* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f7fb;
    color: #223046;
    overflow-x: hidden;
}

a {
    color: #1e5eff;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
    border-right: 1px solid #dce5f3;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 14px 12px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(34, 48, 70, 0.08);
    margin-bottom: 24px;
}

.sidebar-brand-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.sidebar-brand-logo {
    width: 100%;
    max-width: 230px;
    height: auto;
}

.sidebar-brand-mark {
    width: 88px;
    height: 88px;
    border-radius: 22px;
    background: #f7f8fc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(34, 48, 70, 0.08);
}

.sidebar-brand-mark-small {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    flex: 0 0 52px;
}

.sidebar-brand-mark img {
    width: 64px;
    height: 64px;
}

.sidebar-brand-mark-small img {
    width: 34px;
    height: 34px;
}

.sidebar-brand-text strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1.1;
    color: #0f2752;
}

.sidebar-brand-text span {
    display: block;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #5f7392;
    margin-top: 8px;
}

.sidebar-brand-text-inline strong {
    font-size: 1.55rem;
    margin: 0;
}

.nav-group {
    margin-bottom: 18px;
}

.nav-group-title {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7c8aa0;
    padding: 8px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: #2f425e;
    border-radius: 14px;
    margin-bottom: 6px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #1e5eff;
    color: #fff;
    box-shadow: 0 10px 24px rgba(30, 94, 255, 0.2);
}

.icon-chip {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(30, 94, 255, 0.12);
    font-size: 0.75rem;
    font-weight: 700;
}

.nav-link.active .icon-chip,
.nav-link:hover .icon-chip {
    background: rgba(255, 255, 255, 0.16);
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 26px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
    min-width: 0;
}

.topbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.page-heading h1 {
    margin: 0;
    font-size: 1.6rem;
}

.page-heading p {
    margin: 4px 0 0;
    color: #7a869a;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 10px 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(34, 48, 70, 0.08);
}

.topbar-user span {
    display: block;
    font-size: 0.85rem;
    color: #78869c;
}

.topbar-user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.username-availability {
    min-height: 20px;
    font-size: 0.88rem;
    font-weight: 700;
}

.username-availability-used,
.username-availability-invalid {
    color: #b42318;
}

.username-availability-available {
    color: #166534;
}

.username-availability-checking {
    color: #1d4ed8;
}

.menu-toggle {
    display: none;
    border: 0;
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 14px 34px rgba(34, 48, 70, 0.08);
    cursor: pointer;
}

.stats-grid,
.card-grid,
.capacity-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.dashboard-filter {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.dashboard-filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(34, 48, 70, 0.07);
}

.dashboard-filter-form label {
    color: #365074;
    font-size: 0.9rem;
    font-weight: 700;
}

.dashboard-filter-form select {
    min-width: 92px;
    border: 1px solid #d8e1ef;
    border-radius: 10px;
    padding: 8px 32px 8px 10px;
    background: #fbfcff;
    color: #102348;
    font: inherit;
}

.chart-filter-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chart-filter-form label {
    color: #365074;
    font-size: 0.9rem;
    font-weight: 700;
}

.chart-filter-form select {
    min-width: 118px;
    border: 1px solid #d8e1ef;
    border-radius: 10px;
    padding: 8px 32px 8px 10px;
    background: #fbfcff;
    color: #102348;
    font: inherit;
}

.card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-mutasi-ba {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 3fr);
    align-items: start;
}

.card-grid-mutasi-bhp {
    grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr);
    align-items: start;
}

.card-grid-riwayat-bhp {
    grid-template-columns: minmax(320px, 1fr) minmax(0, 2fr);
    align-items: start;
}

.dashboard-electric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-dashboard-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    margin-bottom: 18px;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid #d8e1ef;
    box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08);
}

.user-dashboard-hero-green {
    background: linear-gradient(135deg, #dcfce7 0%, #fef9c3 100%);
    border-color: #86efac;
}

.user-dashboard-hero-yellow {
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border-color: #fde68a;
}

.user-dashboard-hero-red {
    background: linear-gradient(135deg, #fee2e2 0%, #fff1f2 100%);
    border-color: #fecaca;
}

.user-dashboard-hero span {
    display: inline-flex;
    margin-bottom: 6px;
    color: #365074;
    font-weight: 800;
}

.user-dashboard-hero h2 {
    margin: 0;
    color: #081f45;
    font-size: clamp(1.35rem, 2.2vw, 2.1rem);
    line-height: 1.2;
}

.user-dashboard-hero p {
    margin: 10px 0 0;
    color: #405879;
    font-weight: 700;
}

.user-dashboard-rank-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-dashboard-trophy,
.user-dashboard-rank-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 106px;
    height: 106px;
    border-radius: 28px;
    font-size: 4rem;
    box-shadow: 0 18px 36px rgba(34, 48, 70, 0.14);
}

.user-dashboard-trophy-gold {
    background: #facc15;
}

.user-dashboard-trophy-silver {
    background: #e5e7eb;
}

.user-dashboard-trophy-bronze {
    background: #d97706;
}

.user-dashboard-rank-circle {
    background: #fff;
    color: #0f2752;
    font-size: 2.4rem;
    font-weight: 900;
}

.user-dashboard-podium-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.user-dashboard-podium-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid #d8e1ef;
}

.user-dashboard-podium-gold {
    background: #fef9c3;
}

.user-dashboard-podium-silver {
    background: #f1f5f9;
}

.user-dashboard-podium-bronze {
    background: #ffedd5;
}

.user-dashboard-mini-trophy {
    font-size: 2rem;
}

.user-dashboard-podium-card span,
.user-dashboard-podium-card small {
    color: #405879;
    font-weight: 800;
}

.user-dashboard-podium-card strong {
    color: #081f45;
    font-size: 1.25rem;
}

.user-dashboard-standings-table tbody tr td {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.user-dashboard-standings-table .user-dashboard-standing-green td {
    background: #ecfdf3;
}

.user-dashboard-standings-table .user-dashboard-standing-yellow td {
    background: #fffbeb;
}

.user-dashboard-standings-table .user-dashboard-standing-red td {
    background: #fff1f2;
}

.user-dashboard-standings-table .user-dashboard-current-row td {
    box-shadow: inset 0 0 0 9999px rgba(37, 99, 235, 0.07);
    font-weight: 800;
}

.user-dashboard-zone-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.user-dashboard-zone-green {
    background: #bbf7d0;
    color: #166534;
}

.user-dashboard-zone-yellow {
    background: #fde68a;
    color: #92400e;
}

.user-dashboard-zone-red {
    background: #fecdd3;
    color: #be123c;
}

.login-confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 120;
}

.user-dashboard-login-effect-yellow {
    animation: dashboardPulseYellow 2.4s ease-in-out 1;
}

.user-dashboard-login-effect-red {
    animation: dashboardShakeRed 0.7s ease-out 1, dashboardPulseRed 2.5s ease-in-out 1;
}

@keyframes dashboardPulseYellow {
    0%,
    100% {
        box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08);
    }
    22%,
    58% {
        box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08), 0 0 0 8px rgba(250, 204, 21, 0.20);
    }
    40% {
        box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08), 0 0 0 14px rgba(250, 204, 21, 0.12);
    }
}

@keyframes dashboardShakeRed {
    0%,
    100% {
        transform: translateX(0);
    }
    18% {
        transform: translateX(-5px);
    }
    36% {
        transform: translateX(5px);
    }
    54% {
        transform: translateX(-3px);
    }
    72% {
        transform: translateX(3px);
    }
}

@keyframes dashboardPulseRed {
    0%,
    100% {
        box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08);
    }
    30%,
    68% {
        box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08), 0 0 0 8px rgba(248, 113, 113, 0.18);
    }
    48% {
        box-shadow: 0 18px 42px rgba(34, 48, 70, 0.08), 0 0 0 14px rgba(248, 113, 113, 0.10);
    }
}

.card-grid-upload-data {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    align-items: start;
}

.card-grid-kwh-check {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: start;
}

.kwh-stopwatch {
    display: grid;
    gap: 18px;
}

.kwh-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 112px;
    border-radius: 18px;
    background: #f5f8ff;
    border: 1px solid #d8e1ef;
    color: #081f45;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.kwh-sample-count {
    display: grid;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: #fffaf1;
    border: 1px solid #ffe1b5;
}

.kwh-sample-count span,
.kwh-sample-count small {
    color: #5f7392;
    font-weight: 600;
}

.kwh-sample-count strong {
    color: #081f45;
    font-size: 2.2rem;
    line-height: 1;
}

.kwh-phase-inputs {
    display: grid;
    gap: 14px;
}

.kwh-phase-card {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid #d8e1ef;
    border-radius: 16px;
    background: #fbfcff;
}

.kwh-phase-card h3 {
    margin: 0;
    color: #0f2752;
    font-size: 1rem;
}

