@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* Brand-colour defaults so this stylesheet is self-sufficient on the server-rendered
   pages (_Host / legacy Blazor Server) that load site.css but not the client theme.css.
   On the WASM client, theme.css and the runtime esanApplyBrand() override these. */
:root {
  --brand-primary:#6366F1;
  --brand-primary-strong:#4F46E5;
  --brand-primary-deep:#4338CA;
  --brand-primary-rgb:99,102,241;
  --brand-button:#6366F1;
  --brand-button-strong:#4F46E5;
  --brand-button-rgb:99,102,241;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--brand-primary-strong);
}

.btn-primary {
    color: #fff;
    background-color: var(--brand-primary);
    border-color: var(--brand-primary-strong);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-primary);
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.pump-on {
    filter: hue-rotate(80deg) saturate(5) brightness(1.2);
    transition: 0.4s ease-in-out;
}

.pump-off {
    filter: hue-rotate(-50deg) saturate(4) brightness(0.9);
    transition: 0.4s ease-in-out;
}


/* Modern toggle switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

    .switch input {
        display: none;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
    }

input:checked + .slider {
    background-color: var(--brand-primary);
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }

.pump-card {
    max-width: 500px;
    margin: 40px auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.pump-image {
    display: block;
    margin: 0 auto;
    transition: opacity 0.3s ease-in-out;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
    }

input:checked + .slider {
    background-color: #28a745;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }

/* ---- Pump Image Styling ---- */
.pump-image {
    display: block;
    margin: 0 auto;
    transition: opacity 0.3s ease-in-out;
    max-width: 100%;
    height: auto;
}

