:root {
    color-scheme: dark;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #070a12;
    --bs-body-color: #eef5ff;
    --bs-tertiary-bg: #0d1423;
    --bs-secondary-bg: #121c2f;
    --bs-border-color: rgba(184, 205, 236, 0.14);
    --bs-primary: #49c7f5;
    --bs-info: #5ee7f2;
    --bs-warning: #f6bd5f;
    --bs-success: #67d391;
    --bs-danger: #ff7a70;
}

body.bg-body-tertiary,
body.admin-session-page {
    background:
        radial-gradient(circle at 12% 10%, rgba(73, 199, 245, 0.15), transparent 30rem),
        radial-gradient(circle at 88% 0%, rgba(246, 189, 95, 0.12), transparent 28rem),
        linear-gradient(145deg, #070a12 0%, #0b1324 48%, #08121f 100%);
    background-attachment: fixed;
}

body.admin-session-page {
    font-family: "Manrope", "Segoe UI", sans-serif;
}

body.patient-form-page,
.admin-home-page {
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.admin-navbar {
    padding-top: 1rem;
}

.admin-navbar-shell {
    border: 1px solid rgba(184, 205, 236, 0.16);
    background:
        linear-gradient(145deg, rgba(15, 22, 38, 0.92), rgba(8, 13, 25, 0.94)),
        radial-gradient(circle at 0% 0%, rgba(94, 231, 242, 0.14), transparent 16rem);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
}

.admin-brand {
    text-decoration: none;
}

.admin-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 1rem;
    color: #04131a;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    box-shadow: 0 12px 30px rgba(73, 199, 245, 0.26);
    font-size: 1rem;
    overflow: hidden;
}

.admin-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}

.admin-brand-eyebrow,
.admin-brand-title {
    display: block;
    line-height: 1.1;
}

.admin-brand-eyebrow {
    color: #9ce9f3;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-brand-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
}

.admin-nav-links {
    gap: 0.35rem;
}

.admin-nav-links .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.7rem;
    padding: 0.65rem 1rem;
    color: #b7c7de;
    font-weight: 700;
    transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.admin-nav-links .nav-link:hover,
.admin-nav-links .nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(73, 199, 245, 0.22), rgba(94, 231, 242, 0.08));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-nav-links .nav-link:hover {
    transform: translateY(-1px);
}

.admin-user-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(184, 205, 236, 0.14);
    color: #eef5ff;
}

.admin-nav-toggle .navbar-toggler-icon {
    filter: invert(1) grayscale(1);
}

.tracking-wide {
    letter-spacing: 0.06em;
}

.fw-black {
    font-weight: 850;
}

.min-w-0 {
    min-width: 0;
}

/* Session page premium skin. Bootstrap still owns layout/components. */
.admin-session-page {
    min-height: 100vh;
    color: #eef5ff;
}

.admin-session-page .premium-header,
.admin-session-page .premium-card,
.admin-home-page .premium-header,
.admin-home-page .premium-card,
.patient-form-page .premium-card {
    border: 1px solid rgba(184, 205, 236, 0.16);
    background:
        linear-gradient(150deg, rgba(21, 32, 55, 0.9), rgba(9, 15, 29, 0.94)),
        radial-gradient(circle at 0% 0%, rgba(94, 231, 242, 0.12), transparent 18rem);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
}

.admin-session-page .premium-header {
    position: relative;
    overflow: visible;
    z-index: 50;
}

.admin-home-page .premium-header,
.patient-form-page .premium-card {
    position: relative;
    overflow: visible;
    z-index: 50;
}

.admin-session-page .premium-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1rem;
    background: linear-gradient(90deg, #5ee7f2, #f6bd5f, #ff7a70);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    mask: linear-gradient(to bottom, black 3px, transparent 3px);
    -webkit-mask: linear-gradient(to bottom, black 3px, transparent 3px);
}

.admin-home-page .premium-header::before,
.patient-form-page .premium-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1rem;
    background: linear-gradient(90deg, #5ee7f2, #f6bd5f, #ff7a70);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    mask: linear-gradient(to bottom, black 3px, transparent 3px);
    -webkit-mask: linear-gradient(to bottom, black 3px, transparent 3px);
}

.admin-session-page .premium-header h1 {
    max-width: min(64vw, 48rem);
    color: #ffffff;
    text-shadow: 0 0 26px rgba(73, 199, 245, 0.2);
}

.admin-session-page .premium-back {
    border-color: rgba(184, 205, 236, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.admin-session-page .premium-back:hover {
    border-color: rgba(94, 231, 242, 0.38);
    background: rgba(94, 231, 242, 0.12);
}

.admin-session-page .premium-card {
    overflow: visible;
    border-radius: 1rem;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.admin-session-page .premium-card:hover {
    border-color: rgba(184, 205, 236, 0.25);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-home-page .premium-card,
.patient-form-page .premium-card {
    overflow: visible;
    border-radius: 1rem;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.admin-action-detail-card {
    position: relative;
    overflow: visible;
    width: min(100%, 1100px);
    min-height: 32rem;
    margin: 0 auto;
}

.admin-action-detail-card::before,
.admin-action-modal::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1rem;
    background: linear-gradient(90deg, #5ee7f2, #f6bd5f, #ff7a70);
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    mask: linear-gradient(to bottom, black 3px, transparent 3px);
    -webkit-mask: linear-gradient(to bottom, black 3px, transparent 3px);
}

.admin-action-panel-header {
    padding-bottom: 1.35rem;
    border-bottom: 1px solid rgba(184, 205, 236, 0.12);
}

.admin-action-modal-dialog {
    width: min(100% - 2rem, 640px);
    max-width: 640px;
}

.admin-action-modal {
    position: relative;
    overflow: visible;
    border-radius: 1rem;
    background:
        linear-gradient(150deg, rgba(21, 32, 55, 0.96), rgba(9, 15, 29, 0.98)),
        radial-gradient(circle at 0% 0%, rgba(94, 231, 242, 0.12), transparent 16rem) !important;
    border: 1px solid rgba(184, 205, 236, 0.16) !important;
}

.action-mapping-modal-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(14px);
    z-index: 1050;
    padding: 1.25rem;
    overflow: hidden;
}

.action-mapping-modal-dialog {
    width: min(1180px, 100%);
    max-width: 1180px;
    height: min(820px, calc(100vh - 2.5rem));
    min-height: 0;
    display: flex;
    pointer-events: auto;
}

.action-mapping-modal {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
}

.action-mapping-modal::before {
    z-index: 2;
}

.action-mapping-modal-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: start;
    padding: 2rem 2rem 1.25rem;
    border-bottom: 1px solid rgba(184, 205, 236, 0.11);
    background: linear-gradient(180deg, rgba(13, 22, 39, 0.98), rgba(13, 22, 39, 0.84));
}

.action-mapping-title-block {
    min-width: 0;
}

.action-mapping-title-block h4 {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.18;
}

.action-mapping-close {
    margin-top: 0.15rem;
}

.action-mapping-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1.5rem 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-mapping-context {
    display: grid;
    grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 2.4fr) minmax(9rem, 0.9fr);
    gap: 0.75rem;
}

.action-mapping-context-item {
    min-width: 0;
    padding: 0.9rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.action-mapping-context-item span,
.action-permission-panel-head span {
    display: block;
    color: #91a7c5;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.action-mapping-context-item strong {
    display: block;
    margin-top: 0.35rem;
    color: #eef5ff;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.action-mapping-context-item.path strong {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    color: #bdebf2;
}

.action-mapping-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.032);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.action-mapping-legend .legend-title {
    color: #91a7c5;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #dce7f8;
    font-size: 0.82rem;
    white-space: nowrap;
}

.legend-dot {
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
}

.legend-dot.critical {
    background: #ff8f86;
}

.legend-dot.elevated {
    background: #f7bd5d;
}

.legend-dot.operational {
    background: #67dce9;
}

.action-mapping-picker-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
    min-height: 0;
    flex: 1;
}

.action-permission-panel {
    min-width: 0;
    min-height: 22rem;
    display: flex;
    flex-direction: column;
    border-radius: 1rem;
    background: rgba(5, 12, 22, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.09);
    overflow: hidden;
}

.action-permission-panel.selected {
    border-color: rgba(34, 211, 238, 0.22);
    box-shadow: inset 0 1px 0 rgba(34, 211, 238, 0.08);
}

.action-permission-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid rgba(184, 205, 236, 0.09);
    background: rgba(255, 255, 255, 0.025);
}

.action-permission-panel-head strong {
    display: block;
    margin-top: 0.25rem;
    color: #eef5ff;
    font-size: 1rem;
    line-height: 1.2;
}

.action-permission-panel-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.75rem;
}

.action-permission-pill {
    min-height: 2.35rem;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.55rem 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1;
    transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.action-permission-pill:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.action-permission-pill-code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-permission-pill-icon {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.13);
}

.action-permission-pill-icon i {
    font-size: 0.68rem;
}

.action-permission-empty {
    width: 100%;
    min-height: 11rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.5rem;
    border-radius: 0.9rem;
    color: #dce7f8;
    text-align: center;
    background: rgba(255, 255, 255, 0.028);
    border: 1px dashed rgba(184, 205, 236, 0.18);
}

.action-permission-empty i {
    color: #5ee7f2;
    font-size: 1.5rem;
}

.action-permission-empty small {
    color: #91a7c5;
}

.action-mapping-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem 1.5rem;
    border-top: 1px solid rgba(184, 205, 236, 0.11);
    background: rgba(9, 15, 29, 0.96);
}

.action-mapping-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

@media (max-width: 991.98px) {
    .action-mapping-modal-backdrop {
        padding: 0.75rem;
        align-items: stretch;
    }

    .action-mapping-modal-dialog {
        width: 100%;
        height: calc(100vh - 1.5rem);
    }

    .action-mapping-modal {
        height: 100%;
    }

    .action-mapping-modal-header {
        padding: 1.5rem 1.25rem 1rem;
    }

    .action-mapping-modal-body {
        padding: 1rem 1.25rem;
    }

    .action-mapping-context,
    .action-mapping-picker-grid {
        grid-template-columns: 1fr;
    }

    .action-mapping-picker-grid {
        min-height: 0;
    }

    .action-permission-panel {
        min-height: 15rem;
    }

    .action-permission-panel-body {
        max-height: none;
    }

    .action-mapping-modal-footer {
        align-items: stretch;
        padding: 1rem 1.25rem 1.25rem;
    }

    .action-mapping-modal-footer,
    .action-mapping-footer-actions {
        flex-direction: column;
    }

    .action-mapping-modal-footer .btn,
    .action-mapping-footer-actions .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .action-mapping-modal-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.75rem;
        padding: 1.25rem 1rem 0.9rem;
    }

    .action-mapping-title-block h4 {
        font-size: 1.15rem;
    }

    .action-mapping-modal-body {
        padding: 0.9rem 1rem;
        gap: 0.85rem;
    }

    .action-mapping-context-item,
    .action-mapping-legend,
    .action-permission-panel-head,
    .action-permission-panel-body {
        padding: 0.9rem;
    }

    .legend-item {
        white-space: normal;
    }

    .action-permission-pill {
        width: 100%;
        justify-content: space-between;
    }
}

.admin-detail-field span {
    display: block;
    color: #91a7c5;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-detail-field {
    min-width: 0;
    height: 100%;
    min-height: 3.8rem;
    padding: 0.15rem 0 0.95rem;
    border-bottom: 1px solid rgba(184, 205, 236, 0.08);
}

.admin-detail-field strong {
    display: block;
    overflow-wrap: anywhere;
    margin-top: 0.45rem;
    color: #eef5ff;
    font-size: 1.02rem;
    font-weight: 850;
    line-height: 1.35;
}

.admin-detail-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #cfe7f4;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.admin-detail-section-title i {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 0.7rem;
    color: #06141d;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    font-size: 0.82rem;
}

.admin-permission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid rgba(184, 205, 236, 0.1);
}

.admin-permission-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding: 0.95rem 0;
    border: 0;
    border-bottom: 1px solid rgba(184, 205, 236, 0.1);
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease;
}

.admin-permission-option:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-permission-option.selected {
    background: rgba(94, 231, 242, 0.06);
}

.admin-modal-permission-list {
    max-height: 21rem;
    overflow-y: auto;
    border-top: 1px solid rgba(184, 205, 236, 0.1);
}

.admin-modal-permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(184, 205, 236, 0.1);
    cursor: pointer;
}

.admin-modal-permission-row.selected {
    background: rgba(94, 231, 242, 0.06);
}

.permission-group-three-col {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(8rem, 1fr) minmax(8rem, 1fr);
    gap: 1rem;
    align-items: end;
}

.admin-three-col {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.permission-group-count {
    min-height: 3.35rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.035);
}

.permission-group-count span {
    display: block;
    color: #91a7c5;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.permission-group-count strong {
    display: block;
    margin-top: 0.15rem;
    color: #eef5ff;
    font-size: 1.1rem;
    font-weight: 950;
}