.kwh-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kwh-big-action {
    min-height: 112px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    font: inherit;
    font-size: 1.3rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(34, 48, 70, 0.14);
}

.kwh-big-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.kwh-big-start {
    background: #1f9d57;
}

.kwh-big-sampling {
    background: #1e5eff;
}

.kwh-big-stop {
    background: #d64545;
}

.kwh-reset-button {
    width: 100%;
}

.meter-error-danger {
    border-color: #fecaca;
}

.meter-error-danger strong,
.meter-error-danger span,
.meter-error-danger small {
    color: #b42318;
}

.meter-error-warning {
    border-color: #fed7aa;
}

.meter-error-warning strong,
.meter-error-warning span,
.meter-error-warning small {
    color: #b45309;
}

.meter-error-success {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

.meter-error-success strong,
.meter-error-success span,
.meter-error-success small {
    color: #047857;
}

.summary-card.meter-error-danger strong,
.summary-card.meter-error-danger span,
.summary-card.meter-error-danger small {
    color: #b42318;
}

.summary-card.meter-error-warning strong,
.summary-card.meter-error-warning span,
.summary-card.meter-error-warning small {
    color: #b45309;
}

.summary-card.meter-error-success strong,
.summary-card.meter-error-success span,
.summary-card.meter-error-success small {
    color: #047857;
}

.meter-inline-notice {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    line-height: 1.35;
}

.meter-inline-danger {
    background: #ffe4e4;
    color: #b42318;
}

.meter-inline-warning {
    background: #fff0dd;
    color: #b45309;
}

.meter-inline-success {
    background: #dcfce7;
    color: #047857;
}

.monthly-check-responsive-table th {
    white-space: nowrap;
}

.monthly-check-total-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 8px;
    background: #92d050;
    color: #0f2752;
    font-weight: 800;
}

.monthly-day-scroll {
    max-width: min(760px, 62vw);
    overflow-x: auto;
    padding-bottom: 4px;
}

.monthly-day-mini-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
}

.monthly-day-mini-table th,
.monthly-day-mini-table td {
    min-width: 34px;
    height: 30px;
    padding: 4px 6px;
    border: 0;
    border-radius: 8px;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 800;
}

.monthly-day-mini-table th {
    background: #ffff00;
    color: #000;
}

.monthly-day-mini-table td {
    color: #0f2752;
}

.monthly-day-count-filled {
    background: #dcfce7;
}

.monthly-day-count-zero {
    background: #fecaca;
    color: #991b1b !important;
}

.monthly-day-mini-total td {
    background: #bbf7d0;
}

.monthly-day-mini-total .monthly-day-count-zero {
    background: #fecaca;
}

.monthly-check-footer td {
    font-weight: 800;
}

.formula-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.formula-grid div {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #d8e1ef;
    background: #fbfcff;
}

.formula-grid strong {
    color: #0f2752;
    font-size: 1.05rem;
}

.formula-grid span {
    color: #5f7392;
    line-height: 1.45;
}

.capacity-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 18px;
}

.stat-card,
.card {
    min-width: 0;
    background: #fff;
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 16px 40px rgba(34, 48, 70, 0.08);
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 44px rgba(34, 48, 70, 0.12);
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 1;
    pointer-events: none;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-card-ba::before {
    background: linear-gradient(135deg, #f7fbff 0%, #d2e3ff 58%, #a9c8ff 100%);
}

.stat-card-bhp::before {
    background: linear-gradient(135deg, #f4fff9 0%, #cff6e0 58%, #9fe4bf 100%);
}

.stat-card-rak::before {
    background: linear-gradient(135deg, #fffaf1 0%, #ffe1b5 58%, #ffc978 100%);
}

.stat-card-ordner::before {
    background: linear-gradient(135deg, #fbf7ff 0%, #e2d2ff 58%, #c4a5ff 100%);
}

.capacity-card {
    display: grid;
    gap: 14px;
    background: linear-gradient(135deg, #f8fbff 0%, #e0ecff 55%, #c6dbff 100%);
    border: 1px solid #bdd3ff;
    box-shadow: 0 18px 44px rgba(30, 94, 255, 0.12);
}

.capacity-summary strong {
    display: block;
    font-size: 2rem;
    color: #0b2250;
}

.capacity-summary span {
    display: block;
    margin-top: 6px;
    color: #415674;
}

.capacity-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #1e5eff;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 12px 28px rgba(30, 94, 255, 0.22);
}

.card-ba-list {
    background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
    border: 1px solid #cadeff;
}

.card-bhp-list {
    background: linear-gradient(180deg, #ffffff 0%, #edfdf5 100%);
    border: 1px solid #ccefdc;
}

.capacity-bar {
    width: 100%;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    border: 1px solid rgba(96, 131, 192, 0.18);
}

.capacity-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1e5eff 0%, #3b82f6 45%, #60a5fa 100%);
}

.capacity-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: #365074;
    font-weight: 700;
}

.stat-card span,
.stat-card small {
    display: block;
}

.stat-card span {
    color: #1e3a63;
    font-weight: 700;
}

.stat-card small {
    color: #365074;
    font-weight: 600;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    margin: 10px 0 6px;
    color: #081f45;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

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

.form-grid.one-column {
    grid-template-columns: minmax(0, 1fr);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-hidden {
    display: none !important;
}

.field label {
    font-weight: 600;
    color: #33445f;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: #fbfcff;
}

.triple-field {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 12px;
}

.field-inline {
    justify-content: center;
}

.field-inline label {
    font-weight: 500;
}

.form-block {
    margin-top: 18px;
}

.block-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #33445f;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.checkbox-card {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid #d8e1ef;
    border-radius: 16px;
    background: #fbfcff;
}

.checkbox-card-wide {
    grid-column: span 2;
}

.rack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 10px;
}

.rack-frame {
    max-height: 420px;
    overflow-y: auto;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid #d8e1ef;
    background: linear-gradient(180deg, #fcfdff 0%, #f4f8ff 100%);
}

.rack-card {
    display: grid;
    gap: 5px;
    min-height: 128px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid #d8e1ef;
    background: #fbfcff;
    cursor: pointer;
}

.rack-card input {
    display: none;
}

.rack-card strong {
    font-size: 0.94rem;
    color: #0f2752;
}

.rack-card span {
    color: #5f7392;
    font-size: 0.82rem;
}

.rack-card:has(input:checked) {
    border-color: #1e5eff;
    box-shadow: 0 0 0 2px rgba(30, 94, 255, 0.12);
    background: #eef4ff;
}

.rack-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f4f4f4;
}

.qr-result-card {
    max-width: 1120px;
}

.qr-download-preview {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.qr-print-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.qr-box {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #d8e1ef;
}

.qr-box img {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.qr-code-text {
    margin-top: 14px;
    font-weight: 700;
    color: #0f2752;
    word-break: break-word;
    font-size: 1.45rem;
    line-height: 1.3;
}

.qr-meta {
    display: grid;
    gap: 12px;
    align-content: center;
}

.qr-meta div {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #d8e1ef;
}

.qr-meta strong {
    color: #0f2752;
}

.qr-meta span {
    color: #5f7392;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.qr-scanner-box {
    position: relative;
    min-height: 240px;
    border: 1px solid #d8e1ef;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.qr-scanner-video {
    display: block;
    width: 100%;
    min-height: 240px;
    max-height: 320px;
    object-fit: cover;
    background: #0f2752;
}

.qr-scanner-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    color: #5f7392;
    font-weight: 600;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.92) 0%, rgba(238, 244, 255, 0.92) 100%);
}

.qr-scanner-actions {
    margin-top: 12px;
}

.qr-scanner-help {
    display: block;
    margin-top: 4px;
    color: #5f7392;
    line-height: 1.5;
}

.otp-request-card {
    max-width: 760px;
}

.otp-result-panel {
    margin-top: 24px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #f8fbff 0%, #e3efff 52%, #d0e3ff 100%);
    border: 1px solid #bfd5ff;
    text-align: center;
    box-shadow: 0 18px 42px rgba(30, 94, 255, 0.12);
}

.otp-result-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #1e5eff;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
}

.otp-code-display {
    margin-top: 18px;
    font-size: clamp(2.8rem, 10vw, 5rem);
    line-height: 1;
    letter-spacing: 0.18em;
    font-weight: 800;
    color: #0b2250;
}

.otp-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
    color: #365074;
    font-weight: 600;
}

.otp-countdown-wrap {
    margin-top: 20px;
    display: grid;
    gap: 8px;
}

.otp-countdown-label {
    color: #4b6384;
    font-weight: 700;
}

.otp-countdown-wrap strong {
    font-size: clamp(1.8rem, 8vw, 3rem);
    color: #c81e1e;
    line-height: 1;
}

.otp-helper-note {
    margin-top: 18px;
    color: #365074;
    font-weight: 700;
    line-height: 1.6;
}

.form-actions,
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    margin-top: 18px;
}