/* ---- Card Styling ---- */
.pump-card {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

/* ---- Modern Switch Toggle ---- */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-top: 10px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4CAF50;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.pump-card {
    max-width: 550px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.pump-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.pump-image {
    width: 150px;
    height: auto;
    transition: opacity 0.3s ease-in-out;
}

.pump-control {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.status-label {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.pump-status {
    font-size: 1.1rem;
    font-weight: 500;
    color: #555;
}

/* Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4CAF50;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }
.debug-status {
    font-size: 0.9rem;
    color: #7A7A8C;
    margin-top: 10px;
}
.control-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.valve-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.valve-image {
    width: 140px;
    height: auto;
    transition: opacity 0.3s ease-in-out;
}

.valve-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.manual-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}
.fixed-frame {
    min-height: 350px;
    max-width: 550px;
    margin: 50px auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.valve-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    min-height: 180px;
}

.valve-image {
    width: 130px;
    height: auto;
}

.valve-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.manual-toggle {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.toggle-btn {
    padding: 6px 16px;
    font-weight: bold;
    background-color: #ddd;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

    .toggle-btn.active {
        background-color: #28a745;
        color: white;
    }

.control-label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 1rem;
}

.valve-card {
    max-width: 400px;
    margin: auto;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 0 10px #ccc;
}

.valve-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.valve-image {
    width: 150px;
    height: auto;
}

.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.switch-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.mode-status {
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: bold;
}

.manual-buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: space-around;
}

.status-message {
    margin-top: 1rem;
    font-weight: bold;
}
.valve-card {
    max-width: 600px;
    margin: auto;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border-radius: 1rem;
}

.valve-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.valve-image {
    width: 150px;
    height: auto;
}

.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.switch-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4caf50;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.manual-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 1.2rem;
}

.status-message {
    margin-top: 1.2rem;
    font-weight: 500;
}
.valve-card {
    max-width: 600px;
    margin: auto;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border-radius: 1rem;
}

.valve-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.valve-image {
    width: 150px;
    height: auto;
}

.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.switch-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4caf50;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.manual-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 1.2rem;
}

.status-message {
    margin-top: 1.2rem;
    font-weight: 500;
}
.valve-card {
    max-width: 600px;
    margin: auto;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border-radius: 1rem;
}

.valve-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.valve-image {
    width: 150px;
    height: auto;
}

.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.switch-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4caf50;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.manual-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 1.2rem;
}

.status-message {
    margin-top: 1.2rem;
    font-weight: 500;
}
.valve-card {
    max-width: 600px;
    margin: auto;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border-radius: 1rem;
}

.valve-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.valve-image {
    width: 150px;
    height: auto;
}

.mode-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.switch-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 2px;
        bottom: 2px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4caf50;
}

    input:checked + .slider:before {
        transform: translateX(26px);
    }

.manual-buttons {
    display: flex;
    justify-content: space-around;
    margin-top: 1.2rem;
}

.status-message {
    margin-top: 1.2rem;
    font-weight: 500;
}
.pump-card {
    width: 300px;
    background-color: #F8F8FE;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #dee2e6;
}

.esr-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.esr-value {
    font-size: 36px;
    color: var(--brand-primary);
    font-weight: bold;
}
.scroll-container {
    overflow-y: auto;
    max-height: calc(100vh - 100px); /* Leave space for logo header */
}

/* ============================================================
   RPMPL IOT theme — scoped to the app shell (.main-content)
   so it restyles Dashboard / Configuration / Settings / legacy
   pages without changing their markup. Login & change-password
   are standalone pages and are unaffected.
   ============================================================ */
.main-content { color: #1A1A24; }
.main-content h1, .main-content h2, .main-content h3, .main-content h4 {
    color: #1A1A24; font-weight: 800; letter-spacing: -0.02em;
}
.main-content h5, .main-content h6 { color: #1A1A24; font-weight: 700; }

.main-content .card {
    border: 1px solid #E3E3EC;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(10,37,64,0.05);
}
.main-content .card-header {
    background: #fff; border-bottom: 1px solid #EEF3F8; font-weight: 700;
    border-top-left-radius: 16px; border-top-right-radius: 16px;
}

.main-content .btn { border-radius: 10px; font-weight: 600; }
.main-content .btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong)); border: none; color: #fff;
    box-shadow: 0 8px 18px rgba(var(--brand-primary-rgb),0.25);
}
.main-content .btn-primary:hover { filter: brightness(1.04); color: #fff; }
.main-content .btn-success {
    background: linear-gradient(135deg, #10B981, #059669); border: none; color: #fff;
}
.main-content .btn-success:hover { filter: brightness(1.04); color: #fff; }
.main-content .btn-danger {
    background: linear-gradient(135deg, #F43F5E, #E11D48); border: none; color: #fff;
}
.main-content .btn-outline-primary { color: var(--brand-primary-strong); border-color: #C7D2FE; }
.main-content .btn-outline-primary:hover { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.main-content .btn-outline-secondary { border-color: #E3E3EC; color: #7A7A8C; }
.main-content .btn-outline-secondary:hover { background: #EEF3F8; color: #55555F; }
.main-content .btn-outline-danger { color: #E11D48; border-color: #FECDD3; }
.main-content .btn-outline-danger:hover { background: #F43F5E; border-color: #F43F5E; color: #fff; }

.main-content .form-control, .main-content .form-select {
    border: 1.5px solid #E3E3EC; border-radius: 10px; color: #1A1A24;
}
.main-content .form-control:focus, .main-content .form-select:focus {
    border-color: var(--brand-primary); box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb),0.13);
}
.main-content .form-control-color { padding: 3px; min-height: 38px; }
.main-content .input-group-text {
    background: #F3F7FB; border: 1.5px solid #E3E3EC; color: #7A7A8C;
}

.main-content .nav-tabs { border-bottom: 1px solid #E3E3EC; }
.main-content .nav-tabs .nav-link {
    color: #7A7A8C; font-weight: 600; border: none; border-radius: 0;
    padding: 10px 16px;
}
.main-content .nav-tabs .nav-link:hover { color: #1A1A24; border: none; }
.main-content .nav-tabs .nav-link.active {
    color: #1A1A24; background: transparent; border: none;
    border-bottom: 2.5px solid var(--brand-primary);
}

.main-content .table { color: #1A1A24; }
.main-content .table thead th {
    text-transform: uppercase; font-size: 11px; letter-spacing: .06em;
    color: #7A7A8C; font-weight: 700; border-bottom: 1px solid #E3E3EC;
}

/* page headings get a little breathing room */
.main-content > h1:first-child, .main-content > h2:first-child, .main-content > h3:first-child {
    margin-bottom: 1.1rem;
}

/* ===== Master Console / Users shared styles (mc-*) — global so all admin pages share them ===== */
    .mc { max-width: 960px; margin: 0 auto; }
    .mc-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
    .mc-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-primary); margin-bottom: 8px; }
    .mc-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; color: #1A1A24; margin: 0; }
    .mc-sub { color: #7A7A8C; margin: 6px 0 0; font-size: 15px; }
    .mc-stat { text-align: center; background: linear-gradient(135deg,#1A1A24,#1E1B4B); color:#fff; border-radius: 16px; padding: 14px 22px; min-width: 92px; box-shadow: 0 12px 28px rgba(10,37,64,.22); }
    .mc-stat-num { font-size: 28px; font-weight: 800; line-height: 1; }
    .mc-stat-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color:#A5B4FC; margin-top: 5px; }

    .mc-card { background:#fff; border:1px solid #E3E3EC; border-radius: 18px; box-shadow: 0 10px 30px rgba(10,37,64,.06); padding: 26px 26px 24px; margin-bottom: 26px; }
    .mc-card-title { font-size: 17px; font-weight: 800; color:#1A1A24; margin-bottom: 18px; }

    .mc-section { padding-top: 16px; margin-top: 16px; border-top: 1px solid #EEF3F8; }
    .mc-section:first-of-type { padding-top: 0; margin-top: 0; border-top: none; }
    .mc-section-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color:#55555F; margin-bottom: 12px; }
    .mc-section-label span { font-weight: 600; letter-spacing: 0; text-transform: none; color:#8A8AA0; margin-left: 8px; font-size: 12px; }

    .mc-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
    .mc-field { display: flex; flex-direction: column; }
    .mc-field > label { font-size: 12.5px; font-weight: 600; color:#7A7A8C; margin-bottom: 6px; }
    .mc-input { height: 44px; width: 100%; border: 1.5px solid #E3E3EC; border-radius: 10px; padding: 0 13px; font: inherit; font-size: 14px; color:#1A1A24; background:#fff; transition: border-color .15s, box-shadow .15s; }
    .mc-input:focus { outline: none; border-color:var(--brand-primary); box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb),.13); }
    .mc-pass { position: relative; }
    .mc-pass .mc-input { padding-right: 58px; }
    .mc-pass button { position: absolute; right: 6px; top: 6px; height: 32px; border: none; background:#EEF3F8; color:#55555F; border-radius: 8px; padding: 0 11px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
    .mc-pass button:hover { background:#E1E9F1; }

    .mc-btn { margin-top: 22px; height: 48px; padding: 0 26px; border: none; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 700; color:#fff; background: linear-gradient(135deg,var(--brand-primary),var(--brand-primary-strong)); cursor: pointer; box-shadow: 0 10px 24px rgba(var(--brand-primary-rgb),.3); transition: transform .12s; }
    .mc-btn:hover { transform: translateY(-1px); }

    .mc-banner { border-radius: 12px; padding: 13px 16px; font-size: 14px; margin-bottom: 18px; line-height: 1.5; }
    .mc-banner.ok { background:#ECFDF5; color:#065F46; border:1px solid #A7F3D0; }
    .mc-banner.info { background:#EEF0FF; color:var(--brand-primary-strong); border:1px solid #C7D2FE; }
    .mc-banner.err { background:#FFF1F2; color:#9F1239; border:1px solid #FECDD3; }
    .mc-pwd { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 16px; font-weight: 700; background:#fff; padding: 2px 8px; border-radius: 6px; border:1px solid #A7F3D0; }

    .mc-list-head { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color:#7A7A8C; margin: 4px 0 14px; }
    .mc-empty { background:#fff; border:1px dashed #CFDBE8; border-radius: 14px; padding: 30px; text-align: center; color:#8A8AA0; }
    .mc-row { background:#fff; border:1px solid #E3E3EC; border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 16px; margin-bottom: 10px; transition: box-shadow .15s, transform .15s; }
    .mc-row:hover { box-shadow: 0 8px 22px rgba(10,37,64,.08); transform: translateY(-1px); }
    .mc-avatar { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg,var(--brand-primary),var(--brand-primary-strong)); color:#fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: none; }
    .mc-row-main { flex: 1; min-width: 0; }
    .mc-row-name { font-weight: 700; color:#1A1A24; font-size: 15px; }
    .mc-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 5px; }
    .mc-tag { font-size: 12px; color:#7A7A8C; background:#F3F7FB; border:1px solid #E3E3EC; border-radius: 7px; padding: 3px 9px; }
    .mc-tag b { color:#55555F; }
    .mc-actions { display: flex; gap: 8px; flex: none; }
    .mc-act { border: 1.5px solid #E3E3EC; background:#fff; border-radius: 9px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color:#55555F; transition: all .15s; }
    .mc-act:hover { border-color:var(--brand-primary); color:var(--brand-primary-strong); }
    .mc-act.danger:hover { border-color:#FB7185; color:#BE123C; background:#FFF1F2; }

    @media (max-width: 760px) {
        .mc-grid { grid-template-columns: repeat(6, 1fr); }
        .mc-head { flex-direction: column; align-items: flex-start; }
        .mc-row { flex-wrap: wrap; }
        .mc-actions { width: 100%; }
    }
    /* additions for the Users page */
    .mc-hint { font-size: 12.5px; color:#8A8AA0; margin-top: 12px; }
    a.mc-act { text-decoration: none; display: inline-flex; align-items: center; }
    .mc-banner code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 6px; }

/* ============================================================
   DARK THEME  —  active when <html data-theme="dark">
   Overrides the light defaults above. The sidebar is already
   dark in both themes, so it is left untouched.
   ============================================================ */
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main-content { background:#121218; color:#F0F0F5; }

html[data-theme="dark"] .main-content h1,
html[data-theme="dark"] .main-content h2,
html[data-theme="dark"] .main-content h3,
html[data-theme="dark"] .main-content h4,
html[data-theme="dark"] .main-content h5,
html[data-theme="dark"] .main-content h6 { color:#F0F0F5; }

/* Cards */
html[data-theme="dark"] .card,
html[data-theme="dark"] .main-content .card {
    background:#1F1F2C; border-color:#2F2F3C; color:#F0F0F5;
    box-shadow:0 8px 24px rgba(0,0,0,.35);
}
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .main-content .card-header {
    background:#26262E; border-bottom-color:#2F2F3C; color:#F0F0F5;
}

/* Generic bg / text helpers (note: .text-dark left alone so dark-on-yellow badges stay readable) */
html[data-theme="dark"] .text-muted { color:#8A8AA0 !important; }
html[data-theme="dark"] .bg-white { background:#1F1F2C !important; }
html[data-theme="dark"] .bg-light { background:#26262E !important; }
html[data-theme="dark"] .badge.bg-light { background:#2F2F3C !important; color:#CBD6E2 !important; }
html[data-theme="dark"] hr { border-color:#2F2F3C; }
html[data-theme="dark"] code { color:#A5B4FC; background:rgba(255,255,255,.06); }
html[data-theme="dark"] .border,
html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-start,
html[data-theme="dark"] .border-end { border-color:#2F2F3C !important; }

/* Forms */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .main-content .form-control,
html[data-theme="dark"] .main-content .form-select {
    background:#1A1A26; border-color:#2A2A38; color:#F0F0F5;
}
html[data-theme="dark"] .form-control::placeholder { color:#7A7A8C; }
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] .main-content .form-control:focus,
html[data-theme="dark"] .main-content .form-select:focus {
    background:#1A1A26; color:#F0F0F5; border-color:var(--brand-primary);
    box-shadow:0 0 0 4px rgba(var(--brand-primary-rgb),.18);
}
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .main-content .input-group-text {
    background:#26262E; border-color:#2A2A38; color:#8A8AA0;
}
html[data-theme="dark"] .form-check-input { background-color:#1A1A26; border-color:#2A2A38; }
html[data-theme="dark"] .form-check-input:checked { background-color:var(--brand-primary); border-color:var(--brand-primary); }

/* Tables */
html[data-theme="dark"] .table { color:#F0F0F5; }
html[data-theme="dark"] .table > :not(caption) > * > * { background-color:transparent; color:#F0F0F5; border-bottom-color:#2F2F3C; }
html[data-theme="dark"] .table thead th,
html[data-theme="dark"] .main-content .table thead th { color:#8A8AA0; border-bottom-color:#2A2A38; }
html[data-theme="dark"] .table-light,
html[data-theme="dark"] .table-light > th,
html[data-theme="dark"] .table-light > td,
html[data-theme="dark"] .table-light th { background:#26262E !important; color:#C7D2DE !important; }
html[data-theme="dark"] .table-hover > tbody > tr:hover > * { background:#24242E !important; color:#F0F0F5; }
/* keep semantic alarm-row tints visible on dark */
html[data-theme="dark"] .table-danger, html[data-theme="dark"] .table-danger > * { background:#3A1D24 !important; color:#FECDD3 !important; }
html[data-theme="dark"] .table-warning, html[data-theme="dark"] .table-warning > * { background:#3A311B !important; color:#FDE68A !important; }

/* Tabs */
html[data-theme="dark"] .main-content .nav-tabs { border-bottom-color:#2A2A38; }
html[data-theme="dark"] .main-content .nav-tabs .nav-link { color:#8A8AA0; }
html[data-theme="dark"] .main-content .nav-tabs .nav-link:hover { color:#F0F0F5; }
html[data-theme="dark"] .main-content .nav-tabs .nav-link.active { color:#F0F0F5; }

/* Alerts */
html[data-theme="dark"] .alert-secondary { background:#26262E; border-color:#2A2A38; color:#C7D2DE; }
html[data-theme="dark"] .alert-warning { background:#3A311B; border-color:#5B4A1F; color:#FDE68A; }
html[data-theme="dark"] .alert-success { background:#13322A; border-color:#1F5B4A; color:#A7F3D0; }
html[data-theme="dark"] .alert-danger { background:#3A1D24; border-color:#5B1F2C; color:#FECDD3; }
html[data-theme="dark"] .alert-info { background:#26262E; border-color:#2C2C3A; color:#C7D2FE; }

/* PageHeader */
html[data-theme="dark"] .page-title { color:#F0F0F5; }
html[data-theme="dark"] .page-subtitle { color:#8A8AA0; }

/* Master Console / Users (mc-*) */
html[data-theme="dark"] .mc-title,
html[data-theme="dark"] .mc-row-name,
html[data-theme="dark"] .mc-card-title { color:#F0F0F5; }
html[data-theme="dark"] .mc-sub,
html[data-theme="dark"] .mc-field > label,
html[data-theme="dark"] .mc-list-head { color:#8A8AA0; }
html[data-theme="dark"] .mc-card,
html[data-theme="dark"] .mc-row { background:#1F1F2C; border-color:#2F2F3C; }
html[data-theme="dark"] .mc-empty { background:#1F1F2C; border-color:#2A2A38; color:#8A8AA0; }
html[data-theme="dark"] .mc-input { background:#1A1A26; border-color:#2A2A38; color:#F0F0F5; }
html[data-theme="dark"] .mc-tag { background:#26262E; border-color:#2A2A38; color:#8A8AA0; }
html[data-theme="dark"] .mc-tag b { color:#CBD6E2; }
html[data-theme="dark"] .mc-act { background:#1F1F2C; border-color:#2A2A38; color:#C7D2DE; }
html[data-theme="dark"] .mc-section { border-top-color:#2F2F3C; }
html[data-theme="dark"] .mc-section-label { color:#CBD6E2; }
html[data-theme="dark"] .mc-section-label span { color:#8A8AA0; }
html[data-theme="dark"] .mc-pass button { background:#2F2F3C; color:#C7D2DE; }
html[data-theme="dark"] .mc-pass button:hover { background:#2A2A38; }
html[data-theme="dark"] .mc-hint { color:#8A8AA0; }
html[data-theme="dark"] .mc-banner code { background:rgba(255,255,255,.08); }

/* Misc Bootstrap surfaces */
html[data-theme="dark"] .list-group-item { background:#1F1F2C; border-color:#2F2F3C; color:#F0F0F5; }
html[data-theme="dark"] .dropdown-menu { background:#1F1F2C; border-color:#2F2F3C; }
html[data-theme="dark"] .dropdown-item { color:#F0F0F5; }
html[data-theme="dark"] .dropdown-item:hover { background:#24242E; color:#fff; }
html[data-theme="dark"] .modal-content { background:#1F1F2C; color:#F0F0F5; }
html[data-theme="dark"] .btn-outline-secondary { color:#C7D2DE; }

/* Sidebar theme toggle button */
.theme-toggle {
    display:flex; align-items:center; gap:8px; width:100%; background:transparent;
    border:none; color:#fff; padding:.5rem 1rem; border-radius:8px;
    font: inherit; font-size:.95rem; cursor:pointer; text-align:left;
    transition: background .15s;
}
.theme-toggle .tt-icon { font-size:1.05rem; line-height:1; }
.theme-toggle:hover { background:rgba(255,255,255,0.06); }

/* ---- Dark theme: supplementary polish ---- */
html[data-theme="dark"] .form-text { color:#8A8AA0; }
html[data-theme="dark"] .text-dark { color:#F0F0F5 !important; }
html[data-theme="dark"] a, html[data-theme="dark"] .btn-link { color:#A5B4FC; }
html[data-theme="dark"] .shadow-sm { box-shadow:0 4px 14px rgba(0,0,0,.35) !important; }
html[data-theme="dark"] .vr { background-color:#2A2A38; opacity:1; }
/* The dashboard's white sticky header bar */
html[data-theme="dark"] .sticky-top.bg-white { background:#1F1F2C !important; color:#F0F0F5; box-shadow:0 4px 14px rgba(0,0,0,.4) !important; }

/* ---- Dark theme: guaranteed surface overrides (win over inline/scoped styles) ---- */
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main-content { background:#121218 !important; color:#F0F0F5 !important; }
html[data-theme="dark"] .card,
html[data-theme="dark"] .main-content .card { background:#1F1F2C !important; border-color:#2F2F3C !important; color:#F0F0F5 !important; }
html[data-theme="dark"] .table-light,
html[data-theme="dark"] .table-light > * { background:#26262E !important; color:#C7D2DE !important; }

/* ============================================================
   DARK THEME — page-specific custom cards (um-/sp-/tr-)
   ============================================================ */
/* Users management (Master/Users.razor) */
html[data-theme="dark"] .um-card { background:#1F1F2C; border-color:#2F2F3C; }
html[data-theme="dark"] .um-card-title { color:#F0F0F5; }
html[data-theme="dark"] .um-card-intro { color:#8A8AA0; }
html[data-theme="dark"] .um-input { background:#1A1A26; border-color:#2A2A38; color:#F0F0F5; }
html[data-theme="dark"] .um-input:focus { border-color:var(--brand-primary); }
html[data-theme="dark"] .um-row { background:#1F1F2C; border-color:#2F2F3C; }
html[data-theme="dark"] .um-row:hover { box-shadow:0 8px 22px rgba(0,0,0,.4); }
html[data-theme="dark"] .um-empty { background:#1F1F2C; border-color:#2A2A38; color:#8A8AA0; }
html[data-theme="dark"] .um-pwd { background:#13322A; border-color:#1F5B4A; color:#A7F3D0; }
html[data-theme="dark"] .um-banner.ok { background:#13322A; border-color:#1F5B4A; color:#A7F3D0; }
html[data-theme="dark"] .um-banner.info { background:#26262E; border-color:#2C2C3A; color:#C7D2FE; }
html[data-theme="dark"] .um-banner.err { background:#3A1D24; border-color:#5B1F2C; color:#FECDD3; }
html[data-theme="dark"] .um-badge.viewer,
html[data-theme="dark"] .um-badge.user { background:#2F2F3C; color:#CBD6E2; }

/* Setpoints (Setpoints.razor) */
html[data-theme="dark"] .sp-card { background:#1F1F2C; border-color:#2F2F3C; color:#F0F0F5; }
html[data-theme="dark"] .sp-input { background:#1A1A26; border-color:#2A2A38; color:#F0F0F5; }
html[data-theme="dark"] .sp-input:disabled { background:#26262E; color:#7A7A8C; }
html[data-theme="dark"] .sp-unit { background:#26262E; border-color:#2A2A38; color:#8A8AA0; }

/* Trends (Trends.razor) */
html[data-theme="dark"] .tr-chart { background:#1F1F2C; border-color:#2F2F3C; }
html[data-theme="dark"] .tr-chip { background:#26262E; border-color:#2A2A38; color:#C7D2DE; }
html[data-theme="dark"] .tr-param { background:#26262E; border-color:#2A2A38; color:#C7D2DE; }
html[data-theme="dark"] .tr-param.on { background:#26262E; border-color:var(--brand-primary); color:#A5B4FC; }
/* Syncfusion chart SVG: lighten axis labels + gridlines, transparent plot */
html[data-theme="dark"] .tr-chart text { fill:#8A8AA0 !important; }
html[data-theme="dark"] .tr-chart [id*="MajorGridLine"] { stroke:#2F2F3C !important; }
html[data-theme="dark"] .tr-chart [id*="AxisLine"] { stroke:#2A2A38 !important; }

/* Dashboard tenant title under the logo */
.dash-name { color:#1A1A24; }
html[data-theme="dark"] .dash-name { color:#F0F0F5; }
