:root {
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --brand-color: #1e3a5f;
    --brand-accent: #2563eb;
    --ev-gold: #fcaf3b;
    --ev-gold-deep: #ab641d;
    --ev-gold-bright: #ffc700;
    --ev-ink: #2b2b2b;
    --ev-dark: #14171c;
    --ev-muted: #6b6256;
    --ev-line: #e4d8c4;
    --ev-cream: #f7f1e6;
}

body {
    background: #f4f6f9;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 15% 10%, rgba(252, 175, 59, 0.18), transparent 55%),
        radial-gradient(700px 380px at 90% 85%, rgba(20, 23, 28, 0.06), transparent 50%),
        var(--ev-cream);
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-page .login-card {
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(228, 216, 196, 0.9);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(20, 23, 28, 0.08);
}

.page-login {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Figtree", "Segoe UI", system-ui, sans-serif;
    font-size: 15.5px;
    line-height: 1.5;
    color: var(--ev-ink);
    background:
        radial-gradient(900px 420px at 15% 10%, rgba(252, 175, 59, 0.16), transparent 55%),
        radial-gradient(700px 380px at 90% 85%, rgba(20, 23, 28, 0.05), transparent 50%),
        var(--ev-cream);
}

.page-login *,
.page-login *::before,
.page-login *::after {
    box-sizing: border-box;
}

.login-shell {
    width: min(1040px, calc(100% - 2rem));
    margin: 2rem auto;
}

.login-split {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(420px, 1.45fr);
    background: #fff;
    border: 1px solid rgba(228, 216, 196, 0.9);
    border-radius: 6px;
    box-shadow: 0 18px 40px rgba(20, 23, 28, 0.08);
    overflow: hidden;
    min-height: 300px;
}

.login-split__brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    padding: 2.25rem 1.75rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
    color: #fff;
}

.login-brand__logo {
    display: block;
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-bottom: 1.75rem;
}

.login-brand__name {
    margin: 0;
    font-size: clamp(1.55rem, 2.4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: #fff;
}

.login-brand__tag {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    max-width: 14.5rem;
    line-height: 1.45;
}

.login-split__form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.25rem 2.5rem 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.login-error {
    margin: 0 0 1.15rem;
    padding: 0.7rem 0.85rem;
    border-radius: 4px;
    background: #fdecea;
    color: #8a2b22;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-field {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.65rem 0.85rem;
    align-items: center;
    margin-bottom: 1rem;
}

.login-field label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: right;
    color: var(--ev-muted);
}