.permission-select-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.permission-select-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    min-height: 8rem;
    padding: 1rem;
    text-align: left;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 0.9rem;
    color: #eef5ff;
    background: rgba(255, 255, 255, 0.035);
    transition: border-color 160ms ease, background 160ms ease;
}

.permission-select-card:not(:disabled) {
    cursor: pointer;
}

.permission-select-card:not(:disabled):hover {
    border-color: rgba(94, 231, 242, 0.28);
    background: rgba(255, 255, 255, 0.055);
}

.permission-select-card.selected {
    border-color: rgba(94, 231, 242, 0.45);
    background: rgba(94, 231, 242, 0.08);
}

.permission-select-main {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.permission-select-code {
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.permission-select-description {
    color: #91a7c5;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.55;
}

.permission-select-check {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    border-radius: 999px;
    color: #91a7c5;
    background: rgba(5, 10, 18, 0.3);
}

.permission-select-card.selected .permission-select-check {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.7);
    background: #5ee7f2;
}

.permission-group-workspace {
    display: grid;
    grid-template-columns: minmax(17rem, 0.72fr) minmax(0, 1.6fr);
    gap: 1.5rem;
    align-items: start;
}

.permission-group-profile,
.permission-group-canvas {
    min-width: 0;
}

.permission-group-profile {
    position: sticky;
    top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding: 1.15rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 1rem;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        radial-gradient(circle at 20% 0%, rgba(94, 231, 242, 0.12), transparent 12rem);
}

.permission-group-emblem {
    display: inline-grid;
    place-items: center;
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 1rem;
    color: #06141d;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    box-shadow: 0 16px 34px rgba(73, 199, 245, 0.2);
}

.permission-group-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.permission-group-stats div {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(184, 205, 236, 0.1);
    border-radius: 0.85rem;
    background: rgba(5, 10, 18, 0.32);
}

.permission-group-stats span,
.permission-group-selected-title {
    display: block;
    color: #91a7c5;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.permission-group-stats strong {
    display: block;
    margin-top: 0.2rem;
    color: #eef5ff;
    font-size: 1.35rem;
    font-weight: 950;
}

.permission-group-selected {
    display: grid;
    gap: 0.75rem;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.9rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    color: #d9fbff;
    background: rgba(94, 231, 242, 0.1);
    border: 1px solid rgba(94, 231, 242, 0.2);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.permission-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.permission-card {
    position: relative;
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr) 2rem;
    gap: 0.85rem;
    align-items: start;
    min-height: 9.5rem;
    padding: 1rem;
    text-align: left;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 1rem;
    color: #eef5ff;
    background: rgba(255, 255, 255, 0.035);
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.permission-card:not(:disabled) {
    cursor: pointer;
}

.permission-card:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: rgba(184, 205, 236, 0.22);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.permission-card:disabled {
    cursor: default;
}

.permission-card.selected {
    border-color: rgba(94, 231, 242, 0.42);
    background:
        linear-gradient(145deg, rgba(94, 231, 242, 0.13), rgba(255, 255, 255, 0.035)),
        rgba(255, 255, 255, 0.035);
}

.permission-card-icon,
.permission-card-check {
    display: inline-grid;
    place-items: center;
    border-radius: 0.82rem;
}

.permission-card-icon {
    width: 2.8rem;
    height: 2.8rem;
    color: #06141d;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
}

.permission-card-check {
    width: 2rem;
    height: 2rem;
    color: #91a7c5;
    border: 1px solid rgba(184, 205, 236, 0.16);
    background: rgba(5, 10, 18, 0.34);
}

.permission-card.selected .permission-card-check {
    color: #06141d;
    background: #5ee7f2;
    border-color: rgba(94, 231, 242, 0.75);
}

.permission-card-body {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.permission-card-code {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.permission-card-label {
    color: #9beaf4;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.permission-card-description {
    color: #91a7c5;
    font-size: 0.8rem;
    font-weight: 650;
    line-height: 1.55;
}

.permission-card-green .permission-card-icon {
    background: linear-gradient(135deg, #8df0bf, #67d391);
}

.permission-card-amber .permission-card-icon {
    background: linear-gradient(135deg, #ffe1a3, #f6bd5f);
}

.permission-card-red .permission-card-icon {
    background: linear-gradient(135deg, #ffaaa3, #ff7a70);
}

.permission-card-blue .permission-card-icon {
    background: linear-gradient(135deg, #95d7ff, #49c7f5);
}

.permission-card-violet .permission-card-icon {
    background: linear-gradient(135deg, #c9b6ff, #9f8cff);
}

.admin-home-page .premium-status,
.center-form-page .premium-status {
    border: 1px solid rgba(184, 205, 236, 0.18);
    font-weight: 850;
    letter-spacing: 0.03em;
}

.admin-home-page .status-open,
.center-form-page .status-open {
    color: #e6fff0;
    background: linear-gradient(135deg, rgba(103, 211, 145, 0.25), rgba(103, 211, 145, 0.08));
    border-color: rgba(103, 211, 145, 0.38);
}

.admin-home-page .status-muted,
.center-form-page .status-muted {
    color: #d7e3f5;
    background: linear-gradient(135deg, rgba(105, 128, 164, 0.22), rgba(55, 70, 98, 0.18));
    border-color: rgba(160, 181, 215, 0.22);
}

body.login-page {
    min-height: 100vh;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 14% 10%, rgba(73, 199, 245, 0.18), transparent 28rem),
        radial-gradient(circle at 82% 8%, rgba(246, 189, 95, 0.16), transparent 26rem),
        linear-gradient(155deg, #060912 0%, #0b1324 48%, #07111d 100%);
}

.login-shell {
    width: min(1040px, 100%);
    border: 1px solid rgba(184, 205, 236, 0.16);
    background: rgba(10, 16, 29, 0.84);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
}

.login-shell-simple {
    width: min(28rem, 100%);
}

.patient-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.patient-card {
    padding: 1rem;
    border: 1px solid rgba(184, 205, 236, 0.13);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.patient-meta {
    display: grid;
    gap: 0.7rem;
}

.patient-meta div {
    display: grid;
    gap: 0.2rem;
}

.patient-meta span {
    color: #91a7c5;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.patient-meta strong {
    color: #eef5ff;
    font-size: 0.93rem;
    font-weight: 700;
}

.patient-form-card {
    margin: 0 auto;
}

.patient-form-section-title {
    color: #b9cce8;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.patient-textarea {
    min-height: 7rem;
    border-radius: 1rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #eef5ff;
}

.patient-textarea-compact {
    min-height: 5rem;
}

.patient-textarea:focus {
    border-color: rgba(94, 231, 242, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(73, 199, 245, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.login-hero {
    background:
        radial-gradient(circle at 18% 18%, rgba(94, 231, 242, 0.2), transparent 18rem),
        linear-gradient(160deg, rgba(20, 30, 54, 0.96), rgba(9, 14, 27, 0.94));
    border-right: 1px solid rgba(184, 205, 236, 0.12);
}

.login-panel {
    background: linear-gradient(160deg, rgba(11, 18, 32, 0.96), rgba(6, 11, 21, 0.98));
}

.login-form-wrap {
    max-width: 24rem;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(94, 231, 242, 0.12);
    color: #9deef4;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-copy {
    color: #aabbd4;
    font-size: 1rem;
    line-height: 1.75;
}

.login-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.login-metric-card {
    padding: 1rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
}

.login-metric-label {
    color: #87a0c2;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-metric-value {
    color: #f4f8ff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

.login-input {
    min-height: 3.35rem;
    border-radius: 1rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #eef5ff;
}

.login-input option,
.login-input optgroup {
    color: #091220;
    background: #f4f8ff;
}

.select-shell {
    position: relative;
    min-width: min(100%, 23rem);
}

.select-shell-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    z-index: 2;
    color: #8fe2ef;
    font-size: 0.92rem;
    pointer-events: none;
}

.session-select {
    padding-left: 2.9rem;
    padding-right: 3.2rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5' stroke='%2399ECF7' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 1rem center;
    background-size: auto, 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    min-height: 2.375rem !important;
    height: 2.375rem !important;
}

.session-select:hover {
    border-color: rgba(184, 205, 236, 0.24);
    background-color: rgba(255, 255, 255, 0.05);
}

.login-input:focus {
    border-color: rgba(94, 231, 242, 0.4);
    box-shadow: 0 0 0 0.2rem rgba(73, 199, 245, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.login-hint {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.hero-copy {
    max-width: 42rem;
    color: #a8bad4;
    font-size: 1rem;
    line-height: 1.8;
}

.home-hero {
    overflow: hidden;
}

.home-hero-panel {
    position: relative;
    min-height: 22rem;
}

.home-hero-orbit {
    display: none;
}

.home-hero-card {
    position: relative;
    min-height: 22rem;
    padding: 1.35rem;
    border: 1px solid rgba(184, 205, 236, 0.16);
    border-radius: 1.6rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.home-hero-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.home-hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(94, 231, 242, 0.14);
    color: #c8fbff;
    font-size: 0.76rem;
    font-weight: 800;
}

.home-hero-chip.soft {
    background: rgba(255, 255, 255, 0.08);
    color: #eef5ff;
}

.home-hero-visual {
    position: relative;
    min-height: 16rem;
    margin-top: 1.25rem;
    border-radius: 1.3rem;
    background:
        linear-gradient(145deg, rgba(8, 15, 30, 0.84), rgba(16, 25, 44, 0.76)),
        radial-gradient(circle at center, rgba(73, 199, 245, 0.14), transparent 10rem);
    overflow: hidden;
}

.hero-line {
    position: absolute;
    top: 18%;
    left: 18%;
    width: 52%;
    height: 2px;
    background: linear-gradient(90deg, rgba(94, 231, 242, 0.2), #86efff, rgba(94, 231, 242, 0.15));
    transform: rotate(74deg);
    transform-origin: left center;
}

.hero-line-alt {
    top: 48%;
    left: 39%;
    width: 35%;
    transform: rotate(106deg);
    background: linear-gradient(90deg, rgba(246, 189, 95, 0.18), #ffd38a, rgba(246, 189, 95, 0.12));
}

.hero-node {
    position: absolute;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    background: #d9fbff;
    box-shadow: 0 0 24px rgba(94, 231, 242, 0.35);
}

.hero-node-a { top: 17%; left: 31%; }
.hero-node-b { top: 50%; left: 47%; }
.hero-node-c { top: 77%; left: 58%; }

.hero-angle-card {
    position: absolute;
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(184, 205, 236, 0.14);
    color: #eef5ff;
    font-size: 0.76rem;
    font-weight: 700;
}

.hero-angle-top { top: 1rem; right: 1rem; }
.hero-angle-bottom { bottom: 1rem; left: 1rem; }

.home-stat-card,
.nav-feature-card,
.session-card {
    border: 1px solid rgba(184, 205, 236, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.home-stat-icon,
.nav-feature-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    color: #06141d;
    box-shadow: 0 12px 30px rgba(73, 199, 245, 0.22);
}

.home-stat-icon.amber,
.nav-feature-icon.amber {
    background: linear-gradient(135deg, #ffe1a3, #ffbd78);
    color: #241704;
}

.home-stat-icon.mint,
.nav-feature-icon.mint {
    background: linear-gradient(135deg, #92ffd7, #64e3b1);
    color: #082016;
}

.pipeline-session-picker {
    width: min(100%, 28rem);
}

.external-report-mode main.container-xxl {
    padding-top: 1.5rem !important;
}

.external-report-mode .admin-sidebar,
.external-report-mode .admin-navbar,
.external-report-mode nav {
    display: none !important;
}

.external-report-mode .admin-sidebar + main.container-xxl,
.external-report-mode main.container-xxl {
    margin-left: auto !important;
    margin-right: auto !important;
}

.pipeline-session-picker-locked .select-shell {
    opacity: 0.92;
}

.pipeline-session-picker-locked .session-select:disabled {
    cursor: default;
    color: var(--bs-light);
}

.pipeline-list-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(7rem, 0.5fr) minmax(9rem, 0.75fr) minmax(9rem, 0.8fr) auto;
}

.pipeline-run-row {
    cursor: pointer;
}

.pipeline-progress,
.pipeline-progress-track {
    overflow: hidden;
    width: 100%;
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(184, 205, 236, 0.14);
}

.pipeline-progress span,
.pipeline-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, #5ee7f2, #67d391);
}

.pipeline-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1rem;
}

.pipeline-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.pipeline-metric {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    align-items: center;
    gap: 0.35rem 0.75rem;
    min-height: 4.45rem;
    padding: 0.75rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.045);
}

.pipeline-metric i {
    grid-row: span 2;
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
    color: #04131a;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
}

.pipeline-metric span,
.pipeline-artifact-row .list-secondary {
    color: #91a7c5;
    font-size: 0.74rem;
    font-weight: 800;
}

.pipeline-metric strong {
    min-width: 0;
    color: #eef5ff;
    font-size: 1rem;
    font-weight: 950;
}

.pipeline-artifact-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pipeline-artifact-row {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 3.75rem;
    padding: 0.7rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.04);
}

.pipeline-artifact-row > i {
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.78rem;
    color: #8ce9f5;
    border: 1px solid rgba(118, 226, 245, 0.18);
}

.pipeline-pose-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.pipeline-pose-card {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.04);
}

.list-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.pagination-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #91a7c5;
    font-size: 0.78rem;
    font-weight: 850;
}

.pagination-summary strong {
    color: #eef5ff;
    font-weight: 950;
}

.pagination-summary-label {
    color: #5ee7f2;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.pagination-actions .btn,
.pagination-page {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border-radius: 0.7rem;
    font-size: 0.78rem;
    font-weight: 900;
}

.pagination-page {
    color: #b8cdec;
    border: 1px solid rgba(184, 205, 236, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.pagination-page:hover,
.pagination-edge:hover:not(:disabled) {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.7);
    background: #5ee7f2;
}

.pagination-page.active {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.95);
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    box-shadow: 0 8px 20px rgba(94, 231, 242, 0.2);
}

.pagination-edge {
    border-radius: 0.7rem !important;
}

.pagination-ellipsis {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    color: #7f8ea9;
    font-weight: 900;
}

.home-stat-label {
    margin-top: 1rem;
    color: #94accb;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-stat-value {
    margin-top: 0.5rem;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.05;
}

.home-stat-copy {
    margin-top: 0.5rem;
    color: #a8bad4;
    line-height: 1.65;
}

.patient-card-rich,
.session-card {
    padding: 1rem;
    border-radius: 1rem;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.list-shell {
    display: grid;
    gap: 0.8rem;
}

.list-shell .list {
    display: grid;
    gap: 0.8rem;
}

.admin-table-scroll {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.admin-table-scroll .list-shell {
    width: 100%;
}

.admin-tanstack-table {
    gap: 0.65rem;
}

.admin-tanstack-head,
.admin-tanstack-filter-row {
    min-width: 100%;
}

.admin-tanstack-filter-row {
    color: #8ea8c9;
    border: 1px solid rgba(184, 205, 236, 0.09);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.025);
}

.admin-table-column-filter {
    width: 100%;
    min-width: 0;
    height: 2rem;
    /* border-radius: 999px; */
    border-color: rgba(184, 205, 236, 0.18) !important;
    background-color: rgba(5, 12, 22, 0.72) !important;
    color: #eef5ff !important;
    font-size: 0.72rem;
}

.admin-table-column-filter::placeholder {
    color: #7087a8;
}

.admin-table-filter-placeholder {
    display: block;
    height: 2rem;
}

.premium-tabs {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.5rem;
}

.premium-tabs .nav-link {
    color: rgba(255, 255, 255, 0.6);
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    background: transparent;
    transition: all 0.2s ease;
}

.premium-tabs .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.03);
}

.premium-tabs .nav-link.active {
    color: #00f2fe;
    background: rgba(0, 242, 254, 0.08);
    border-bottom: 2px solid #00f2fe;
}

.settings-premium-header {
    background: linear-gradient(135deg, rgba(16, 26, 46, 0.8), rgba(8, 12, 22, 0.94)) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
    position: relative;
    overflow: hidden;
}

.settings-premium-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(94, 231, 242, 0.3), transparent);
}

.settings-eyebrow {
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #5ee7f2 !important;
}

.admin-profile-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    padding: 8px 18px;
    border-radius: 30px;
    background: rgba(94, 231, 242, 0.04) !important;
    border: 1px solid rgba(94, 231, 242, 0.15) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.admin-profile-badge:hover {
    background: rgba(94, 231, 242, 0.07) !important;
    border-color: rgba(94, 231, 242, 0.3) !important;
    box-shadow: 0 6px 20px rgba(94, 231, 242, 0.1);
}

.settings-profile-label {
    font-size: 9px;
    letter-spacing: 0.05em;
}

.pref-toggle-container {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 30px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.5);
}

.btn-pref-toggle {
    padding: 8px 24px;
    border: none !important;
    border-radius: 25px;
    outline: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45) !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-pref-toggle:hover {
    color: #ffffff !important;
}

.btn-pref-toggle.active {
    background: linear-gradient(135deg, #5ee7f2 0%, #49c7f5 100%) !important;
    color: #070a12 !important;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(94, 231, 242, 0.35);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-pill.local-mode {
    background: rgba(94, 231, 242, 0.05);
    border-color: rgba(94, 231, 242, 0.2);
    color: #5ee7f2;
}

.status-pill.cloud-mode {
    background: rgba(103, 211, 145, 0.05);
    border-color: rgba(103, 211, 145, 0.2);
    color: #67d391;
}

.status-pill.offline {
    background: rgba(255, 122, 112, 0.05);
    border-color: rgba(255, 122, 112, 0.2);
    color: #ff7a70;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    animation: status-pulse 2s infinite ease-in-out;
}

.local-mode .pulse-dot {
    background-color: #5ee7f2;
}

.cloud-mode .pulse-dot {
    background-color: #67d391;
}

.offline .pulse-dot {
    background-color: #ff7a70;
}

@keyframes status-pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.65;
        box-shadow: 0 0 0 0 currentColor;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow: 0 0 8px 2px currentColor;
    }
    100% {
        transform: scale(0.9);
        opacity: 0.65;
        box-shadow: 0 0 0 0 currentColor;
    }
}

.settings-qr-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    height: 100%;
    padding: 24px !important;
    border-radius: 16px !important;
    background: rgba(0, 0, 0, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.settings-qr-panel:hover {
    border-color: rgba(94, 231, 242, 0.2) !important;
    background: rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 15px 35px rgba(0, 0, 0, 0.35) !important;
}

.qr-wrapper {
    display: inline-block;
    max-width: 150px !important;
    padding: 10px !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.3s ease !important;
}

.qr-wrapper:hover {
    transform: scale(1.03);
}

.premium-input-group {
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.premium-input-group:focus-within {
    border-color: rgba(94, 231, 242, 0.35);
    box-shadow: 0 0 12px rgba(94, 231, 242, 0.15);
}

.premium-input {
    width: 100%;
    padding: 6px 12px;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-size: 15px;
    font-weight: 700;
}

.premium-btn {
    padding: 8px 18px;
    border: none !important;
    border-radius: 8px;
    background: linear-gradient(135deg, #5ee7f2 0%, #49c7f5 100%) !important;
    color: #070a12 !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(94, 231, 242, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(94, 231, 242, 0.35);
    filter: brightness(1.08);
}

.stat-card-premium {
    height: 100%;
    padding: 14px 10px !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.stat-card-premium:hover {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(94, 231, 242, 0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.stat-card-premium .label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-card-premium .value {
    margin-top: 5px;
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-desc-box {
    padding: 16px !important;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.device-slot-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 16px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.015) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.device-slot-premium:hover {
    border-color: rgba(255, 255, 255, 0.09) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.device-slot-premium.connected {
    background: rgba(103, 211, 145, 0.03) !important;
    border-color: rgba(103, 211, 145, 0.15) !important;
    animation: pulse-glow-success 3s infinite ease-in-out;
}

.device-slot-premium.disconnected {
    background: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

@keyframes pulse-glow-success {
    0% {
        box-shadow: 0 0 5px rgba(103, 211, 145, 0.05);
        border-color: rgba(103, 211, 145, 0.15) !important;
    }
    50% {
        box-shadow: 0 0 15px rgba(103, 211, 145, 0.18);
        border-color: rgba(103, 211, 145, 0.3) !important;
    }
    100% {
        box-shadow: 0 0 5px rgba(103, 211, 145, 0.05);
        border-color: rgba(103, 211, 145, 0.15) !important;
    }
}

.device-role-badge {
    display: inline-block;
    margin-bottom: 6px;
    padding: 4px 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.device-slot-premium.connected .device-role-badge {
    background: rgba(103, 211, 145, 0.1);
    border-color: rgba(103, 211, 145, 0.3);
    color: #67d391;
}

.settings-card-title {
    letter-spacing: -0.01em;
}

.settings-card-title i {
    font-size: 1.1rem;
}

.settings-mini-label {
    font-size: 9px;
    letter-spacing: 0.05em;
}

.settings-desc-text {
    font-size: 11.5px;
    line-height: 1.5;
}

.settings-select {
    cursor: pointer;
    padding-left: 8px;
}

.settings-select option {
    background: #0d1423;
    color: #ffffff;
}

.session-create-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    flex-wrap: wrap;
}

.session-create-form {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin: 0;
}

.session-start-button {
    min-height: 2.375rem;
    padding-inline: 1.2rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.list-head,
.list-row {
    display: grid;
    gap: 0.9rem;
    align-items: center;
}

.list-head {
    padding: 0 1rem;
    color: #8ea8c9;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid transparent; /* Match list-row border for vertical alignment */
}

.list-row {
    padding: 1rem;
    border: 1px solid rgba(184, 205, 236, 0.13);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.list-row:hover {
    border-color: rgba(184, 205, 236, 0.24);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.user-list-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(7rem, 0.8fr) minmax(7rem, 0.8fr) minmax(0, 1.2fr) 11rem;
}

.session-list-grid {
    grid-template-columns: minmax(0, 1.5fr) 5.5rem 6.5rem 6rem 8.5rem 6rem;
}

.admin-list-row {
    grid-template-columns: minmax(0, 1.2fr) minmax(5rem, 0.5fr) minmax(6rem, 0.7fr) minmax(8rem, 1.2fr) minmax(10rem, 1.5fr) minmax(6rem, 0.8fr) 11rem;
}

.list-primary {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
}

.list-secondary {
    color: #8fe2ef;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 0.2rem;
}

.list-value {
    color: #dce7f8;
    font-size: 0.93rem;
    font-weight: 700;
}

.patient-form-card-compact {
    max-width: 920px;
}

.patient-card-rich:hover,
.session-card:hover {
    border-color: rgba(184, 205, 236, 0.24);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.22);
}

.session-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.session-card-title {
    font-size: 1rem;
}

.session-card-meta {
    display: grid;
    gap: 0.7rem;
}

.session-card-meta div {
    display: grid;
    gap: 0.2rem;
}

.session-card-meta span,
.settings-summary-grid span,
.settings-profile-label {
    color: #91a7c5;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.session-card-meta strong,
.settings-summary-grid strong,
.settings-profile-value {
    color: #eef5ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.settings-summary-card,
.settings-profile-card {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.05);
}

.settings-summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(94, 231, 242, 0.14);
    color: #d5fbff;
    font-size: 0.76rem;
    font-weight: 800;
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.settings-qr-wrap {
    display: grid;
    grid-template-columns: minmax(15rem, 18rem) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.settings-qr-panel {
    display: grid;
    place-items: center;
    padding: 1.25rem;
    border-radius: 1.4rem;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
}

.settings-qr-panel img {
    max-width: 100%;
    height: auto;
}

.settings-qr-copy {
    display: grid;
    gap: 0.9rem;
}

.settings-qr-step {
    display: grid;
    grid-template-columns: 2.3rem minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    color: #d6e3f6;
    line-height: 1.65;
}

.settings-qr-step span {
    display: inline-grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    color: #06141d;
    font-weight: 800;
}

.settings-profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.settings-profile-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    color: #06141d;
}

.settings-profile-icon.alt {
    background: linear-gradient(135deg, #ffe1a3, #ffbd78);
    color: #241704;
}

@media (max-width: 991.98px) {
    .admin-action-detail-card {
        min-height: auto;
    }

    .permission-group-workspace {
        grid-template-columns: 1fr;
    }

    .permission-group-profile {
        position: static;
    }

    .permission-card-grid {
        grid-template-columns: 1fr;
    }

    .permission-group-three-col,
    .admin-three-col,
    .permission-select-grid {
        grid-template-columns: 1fr;
    }

    .login-hero {
        border-right: 0;
        border-bottom: 1px solid rgba(184, 205, 236, 0.12);
    }

    .login-metric-grid {
        grid-template-columns: 1fr;
    }

    .admin-navbar-shell {
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    .admin-nav-links {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .admin-nav-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .settings-qr-wrap {
        grid-template-columns: 1fr;
    }

    .list-head {
        display: none;
    }

    .user-list-grid {
        grid-template-columns: minmax(10rem, 1.1fr) minmax(5.5rem, 0.55fr) minmax(6.5rem, 0.65fr) minmax(8rem, 0.85fr) auto;
        gap: 0.55rem;
    }

    .pipeline-list-grid {
        grid-template-columns: minmax(10rem, 1.15fr) minmax(5.8rem, 0.52fr) minmax(7rem, 0.68fr) minmax(7rem, 0.68fr) auto;
        gap: 0.55rem;
    }

    .session-list-grid {
        grid-template-columns: minmax(8rem, 1.5fr) 5.5rem 6.5rem 6rem 8.5rem auto;
        gap: 0.55rem;
    }

    .user-list-shell,
    .pipeline-list-shell,
    .session-list-shell,
    .list-shell:has(.user-list-grid),
    .list-shell:has(.pipeline-list-grid),
    .list-shell:has(.session-list-grid),
    .list-shell:has(.admin-list-row) {
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .user-list-shell .user-list-grid,
    .list-shell:has(.user-list-grid) .user-list-grid {
        min-width: 39rem;
    }

    .pipeline-list-shell .pipeline-list-grid,
    .list-shell:has(.pipeline-list-grid) .pipeline-list-grid {
        min-width: 40rem;
    }

    .session-list-shell .session-list-grid,
    .list-shell:has(.session-list-grid) .session-list-grid {
        min-width: 40rem;
    }

    .list-shell:has(.admin-list-row) .admin-list-row {
        min-width: 52rem;
    }

    .list-row.user-list-grid,
    .list-row.pipeline-list-grid,
    .list-row.session-list-grid,
    .list-row.admin-list-row {
        padding: 0.85rem;
    }

    .list-row.user-list-grid .list-primary,
    .list-row.user-list-grid .list-value,
    .list-row.pipeline-list-grid .list-primary,
    .list-row.pipeline-list-grid .list-value,
    .list-row.session-list-grid .list-primary,
    .list-row.session-list-grid .list-value {
        font-size: 0.82rem;
    }

    .list-row.user-list-grid .list-secondary,
    .list-row.pipeline-list-grid .list-secondary,
    .list-row.session-list-grid .list-secondary {
        font-size: 0.72rem;
    }

    .list-row.user-list-grid .btn,
    .list-row.pipeline-list-grid .btn,
    .list-row.session-list-grid .btn {
        min-height: 2rem;
        padding-inline: 0.62rem !important;
        font-size: 0.72rem;
    }

    /* Responsive pipeline run list card formatting */
    .pipeline-list-grid {
        gap: 0.6rem !important;
    }
    
    .pipeline-run-row,
    .pipeline-run-row-running {
        padding: 1.25rem !important;
    }
    
    .pipeline-run-row > div:open-btn,
    .pipeline-run-row > div:nth-child(2),
    .pipeline-run-row-running > div:nth-child(2) {
        display: flex;
        align-items: center;
    }
    
    .pipeline-run-row > div:nth-child(3),
    .pipeline-run-row-running > div:nth-child(3) {
        font-size: 0.82rem;
        color: #8292ad;
    }
    
    .pipeline-run-row > div:nth-child(3)::before,
    .pipeline-run-row-running > div:nth-child(3)::before {
        content: "Started: ";
        font-weight: 600;
        color: #91a7c5;
    }
    
    .pipeline-run-row > div:nth-child(4),
    .pipeline-run-row-running > div:nth-child(4) {
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
    }
    
    .pipeline-run-row > div:open-btn,
    .pipeline-run-row > div:nth-child(5),
    .pipeline-run-row-running > div:nth-child(5) {
        justify-content: flex-start !important;
        margin-top: 0.5rem;
    }

    .session-create-row,
    .session-create-form {
        align-items: stretch;
    }

    .session-create-row {
        flex-direction: column;
        justify-content: flex-start !important;
        gap: 1rem;
    }

    .session-create-row > .min-w-0,
    .session-create-form {
        width: 100%;
    }

    .session-create-form {
        flex-direction: column;
        justify-content: flex-start;
        min-width: 0;
        gap: 0.75rem;
        flex: none !important;
    }

    .session-create-form .dropdown,
    .session-create-form .select-shell {
        flex: none !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    .dropdown,
    .select-shell,
    .session-start-button {
        width: 100%;
    }

    .session-create-form .session-start-button {
        margin-left: 0 !important;
    }
}

.admin-session-page .premium-card .card-header {
    border-bottom-color: rgba(184, 205, 236, 0.12);
}

.admin-session-page .device-card {
    border-top: 3px solid #5ee7f2;
}

.admin-session-page .device-side {
    border-top-color: #f6bd5f;
}

.admin-session-page .role-badge,
.admin-session-page .premium-status,
.pipeline-page .premium-status {
    border: 1px solid transparent;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 0.76rem;
}

.admin-session-page .role-front {
    color: #06141d;
    background: linear-gradient(135deg, #8af4ff, #49c7f5);
    box-shadow: 0 0 20px rgba(73, 199, 245, 0.24);
}

.admin-session-page .role-side {
    color: #211504;
    background: linear-gradient(135deg, #ffde98, #f6bd5f);
    box-shadow: 0 0 20px rgba(246, 189, 95, 0.22);
}

.admin-session-page .premium-status,
.pipeline-page .premium-status {
    color: #cddbed;
    background: rgba(121, 145, 180, 0.16);
    border-color: rgba(184, 205, 236, 0.18);
}

.admin-session-page .status-created,
.admin-session-page .status-ready,
.admin-session-page .status-ready-for-pipeline,
.admin-session-page .status-uploaded,
.admin-session-page .status-connected,
.pipeline-page .status-done {
    color: #e6fff0;
    background: linear-gradient(135deg, rgba(103, 211, 145, 0.25), rgba(103, 211, 145, 0.08));
    border-color: rgba(103, 211, 145, 0.38);
}

.admin-session-page .status-waiting,
.admin-session-page .status-waiting-for-videos,
.admin-session-page .status-missing,
.admin-session-page .status-muted,
.pipeline-page .status-muted {
    color: #d7e3f5;
    background: linear-gradient(135deg, rgba(105, 128, 164, 0.22), rgba(55, 70, 98, 0.18));
    border-color: rgba(160, 181, 215, 0.22);
}

.admin-session-page .status-starting,
.admin-session-page .status-recording,
.admin-session-page .status-stopped,
.admin-session-page .status-recorded,
.admin-session-page .status-partial-upload,
.pipeline-page .status-running {
    color: #fff4df;
    background: linear-gradient(135deg, rgba(246, 189, 95, 0.24), rgba(255, 122, 112, 0.1));
    border-color: rgba(246, 189, 95, 0.38);
}

.admin-session-page .status-saved,
.admin-session-page .status-recording-stopped {
    color: #082330;
    background: linear-gradient(135deg, rgba(216, 251, 255, 0.95), rgba(165, 241, 255, 0.9));
    border-color: rgba(94, 231, 242, 0.4);
}

.admin-session-page .status-error,
.admin-session-page .status-failed,
.admin-session-page .status-disconnected,
.pipeline-page .status-failed {
    color: #fff0ee;
    background: linear-gradient(135deg, rgba(255, 122, 112, 0.24), rgba(255, 122, 112, 0.08));
    border-color: rgba(255, 122, 112, 0.42);
}

.admin-session-page .info-tile {
    padding: 0.85rem;
    border: 1px solid rgba(184, 205, 236, 0.12);
    border-radius: 0.9rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-session-page .info-label,
.admin-session-page .detail-title {
    color: #94a9c6;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-session-page .detail-title {
    margin-bottom: 0.6rem;
    color: #b9cce8;
}

.admin-session-page .device-front .detail-title i {
    color: #5ee7f2;
}

.admin-session-page .device-side .detail-title i {
    color: #f6bd5f;
}

.admin-session-page .font-monospace {
    color: #9fd4e7;
    font-size: 0.8rem;
}

.admin-session-page .premium-accordion {
    overflow: hidden;
    border: 1px solid rgba(184, 205, 236, 0.13);
    border-radius: 1rem;
    background: rgba(5, 12, 24, 0.34);
}

.admin-session-page .premium-accordion .accordion-item,
.admin-session-page .premium-accordion .accordion-button {
    color: #eef5ff;
    background: transparent;
    border: 0;
}

.admin-session-page .premium-accordion .accordion-button {
    box-shadow: none;
}

.admin-session-page .premium-accordion .accordion-button:not(.collapsed) {
    border-bottom: 1px solid rgba(184, 205, 236, 0.12);
    background: linear-gradient(90deg, rgba(94, 231, 242, 0.08), rgba(255, 255, 255, 0.025));
}

.admin-session-page .premium-accordion .accordion-button::after {
    filter: invert(1) grayscale(1);
    opacity: 0.7;
}

.admin-session-page .raw-data {
    max-height: 8rem;
    padding: 0.9rem;
    overflow: auto;
    color: #9df3ff;
    border: 1px solid rgba(94, 231, 242, 0.14);
    border-radius: 0.9rem;
    background: rgba(2, 8, 18, 0.72);
    font-size: 0.76rem;
}

.admin-session-page .panel-icon,
.admin-session-page .file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 auto;
    border-radius: 0.85rem;
    color: #06141d;
    background: linear-gradient(135deg, #8af4ff, #67e8c7);
}

.admin-session-page .panel-icon-amber {
    color: #211504;
    background: linear-gradient(135deg, #ffde98, #ffb4a8);
}

.admin-session-page .empty-state {
    min-height: 10rem;
    border: 1px dashed rgba(184, 205, 236, 0.22);
    background:
        radial-gradient(circle at center, rgba(94, 231, 242, 0.1), transparent 12rem),
        rgba(7, 14, 28, 0.5);
}

.admin-session-page .empty-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: #8af4ff;
    border: 1px solid rgba(94, 231, 242, 0.22);
    border-radius: 999px;
    background: rgba(94, 231, 242, 0.1);
}

.admin-session-page .pairing-row,
.admin-session-page .candidate-row {
    border: 1px solid rgba(184, 205, 236, 0.13);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.admin-session-page .pairing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.admin-session-page .candidate-row {
    padding: 1rem !important;
}

.admin-session-page .candidate-card {
    height: 100%;
}

.admin-session-page .candidate-name {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
}

.admin-session-page .candidate-tags,
.admin-session-page .device-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.admin-session-page .candidate-tag,
.admin-session-page .device-tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.35rem 0.72rem;
    border: 1px solid rgba(184, 205, 236, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    color: #dfeafb;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.admin-session-page .candidate-tag.role-front,
.admin-session-page .device-tag.role-front {
    color: #05202b;
    border-color: rgba(94, 231, 242, 0.34);
    background: linear-gradient(135deg, #a2f4ff, #62d8f7);
}

.admin-session-page .candidate-tag.role-side,
.admin-session-page .device-tag.role-side {
    color: #241704;
    border-color: rgba(246, 189, 95, 0.34);
    background: linear-gradient(135deg, #ffe4a7, #ffc874);
}

.admin-session-page .candidate-tag.good,
.admin-session-page .device-tag.good {
    color: #e8fff0;
    border-color: rgba(103, 211, 145, 0.34);
    background: rgba(103, 211, 145, 0.16);
}

.admin-session-page .candidate-tag.soft,
.admin-session-page .device-tag.soft {
    color: #dce7f8;
    border-color: rgba(184, 205, 236, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.admin-session-page .candidate-actions .btn {
    min-width: 7.4rem;
    border-radius: 999px;
    font-weight: 700;
}

.admin-session-page .capture-files .file-row {
    border-color: rgba(184, 205, 236, 0.1);
}

.admin-session-page .file-row.is-uploaded {
    border-color: rgba(103, 211, 145, 0.28);
    background: linear-gradient(135deg, rgba(103, 211, 145, 0.1), transparent);
}

.admin-session-page .file-row.is-saved {
    border-color: rgba(94, 231, 242, 0.24);
    background: linear-gradient(135deg, rgba(94, 231, 242, 0.08), transparent);
}

.admin-session-page .file-front {
    color: #8af4ff;
    background: rgba(94, 231, 242, 0.12);
}

.admin-session-page .file-side {
    color: #ffde98;
    background: rgba(246, 189, 95, 0.12);
}

.admin-session-page .control-bar {
    z-index: 20;
}

.admin-session-page .control-card {
    border-radius: 1.25rem;
    background: linear-gradient(135deg, rgba(15, 24, 43, 0.94), rgba(7, 13, 26, 0.94));
}

.admin-session-page .control-toolbar {
    min-height: 3rem;
}

.admin-session-page .capture-name-pill {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 2.85rem;
    min-width: min(100%, 18rem);
    padding: 0.2rem 1rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    cursor: text;
}

.admin-session-page .capture-name-label {
    color: #9fb3ce;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-session-page .capture-name-pill i {
    color: #8ce9f5;
    font-size: 0.95rem;
}

.admin-session-page .capture-name-input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #eef5ff;
    font-size: 0.95rem;
    font-weight: 700;
}

.admin-session-page .capture-name-input::placeholder {
    color: #7f96b7;
    font-weight: 600;
}

.admin-session-page select.capture-name-input {
    background: transparent;
    color: #eef5ff;
    border: none;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 0.5rem;
}

.admin-session-page select.capture-name-input option {
    background: #0d1423;
    color: #eef5ff;
}

.admin-session-page .btn-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.85rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    border-radius: 999px;
    padding: 0.65rem 1rem;
    color: #eef5ff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-session-page .btn-control:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(94, 231, 242, 0.15);
}

.admin-session-page .btn-control:active:not(:disabled) {
    transform: translateY(0);
}

.diagnostic-check-card {
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.diagnostic-check-card:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(94, 231, 242, 0.2) !important;
}

.admin-session-page .btn-control:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.24);
}

.admin-session-page .btn-control:disabled,
.admin-session-page .btn-outline-danger:disabled {
    color: rgba(218, 229, 245, 0.48);
    border-color: rgba(184, 205, 236, 0.1);
    background: rgba(62, 75, 102, 0.2);
    opacity: 1;
}

.admin-session-page .btn-start { background: linear-gradient(135deg, rgba(103, 211, 145, 0.27), rgba(103, 211, 145, 0.08)); }
.admin-session-page .btn-stop { background: linear-gradient(135deg, rgba(255, 122, 112, 0.27), rgba(255, 122, 112, 0.08)); }
.admin-session-page .btn-upload { background: linear-gradient(135deg, rgba(246, 189, 95, 0.24), rgba(246, 189, 95, 0.08)); }
.admin-session-page .btn-results { background: linear-gradient(135deg, rgba(94, 231, 242, 0.24), rgba(103, 211, 145, 0.07)); }
.admin-session-page .btn-results:disabled {
    color: rgba(238, 245, 255, 0.78);
    border-color: rgba(94, 231, 242, 0.18);
    background: linear-gradient(135deg, rgba(94, 231, 242, 0.18), rgba(103, 211, 145, 0.06));
}

.admin-session-page .countdown-overlay {
    z-index: 1050;
    width: min(90vw, 38rem);
    border: 1px solid rgba(94, 231, 242, 0.22);
    background: rgba(5, 12, 24, 0.9);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55), 0 0 45px rgba(94, 231, 242, 0.14);
    backdrop-filter: blur(18px);
}

.admin-session-page .capture-history-item {
    border: 1px solid rgba(184, 205, 236, 0.13);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.035);
}

.admin-session-page .capture-history-title {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.2;
}

.admin-session-page .capture-history-details[hidden] {
    display: none !important;
}

.admin-session-page .capture-detail-tile {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.admin-session-page .capture-history-run-config,
.admin-session-page .pipeline-progress-info-button {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    flex: 0 0 2.35rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(184, 205, 236, 0.16);
    color: #dff8ff;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
        rgba(8, 14, 27, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 22px rgba(0, 0, 0, 0.22);
    transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.admin-session-page .capture-history-run-config:hover,
.admin-session-page .pipeline-progress-info-button:hover {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.72);
    background: linear-gradient(135deg, #90f1ff, #5ee7f2);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(94, 231, 242, 0.18);
}

.admin-session-page .run-model-select-wrap {
    position: relative;
}

.admin-session-page .run-model-select-wrap > i {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    z-index: 2;
    color: #5ee7f2;
    transform: translateY(-50%);
    pointer-events: none;
}

.admin-session-page .run-model-select {
    min-height: 2.8rem;
    padding-left: 2.55rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(184, 205, 236, 0.16);
    color: #eef5ff;
    background-color: rgba(5, 12, 22, 0.82);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.admin-session-page .pipeline-milestone-overlay {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(1, 5, 12, 0.72);
    backdrop-filter: blur(10px);
}

.admin-session-page .pipeline-milestone-panel {
    width: min(94vw, 46rem);
    border: 1px solid rgba(184, 205, 236, 0.14);
    border-radius: 1.25rem;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 10% 0%, rgba(94, 231, 242, 0.12), transparent 16rem),
        linear-gradient(145deg, rgba(15, 22, 38, 0.98), rgba(7, 12, 22, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-session-page .pipeline-milestone-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.admin-session-page .pipeline-milestone-close {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(184, 205, 236, 0.14);
    color: #c9d7ec;
    background: rgba(255, 255, 255, 0.04);
}

.admin-session-page .pipeline-milestone-track {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
    margin: 1rem 0 1.35rem;
}

.admin-session-page .pipeline-milestone-item {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.admin-session-page .pipeline-milestone-node {
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    border: 1px solid rgba(184, 205, 236, 0.18);
    color: #9fb1cc;
    background: #101827;
    font-size: 0.84rem;
    font-weight: 900;
}

.admin-session-page .pipeline-milestone-item.done .pipeline-milestone-node {
    color: #06141d;
    border-color: rgba(103, 211, 145, 0.86);
    background: linear-gradient(135deg, #8ff2b2, #67d391);
}

.admin-session-page .pipeline-milestone-item.running .pipeline-milestone-node {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.9);
    background: linear-gradient(135deg, #90f1ff, #5ee7f2);
    box-shadow: 0 0 0 6px rgba(94, 231, 242, 0.12), 0 0 28px rgba(94, 231, 242, 0.22);
}

.admin-session-page .pipeline-milestone-item.failed .pipeline-milestone-node {
    color: #fff4f3;
    border-color: rgba(255, 122, 112, 0.9);
    background: linear-gradient(135deg, #ff9b92, #ff6258);
}

.admin-session-page .pipeline-milestone-line {
    position: absolute;
    top: 1.22rem;
    left: 50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(184, 205, 236, 0.26), rgba(184, 205, 236, 0.08));
}

.admin-session-page .pipeline-milestone-item.done .pipeline-milestone-line {
    background: linear-gradient(90deg, rgba(103, 211, 145, 0.76), rgba(94, 231, 242, 0.46));
}

.admin-session-page .pipeline-milestone-label {
    display: grid;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
    padding: 0 0.35rem;
    color: #93a6c4;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.25;
}

.admin-session-page .pipeline-milestone-label strong {
    color: #eef5ff;
    font-size: 0.75rem;
}

.admin-session-page .pipeline-milestone-label span {
    color: #5ee7f2;
    overflow-wrap: anywhere;
}

.admin-session-page .pipeline-milestone-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.admin-session-page .pipeline-milestone-summary > div {
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid rgba(184, 205, 236, 0.1);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.035);
}

.admin-session-page .pipeline-milestone-summary span {
    display: block;
    color: #91a4c1;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-session-page .pipeline-milestone-summary strong {
    display: block;
    margin-top: 0.25rem;
    color: #eef5ff;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .admin-session-page .premium-header h1 {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .admin-session-page .control-bar {
        position: static !important;
    }

    .admin-session-page .btn-control {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-session-page .capture-name-pill {
        width: 100%;
        min-width: 0;
    }

    .admin-session-page .pipeline-milestone-track {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .admin-session-page .pipeline-milestone-item {
        grid-template-columns: 2.45rem 1fr;
        justify-items: start;
        align-items: center;
    }

    .admin-session-page .pipeline-milestone-line {
        display: none;
    }

    .admin-session-page .pipeline-milestone-label {
        padding: 0;
        text-align: left;
    }

    .admin-session-page .pipeline-milestone-summary {
        grid-template-columns: 1fr;
    }

    .admin-session-page .pairing-grid {
        grid-template-columns: 1fr;
    }

    .list-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-summary,
    .pagination-actions {
        justify-content: center;
    }

    .pagination-actions {
        flex-wrap: wrap;
    }

    .pagination-pages {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.2rem;
    }

    .patient-grid {
        grid-template-columns: 1fr;
    }

    .user-list-grid,
    .pipeline-list-grid,
    .session-list-grid,
    .admin-list-row {
        grid-template-columns: 1fr;
    }

    .user-list-shell .user-list-grid,
    .pipeline-list-shell .pipeline-list-grid,
    .list-shell:has(.user-list-grid) .user-list-grid,
    .list-shell:has(.pipeline-list-grid) .pipeline-list-grid,
    .session-list-shell .session-list-grid,
    .list-shell:has(.session-list-grid) .session-list-grid,
    .list-shell:has(.admin-list-row) .admin-list-row {
        min-width: 0;
    }

    .list-row.user-list-grid,
    .list-row.pipeline-list-grid,
    .list-row.session-list-grid,
    .list-row.admin-list-row {
        gap: 0.7rem;
        padding: 1rem;
    }

    .list-row.user-list-grid .d-flex.justify-content-end,
    .list-row.pipeline-list-grid .d-flex.justify-content-end,
    .list-row.session-list-grid .d-flex.justify-content-end,
    .list-row.admin-list-row .d-flex.justify-content-end {
        justify-content: flex-start !important;
    }

    .session-grid,
    .settings-summary-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-detail-grid,
    .pipeline-metric-grid,
    .pipeline-pose-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Collapsible Left Sidebar Layout */

.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(10, 18, 30, 0.92) 0%, rgba(5, 8, 14, 0.98) 100%);
    border-right: 1px solid rgba(94, 231, 242, 0.12);
    box-shadow: 12px 0 45px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
    white-space: nowrap;
}

.admin-sidebar.collapsed {
    width: 68px;
    padding: 1.5rem 0.55rem;
    align-items: center;
}

.admin-sidebar:not(.collapsed) {
    width: 260px;
    padding: 1.5rem 1rem;
}

body.admin-home-page,
body.patient-form-page,
body.center-form-page {
    padding-left: 260px;
    transition: padding-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.admin-home-page:has(.admin-sidebar.collapsed),
body.patient-form-page:has(.admin-sidebar.collapsed),
body.center-form-page:has(.admin-sidebar.collapsed) {
    padding-left: 68px;
}

body.external-report-mode {
    padding-left: 0 !important;
}

main.container-xxl {
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 2.2rem !important;
    padding-right: 2.2rem !important;
}

/* Sidebar Brand Header */
.sidebar-brand-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding: 0 0.2rem;
    width: 100%;
    min-height: 3rem;
}

.admin-sidebar.collapsed .sidebar-brand-wrapper {
    justify-content: center;
    padding: 0;
    margin-top: 2.4rem;
    margin-bottom: 2.1rem;
}

.admin-sidebar.collapsed .admin-brand > span:last-child {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.admin-brand > span:last-child {
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.admin-sidebar.collapsed .admin-brand {
    justify-content: center;
    width: 2.75rem;
    min-width: 2.75rem;
    gap: 0 !important;
}

.admin-sidebar.collapsed .admin-brand-mark {
    width: 2.45rem;
    height: 2.45rem;
    min-width: 2.45rem;
    border-radius: 0.82rem;
}

/* Navigation Links list */
.admin-sidebar .admin-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    width: 100%;
}

.admin-sidebar .nav-item {
    width: 100%;
}

.admin-sidebar.collapsed .nav-item {
    display: flex;
    justify-content: center;
}

.admin-sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #8fa0ba;
    font-weight: 700;
    border-radius: 0.85rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0.75rem 1rem;
    height: 3.2rem;
    width: 100%;
    border: 1px solid transparent;
}

.admin-sidebar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.admin-sidebar.collapsed .nav-link {
    justify-content: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: 12px !important;
}

.admin-sidebar.collapsed .nav-link:hover {
    transform: scale(1.1);
}

.admin-sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(94, 231, 242, 0.12), rgba(94, 231, 242, 0.02)) !important;
    border: 1px solid rgba(94, 231, 242, 0.2) !important;
    color: #5ee7f2 !important;
    box-shadow: 0 4px 15px rgba(94, 231, 242, 0.08);
}

.admin-sidebar.collapsed .nav-link.active {
    background: linear-gradient(135deg, rgba(94, 231, 242, 0.22), rgba(103, 210, 246, 0.04)) !important;
    border: 1px solid rgba(94, 231, 242, 0.35) !important;
    box-shadow: 0 0 15px rgba(94, 231, 242, 0.25) !important;
}

.admin-sidebar .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.admin-sidebar .nav-link:hover i {
    transform: scale(1.1);
}

.admin-sidebar .nav-link span {
    margin-left: 0.95rem;
    font-size: 0.92rem;
    font-weight: 700;
}

.admin-sidebar.collapsed .nav-link span {
    display: none;
}

/* Premium Left Active Indicator Line */
.admin-sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 25%;
    height: 50%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #5ee7f2;
    box-shadow: 0 0 10px rgba(94, 231, 242, 0.8);
}

.admin-sidebar.collapsed .nav-link.active::before {
    display: none;
}

/* Sidebar expand/collapse button */
.sidebar-toggle-btn {
    position: absolute;
    right: 1rem;
    top: 1.45rem;
    z-index: 1010;
    border: 1px solid rgba(184, 205, 236, 0.16);
    background: #0d1423; /* Matches dark context card background to block line */
    color: #b7c7de;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.admin-sidebar.collapsed .sidebar-toggle-btn {
    left: 50%;
    right: auto;
    top: 0.5rem;
    transform: translateX(-50%);;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
}

.sidebar-toggle-btn:hover {
    background: rgba(73, 199, 245, 0.15);
    color: #ffffff;
    border-color: rgba(73, 199, 245, 0.35);
    box-shadow: 0 0 10px rgba(73, 199, 245, 0.25);
}

.sidebar-toggle-btn i {
    transition: transform 0.2s ease;
    font-size: 1.05rem;
}

/* Sidebar Footer & Actions */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid rgba(184, 205, 236, 0.12);
    padding-top: 1.25rem;
    width: 100%;
}

.admin-sidebar.collapsed .sidebar-footer {
    align-items: center;
}

.admin-user-badge-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.admin-sidebar.collapsed [data-admin-name] {
    display: none;
}

/* Turn User Badge into a perfect circle when collapsed */
.admin-sidebar.collapsed .admin-user-badge {
    width: 2.75rem !important;
    height: 2.75rem !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
}

.admin-sidebar.collapsed .admin-user-badge i {
    margin: 0 !important;
    font-size: 1.05rem;
}

.pressed {
    opacity: 0.7;
}

/* Responsive Session Listing Info Pills Collapse */
@media (max-width: 576px) {
    .session-info-pill-text {
        display: none !important;
    }
}

/* Biomechanical Results & SVG Overlay Styles */
.debug-image-viewer-card {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(184, 205, 236, 0.14);
}
.debug-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.debug-image-overlay circle {
    fill: #5ee7f2;
    stroke: #ffffff;
    stroke-width: 1.5px;
}
.debug-image-overlay line {
    stroke: #5ee7f2;
    stroke-width: 2px;
    stroke-linecap: round;
}
.debug-image-overlay line.dotted-segment {
    stroke-dasharray: 4,4;
    stroke-width: 1.5px;
}
.debug-image-overlay line.reference-vertical {
    stroke: #ffc874;
    stroke-dasharray: 2,4;
    stroke-width: 1px;
}
.debug-image-overlay text.angle-label {
    fill: #ffc874;
    font-size: 11px;
    font-weight: bold;
    font-family: 'Manrope', sans-serif;
}
.debug-image-overlay text.length-label {
    fill: #5ee7f2;
    font-size: 10px;
    font-weight: bold;
    font-family: 'Manrope', sans-serif;
}

/* Neon Glow curves chart */
.svg-chart-interactive path {
    filter: drop-shadow(0px 0px 4px rgba(94, 231, 242, 0.4));
}
.svg-chart-interactive path.knee-glow {
    stroke: #5ee7f2;
    stroke-width: 6px;
    opacity: 0.15;
}
.svg-chart-interactive path.trunk-glow {
    stroke: #ffc874;
    stroke-width: 4px;
    opacity: 0.15;
}

/* Clinical print report styling */
@media print {
    body, html {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12pt;
    }
    .admin-navbar, 
    .admin-sidebar, 
    .btn, 
    nav, 
    footer,
    #toggleDevStepsBtn,
    #devStepsContainer,
    .filter-box-shell,
    .search-box-shell,
    .breadcrumbRow,
    .tabRow,
    [data-action='backToPipeline'] {
        display: none !important;
    }
    main.container-xxl,
    .admin-sidebar + main.container-xxl {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .card.premium-card {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #000000 !important;
        margin-bottom: 2rem !important;
        page-break-inside: avoid;
    }
    .text-white, h1, h2, h3, h4, h5, h6, .list-primary {
        color: #000000 !important;
    }
    .text-secondary, .list-secondary {
        color: #555555 !important;
    }
    .badge {
        border: 1px solid #000000 !important;
        background: transparent !important;
        color: #000000 !important;
    }
    .clinical-detail-card, .metricCell, .pipeline-metric {
        background: #f8f9fa !important;
        border: 1px solid #dee2e6 !important;
        color: #000000 !important;
    }
    .debug-image-viewer-card {
        border: 1px solid #dee2e6 !important;
        page-break-inside: avoid;
    }
    svg {
        filter: none !important;
    }
    .svg-chart-interactive line {
        stroke: #dee2e6 !important;
    }
    .svg-chart-interactive text {
        fill: #333333 !important;
    }
    .svg-chart-interactive path {
        filter: none !important;
    }
}

.pipeline-list-grid {
    grid-template-columns: 2fr 1fr 2.2fr 1fr !important;
}

/* Small Pill & Eyebrow Toolbar Styles */
.admin-session-page .control-toolbar {
    align-items: flex-end !important;
}

.admin-session-page .control-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.admin-session-page .control-eyebrow {
    color: #9fb3ce;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    margin-left: 0.75rem;
}

.admin-session-page .capture-name-pill.small-pill {
    min-height: 2.2rem;
    padding: 0.1rem 0.75rem;
    gap: 0.5rem;
    min-width: min(100%, 14rem);
}

.admin-session-page .capture-name-pill.small-pill i {
    font-size: 0.8rem;
}

.admin-session-page .capture-name-pill.small-pill .capture-name-input {
    font-size: 0.85rem;
}

.admin-session-page .capture-name-pill.small-pill select.capture-name-input {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .admin-session-page .control-group {
        width: 100%;
    }
}

/* Center selection link styling in sidebar */
.center-link {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(184, 205, 236, 0.14);
    color: #eef5ff;
    transition: all 0.15s ease;
}

.center-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(184, 205, 236, 0.25);
    color: #ffffff;
}

/* Reduced size of admin icon and logout icon in sidebar */
.admin-user-badge i {
    font-size: 0.85rem;
}

.sidebar-footer form button i {
    font-size: 0.85rem;
}

/* Collapsed sidebar footer styling adjustments */
.admin-sidebar.collapsed .center-link {
    width: 2.75rem !important;
    height: 2.75rem !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
}

.admin-sidebar.collapsed .center-link span {
    display: none;
}

.admin-sidebar.collapsed .center-link i {
    margin: 0 !important;
    font-size: 1.05rem;
}

.admin-sidebar.collapsed .sidebar-footer form {
    display: flex;
    justify-content: center;
    width: 100%;
}

.admin-sidebar.collapsed .sidebar-footer form button {
    width: 2.75rem !important;
    height: 2.75rem !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
}

.admin-sidebar.collapsed .sidebar-footer form button i {
    margin: 0 !important;
    font-size: 1.05rem;
}

.admin-sidebar.collapsed .logout-text {
    display: none;
}

/* Custom Select Dropdowns Premium Styling */
.admin-session-page .capture-name-pill {
    position: relative;
}

.admin-session-page .capture-name-pill select.capture-name-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 1.8rem !important; /* space for custom chevron */
    cursor: pointer;
}

.admin-session-page .capture-name-pill i.fa-chevron-down {
    position: absolute;
    right: 1rem;
    pointer-events: none;
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1), color 0.22s ease;
}

.admin-session-page .capture-name-pill:focus-within i.fa-chevron-down {
    transform: rotate(180deg);
    color: #00c878;
}

.admin-session-page .capture-name-pill.small-pill i.fa-chevron-down {
    right: 0.75rem;
}

/* Premium Glow & Lift Hover transitions */
.available-phone-card {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.available-phone-card:hover {
    transform: translateY(-2px) scale(1.01) !important;
    border-color: rgba(94, 231, 242, 0.45) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 0 0 15px rgba(94, 231, 242, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.admin-session-page .btn-control,
.admin-session-page .btn-start,
.admin-session-page .btn-stop,
.admin-session-page .btn-complete {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

.admin-session-page .btn-control:hover:not(:disabled),
.admin-session-page .btn-start:hover:not(:disabled),
.admin-session-page .btn-stop:hover:not(:disabled),
.admin-session-page .btn-complete:hover:not(:disabled) {
    transform: translateY(-1.5px) scale(1.025);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    filter: brightness(1.1);
}

.admin-session-page .capture-history-row.border-danger-highlight {
    border-color: rgba(255, 91, 118, 0.45) !important;
    background: rgba(255, 91, 118, 0.04) !important;
}

/* Floating notification toast styles */
#kinaxiq-notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
    width: calc(100% - 40px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Let clicks pass through container */
}

.kinaxiq-toast {
    pointer-events: auto; /* Allow clicks on toasts themselves */
    animation: toastEntrance 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    background-color: rgba(18, 30, 49, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45) !important;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

@keyframes toastEntrance {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* OTP Pairing Code Modal Styles */
.otp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 8, 17, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.otp-modal-card {
    position: relative;
    background: rgba(10, 18, 33, 0.955);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 240, 255, 0.1), 0 10px 30px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 400px;
    padding: 2.5rem 2rem;
    text-align: center;
    font-family: 'Manrope', sans-serif;
    color: #ffffff;
}
.otp-modal-icon {
    font-size: 2.5rem;
    color: #5ee7f2;
    margin-bottom: 1rem;
}
.otp-modal-title {
    font-weight: 800;
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #ffffff 30%, #a5bdfd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.otp-modal-body {
    color: #8292ad;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.otp-input-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.otp-input-field {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(5, 10, 18, 0.6);
    border: 1px solid rgba(184, 205, 236, 0.15);
    border-radius: 0.75rem;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}
.otp-input-field:focus {
    border-color: #5ee7f2;
    box-shadow: 0 0 15px rgba(94, 231, 242, 0.25);
    background: rgba(5, 10, 18, 0.85);
}
.otp-timer {
    font-size: 0.8rem;
    color: #ff858f;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.otp-btn-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
}
.otp-btn {
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.otp-btn-confirm {
    background: linear-gradient(135deg, #00f0ff, #0072ff);
    color: #030f1d;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
}
.otp-btn-confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 240, 255, 0.35);
}
.otp-btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.otp-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.otp-close-x {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.otp-close-x:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    border-color: rgba(94, 231, 242, 0.35) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.btn-action-slim {
    padding: 0.25rem 0.65rem !important;
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 4.8rem !important;
    gap: 0.3rem !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}
.btn-action-slim i {
    font-size: 0.72rem !important;
    line-height: 1 !important;
}

.btn-action-icon {
    width: 2.15rem !important;
    height: 2.15rem !important;
    padding: 0 !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    border-radius: 50% !important;
    transition: all 0.2s ease-in-out !important;
}
.btn-action-icon i {
    font-size: 0.95rem !important;
    line-height: 1 !important;
}
.btn-action-icon:hover {
    transform: scale(1.1) !important;
}

#usersListJsWrapper .pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0;
    margin: 0;
    list-style: none;
}
#usersListJsWrapper .pagination li {
    display: inline-block;
}
#usersListJsWrapper .pagination .page {
    display: inline-grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    font-size: 0.78rem;
    font-weight: 900;
    color: #b8cdec;
    border: 1px solid rgba(184, 205, 236, 0.14);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    transition: all 0.25s ease;
}
#usersListJsWrapper .pagination li.active .page {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.95);
    background: linear-gradient(135deg, #90f1ff, #67d2f6);
    box-shadow: 0 8px 20px rgba(94, 231, 242, 0.2);
}
#usersListJsWrapper .pagination .page:hover {
    color: #06141d;
    border-color: rgba(94, 231, 242, 0.7);
    background: #5ee7f2;
}

/* warning pulse alert animation for center selection link */
@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(246, 189, 95, 0.45); border-color: rgba(246, 189, 95, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(246, 189, 95, 0); border-color: rgba(246, 189, 95, 0.25); }
    100% { box-shadow: 0 0 0 0 rgba(246, 189, 95, 0); border-color: rgba(246, 189, 95, 0.5); }
}

.center-link.pulse-warning-glow {
    animation: pulse-warning 2s infinite !important;
    border-color: rgba(246, 189, 95, 0.6) !important;
    background: rgba(246, 189, 95, 0.08) !important;
    color: #ffd27c !important;
}

.center-link.pulse-warning-glow i {
    color: hsl(35, 100%, 60%) !important;
}

/* Hover scales for circular collapsed elements */
.admin-sidebar.collapsed .center-link:hover,
.admin-sidebar.collapsed .sidebar-footer form button:hover,
.admin-sidebar.collapsed .admin-user-badge:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 0 15px rgba(94, 231, 242, 0.15) !important;
}

/* Responsive adjustments for mobile and 11-inch/13-inch tablets (up to 1200px) */
@media (max-width: 1200px) {
    body.admin-home-page,
    body.patient-form-page,
    body.center-form-page {
        padding-left: 0 !important;
    }

    .admin-sidebar {
        left: -300px !important;
        width: 260px !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1050;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.6);
        transform: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(10, 18, 30, 0.98) !important;
    }
    
    .admin-sidebar:not(.collapsed) {
        left: 0 !important;
    }

    .admin-sidebar.collapsed {
        left: -300px !important;
        width: 260px !important;
        padding: 1.5rem 1rem !important;
        align-items: stretch !important;
    }

    .admin-sidebar.collapsed .sidebar-brand-wrapper {
        justify-content: space-between !important;
        padding: 0 0.2rem !important;
        margin-top: 0 !important;
        margin-bottom: 2.5rem !important;
    }

    .admin-sidebar.collapsed .admin-brand > span:last-child {
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    .admin-sidebar.collapsed .admin-brand {
        justify-content: flex-start !important;
        width: auto !important;
        min-width: 0 !important;
        gap: 0.65rem !important;
    }

    .admin-sidebar.collapsed .admin-brand-mark {
        width: 2.5rem !important;
        height: 2.5rem !important;
        min-width: 2.5rem !important;
        border-radius: 0.85rem !important;
    }

    .admin-sidebar.collapsed .nav-item {
        display: block !important;
    }

    .admin-sidebar.collapsed .nav-link {
        justify-content: flex-start !important;
        padding: 0.8rem 1.2rem !important;
        border-radius: 0.75rem !important;
    }

    .admin-sidebar.collapsed .nav-link span {
        display: inline !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .admin-sidebar.collapsed .center-link {
        width: 100% !important;
        height: auto !important;
        padding: 0.75rem 1rem !important;
        border-radius: 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .admin-sidebar.collapsed .center-link span {
        display: inline !important;
    }

    .admin-sidebar.collapsed .center-link i {
        margin-right: 0.5rem !important;
    }

    .admin-sidebar.collapsed .sidebar-footer form {
        display: block !important;
        width: 100% !important;
    }

    .admin-sidebar.collapsed .sidebar-footer form button {
        width: 100% !important;
        height: auto !important;
        padding: 0.5rem 1rem !important;
        border-radius: 0.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .admin-sidebar.collapsed .logout-text {
        display: inline !important;
    }

    .admin-sidebar.collapsed [data-admin-name] {
        display: inline !important;
    }

    .admin-sidebar.collapsed .admin-user-badge {
        padding: 0.5rem 1rem !important;
        border-radius: 0.75rem !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* Float toggle button at top-left */
    .sidebar-toggle-btn {
        position: fixed !important;
        top: 1rem !important;
        left: calc(260px - 3.5rem) !important;
        z-index: 1100 !important;
        background: rgba(18, 30, 49, 0.85) !important;
        border: 1px solid rgba(94, 231, 242, 0.25) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-radius: 50% !important;
        width: 2.75rem !important;
        height: 2.75rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
        color: #ffffff !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .admin-sidebar.collapsed .sidebar-toggle-btn {
        position: fixed !important;
        left: 1rem !important;
    }

    /* Shift the main container down on mobile to clear the floating button */
    main.container-xxl {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-top: 4.5rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
    }

    .admin-sidebar.collapsed + main.container-xxl {
        margin-left: 0 !important;
    }
}

/* ==========================================================================
   Premium Admin Home Page Redesign Styles
   ========================================================================== */

/* Ambient Glow Orbs */
.bg-glow-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.bg-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    animation: floatOrb 25s infinite alternate ease-in-out;
    will-change: transform;
}
.bg-glow-orb-1 {
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #5ee7f2 0%, transparent 70%);
    top: -15%;
    left: -15%;
}
.bg-glow-orb-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #29bed5 0%, transparent 70%);
    bottom: -15%;
    right: -15%;
    animation-delay: -8s;
}

/* Glassmorphism Premium Cards */
.premium-card.glass-card {
    background: rgba(18, 30, 49, 0.45) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(94, 231, 242, 0.12) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35) !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.premium-card.glass-card:hover {
    transform: translateY(-6px) !important;
    border-color: rgba(94, 231, 242, 0.28) !important;
    /* box-shadow: 7px 11px 20px rgba(94, 231, 242, 0.12) !important; */
}

/* Telemetry Badge for selected Center */
.telemetry-card {
    background: rgba(18, 30, 49, 0.75);
    border: 1px solid rgba(94, 231, 242, 0.25) !important;
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.25s ease-in-out;
}

.telemetry-card:hover {
    border-color: rgba(94, 231, 242, 0.6) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.telemetry-card.warning {
    background: rgba(30, 22, 18, 0.75);
    border: 1px solid rgba(255, 200, 116, 0.25) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.telemetry-card.warning:hover {
    border-color: rgba(255, 200, 116, 0.6) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #5ee7f2;
    display: inline-block;
    box-shadow: 0 0 10px #5ee7f2;
}
.status-dot.pulsing {
    animation: statusPulse 1.5s infinite alternate;
}
@keyframes statusPulse {
    0% { opacity: 0.5; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 14px #5ee7f2; }
}

/* Feature Showcase Grid */
.feature-showcase-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (max-width: 991px) {
    .feature-showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* Feature Showcase Card (No-Image version) */
.feature-showcase-card {
    background: rgba(18, 30, 49, 0.45) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.35) !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    border-radius: 20px;
    overflow: visible;
    position: relative;
}
.feature-showcase-card:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45) !important;
}
.feature-showcase-card .badge {
    position: absolute !important;
    top: -10px !important;
    left: 24px !important;
    margin: 0 !important;
    z-index: 5 !important;
}

/* 3D Tilted Card Visual */
.home-hero-tilt-wrapper {
    perspective: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
    padding: 2.2rem 0;
}

.home-hero-tilt-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    border-radius: 20px;
    background: rgba(18, 30, 49, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 20px 50px rgba(0, 0, 0, 0.6);
    transform: rotateX(8deg) rotateY(-16deg) rotateZ(3deg);
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s ease;
    overflow: visible;
}

.home-hero-tilt-card.is-tilting {
    transition: transform 0.1s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.home-hero-tilt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(
        circle 300px at var(--shine-x, 50%) var(--shine-y, 50%),
        rgba(255, 255, 255, 0.18) 0%,
        rgba(255, 255, 255, 0) 65%
    );
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: overlay;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.home-hero-tilt-card:hover::before {
    opacity: 1;
}

.home-hero-tilt-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(94, 231, 242, 0.1) 0%, transparent 60%);
    pointer-events: none;
    z-index: 8;
    transition: opacity 0.6s ease;
}

.home-hero-tilt-card:hover {
    border-color: #3b82f6;
    box-shadow: -25px 25px 60px rgba(0, 0, 0, 0.75);
    transform: rotateX(4deg) rotateY(-8deg) rotateZ(1.5deg) scale(1.02);
}

.mockup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(8, 15, 30, 0.85);
    border-bottom: 1px solid rgba(94, 231, 242, 0.12);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transform: translateZ(25px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mockup-dots {
    display: flex;
    gap: 0.38rem;
}

.mockup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.mockup-dot.red { background-color: #ff5f56; }
.mockup-dot.yellow { background-color: #ffbd2e; }
.mockup-dot.green { background-color: #27c93f; }

.mockup-version {
    font-size: 0.65rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mockup-body {
    width: 100%;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow: hidden;
    transform: translateZ(15px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: #080f1e;
}

.mockup-body img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.85;
    transform: scale(1.01);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-hero-tilt-card:hover .mockup-body img {
    opacity: 1;
    transform: scale(1.03) translateZ(5px);
}


/* slow reveal effect classes */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: customReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes customReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

.home-stat-card {
    background: rgba(18, 30, 49, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.home-stat-card:hover {
    transform: translateY(-2px) !important;
}

.home-stat-value {
    font-family: 'Manrope', sans-serif;
    font-size: 2.2rem;
    font-weight: 850;
    transition: all 0.3s ease;
}

/* Stats Cyan */
.stat-card-cyan:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(94, 231, 242, 0.5), rgba(41, 190, 213, 0.15)) border-box !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45) !important;
}
.stat-card-cyan .home-stat-value {
    background: linear-gradient(135deg, #ffffff 30%, #5ee7f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Stats Amber */
.stat-card-amber:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(255, 200, 116, 0.5), rgba(246, 189, 95, 0.15)) border-box !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45) !important;
}
.stat-card-amber .home-stat-value {
    background: linear-gradient(135deg, #ffffff 30%, #ffc874 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Stats Green */
.stat-card-green:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(57, 201, 128, 0.5), rgba(39, 201, 128, 0.15)) border-box !important;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.45) !important;
}
.stat-card-green .home-stat-value {
    background: linear-gradient(135deg, #ffffff 30%, #39c980 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}



.feature-showcase-card h3 {
    transition: all 0.3s ease;
    display: inline-block;
}

/* Showcase Cyan */
.showcase-card-cyan:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(94, 231, 242, 0.5), rgba(41, 190, 213, 0.15)) border-box !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45) !important;
}
.showcase-card-cyan:hover h3 {
    background: linear-gradient(135deg, #ffffff 30%, #5ee7f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Showcase Amber */
.showcase-card-amber:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(255, 200, 116, 0.5), rgba(246, 189, 95, 0.15)) border-box !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45) !important;
}
.showcase-card-amber:hover h3 {
    background: linear-gradient(135deg, #ffffff 30%, #ffc874 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Showcase Green */
.showcase-card-green:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(57, 201, 128, 0.5), rgba(39, 201, 128, 0.15)) border-box !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45) !important;
}
.showcase-card-green:hover h3 {
    background: linear-gradient(135deg, #ffffff 30%, #39c980 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Showcase Silver */
.showcase-card-silver:hover {
    background: linear-gradient(rgba(18, 30, 49, 0.55), rgba(8, 15, 30, 0.65)) padding-box,
                linear-gradient(135deg, rgba(174, 190, 187, 0.5), rgba(174, 190, 187, 0.15)) border-box !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45) !important;
}
.showcase-card-silver:hover h3 {
    background: linear-gradient(135deg, #ffffff 30%, #aebebb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.center-select-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.center-select-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.center-select-card.selected {
    background: rgba(94, 231, 242, 0.08);
    border-color: #5ee7f2 !important;
}

.center-select-card.selected strong {
    color: #5ee7f2 !important;
}

/* Telemetry Icon & Pulse styles */
.telemetry-icon-wrapper {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    transition: all 0.35s ease;
}

.telemetry-card.active .telemetry-icon-wrapper {
    background: rgba(94, 231, 242, 0.12);
    color: #5ee7f2;
    border: 1px solid rgba(94, 231, 242, 0.25);
    box-shadow: none;
}

.telemetry-card.warning .telemetry-icon-wrapper {
    background: rgba(255, 200, 116, 0.12);
    color: #ffc874;
    border: 1px solid rgba(255, 200, 116, 0.25);
    box-shadow: none;
}

.pulsing-icon {
    animation: none;
}

.settings-qr-panel {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 220px !important;
    height: 100% !important;
    padding: 24px !important;
    border-radius: 16px !important;
    background: rgba(0, 0, 0, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

.settings-qr-panel:hover {
    border-color: rgba(94, 231, 242, 0.2) !important;
    background: rgba(0, 0, 0, 0.25) !important;
}

.bridge-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 200, 120, 0.15);
    border: 1px solid rgba(0, 200, 120, 0.4);
    color: #00c878;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 12px;
    vertical-align: middle;
}

.bridge-mode-badge .bridge-mode-icon {
    font-size: 8px;
    animation: bridgePulse 2s ease-in-out infinite;
}

.bridge-mode-badge.bridge-unreachable {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.4);
    color: #ff5050;
}

@keyframes bridgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.manual-upload-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.75) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease !important;
}

.manual-upload-card:hover {
    border-color: rgba(94, 231, 242, 0.3) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35), 0 0 20px rgba(94, 231, 242, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

.manual-upload-card .form-label {
    font-size: 0.72rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    margin-bottom: 0.35rem !important;
}

.manual-upload-card .form-control {
    background-color: rgba(15, 23, 42, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    color: #f8fafc !important;
    padding: 0.45rem 0.75rem !important;
    font-size: 0.78rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.manual-upload-card .form-control:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.manual-upload-card .form-control:focus {
    border-color: rgba(94, 231, 242, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(94, 231, 242, 0.12) !important;
    background-color: rgba(15, 23, 42, 0.7) !important;
}

.manual-form-container {
    background: rgba(15, 23, 42, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px !important;
    padding: 14px !important;
}

.manual-filled-details {
    background: rgba(15, 23, 42, 0.45) !important;
    border: 1px solid rgba(94, 231, 242, 0.15) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.btn-manual-save,
.btn-manual-edit {
    background: rgba(245, 158, 11, 0.08) !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
    color: #f59e0b !important;
    font-weight: 600 !important;
    border-radius: 30px !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.75rem !important;
    transition: all 0.2s ease !important;
}

.btn-manual-save:hover,
.btn-manual-edit:hover {
    background: rgba(245, 158, 11, 0.18) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    color: #fbbf24 !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.15) !important;
}

.btn-manual-upload {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: 1px solid rgba(6, 182, 212, 0.2) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    border-radius: 30px !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.02em;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2) !important;
}

.btn-manual-upload:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
    border-color: rgba(6, 182, 212, 0.4) !important;
    box-shadow: 0 6px 15px rgba(6, 182, 212, 0.3) !important;
}

/* ==========================================================================
   React Native Admin Studio WebView surface
   ========================================================================== */

body.mobile-controller-surface {
    overflow-x: hidden;
    background-attachment: scroll;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.mobile-controller-surface .admin-sidebar {
    display: none !important;
}

body.external-report-mode .admin-sidebar {
    display: none !important;
}

body.mobile-controller-surface main.container-xxl,
body.mobile-controller-surface .admin-sidebar + main.container-xxl,
body.mobile-controller-surface .admin-sidebar.collapsed + main.container-xxl,
body.external-report-mode main.container-xxl,
body.external-report-mode .admin-sidebar + main.container-xxl,
body.external-report-mode .admin-sidebar.collapsed + main.container-xxl {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
    padding-top: 1rem !important;
}

body.mobile-controller-surface .premium-header,
body.mobile-controller-surface .premium-card,
body.mobile-controller-surface .card,
body.external-report-mode .premium-header,
body.external-report-mode .premium-card,
body.external-report-mode .card {
    border-radius: 0.85rem !important;
}

body.mobile-controller-surface .card-body,
body.external-report-mode .card-body {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

body.mobile-controller-surface .admin-table-scroll,
body.mobile-controller-surface .table-responsive,
body.external-report-mode .admin-table-scroll,
body.external-report-mode .table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body.mobile-controller-surface table,
body.external-report-mode table {
    min-width: 680px;
}

body.mobile-controller-surface .list-pagination,
body.external-report-mode .list-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
}

body.mobile-controller-surface .pagination-actions,
body.mobile-controller-surface .page-size-selector,
body.mobile-controller-surface .list-pagination > div,
body.external-report-mode .pagination-actions,
body.external-report-mode .page-size-selector,
body.external-report-mode .list-pagination > div {
    flex-wrap: wrap;
}

body.mobile-controller-surface .admin-three-col,
body.mobile-controller-surface .permission-group-three-col,
body.mobile-controller-surface .permission-select-grid,
body.mobile-controller-surface .action-mapping-context,
body.mobile-controller-surface .action-mapping-picker-grid,
body.mobile-controller-surface .feature-showcase-grid,
body.external-report-mode .admin-three-col,
body.external-report-mode .permission-group-three-col,
body.external-report-mode .permission-select-grid,
body.external-report-mode .action-mapping-context,
body.external-report-mode .action-mapping-picker-grid,
body.external-report-mode .feature-showcase-grid {
    grid-template-columns: 1fr !important;
}

body.mobile-controller-surface .admin-action-panel-header,
body.mobile-controller-surface .premium-card .d-flex.justify-content-between,
body.mobile-controller-surface .premium-header .d-flex.justify-content-between,
body.external-report-mode .admin-action-panel-header,
body.external-report-mode .premium-card .d-flex.justify-content-between,
body.external-report-mode .premium-header .d-flex.justify-content-between {
    align-items: stretch !important;
    flex-wrap: wrap !important;
}

body.mobile-controller-surface .btn,
body.mobile-controller-surface .form-control,
body.mobile-controller-surface .form-select,
body.external-report-mode .btn,
body.external-report-mode .form-control,
body.external-report-mode .form-select {
    max-width: 100%;
}

body.mobile-controller-surface .btn.rounded-pill,
body.external-report-mode .btn.rounded-pill {
    white-space: normal;
}

body.mobile-controller-surface .action-mapping-modal-backdrop,
body.mobile-controller-surface .modal,
body.external-report-mode .action-mapping-modal-backdrop,
body.external-report-mode .modal {
    padding: 0.75rem;
}

@media (max-width: 600px) {
    body.mobile-controller-surface main.container-xxl,
    body.mobile-controller-surface .admin-sidebar + main.container-xxl,
    body.mobile-controller-surface .admin-sidebar.collapsed + main.container-xxl,
    body.external-report-mode main.container-xxl,
    body.external-report-mode .admin-sidebar + main.container-xxl,
    body.external-report-mode .admin-sidebar.collapsed + main.container-xxl {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    body.mobile-controller-surface h1,
    body.mobile-controller-surface .h1,
    body.external-report-mode h1,
    body.external-report-mode .h1 {
        font-size: 1.45rem !important;
        line-height: 1.2;
    }

    body.mobile-controller-surface h2,
    body.mobile-controller-surface .h2,
    body.external-report-mode h2,
    body.external-report-mode .h2 {
        font-size: 1.25rem !important;
        line-height: 1.25;
    }

    body.mobile-controller-surface .card-body,
    body.external-report-mode .card-body {
        padding: 0.9rem !important;
    }

    body.mobile-controller-surface .nav-tabs,
    body.external-report-mode .nav-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    body.mobile-controller-surface .nav-tabs .nav-link,
    body.external-report-mode .nav-tabs .nav-link {
        white-space: nowrap;
    }

    body.mobile-controller-surface .btn,
    body.external-report-mode .btn {
        min-height: 2.35rem;
    }
}

/* ==========================================================================
   Mobile Controller WebView Style Adjustments & Responsiveness
   ========================================================================== */

/* Spacing and Padding Adjustments */
body.mobile-controller-surface main.container-xxl,
body.external-report-mode main.container-xxl {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-top: 0.5rem !important;
    gap: 0.75rem !important;
}

body.mobile-controller-surface .card-body,
body.mobile-controller-surface .card-header,
body.external-report-mode .card-body,
body.external-report-mode .card-header {
    padding: 0.75rem !important;
}

body.mobile-controller-surface .gap-4,
body.external-report-mode .gap-4 {
    gap: 0.75rem !important;
}

body.mobile-controller-surface hr,
body.external-report-mode hr {
    display: none !important;
}

/* Hide clinician instruction banners to save vertical space */
body.mobile-controller-surface .premium-header .text-secondary,
body.mobile-controller-surface .premium-header .ps-3,
body.external-report-mode .premium-header .text-secondary,
body.external-report-mode .premium-header .ps-3 {
    display: none !important;
}

/* Stack tabular data to visual cards on phone widths */
@media (max-width: 768px) {
    body.mobile-controller-surface .table-responsive table,
    body.external-report-mode .table-responsive table {
        min-width: 100% !important;
    }
    
    body.mobile-controller-surface table.premium-table-custom,
    body.mobile-controller-surface table.premium-table-custom thead,
    body.mobile-controller-surface table.premium-table-custom tbody,
    body.mobile-controller-surface table.premium-table-custom th,
    body.mobile-controller-surface table.premium-table-custom td,
    body.mobile-controller-surface table.premium-table-custom tr,
    body.external-report-mode table.premium-table-custom,
    body.external-report-mode table.premium-table-custom thead,
    body.external-report-mode table.premium-table-custom tbody,
    body.external-report-mode table.premium-table-custom th,
    body.external-report-mode table.premium-table-custom td,
    body.external-report-mode table.premium-table-custom tr {
        display: block !important;
    }
    
    body.mobile-controller-surface table.premium-table-custom thead,
    body.external-report-mode table.premium-table-custom thead {
        display: none !important; /* Hide column headers */
    }
    
    body.mobile-controller-surface table.premium-table-custom tr,
    body.external-report-mode table.premium-table-custom tr {
        margin-bottom: 0.85rem;
        background: rgba(15, 23, 42, 0.45) !important;
        border: 1px solid rgba(184, 205, 236, 0.12) !important;
        border-radius: 12px !important;
        padding: 0.75rem !important;
    }
    
    body.mobile-controller-surface table.premium-table-custom td,
    body.external-report-mode table.premium-table-custom td {
        border-top: none !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        padding: 0.6rem 0 !important;
        text-align: left !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    body.mobile-controller-surface table.premium-table-custom td:last-child,
    body.external-report-mode table.premium-table-custom td:last-child {
        border-bottom: none !important;
        justify-content: flex-end !important;
    }

    /* Prefix cells with their header label on mobile */
    body.mobile-controller-surface table.premium-table-custom td::before,
    body.external-report-mode table.premium-table-custom td::before {
        content: attr(data-label);
        display: inline-block !important;
        font-weight: 700 !important;
        color: #8292ad !important;
        font-size: 0.8rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
        margin-bottom: 0 !important;
    }

    body.mobile-controller-surface table.premium-table-custom td[data-label=""]::before,
    body.mobile-controller-surface table.premium-table-custom td:not([data-label])::before,
    body.external-report-mode table.premium-table-custom td[data-label=""]::before,
    body.external-report-mode table.premium-table-custom td:not([data-label])::before {
        display: none !important;
    }
    
    body.mobile-controller-surface table.premium-table-custom td .d-flex.justify-content-end,
    body.external-report-mode table.premium-table-custom td .d-flex.justify-content-end {
        justify-content: flex-end !important;
        width: auto;
        margin-top: 0;
    }

    body.mobile-controller-surface .text-truncate,
    body.external-report-mode .text-truncate {
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }
}

/* External browser Admin Actions surface opened from Admin Studio */
body.external-report-mode main.admin-actions-external-page {
    padding-bottom: 1rem !important;
}

body.external-report-mode #adminActionsTabs {
    border-bottom: 0 !important;
    display: grid !important;
    gap: 0.45rem !important;
    grid-template-columns: repeat(auto-fit, minmax(8.25rem, 1fr));
}

body.external-report-mode #adminActionsTabs .nav-item {
    min-width: 0;
}

body.external-report-mode #adminActionsTabs .nav-link {
    align-items: center;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(184, 205, 236, 0.12) !important;
    border-radius: 0.75rem !important;
    display: flex;
    font-size: 0.78rem;
    font-weight: 800;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0.45rem 0.55rem;
    width: 100%;
}

body.external-report-mode #adminActionsTabs .nav-link.active {
    background: rgba(6, 182, 212, 0.16) !important;
    border-color: rgba(6, 182, 212, 0.48) !important;
    color: #e6fdff !important;
}

@media (max-width: 768px) {
    body.external-report-mode main.admin-actions-external-page {
        padding-left: 0.55rem !important;
        padding-right: 0.55rem !important;
    }

    body.external-report-mode main.admin-actions-external-page > .premium-card:first-child {
        display: none !important;
    }

    body.external-report-mode #adminActionsTabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 0.75rem !important;
    }

    body.external-report-mode #adminActionsTabs .nav-link {
        font-size: 0.72rem;
        gap: 0.25rem;
        min-height: 2.25rem;
        padding: 0.4rem 0.35rem;
    }

    body.external-report-mode #adminActionsTabs .nav-link i {
        margin-right: 0.25rem !important;
    }

    body.external-report-mode main.admin-actions-external-page .card-header {
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    body.external-report-mode main.admin-actions-external-page .card-header > .d-flex {
        align-items: stretch !important;
        flex-direction: column !important;
        width: 100%;
    }

    body.external-report-mode main.admin-actions-external-page .card-header .search-box-shell {
        max-width: none !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    body.external-report-mode main.admin-actions-external-page .card-header .btn {
        justify-content: center;
        width: 100%;
    }

    body.external-report-mode main.admin-actions-external-page #actionsTotalBadge {
        align-self: flex-start;
        width: auto;
    }

    body.external-report-mode main.admin-actions-external-page .admin-table-scroll,
    body.external-report-mode main.admin-actions-external-page .table-responsive {
        overflow-x: hidden !important;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom {
        border-spacing: 0 0.85rem !important;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom tr {
        background:
            linear-gradient(145deg, rgba(10, 20, 38, 0.94), rgba(14, 27, 50, 0.82)) !important;
        border: 1px solid rgba(94, 231, 242, 0.18) !important;
        border-radius: 0.95rem !important;
        box-shadow: 0 14px 30px rgba(2, 8, 23, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        margin-bottom: 0.9rem !important;
        overflow: hidden;
        padding: 0.85rem 0.95rem 0.75rem !important;
        position: relative;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom tr::before {
        background: linear-gradient(90deg, rgba(94, 231, 242, 0.88), rgba(246, 189, 95, 0.58));
        content: "";
        height: 3px;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 0.35rem;
        border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
        color: rgba(226, 232, 240, 0.9) !important;
        min-width: 0;
        padding: 0.62rem 0 !important;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td:first-child {
        padding-top: 0.25rem !important;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td:first-child::before {
        background: rgba(94, 231, 242, 0.12);
        border: 1px solid rgba(94, 231, 242, 0.24);
        border-radius: 999px;
        color: #87f4ff !important;
        margin-bottom: 0.35rem !important;
        padding: 0.2rem 0.5rem;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td:first-child > * {
        color: #f8fafc !important;
        font-size: 0.96rem !important;
        font-weight: 900 !important;
        line-height: 1.25 !important;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td::before {
        background: rgba(148, 163, 184, 0.08);
        border-radius: 999px;
        color: #93a7c7 !important;
        font-size: 0.66rem !important;
        line-height: 1;
        padding: 0.18rem 0.45rem;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td .badge {
        border-color: rgba(94, 231, 242, 0.18) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td:last-child {
        align-items: stretch !important;
        justify-content: stretch !important;
        padding-bottom: 0 !important;
    }

    body.external-report-mode main.admin-actions-external-page .btn-action-icon {
        border-radius: 0.7rem !important;
        height: 2rem;
        min-height: 2rem;
        width: 2rem;
    }

    body.external-report-mode main.admin-actions-external-page table.premium-table-custom td:last-child .d-flex {
        background: rgba(255, 255, 255, 0.035);
        border-radius: 0.75rem;
        gap: 0.45rem !important;
        justify-content: flex-end !important;
        padding: 0.35rem;
        width: 100%;
    }

    body.external-report-mode main.admin-actions-external-page .pagination-actions {
        justify-content: center;
    }
}