.inline-search {
    display: flex;
    gap: 12px;
    align-items: center;
}

.inline-search input {
    flex: 1;
}

.lookup-results {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.lookup-results-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: #51657f;
    font-weight: 700;
}

.lookup-result-list {
    display: grid;
    gap: 12px;
}

.lookup-result-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #d8e1ef;
    background: #fbfcff;
}

.lookup-result-card-active {
    border-color: #8ab3ff;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
    box-shadow: 0 10px 26px rgba(30, 94, 255, 0.1);
}

.lookup-result-copy {
    display: grid;
    gap: 4px;
}

.lookup-result-copy strong {
    color: #0f2752;
}

.lookup-result-copy span {
    color: #5f7392;
    line-height: 1.45;
}

.lookup-result-photo {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #d8e1ef;
    background: #f6f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b8aa1;
    font-size: 0.82rem;
    font-weight: 700;
}

.lookup-result-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-summary-grid {
    display: grid;
    gap: 16px;
}

.detail-summary-card {
    padding: 18px;
    border-radius: 20px;
    border: 1px solid #d8e1ef;
    background: linear-gradient(180deg, #fbfcff 0%, #f5f9ff 100%);
}

.detail-summary-card strong {
    display: block;
    font-size: 1.15rem;
    color: #0f2752;
}

.detail-summary-copy {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.detail-summary-copy span {
    color: #5f7392;
    line-height: 1.5;
}

.detail-summary-photo {
    width: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #d8e1ef;
    background: #f6f9ff;
}

.detail-summary-photo img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.detail-summary-empty {
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed #cbd7ea;
    background: #f9fbff;
    color: #6b7c94;
    text-align: center;
}

.confirm-lookup-form {
    margin-top: 4px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid #d8e1ef;
    background: linear-gradient(180deg, #fbfcff 0%, #f5f9ff 100%);
}

.info-action-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    flex-wrap: wrap;
}

.status-popup-copy {
    padding: 16px 18px;
    border-radius: 18px;
    line-height: 1.6;
    font-weight: 700;
}

.status-popup-copy-success {
    background: #e6f8ee;
    color: #166b3d;
}

.status-popup-copy-danger {
    background: #ffebee;
    color: #a22035;
}

.status-popup-copy-warning {
    background: #fff4dd;
    color: #8a5a02;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 0;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: #1e5eff;
    color: #fff;
}

.btn-success {
    background: #1f9d57;
    color: #fff;
}

.btn-danger {
    background: #d64545;
    color: #fff;
}

.btn-warning {
    background: #f39c12;
    color: #fff;
}

.btn-info {
    background: #2d7ff9;
    color: #fff;
}

.btn-soft-info {
    background: #d9ecff;
    color: #1d4ed8;
}

.btn-light {
    background: #edf2fb;
    color: #29405f;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.88rem;
}

.full-width {
    width: 100%;
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #d8e1ef;
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%);
}

.report-filter-toolbar {
    grid-template-columns: repeat(4, minmax(150px, 210px)) auto;
    align-items: end;
    width: fit-content;
    max-width: 100%;
    padding: 14px 16px;
}

.report-filter-toolbar .field {
    min-width: 0;
}

.report-filter-toolbar .report-error-filter-field {
    grid-column: 1;
}

.report-filter-toolbar .field input,
.report-filter-toolbar .field select {
    min-height: 44px;
    padding: 9px 12px;
    border-radius: 12px;
}

.report-filter-toolbar .form-actions {
    align-self: end;
    flex-wrap: nowrap;
    margin-top: 0;
}

.score-team-filter-toolbar {
    grid-template-columns: minmax(220px, 280px) minmax(260px, 1fr);
    align-items: end;
}

.score-team-filter-toolbar .form-actions {
    grid-column: 1 / -1;
    margin-top: 0;
}

.table-toolbar-grid {
    display: grid;
    gap: 14px;
}

.table-toolbar-grid-ba {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-toolbar-grid-bhp {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-toolbar-grid-user {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-toolbar-grid-rak {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-toolbar-grid-ordner {
    grid-template-columns: minmax(0, 1fr);
}

.table-toolbar-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.table-toolbar-grid-ba-history {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-toolbar-grid-bhp-history {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-toolbar-grid-log-gudang {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-toolbar-grid-monitoring-bhp {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-toolbar-grid-electric-history,
.table-toolbar-grid-anomaly {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.table-toolbar-grid-anomaly {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.table-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    color: #5f7392;
    font-weight: 600;
}

.report-table-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.report-table-meta {
    margin-bottom: 0;
}

.report-per-page-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5f7392;
    font-weight: 700;
    white-space: nowrap;
}

.report-per-page-form select {
    width: auto;
    min-width: 78px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #d8e1ef;
    border-radius: 10px;
    background: #fbfcff;
    color: #001f49;
    font: inherit;
}

.camera-sensor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.camera-sensor-main {
    display: grid;
    gap: 12px;
}

.camera-sensor-topbar {
    display: grid;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.camera-sensor-topbar .field {
    margin: 0;
}

.camera-sensor-primary-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.camera-sensor-mini-card {
    padding: 10px 12px;
    border: 1px solid #d8e1ef;
    border-radius: 12px;
    background: #f8fbff;
}

.camera-sensor-mini-card span,
.camera-sensor-mini-card small {
    display: block;
    color: #6b7d97;
    font-weight: 700;
}

.camera-sensor-mini-card strong {
    display: block;
    margin-top: 3px;
    color: #001f49;
    font-size: 1.55rem;
    line-height: 1.1;
}

.camera-sensor-preview {
    position: relative;
    height: 320px;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid #d8e1ef;
    border-radius: 18px;
    background: #081427;
}

.camera-sensor-preview video {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    display: block;
}

.camera-sensor-roi {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 140px;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 3px solid #ffe45c;
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.camera-sensor-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #dbe8ff;
    font-weight: 800;
    background: rgba(8, 20, 39, 0.86);
}

.camera-sensor-camera-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

.camera-sensor-camera-actions .btn {
    min-height: 74px;
    justify-content: center;
    text-align: center;
    white-space: normal;
}

.camera-sensor-camera-actions .field-hidden {
    display: none;
}

.camera-sensor-camera-actions .meter-inline-notice {
    grid-column: 1 / -1;
    margin-top: 0;
}

.camera-sensor-camera-actions #sensorReset {
    grid-column: 1 / -1;
    min-height: 46px;
    margin-top: 0;
}

.camera-sensor-panel {
    display: grid;
    gap: 12px;
}

.camera-sensor-setup {
    display: grid;
    gap: 12px;
}

.camera-sensor-test-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.camera-sensor-panel-compact {
    gap: 10px;
}

.camera-sensor-panel-compact .camera-sensor-test-bar {
    grid-template-columns: minmax(130px, 0.8fr) minmax(160px, 1.2fr);
    align-items: end;
}

.camera-sensor-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.camera-sensor-stats article {
    padding: 10px;
    border: 1px solid #d8e1ef;
    border-radius: 12px;
    background: #f8fbff;
}

.camera-sensor-stats span,
.camera-sensor-stats small {
    display: block;
    color: #6b7d97;
    font-weight: 700;
}

.camera-sensor-stats strong {
    display: block;
    margin-top: 3px;
    color: #001f49;
    font-size: 1.28rem;
    line-height: 1.1;
}

.camera-sensor-panel-compact .camera-sensor-stats strong {
    font-size: 1.55rem;
}

.camera-sensor-panel-compact .meter-inline-notice {
    padding: 10px 12px;
}

.daily-quiz-shell {
    min-height: calc(100dvh - 190px);
    display: grid;
    place-items: center;
}

.daily-quiz-card {
    width: min(760px, 100%);
    display: grid;
    gap: 18px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.daily-quiz-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 94, 255, 0.08), rgba(34, 197, 94, 0.1));
    pointer-events: none;
}

.daily-quiz-card > * {
    position: relative;
}

.daily-quiz-badge {
    justify-self: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1e5eff;
    font-weight: 900;
}

.daily-quiz-question {
    color: #001f49;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.5;
}

.daily-quiz-intro-card h2 {
    line-height: 1.25;
}

.daily-quiz-meta-row,
.daily-quiz-topbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.daily-quiz-meta-row span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(216, 225, 239, 0.86);
    color: #29405f;
    font-weight: 800;
}

.daily-quiz-topbar {
    justify-content: space-between;
}

.daily-quiz-timer {
    min-width: 132px;
    padding: 10px 12px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-weight: 900;
}

.daily-quiz-timer span,
.daily-quiz-timer small {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
}

.daily-quiz-timer strong {
    display: block;
    color: #001f49;
    font-size: 2rem;
    line-height: 1;
}

.daily-quiz-options {
    display: grid;
    gap: 10px;
}

.daily-quiz-option {
    display: grid;
    grid-template-columns: auto 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.daily-quiz-option input {
    width: 18px;
    height: 18px;
}

.daily-quiz-option span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #edf2fb;
    color: #1e5eff;
    font-weight: 900;
}

.daily-quiz-option strong {
    color: #001f49;
    line-height: 1.35;
}

.daily-quiz-result-correct {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

.daily-quiz-result-wrong {
    background: linear-gradient(180deg, #fff7ed 0%, #fee2e2 100%);
}

.daily-quiz-score-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.daily-quiz-score-grid-wide article {
    min-height: 92px;
}

.inline-action-form {
    display: inline-flex;
    margin: 0;
}

.actions .inline-action-form {
    margin-left: 6px;
}

.responsive-table .actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.responsive-table .actions .inline-action-form {
    margin-left: 0;
}

.history-meter-test-card {
    display: grid;
    gap: 14px;
}

.history-meter-test-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 12px;
}

.history-meter-test-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #d8e1ef;
    border-radius: 14px;
    background: #f8fbff;
    color: #001f49;
    font-weight: 800;
    cursor: pointer;
}

.history-meter-test-choice input {
    width: 18px;
    height: 18px;
}

.history-meter-test-action {
    margin-top: 2px;
}

.history-meter-test-action[hidden] {
    display: none !important;
}

.daily-quiz-score-grid article {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(216, 225, 239, 0.8);
}

.daily-quiz-score-grid span {
    display: block;
    color: #5f7392;
    font-weight: 800;
}

.daily-quiz-score-grid strong {
    display: block;
    margin-top: 4px;
    color: #001f49;
    font-size: 1.7rem;
}

body.daily-quiz-celebrate::after,
body.daily-quiz-try-again::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
}

body.daily-quiz-celebrate::after {
    background:
        radial-gradient(circle at 16% 20%, #fde047 0 8px, transparent 9px),
        radial-gradient(circle at 72% 18%, #22c55e 0 7px, transparent 8px),
        radial-gradient(circle at 42% 12%, #38bdf8 0 6px, transparent 7px),
        radial-gradient(circle at 28% 72%, #f97316 0 7px, transparent 8px),
        radial-gradient(circle at 84% 68%, #e879f9 0 8px, transparent 9px);
    animation: quizCelebrate 1.1s ease-out forwards;
}

body.daily-quiz-try-again::after {
    background: rgba(251, 146, 60, 0.16);
    animation: quizShakeTint 0.55s ease-out forwards;
}

@keyframes quizCelebrate {
    0% { opacity: 0; transform: translateY(-18px) scale(0.96); }
    25% { opacity: 1; }
    100% { opacity: 0; transform: translateY(28px) scale(1.03); }
}

@keyframes quizShakeTint {
    0%, 100% { opacity: 0; }
    20%, 70% { opacity: 1; }
}

@media (max-width: 640px) {
    .daily-quiz-card {
        gap: 14px;
        text-align: left;
    }

    .daily-quiz-badge,
    .daily-quiz-card .btn {
        justify-self: stretch;
        text-align: center;
    }

    .daily-quiz-topbar {
        align-items: stretch;
    }

    .daily-quiz-timer {
        flex: 1 1 100%;
        text-align: center;
    }

    .daily-quiz-score-grid {
        grid-template-columns: 1fr;
    }

    .daily-quiz-option {
        grid-template-columns: auto 38px minmax(0, 1fr);
        padding: 10px;
    }

    .rekening-alert-card .section-head {
        display: block;
    }

    .rekening-alert-actions {
        justify-content: stretch;
    }

    .rekening-alert-actions .btn {
        width: 100%;
    }
}

.sortable-table-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.sortable-table-link:hover {
    color: #2861ff;
}

.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    background: #edf2fb;
    color: #29405f;
    font-weight: 700;
}

.pagination-link.active {
    background: #1e5eff;
    color: #fff;
}

.btn-disabled {
    pointer-events: none;
    opacity: 0.55;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 39, 82, 0.34);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 60;
    overflow-y: auto;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    width: min(580px, 100%);
    max-height: calc(100vh - 40px);
    background: #fff;
    border-radius: 26px;
    padding: 24px;
    box-shadow: 0 24px 64px rgba(15, 39, 82, 0.18);
    overflow-y: auto;
}

.modal-card-large {
    width: min(920px, 100%);
}

.report-detail-modal .modal-card {
    width: min(980px, 100%);
}

.report-detail-subtitle {
    margin: 6px 0 0;
    color: #5f7392;
    font-weight: 700;
}

.report-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.report-detail-item {
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #e0e8f4;
    border-radius: 10px;
    background: #f8fbff;
}

.report-detail-item span {
    display: block;
    margin-bottom: 3px;
    color: #6b7d97;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.report-detail-item strong {
    display: block;
    color: #001f49;
    font-size: 0.9rem;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rekening-alert-card {
    border: 1px solid #fecaca;
    background: #fff;
}

.rekening-alert-card .section-head h2,
.rekening-alert-body strong {
    color: #b91c1c;
}

.rekening-alert-body {
    display: grid;
    gap: 10px;
}

.rekening-alert-body strong {
    font-size: 1.35rem;
    line-height: 1.2;
}

.rekening-alert-body p {
    margin: 0;
    color: #b91c1c;
    font-weight: 800;
    line-height: 1.45;
}

.rekening-alert-actions {
    justify-content: flex-end;
}

.modal-overlay-top {
    align-items: flex-start;
}

.user-modal-card {
    width: min(620px, 100%);
    max-height: calc(100dvh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.user-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid #e6edf8;
    text-align: left;
    vertical-align: top;
}

th {
    color: #6d7c90;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2554c7;
    font-size: 0.85rem;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.badge-status-penuh {
    background: #ffe4e4;
    color: #b42318;
}

.badge-status-kosong {
    background: #e7f8ee;
    color: #166534;
}

.badge-status-terisi {
    background: #e8f0ff;
    color: #1d4ed8;
}

.badge-status-danger {
    background: #ffe4e4;
    color: #b42318;
}

.badge-status-success {
    background: #e7f8ee;
    color: #166534;
}

.badge-status-info {
    background: #e8f0ff;
    color: #1d4ed8;
}

.badge-status-warning {
    background: #fff0dd;
    color: #b45309;
}

.scan-preview-wrap {
    border: 1px solid #d8e1ef;
    border-radius: 18px;
    overflow: hidden;
    background: #f6f9ff;
}

.scan-preview-frame {
    display: block;
    width: 100%;
    height: 70vh;
    min-height: 520px;
    border: 0;
    background: #fff;
}

.photo-preview-wrap {
    border: 1px solid #d8e1ef;
    border-radius: 18px;
    overflow: hidden;
    background: #f6f9ff;
    padding: 18px;
    text-align: center;
}

.photo-preview-wrap img {
    max-height: 70vh;
    margin: 0 auto;
    border-radius: 14px;
}

.alerts {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 500;
}

.alert-success {
    background: #e6f8ee;
    color: #166b3d;
}

.alert-danger {
    background: #ffebee;
    color: #a22035;
}

.alert-warning {
    background: #fff4dd;
    color: #8a5a02;
}

.empty-state {
    text-align: center;
    color: #7f8ea2;
    padding: 18px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.advanced-summary-grid {
    width: 100%;
    gap: 18px;
    margin-top: 18px;
    margin-bottom: 18px;
}

.advanced-summary-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advanced-summary-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-card,
.electric-chart-wrap {
    background: #fff;
    border: 1px solid #d8e1ef;
    border-radius: 18px;
}

.summary-card {
    min-width: 0;
    padding: 18px;
    box-shadow: 0 14px 34px rgba(34, 48, 70, 0.06);
}

.report-history-table-wrap {
    overflow-x: auto;
}

.report-history-table {
    width: max-content;
    min-width: 1280px;
    max-width: none;
}

.report-history-table th,
.report-history-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.summary-card-soft-blue {
    background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
}

.summary-card-soft-green {
    background: linear-gradient(135deg, #ffffff 0%, #f2fbf6 100%);
}

.summary-card-soft-cyan {
    background: linear-gradient(135deg, #ffffff 0%, #effbfc 100%);
}

.summary-card-soft-peach {
    background: linear-gradient(135deg, #ffffff 0%, #fff6ee 100%);
}

.summary-card-soft-lavender {
    background: linear-gradient(135deg, #ffffff 0%, #f8f5ff 100%);
}

.summary-card-soft-yellow {
    background: linear-gradient(135deg, #ffffff 0%, #fffbea 100%);
}

.summary-card span,
.summary-card small {
    display: block;
    color: #5f7392;
    font-weight: 600;
}

.summary-card strong {
    display: block;
    margin: 8px 0;
    color: #0f2752;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
}

.electric-chart-wrap {
    padding: 12px;
    overflow-x: auto;
    background: linear-gradient(180deg, #fbfcff 0%, #f6f9ff 100%);
}

.electric-chart {
    display: block;
    width: 100%;
    height: auto;
}

.lokasi-map-head {
    align-items: center;
    gap: 14px;
}

.lokasi-map-actions {
    margin: 0;
}

.lokasi-map-frame {
    border: 1px solid #d8e1ef;
    border-radius: 18px;
    overflow: hidden;
    background: #f6f9ff;
    min-height: 420px;
}

.lokasi-map-frame iframe {
    display: block;
    width: 100%;
    min-height: 420px;
    border: 0;
}

.petugas-map {
    width: 100%;
    min-height: 560px;
    border: 1px solid #d8e1ef;
    border-radius: 18px;
    overflow: hidden;
    background: #f6f9ff;
}

.petugas-pin {
    background: transparent;
    border: 0;
}

.petugas-pin span {
    position: relative;
    display: block;
    width: 26px;
    height: 26px;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    box-shadow: 0 8px 18px rgba(15, 39, 82, 0.3);
    transform: rotate(-45deg);
}

.petugas-pin span::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    top: 6px;
    left: 6px;
    border-radius: 50%;
    background: #fff;
}

.petugas-pin span b {
    position: absolute;
    top: 3px;
    left: 0;
    z-index: 1;
    width: 20px;
    color: #fff;
    font-size: 0.68rem;
    line-height: 20px;
    text-align: center;
    transform: rotate(45deg);
}

.petugas-pin span:has(b)::after {
    display: none;
}

.electric-chart .chart-grid line {
    stroke: #dce5f3;
    stroke-width: 1;
}

.electric-chart .chart-grid text,
.electric-chart .chart-labels text {
    fill: #6d7c90;
    font-size: 12px;
}

.electric-chart .chart-average line {
    stroke: #16a34a;
    stroke-width: 3;
    stroke-dasharray: 10 8;
}

.electric-chart .chart-average text {
    fill: #15803d;
    font-size: 13px;
    font-weight: 700;
}

.electric-chart polyline {
    fill: none;
    stroke: #1e5eff;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.electric-chart .chart-points circle {
    fill: #fff;
    stroke: #1e5eff;
    stroke-width: 3;
}

.electric-chart .chart-point-max circle {
    fill: #ecfdf5;
    stroke: #16a34a;
    stroke-width: 5;
}

.electric-chart .chart-point-min circle {
    fill: #fef2f2;
    stroke: #dc2626;
    stroke-width: 5;
}

.electric-chart .chart-point-max text {
    fill: #15803d;
    font-size: 13px;
    font-weight: 800;
}

.electric-chart .chart-point-min text {
    fill: #b91c1c;
    font-size: 13px;
    font-weight: 800;
}

.analysis-copy {
    margin: 14px 0 0;
    color: #365074;
    line-height: 1.65;
    font-weight: 600;
}

.upload-template-note,
.upload-guide {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d8e1ef;
    border-radius: 16px;
    background: #f6f9ff;
    color: #365074;
}

.upload-template-note strong {
    color: #0f2752;
}

.upload-template-note span {
    font-family: Consolas, "Courier New", monospace;
    overflow-wrap: anywhere;
}

.upload-template-button {
    width: fit-content;
    margin-top: 6px;
}

.upload-guide p {
    margin: 0;
    line-height: 1.6;
}

.footer {
    color: #718097;
    padding: 18px 4px 0;
}

.login-body {
    min-height: 100vh;
    background: radial-gradient(circle at top left, #dbe7ff 0%, #f4f7fb 45%, #f8fbff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-shell {
    width: min(560px, 100%);
    display: flex;
    justify-content: center;
}

.login-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 30px;
    padding: 38px 34px;
    box-shadow: 0 24px 60px rgba(34, 48, 70, 0.12);
}

.login-brand {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.login-brand-mark {
    width: 128px;
    height: 128px;
    border-radius: 26px;
    background: #f7f8fc;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 40px rgba(34, 48, 70, 0.12);
}

.login-brand-mark img {
    width: 92px;
    height: 92px;
}

.login-brand-logo {
    width: min(510px, 100%);
    height: auto;
}

.login-brand-subtitle {
    margin: 8px 0 0;
    color: #53647d;
    font-size: 0.96rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.45;
}

.login-brand-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-brand-copy h1 {
    margin: 0;
    font-size: 2.25rem;
    color: #0f2752;
}

.login-brand-copy p {
    max-width: 360px;
    margin: 6px 0 0;
    color: #5f7392;
    line-height: 1.55;
    font-size: 0.95rem;
}

.intro-card {
    margin-top: 20px;
}

.login-panel > p {
    text-align: center;
}

@media (max-width: 1080px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        width: 260px;
    }

    .stats-grid,
    .card-grid,
    .form-grid,
    .triple-field,
    .checkbox-grid,
    .rack-grid,
    .qr-print-layout,
    .table-toolbar-grid-ba,
    .table-toolbar-grid-bhp,
    .table-toolbar-grid-user,
    .table-toolbar-grid-rak,
    .table-toolbar-grid-ordner,
    .table-toolbar-grid-ba-history,
    .table-toolbar-grid-bhp-history,
    .table-toolbar-grid-log-gudang,
    .table-toolbar-grid-monitoring-bhp,
    .table-toolbar-grid-electric-history,
    .table-toolbar-grid-anomaly,
    .summary-grid,
    .dashboard-electric-grid,
    .card-grid-kwh-check,
    .card-grid-upload-data {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-filter-toolbar {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .score-team-filter-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .camera-sensor-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .camera-sensor-topbar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .camera-sensor-primary-stats {
        grid-column: span 2;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .advanced-summary-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .advanced-summary-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .sidebar {
        position: fixed;
        left: -320px;
        width: min(300px, calc(100vw - 34px));
        z-index: 20;
        transition: left 0.2s ease;
        box-shadow: 18px 0 50px rgba(15, 39, 82, 0.18);
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        padding: 18px;
    }

    .menu-toggle {
        display: inline-flex;
    }

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

    .topbar > div:first-child,
    .topbar-user {
        align-items: flex-start;
    }

    .topbar-user {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .topbar-user-actions {
        width: 100%;
        justify-content: stretch;
    }

    .topbar-user-actions .btn {
        flex: 1 1 150px;
    }

    .page-heading h1 {
        font-size: 1.35rem;
    }

    .page-heading p {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .lookup-result-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .lookup-result-photo {
        width: 100%;
        height: 180px;
    }

    .info-action-box .btn {
        width: 100%;
    }

    .table-responsive {
        overflow: visible;
    }

    .electric-chart-wrap {
        padding: 8px;
    }

    .electric-chart .chart-grid text,
    .electric-chart .chart-labels text {
        font-size: 14px;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tbody {
        display: grid;
        gap: 14px;
    }

    .responsive-table tr {
        border: 1px solid #d8e1ef;
        border-radius: 18px;
        background: #fff;
        padding: 8px 0;
        box-shadow: 0 12px 28px rgba(34, 48, 70, 0.06);
    }

    .responsive-table td {
        border-bottom: 1px solid #edf2fb;
        padding: 12px 14px;
    }

    .responsive-table td:last-child {
        border-bottom: 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: #6d7c90;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .responsive-table td.actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .responsive-table td.actions::before {
        width: 100%;
    }

    .responsive-table .empty-state-cell {
        text-align: center;
        border-bottom: 0;
        padding: 18px;
    }

    .responsive-table .empty-state-cell::before {
        content: none;
    }

    .compact-mobile-table {
        display: table;
        min-width: 360px;
    }

    .table-responsive:has(.compact-mobile-table) {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .report-history-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compact-mobile-table thead {
        display: table-header-group;
    }

    .compact-mobile-table tbody {
        display: table-row-group;
    }

    .compact-mobile-table tr {
        display: table-row;
        border: 0;
        border-radius: 0;
        padding: 0;
        box-shadow: none;
        background: transparent;
    }

    .compact-mobile-table th,
    .compact-mobile-table td {
        display: table-cell;
        width: auto;
        padding: 11px 10px;
        border-bottom: 1px solid #e6edf8;
    }

    .compact-mobile-table td::before {
        content: none;
    }

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

    .pagination-pages {
        justify-content: center;
    }

    .form-actions {
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 560px) {
    body {
        background: #f7f9fd;
    }

    .dashboard-filter {
        justify-content: stretch;
    }

    .dashboard-filter-form {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .dashboard-filter-form select {
        flex: 1;
        min-width: 120px;
    }

    .chart-filter-form {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .chart-filter-form select {
        flex: 1;
        min-width: 130px;
    }

    .lokasi-map-actions {
        width: 100%;
    }

    .lokasi-map-actions .btn {
        flex: 1;
    }

    .main-content {
        padding: 14px 12px;
    }

    .sidebar {
        padding: 18px 12px;
    }

    .sidebar-brand {
        margin-bottom: 16px;
        padding: 12px;
    }

    .sidebar-brand-logo {
        max-width: 210px;
    }

    .topbar {
        gap: 12px;
        margin-bottom: 16px;
    }

    .topbar > div:first-child {
        gap: 10px;
    }

    .topbar-user {
        padding: 12px;
        border-radius: 14px;
    }

    .menu-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 10px;
    }

    .page-heading h1 {
        font-size: 1.18rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .stats-grid,
    .summary-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .advanced-summary-grid-2,
    .advanced-summary-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-dashboard-hero {
        grid-template-columns: minmax(0, 1fr);
        padding: 18px;
        text-align: center;
    }

    .user-dashboard-trophy,
    .user-dashboard-rank-circle {
        width: 86px;
        height: 86px;
        border-radius: 22px;
        font-size: 3.1rem;
    }

    .user-dashboard-podium-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .stat-card,
    .card,
    .summary-card {
        padding: 16px;
    }

    .stat-card,
    .summary-card,
    .card,
    .table-toolbar {
        border-radius: 16px;
    }

    .stat-card strong {
        font-size: 1.55rem;
    }

    .kwh-timer {
        min-height: 88px;
        font-size: 2.2rem;
    }

    .kwh-big-action {
        min-height: 96px;
        font-size: 1.15rem;
        border-radius: 16px;
    }

    .formula-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .lokasi-map-frame,
    .lokasi-map-frame iframe,
    .petugas-map {
        min-height: 340px;
    }

    .section-head {
        gap: 10px;
        margin-bottom: 12px;
    }

    .section-head h2 {
        font-size: 1rem;
    }

    .field input,
    .field select,
    .field textarea {
        min-height: 46px;
        border-radius: 12px;
        padding: 11px 12px;
    }

    .btn {
        min-height: 44px;
        border-radius: 12px;
        padding: 10px 14px;
    }

    .table-toolbar {
        padding: 14px;
    }

    .report-filter-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .score-team-filter-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-filter-toolbar .form-actions {
        flex-wrap: wrap;
    }

    .report-table-tools {
        align-items: flex-start;
    }

    .report-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .camera-sensor-preview,
    .camera-sensor-preview video {
        height: 240px;
        min-height: 0;
    }

    .camera-sensor-topbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .camera-sensor-primary-stats {
        grid-column: auto;
    }

    .camera-sensor-camera-actions .btn {
        min-height: 64px;
    }

    .daily-quiz-score-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .daily-quiz-option {
        grid-template-columns: auto 38px minmax(0, 1fr);
    }

    .camera-sensor-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .camera-sensor-panel-compact .camera-sensor-test-bar {
        grid-template-columns: minmax(0, 1fr);
    }

    .table-meta {
        font-size: 0.9rem;
    }

    .responsive-table tr {
        border-radius: 14px;
    }

    .responsive-table td {
        padding: 10px 12px;
    }

    .monthly-day-scroll {
        max-width: 100%;
    }

    .electric-chart {
        min-width: 0;
    }

    .analysis-copy,
    .upload-guide p {
        font-size: 0.94rem;
    }

    .login-body {
        align-items: flex-start;
        padding: 18px 12px;
    }

    .login-panel {
        border-radius: 22px;
        padding: 24px 18px;
    }

    .login-brand {
        margin-bottom: 16px;
    }

    .login-brand-logo {
        width: min(360px, 100%);
    }
}

@media (max-width: 380px) {
    .main-content {
        padding: 12px 10px;
    }

    .page-heading h1 {
        font-size: 1.05rem;
    }

    .page-heading p,
    .topbar-user span {
        font-size: 0.82rem;
    }

    .btn,
    .field input,
    .field select,
    .field textarea {
        font-size: 0.92rem;
    }

    .login-panel {
        padding: 20px 14px;
    }
}

.score-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e8eef8;
    color: #1f3b66;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-weight: 800;
}

.score-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.score-avatar-small {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    font-size: 0.78rem;
}

.score-composition-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.score-petugas-pool {
    position: sticky;
    top: 18px;
}

.score-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
}

.score-team-card {
    min-height: 190px;
}

.score-team-card-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.score-team-card-head strong,
.score-team-card-head span {
    display: block;
}

.score-team-card-head span {
    color: #6f7f96;
    font-size: 0.84rem;
    margin-top: 3px;
}

.score-dropzone {
    min-height: 96px;
    border: 1px dashed #c6d4e7;
    border-radius: 8px;
    padding: 10px;
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-dropzone-hover {
    border-color: #1e5eff;
    background: #eef5ff;
}

.score-person-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    box-shadow: 0 8px 18px rgba(34, 48, 70, 0.06);
    cursor: grab;
    font-weight: 700;
}

.score-person-chip-dragging {
    opacity: 0.55;
}

.score-table-scroll {
    overflow-x: auto;
}

.score-daily-table {
    width: 100%;
    min-width: 1550px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.score-daily-table th,
.score-daily-table td {
    border: 1px solid #9aa9bc;
    padding: 6px;
    vertical-align: top;
    background-clip: padding-box;
}

.score-daily-table th {
    text-align: center;
    color: #172033;
    font-size: 0.74rem;
}

.score-daily-table th:nth-child(12),
.score-daily-table th:nth-child(13),
.score-daily-table th:nth-child(14),
.score-daily-table th:nth-child(15),
.score-daily-table th:nth-child(16),
.score-daily-table th:nth-child(17),
.score-daily-table th:nth-child(18) {
    background: #9edb9b;
}

.score-daily-table input,
.score-daily-table textarea {
    width: 100%;
    border: 1px solid #cbd6e4;
    border-radius: 6px;
    padding: 7px;
    font: inherit;
}

.score-daily-table input[type="number"]::-webkit-outer-spin-button,
.score-daily-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.score-daily-table input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.score-daily-table textarea {
    min-width: 180px;
    resize: vertical;
}

.score-daily-table th:nth-child(1),
.score-daily-table td:nth-child(1),
.score-daily-table th:nth-child(2),
.score-daily-table td:nth-child(2),
.score-daily-table th:nth-child(3),
.score-daily-table td:nth-child(3) {
    position: sticky;
    z-index: 4;
}

.score-daily-table th:nth-child(1),
.score-daily-table td:nth-child(1) {
    left: 0;
    min-width: 48px;
    width: 48px;
    background: #ffffff;
}

.score-daily-table th:nth-child(2),
.score-daily-table td:nth-child(2) {
    left: 48px;
    min-width: 120px;
    width: 120px;
    background: #ffffff;
}

.score-daily-table th:nth-child(3),
.score-daily-table td:nth-child(3) {
    left: 168px;
    min-width: 170px;
    width: 170px;
    background: #ffffff;
    box-shadow: 8px 0 14px rgba(34, 48, 70, 0.08);
}

.score-daily-table th:nth-child(1),
.score-daily-table th:nth-child(2),
.score-daily-table th:nth-child(3) {
    z-index: 6;
    background: #f8fbff;
}

.score-daily-table th:nth-child(16),
.score-daily-table th:nth-child(17),
.score-daily-table .score-percent-cell {
    min-width: 90px;
    width: 90px;
}

.score-monthly-report-table th:nth-child(16),
.score-monthly-report-table td:nth-child(16) {
    min-width: 110px;
    width: 110px;
}

.score-monthly-report-table th:nth-child(17),
.score-monthly-report-table td:nth-child(17) {
    min-width: 90px;
    width: 90px;
}

.score-daily-table .score-small-count-cell {
    min-width: 58px;
    width: 58px;
}

.score-daily-table .score-kwh-cell {
    min-width: 86px;
    width: 86px;
}

.score-monthly-report-table th:nth-child(1),
.score-monthly-report-table td:nth-child(1),
.score-monthly-report-table th:nth-child(2),
.score-monthly-report-table td:nth-child(2),
.score-monthly-report-table th:nth-child(3),
.score-monthly-report-table td:nth-child(3) {
    position: static;
    box-shadow: none;
}

.score-report-total-row td {
    font-weight: 800;
    background: #f8fbff;
}

.score-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.score-report-capture {
    background: #ffffff;
    padding: 10px;
}

.score-kwh-report-table {
    width: 100%;
    min-width: 2220px;
    border-collapse: collapse;
    font-size: 0.72rem;
    table-layout: fixed;
}

.score-kwh-report-table th,
.score-kwh-report-table td {
    border: 1px solid #1f2937;
    padding: 5px 6px;
    text-align: center;
    vertical-align: middle;
    color: #0f172a;
    line-height: 1.25;
}

.score-kwh-rank-col {
    width: 70px;
}

.score-kwh-regu-col {
    width: 76px;
}

.score-kwh-name-col {
    width: 210px;
}

.score-kwh-type-col {
    width: 82px;
}

.score-kwh-date-col {
    width: 56px;
}

.score-kwh-total-col {
    width: 92px;
}

.score-kwh-percent-col {
    width: 82px;
}

.score-kwh-report-table thead tr:first-child th {
    background: #0879be;
    color: #ffffff;
    font-weight: 800;
    text-transform: uppercase;
}

.score-kwh-report-table thead tr:first-child th.score-kwh-date-head {
    background: #fff200;
    color: #111827;
}

.score-kwh-report-table thead tr:nth-child(2) th {
    background: #fff200;
    color: #111827;
    font-weight: 800;
}

.score-kwh-report-table th:nth-child(1),
.score-kwh-report-table td:nth-child(1) {
    width: 70px;
}

.score-kwh-report-table th:nth-child(2),
.score-kwh-report-table td:nth-child(2),
.score-kwh-report-table th:nth-child(5),
.score-kwh-report-table td:nth-child(5) {
    width: 78px;
}

.score-kwh-report-table th:nth-child(3),
.score-kwh-report-table td:nth-child(3) {
    width: 210px;
}

.score-kwh-report-table th:nth-child(4),
.score-kwh-report-table td:nth-child(4) {
    width: 82px;
}

.score-kwh-report-table thead tr:nth-child(2) th,
.score-kwh-report-table tbody td:nth-child(n+5):nth-child(-n+35) {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
}

.score-kwh-report-table td.score-kwh-achieved,
.score-kwh-report-table td.score-kwh-missed,
.score-kwh-total-row td:not(:first-child),
.score-kwh-percent-row td:not(:first-child) {
    width: 56px;
    min-width: 56px;
    max-width: 56px;
}

.score-kwh-report-table th:last-child,
.score-kwh-report-table td:last-child {
    width: 82px;
}

.score-kwh-name-cell {
    font-weight: 700;
    text-align: center;
}

.score-kwh-achieved {
    background: #12b857;
    color: #06140b;
    font-weight: 800;
}

.score-kwh-missed {
    background: #fca5a5;
    color: #111827;
    font-weight: 800;
}

.score-kwh-total-row td {
    background: #10aee3;
    color: #061827;
    font-weight: 900;
    text-transform: uppercase;
}

.score-kwh-percent-row td {
    background: #b8dda8;
    color: #061827;
    font-weight: 900;
}

.score-report-capture .score-daily-table {
    table-layout: fixed;
    min-width: 1620px;
}

.score-report-capture .score-daily-table th,
.score-report-capture .score-daily-table td {
    height: 48px;
    min-height: 48px;
    vertical-align: middle;
}

.score-report-capture .score-daily-table th {
    background: #fff35c;
}

.score-report-capture .score-daily-table th:nth-child(12),
.score-report-capture .score-daily-table th:nth-child(13),
.score-report-capture .score-daily-table th:nth-child(14),
.score-report-capture .score-daily-table th:nth-child(15),
.score-report-capture .score-daily-table th:nth-child(16),
.score-report-capture .score-daily-table th:nth-child(17),
.score-report-capture .score-daily-table th:nth-child(18) {
    background: #9edb9b;
}

.score-report-capture .score-daily-table tbody tr:nth-child(even) td {
    background: #eaf4ff;
}

.score-report-capture .score-daily-table tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.score-report-capture .score-daily-table th:nth-child(1),
.score-report-capture .score-daily-table td:nth-child(1) {
    width: 48px;
}

.score-report-capture .score-daily-table th:nth-child(2),
.score-report-capture .score-daily-table td:nth-child(2) {
    width: 130px;
}

.score-report-capture .score-daily-table th:nth-child(3),
.score-report-capture .score-daily-table td:nth-child(3) {
    width: 180px;
}

.score-report-capture .score-daily-table th:nth-child(4),
.score-report-capture .score-daily-table td:nth-child(4) {
    width: 96px;
}

.score-report-capture .score-daily-table th:nth-child(5),
.score-report-capture .score-daily-table td:nth-child(5),
.score-report-capture .score-daily-table th:nth-child(6),
.score-report-capture .score-daily-table td:nth-child(6),
.score-report-capture .score-daily-table th:nth-child(7),
.score-report-capture .score-daily-table td:nth-child(7),
.score-report-capture .score-daily-table th:nth-child(8),
.score-report-capture .score-daily-table td:nth-child(8),
.score-report-capture .score-daily-table th:nth-child(9),
.score-report-capture .score-daily-table td:nth-child(9),
.score-report-capture .score-daily-table th:nth-child(10),
.score-report-capture .score-daily-table td:nth-child(10) {
    width: 58px;
}

.score-report-capture .score-daily-table th:nth-child(11),
.score-report-capture .score-daily-table td:nth-child(11) {
    width: 76px;
}

.score-report-capture .score-daily-table th:nth-child(12),
.score-report-capture .score-daily-table td:nth-child(12),
.score-report-capture .score-daily-table th:nth-child(13),
.score-report-capture .score-daily-table td:nth-child(13),
.score-report-capture .score-daily-table th:nth-child(14),
.score-report-capture .score-daily-table td:nth-child(14),
.score-report-capture .score-daily-table th:nth-child(15),
.score-report-capture .score-daily-table td:nth-child(15),
.score-report-capture .score-daily-table th:nth-child(18),
.score-report-capture .score-daily-table td:nth-child(18),
.score-report-capture .score-daily-table th:nth-child(21),
.score-report-capture .score-daily-table td:nth-child(21) {
    width: 96px;
}

.score-report-capture .score-daily-table th:nth-child(16),
.score-report-capture .score-daily-table td:nth-child(16) {
    width: 110px;
}

.score-report-capture .score-daily-table th:nth-child(17),
.score-report-capture .score-daily-table td:nth-child(17) {
    width: 90px;
}

.score-report-capture .score-daily-table th:nth-child(19),
.score-report-capture .score-daily-table td:nth-child(19),
.score-report-capture .score-daily-table th:nth-child(20),
.score-report-capture .score-daily-table td:nth-child(20) {
    width: 84px;
}

.score-report-capture .score-daily-table th:nth-child(22),
.score-report-capture .score-daily-table td:nth-child(22) {
    width: 180px;
}

.score-report-title {
    text-align: center;
    margin-bottom: 14px;
}

.score-report-title h2 {
    margin: 0;
    font-size: 1.15rem;
    color: #111827;
}

.score-report-title p {
    margin: 6px 0 0;
    color: #334155;
    font-weight: 700;
}

.score-yellow {
    background: #fff35c;
}

.score-green {
    background: #9fdf9f;
}

.score-blue {
    background: #96c7ea;
}

.score-input-int {
    background: #fffde7;
}

.score-input-dec {
    background: #effaf0;
}

.score-readonly {
    background: #e9f3ff;
    color: #193b61;
    font-weight: 800;
}

.score-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.score-dashboard-grid-single {
    grid-template-columns: minmax(0, 1fr);
}

.score-spider-summary-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(250px, 1fr);
    gap: 18px;
    align-items: stretch;
}

.score-spider-card {
    min-width: 0;
}

.score-points-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.score-points-panel .summary-card {
    min-height: 0;
    padding: 16px;
}

.score-points-panel .summary-card strong {
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.score-ranking-toolbar {
    margin: 0 0 14px;
}

.score-ranking-toolbar .field {
    max-width: 360px;
}

.score-trend-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.score-trend-chart {
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    padding: 14px;
    background: #ffffff;
}

.score-trend-chart h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #1d2d44;
}

.score-trend-chart svg {
    width: 100%;
    height: auto;
    display: block;
}

.score-trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.score-trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.score-trend-legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.score-radar-wrap {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.score-team-profile {
    display: grid;
    gap: 18px;
    justify-items: center;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    background: #f8fbff;
}

.score-team-profile-title strong {
    display: block;
    color: #0f2752;
    font-size: 1.45rem;
    line-height: 1.25;
    text-align: center;
}

.score-team-members {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    align-items: start;
    justify-items: center;
}

.score-team-member {
    display: grid;
    justify-items: center;
    gap: 9px;
    width: 100%;
    max-width: 170px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
}

.score-team-member .score-avatar {
    width: 92px;
    height: 92px;
    font-size: 1.35rem;
    box-shadow: 0 12px 28px rgba(34, 48, 70, 0.12);
}

.score-avatar-photo-button {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
    overflow: hidden;
}

.score-avatar-photo-button img {
    transition: transform 0.18s ease;
}

.score-avatar-photo-button:hover img {
    transform: scale(1.06);
}

.score-petugas-photo-modal-card {
    width: min(720px, 100%);
}

.score-petugas-photo-preview {
    display: grid;
    place-items: center;
    background: #f8fbff;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    padding: 14px;
}

.score-petugas-photo-preview img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 14px;
    object-fit: contain;
}

.score-team-member-empty {
    color: #64748b;
    font-weight: 700;
}

.score-radar {
    width: min(100%, 520px);
    height: auto;
}

.score-radar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    color: #53647d;
    font-size: 0.86rem;
}

.score-radar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.score-radar-legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
}

.score-analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.score-analysis-box {
    border: 1px solid #dbe5f2;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
}

.score-analysis-box span {
    display: block;
    color: #65758d;
    margin-bottom: 8px;
    font-weight: 700;
}

.score-analysis-box strong {
    color: #1d2d44;
    line-height: 1.45;
}

.score-analysis-good {
    background: #edfdf5;
    border-color: #b7efd3;
}

.score-analysis-risk {
    background: #fff7ed;
    border-color: #fed7aa;
}

.score-analysis-recommendation {
    background: #eef6ff;
    border-color: #bfdbfe;
}

.score-analysis-final {
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.score-analysis-final strong {
    font-size: 1.15rem;
    color: #4c1d95;
}

.score-champions-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    gap: 18px;
    align-items: end;
    background:
        linear-gradient(135deg, rgba(255, 246, 196, 0.82), rgba(239, 249, 255, 0.96) 46%, rgba(245, 243, 255, 0.9)),
        #ffffff;
}

.score-champions-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: #0f766e;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.score-champions-copy h2 {
    margin: 0;
    color: #0f2752;
    font-size: 2.2rem;
    line-height: 1.1;
}

.score-champions-copy p {
    margin: 10px 0 0;
    color: #52637a;
    font-weight: 700;
}

.score-champions-filter {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.score-celebration-burst {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.72;
}

.score-celebration-burst span {
    position: absolute;
    width: 9px;
    height: 18px;
    border-radius: 2px;
    background: #facc15;
    animation: scoreConfettiFall 3.6s ease-in-out infinite;
}

.score-celebration-burst span:nth-child(3n) { background: #22c55e; }
.score-celebration-burst span:nth-child(4n) { background: #38bdf8; }
.score-celebration-burst span:nth-child(5n) { background: #f97316; }
.score-celebration-burst span:nth-child(6n) { background: #a78bfa; }

.score-celebration-burst span:nth-child(1) { left: 8%; top: 8%; animation-delay: 0s; }
.score-celebration-burst span:nth-child(2) { left: 18%; top: 22%; animation-delay: .3s; }
.score-celebration-burst span:nth-child(3) { left: 30%; top: 10%; animation-delay: .7s; }
.score-celebration-burst span:nth-child(4) { left: 42%; top: 26%; animation-delay: .15s; }
.score-celebration-burst span:nth-child(5) { left: 58%; top: 9%; animation-delay: .45s; }
.score-celebration-burst span:nth-child(6) { left: 71%; top: 20%; animation-delay: .85s; }
.score-celebration-burst span:nth-child(7) { left: 84%; top: 11%; animation-delay: .2s; }
.score-celebration-burst span:nth-child(8) { left: 94%; top: 28%; animation-delay: .6s; }
.score-celebration-burst span:nth-child(n+9) { top: -10%; animation-delay: 1s; }

@keyframes scoreConfettiFall {
    0% { transform: translateY(-12px) rotate(0deg); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateY(150px) rotate(240deg); opacity: 0; }
}

.score-podium-stage {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.12fr) minmax(0, 0.92fr);
    gap: 18px;
    align-items: end;
    margin: 20px 0;
    perspective: 1100px;
}

.score-podium-card {
    position: relative;
    overflow: visible;
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 410px;
    padding: 24px 18px 0;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 44px rgba(34, 48, 70, 0.12);
    transform-style: preserve-3d;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.score-podium-card:hover {
    transform: translateY(-6px) rotateX(2deg);
    box-shadow: 0 28px 58px rgba(34, 48, 70, 0.18);
}

.score-podium-rank-1 {
    min-height: 470px;
    background: linear-gradient(180deg, #fff7cc, #ffffff 58%);
    border-color: #f4d25f;
}

.score-podium-rank-2 {
    background: linear-gradient(180deg, #f1f5f9, #ffffff 58%);
    border-color: #cbd5e1;
}

.score-podium-rank-3 {
    background: linear-gradient(180deg, #ffead5, #ffffff 58%);
    border-color: #fdba74;
}

.score-podium-medal {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #0f172a;
    font-weight: 1000;
    box-shadow: 0 10px 24px rgba(34, 48, 70, 0.16);
}

.score-podium-rank-1 .score-podium-medal { background: #facc15; }
.score-podium-rank-2 .score-podium-medal { background: #cbd5e1; }
.score-podium-rank-3 .score-podium-medal { background: #fb923c; }

.score-podium-team-photos {
    display: flex;
    justify-content: center;
    min-height: 74px;
}

.score-podium-avatar,
.score-podium-avatar-fallback {
    width: 72px;
    height: 72px;
    margin-left: -10px;
    border: 4px solid #ffffff;
    border-radius: 50%;
    overflow: hidden;
    background: #eaf2ff;
    box-shadow: 0 12px 28px rgba(34, 48, 70, 0.16);
}

.score-podium-avatar:first-child {
    margin-left: 0;
}

.score-podium-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.score-podium-avatar span,
.score-podium-avatar-fallback {
    display: grid;
    place-items: center;
    color: #0f2752;
    font-weight: 900;
}

.score-podium-card h3 {
    margin: 0;
    color: #0f2752;
    font-size: 1.2rem;
    text-align: center;
}

.score-podium-card strong {
    color: #102a56;
    font-size: 2rem;
    line-height: 1;
}

.score-podium-card p {
    min-height: 48px;
    margin: 0;
    color: #52637a;
    font-weight: 700;
    text-align: center;
}

.score-podium-block {
    position: relative;
    align-self: end;
    width: calc(100% + 36px);
    height: 112px;
    margin-top: 14px;
    transform-style: preserve-3d;
    filter: drop-shadow(0 18px 18px rgba(15, 23, 42, 0.18));
}

.score-podium-rank-1 .score-podium-block {
    height: 148px;
}

.score-podium-rank-2 .score-podium-block {
    height: 120px;
}

.score-podium-rank-3 .score-podium-block {
    height: 104px;
}

.score-podium-top,
.score-podium-front,
.score-podium-side {
    position: absolute;
    inset-inline: 0;
}

.score-podium-top {
    top: 0;
    height: 38px;
    clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%);
    transform: translateY(-18px) skewX(-10deg);
    border-radius: 10px 10px 4px 4px;
}

.score-podium-front {
    bottom: 0;
    display: grid;
    place-items: center;
    height: calc(100% - 12px);
    color: #0f172a;
    font-weight: 1000;
    text-align: center;
    letter-spacing: 0;
    border-radius: 0 0 16px 16px;
}

.score-podium-front::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.32), transparent 26%, rgba(15,23,42,0.13) 100%);
    pointer-events: none;
    border-radius: inherit;
}

.score-podium-side {
    right: -22px;
    left: auto;
    bottom: 0;
    width: 22px;
    height: calc(100% - 12px);
    clip-path: polygon(0 10%, 100% 0, 100% 88%, 0 100%);
    transform: skewY(-18deg);
    transform-origin: left bottom;
    border-radius: 0 10px 12px 0;
}

.score-podium-rank-1 .score-podium-top { background: linear-gradient(135deg, #fde68a, #facc15); }
.score-podium-rank-1 .score-podium-front { background: linear-gradient(180deg, #facc15, #eab308); }
.score-podium-rank-1 .score-podium-side { background: #b77905; }

.score-podium-rank-2 .score-podium-top { background: linear-gradient(135deg, #f8fafc, #cbd5e1); }
.score-podium-rank-2 .score-podium-front { background: linear-gradient(180deg, #e2e8f0, #cbd5e1); }
.score-podium-rank-2 .score-podium-side { background: #94a3b8; }

.score-podium-rank-3 .score-podium-top { background: linear-gradient(135deg, #fed7aa, #fb923c); }
.score-podium-rank-3 .score-podium-front { background: linear-gradient(180deg, #fb923c, #ea580c); }
.score-podium-rank-3 .score-podium-side { background: #9a3412; }

.score-leaderboard-top-row {
    background: #fffbea;
}

.score-rank-with-movement {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.score-rank-movement {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 1000;
}

.score-rank-up {
    background: #dcfce7;
    color: #15803d;
}

.score-rank-down {
    background: #fee2e2;
    color: #b91c1c;
}

.score-rank-same {
    background: #eef2f7;
    color: #64748b;
}

@media (max-width: 980px) {
    .score-composition-layout,
    .score-dashboard-grid,
    .score-analysis-grid,
    .score-spider-summary-layout,
    .score-champions-hero,
    .score-podium-stage,
    .score-trend-grid {
        grid-template-columns: 1fr;
    }

    .score-petugas-pool {
        position: static;
    }

}