.login-field input {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.62rem 0.78rem;
    border: 1px solid #d4c7b0;
    border-radius: 6px;
    background: #f6f2ea;
    color: var(--ev-ink);
    font: inherit;
    box-shadow: inset 0 1px 2px rgba(20, 23, 28, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-field input:focus {
    outline: none;
    border-color: var(--ev-gold);
    box-shadow: 0 0 0 3px rgba(252, 175, 59, 0.22);
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 6.35rem);
    margin: 1rem 0 0 6.35rem;
    padding: 0.62rem 1rem;
    border: 0;
    border-radius: 4px;
    background: var(--ev-gold);
    color: var(--ev-dark);
    font: inherit;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(171, 100, 29, 0.28);
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.login-submit:hover {
    background: var(--ev-gold-deep);
    color: #fff;
}

.login-submit:active {
    transform: translateY(1px);
}

.login-split--password {
    grid-template-columns: minmax(240px, 0.7fr) minmax(420px, 1.5fr);
}

.login-heading {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--ev-ink);
}

.login-lead {
    margin: 0 0 1.25rem;
    color: var(--ev-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.login-field--stack {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    margin-bottom: 1.05rem;
}

.login-field--stack label {
    text-align: left;
}

.login-hint {
    margin: 0;
    font-size: 0.78rem;
    color: var(--ev-muted);
}

.login-submit--full {
    width: 100%;
    margin-left: 0;
}

.login-cancel {
    display: inline-block;
    margin-top: 1rem;
    color: var(--ev-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
}

.login-cancel:hover {
    color: var(--ev-ink);
    text-decoration: underline;
}

.login-notice,
.login-success {
    margin: 0 0 1.15rem;
    padding: 0.7rem 0.85rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-notice {
    background: #fff4df;
    color: #8a5a12;
}

.login-success {
    background: #e8f6ee;
    color: #1e6b3a;
}

.site-map-card {
    overflow: hidden;
}

.site-map {
    position: relative;
    line-height: 0;
    background: #14171c;
}

.site-map img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
}

.site-map svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.site-map__shape {
    fill: rgba(252, 175, 59, 0.32);
    stroke: #fcaf3b;
    stroke-width: 0.45;
    cursor: pointer;
    pointer-events: auto;
}

.site-map__shape.is-active {
    fill: rgba(252, 175, 59, 0.55);
    stroke: #ffc700;
}

.site-map__shape.is-hover {
    fill: rgba(255, 199, 0, 0.38);
    stroke: #ffc700;
    stroke-width: 0.55;
    filter: drop-shadow(0 0 8px rgba(255, 199, 0, 0.85));
}

/* Home page viewer: no visible outline; subtle fill only */
.site-map[data-interactive="1"] .site-map__shape {
    stroke: none;
    fill: rgba(252, 175, 59, 0.12);
}

.site-map[data-interactive="1"] .site-map__shape.is-active {
    fill: rgba(252, 175, 59, 0.35);
    stroke: rgba(252, 175, 59, 0.1);
    stroke-width: 0.45;
}

.site-map[data-interactive="1"] .site-map__shape.is-hover {
    fill: rgba(255, 199, 0, 0.38);
    stroke: #ffc700;
    stroke-width: 0.55;
    filter: drop-shadow(0 0 8px rgba(255, 199, 0, 0.85));
}

.site-map__draft {
    fill: none;
    stroke: #fff;
    stroke-width: 0.45;
    stroke-dasharray: 1.2 0.8;
    pointer-events: none;
}

.site-map__draft-close {
    fill: none;
    stroke: #ffc700;
    stroke-width: 0.55;
    stroke-dasharray: 1.4 0.9;
    pointer-events: none;
    opacity: 0.95;
}

.site-map__vertex {
    fill: #ffc700;
    stroke: #14171c;
    stroke-width: 0.25;
    pointer-events: none;
}

.site-map__vertex--close {
    fill: #fff;
    stroke: #ffc700;
    stroke-width: 0.45;
    pointer-events: auto;
    cursor: pointer;
    animation: site-map-vertex-pulse 1.2s ease-in-out infinite;
}

.site-map--editor.site-map--closed .site-map__shape.is-active {
    animation: site-map-outline-flash 0.7s ease-out;
}

@keyframes site-map-vertex-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.55;
    }
}

@keyframes site-map-outline-flash {
    0% {
        fill: rgba(255, 199, 0, 0.85);
    }
    100% {
        fill: rgba(252, 175, 59, 0.55);
    }
}

.site-map--editor {
    cursor: crosshair;
    border-radius: 0.5rem;
    overflow: hidden;
}

.site-map--editor[data-map-tool="marker"] {
    cursor: copy;
}

.site-map-marker-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.site-map--editor[data-map-tool="marker"] .site-map__shape,
.site-map--editor.site-map--callout-placement .site-map__shape,
.site-map--editor.site-map--dragging-callout .site-map__shape,
.site-map--editor.site-map--dragging-rect .site-map__shape {
    pointer-events: none;
}

.site-map-marker-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.site-map-marker-items {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.site-map-marker {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.site-map-marker__callout-dot {
    position: absolute;
    left: var(--callout-x);
    top: var(--callout-y);
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #ffc700;
    border: 2px solid #14171c;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
    pointer-events: none;
    z-index: 5;
}

.site-map-marker--editable .site-map-marker__callout-dot {
    pointer-events: auto;
    cursor: grab;
}

.site-map-marker--editable .site-map-marker__callout-dot:active {
    cursor: grabbing;
}

.site-map-marker.is-selected .site-map-marker__callout-dot {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffc700;
}

.site-map-marker__rect {
    position: absolute;
    left: var(--rect-x);
    top: var(--rect-y);
    width: 125px;
    height: var(--rect-h, 128px);
    /* Anchor Y to the idle-height centre so taller session windows grow downward. */
    transform: translate(-50%, calc(-0.5 * var(--rect-h-anchor, 128px)));
    background: var(--ev-gold-bright);
    border: 2px solid #14171c;
    border-radius: 0.35rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1;
}

.site-map-marker__titlebar,
.site-map-marker__footer {
    background: rgba(20, 23, 28, 0.94);
    color: #fff;
    padding: 0.35rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    min-height: calc(0.7rem + 1.2 * 0.72rem);
}

.site-map-marker__titlebar {
    border-bottom: 1px solid rgba(255, 199, 0, 0.55);
}

.site-map-marker__footer {
    border-top: 1px solid rgba(255, 199, 0, 0.55);
}

.site-map-marker__footer .site-map-marker__time {
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.site-map-marker__body {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.4rem 0.4rem 0.35rem;
    flex: 1;
    min-height: 0;
}

.site-map-marker--editable .site-map-marker__rect {
    cursor: grab;
}

.site-map-marker.is-selected .site-map-marker__rect,
.site-map-marker.is-active .site-map-marker__rect {
    border-color: #fff;
    box-shadow: 0 0 0 2px #ffc700, 0 8px 22px rgba(0, 0, 0, 0.35);
}

.site-map-marker.is-hover .site-map-marker__rect {
    border-color: #fff;
    box-shadow: 0 0 0 2px #ffc700, 0 0 16px 5px rgba(255, 199, 0, 0.85);
}

/* Persistent status glow (always on — including without hover). */
.site-map-marker--glow-charging .site-map-marker__rect,
.site-map-marker--glow-charging.is-hover .site-map-marker__rect,
.site-map-marker--glow-charging.is-selected .site-map-marker__rect,
.site-map-marker--glow-charging.is-active .site-map-marker__rect {
    border-color: #fff;
    box-shadow: 0 0 0 2px #22c55e, 0 0 18px 6px rgba(34, 197, 94, 0.9);
}

.site-map-marker--glow-occupied .site-map-marker__rect,
.site-map-marker--glow-occupied.is-hover .site-map-marker__rect,
.site-map-marker--glow-occupied.is-selected .site-map-marker__rect,
.site-map-marker--glow-occupied.is-active .site-map-marker__rect,
.site-map-marker--glow-alert .site-map-marker__rect,
.site-map-marker--glow-alert.is-hover .site-map-marker__rect,
.site-map-marker--glow-alert.is-selected .site-map-marker__rect,
.site-map-marker--glow-alert.is-active .site-map-marker__rect {
    border-color: #fff;
    box-shadow: 0 0 0 2px #ef4444, 0 0 18px 6px rgba(239, 68, 68, 0.9);
}

.site-map-marker--glow-charged .site-map-marker__rect,
.site-map-marker--glow-charged.is-hover .site-map-marker__rect,
.site-map-marker--glow-charged.is-selected .site-map-marker__rect,
.site-map-marker--glow-charged.is-active .site-map-marker__rect {
    border-color: #fff;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 18px 6px rgba(59, 130, 246, 0.9);
}

.site-map-marker--no-callout .site-map-marker__callout-dot {
    display: none;
}

.site-map-marker__pill {
    display: block;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.28rem 0.35rem;
    border-radius: 0.25rem;
    color: #14171c;
    border: 1px solid #14171c;
}

.site-map-marker__pill--success {
    background: #1e6b3a;
    color: #fff;
}

.site-map-marker__pill--info {
    background: #3b82f6;
    color: #fff;
}

.site-map-marker__pill--warning {
    background: #ffc700;
    color: #14171c;
}

.site-map-marker__pill--danger {
    background: #c0392b;
    color: #fff;
}

.site-map-marker__pill--muted {
    background: #e5e7eb;
    color: #374151;
}

.site-map-marker__last-seen {
    margin: -0.18rem 0 0;
    text-align: center;
    font-size: 0.52rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: rgba(20, 23, 28, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-map-marker__session-meta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.site-map-marker__cost {
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #14171c;
    line-height: 1.15;
    padding-bottom: 0.05rem;
}

.site-map-marker__time {
    margin-top: 0;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #14171c;
    line-height: 1.15;
    flex-shrink: 0;
}

.site-map-marker--session .site-map-marker__body {
    gap: 0.2rem;
    padding-bottom: 0.4rem;
}

.site-map-marker__line {
    stroke: #ffc700;
    stroke-width: 2;
    pointer-events: none;
}

.site-map[data-interactive="1"] .site-map-marker__line {
    stroke: #ffc700;
    stroke-width: 2.5;
    opacity: 1;
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.75));
}

.site-map-marker-snap {
    min-width: 9rem;
}

.site-map-marker-palette {
    width: 62px;
    height: 75px;
    border: 2px dashed #ffc700;
    border-radius: 0.35rem;
    background: rgba(255, 199, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
}

.site-map-marker-palette__label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #14171c;
    text-align: center;
    line-height: 1.2;
}

.site-photo-crop-container {
    position: relative;
    height: min(480px, calc(100vh - 240px));
    overflow: hidden;
}

.site-photo-crop-hazard {
    background-color: #14171c;
    background-image: repeating-linear-gradient(
        -45deg,
        #ffc700 0,
        #ffc700 14px,
        #14171c 14px,
        #14171c 28px
    );
}

.site-photo-crop-container .cropper-modal {
    opacity: 1;
    background-color: transparent;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255, 199, 0, 0.92) 0,
        rgba(255, 199, 0, 0.92) 14px,
        rgba(20, 23, 28, 0.92) 14px,
        rgba(20, 23, 28, 0.92) 28px
    );
}

.site-photo-crop-container .cropper-view-box {
    outline: 2px solid #fff;
    outline-offset: -1px;
}

.site-photo-crop-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #fff;
    background-color: rgba(20, 23, 28, 0.72);
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(255, 199, 0, 0.35) 0,
        rgba(255, 199, 0, 0.35) 14px,
        rgba(20, 23, 28, 0.35) 14px,
        rgba(20, 23, 28, 0.35) 28px
    );
}

.site-photo-crop-loading[hidden] {
    display: none !important;
}

.site-photo-crop-container.is-loading img,
.site-photo-crop-container.is-loading .cropper-container {
    visibility: hidden;
}

.site-photo-crop-container:not(.is-ready) img {
    display: block;
    visibility: hidden;
    max-height: 0;
    max-width: 100%;
}

.site-photo-crop-container.is-ready .cropper-container {
    max-height: min(480px, calc(100vh - 240px));
}

#sitePhotoCropModal .modal-body {
    overflow: hidden;
}

.site-map__counts {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    max-width: min(70%, 28rem);
    line-height: 1.2;
    pointer-events: none;
}

.site-map__counts .badge {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.charger-panel {
    padding: 1.1rem 1.25rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.charger-panel__split {
    display: flex;
    align-items: flex-start;
    gap: 1.75rem;
    margin-top: 1rem;
}

.charger-panel__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.charger-panel__actions .btn {
    white-space: nowrap;
}

.charger-command-modal {
    --bs-modal-zindex: 2000;
}

.charger-command-modal .modal-dialog {
    width: 80vw;
    max-width: 80vw;
    height: 80vh;
    margin: 10vh auto;
}

.charger-command-modal .modal-content {
    height: 100%;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.charger-command-modal .modal-header {
    padding: 2rem 2.5rem 0.25rem;
    border-bottom: 0;
}

.charger-command-modal .modal-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
}

.charger-command-modal .modal-body {
    display: flex;
    align-items: center;
    padding: 1.5rem 2.5rem;
}

.charger-command-modal .modal-body p {
    margin: 0;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.45;
    white-space: pre-line;
}

.charger-command-modal .modal-footer {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    border-top: 0;
    padding: 1.5rem 2.5rem 2.25rem;
}

.charger-command-modal .modal-footer .btn {
    flex: 1 1 0;
    max-width: calc(50% - 0.75rem);
    min-height: 5.5rem;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    border-radius: 0.75rem;
    border-width: 2px;
}

.charger-command-modal__confirm {
    background: #ffc700;
    border-color: #14171c;
    color: #14171c;
}

.charger-command-modal__confirm:hover,
.charger-command-modal__confirm:focus {
    background: #e6b400;
    border-color: #14171c;
    color: #14171c;
}

.charger-command-modal__cancel {
    margin-left: auto;
    background: #fff;
    border-color: #14171c;
    color: #14171c;
}

.charger-command-modal__cancel:hover,
.charger-command-modal__cancel:focus {
    background: #f3f4f6;
    border-color: #14171c;
    color: #14171c;
}

.charger-panel__session {
    flex: 0 1 auto;
}

[data-panel-session-time] {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 650;
    letter-spacing: 0.04em;
}

.charger-panel__details {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 1.25rem;
    row-gap: 0.45rem;
    align-content: start;
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
}

.charger-panel__details > div {
    display: contents;
}

.charger-panel__details > div[hidden] {
    display: none;
}

.charger-panel__details dt {
    margin: 0;
    color: #6b7280;
    font-weight: 600;
}

.charger-panel__details dd {
    margin: 0;
}

@media (max-width: 720px) {
    .charger-panel__split {
        flex-direction: column;
    }
}

@media (max-width: 820px) {
    .login-split {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-split__brand {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 1.5rem 1.35rem 1.25rem;
        align-items: flex-start;
    }

    .login-split__form {
        padding: 1.35rem;
    }

    .login-field {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        margin-bottom: 1.05rem;
    }

    .login-field label {
        text-align: left;
    }

    .login-submit {
        margin-left: 0;
        width: 100%;
    }
}

.impersonation-banner {
    background: #fff3cd;
    border-bottom: 1px solid #ffe69c;
    padding: 0.65rem 0;
    font-size: 0.9rem;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--brand-color);
    color: #fff;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0.5rem;
    padding: 0.65rem 0.85rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.sidebar-section {
    padding: 1rem 0.85rem 0.35rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
}

.integration-type-card {
    transition: box-shadow 0.15s ease;
}

.integration-type-card:hover {
    box-shadow: 0 4px 12px rgba(16, 24, 40, 0.1);
}

.admin-main {
    flex: 1;
    min-width: 0;
}

.admin-topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-content {
    padding: 1.5rem;
}

.stat-card {
    border: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.card {
    border: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
    border-radius: 0.75rem;
}

button.ecms-collapse-toggle {
    cursor: pointer;
    font: inherit;
    color: inherit;
    background-color: var(--bs-card-cap-bg, #f8f9fa);
    border: 0;
    border-bottom: var(--bs-card-border-width, 1px) solid var(--bs-card-border-color, #dee2e6);
}

.card > button.ecms-collapse-toggle[aria-expanded="false"] {
    border-bottom: 0;
    border-radius: inherit;
}

button.ecms-collapse-toggle:hover {
    background-color: #eef1f4;
}

button.ecms-collapse-toggle:focus-visible {
    outline: 2px solid var(--brand-accent, #2563eb);
    outline-offset: -2px;
}

button.ecms-collapse-toggle .bi-chevron-right {
    display: inline-block;
    transition: transform 0.15s ease;
    font-size: 0.8rem;
}

button.ecms-collapse-toggle[aria-expanded="true"] .bi-chevron-right {
    transform: rotate(90deg);
}

.site-map[data-interactive="0"] .site-map-marker__rect,
.site-map[data-interactive="0"] .site-map__shape {
    cursor: default;
}

.magic-view {
    background: #f3f4f6;
    min-height: 100vh;
}

.magic-view__main {
    padding: 1rem 1.25rem 2rem;
}

@media (max-width: 991.98px) {
    .admin-shell {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}
