:root {
    --wr-forest: #0F3D2E;
    --wr-forest-dark: #0a2a20;
    --wr-emerald: #22C55E;
    --wr-emerald-soft: rgba(34, 197, 94, 0.15);
    --wr-primary-strong: #16a34a;
    --wr-gold: #D4AF37;
    --wr-gold-soft: rgba(212, 175, 55, 0.15);
    --wr-bg: #F8FAFC;
    --wr-surface: #ffffff;
    --wr-text: #0f172a;
    --wr-text-muted: #64748b;
    --wr-border: #e2e8f0;
    --wr-shadow-sm: 0 1px 2px rgba(15, 61, 46, 0.04);
    --wr-shadow-md: 0 8px 24px rgba(15, 61, 46, 0.08);
    --wr-shadow-lg: 0 16px 40px rgba(15, 61, 46, 0.1);
    --wr-radius: 16px;
    --wr-radius-lg: 20px;
    --wr-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --wr-sidebar-width: 280px;
    /* Desktop topbar: padding 0.5rem×2 + content ≈ 24px + 1px border */
    --wr-topbar-h: 41px;
}

[data-bs-theme="dark"] {
    --wr-bg: #0b1220;
    --wr-surface: #10231d;
    --wr-text: #f8fafc;
    --wr-text-muted: #94a3b8;
    --wr-text-secondary: #cbd5e1;
    --wr-kpi-label: #e2e8f0;
    --wr-table-body: #132a23;
    --wr-border: #1d3a31;
    --wr-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
    --wr-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --wr-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.dark-mode {
    color-scheme: dark;
}

[data-wr-theme-color="emerald"] {
    --wr-forest: #064e3b;
    --wr-forest-dark: #022c22;
    --wr-emerald: #10b981;
    --wr-emerald-soft: rgba(16, 185, 129, 0.15);
    --wr-primary-strong: #059669;
}

[data-wr-theme-color="forest"] {
    --wr-forest: #14532d;
    --wr-forest-dark: #052e16;
    --wr-emerald: #16a34a;
    --wr-emerald-soft: rgba(22, 163, 74, 0.15);
    --wr-primary-strong: #15803d;
}

[data-wr-theme-color="olive"] {
    --wr-forest: #3f4f1f;
    --wr-forest-dark: #283618;
    --wr-emerald: #84cc16;
    --wr-emerald-soft: rgba(132, 204, 22, 0.16);
    --wr-primary-strong: #65a30d;
}

* { box-sizing: border-box; }

body.wr-app {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--wr-bg);
    color: var(--wr-text);
    transition: background var(--wr-transition), color var(--wr-transition);
}

.wr-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.wr-sidebar {
    width: var(--wr-sidebar-width);
    flex-shrink: 0;
    background: linear-gradient(180deg, #145a42 0%, var(--wr-forest) 45%, var(--wr-forest-dark) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    z-index: 1040;
    transition: transform var(--wr-transition);
}

.wr-sidebar-header {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, #145a42 0%, var(--wr-forest) 70%, var(--wr-forest) 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.wr-sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 1rem 1rem 0.75rem;
    text-align: center;
    transition: opacity var(--wr-transition);
}

.wr-sidebar-brand:hover { opacity: 0.95; color: inherit; }

.wr-logo-glow {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wr-brand-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.wr-brand-identity--sidebar {
    --wr-brand-logo-gap: 0.25rem;
    --wr-brand-title-tagline-gap: 0.4375rem;
    --wr-brand-tagline-credit-gap: 0.3125rem;
    --wr-brand-logo-trim: -0.875rem;
}

.wr-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.wr-brand-identity--sidebar .wr-brand-logo {
    margin-bottom: var(--wr-brand-logo-gap);
}

.wr-brand-identity--sidebar .wr-sidebar-logo,
.wr-brand-identity--sidebar .wr-sidebar-logo-fallback {
    margin-bottom: var(--wr-brand-logo-trim);
}

.wr-brand-tagline {
    margin: var(--wr-brand-title-tagline-gap, 0.5rem) 0 var(--wr-brand-tagline-credit-gap, 0.375rem);
    padding: 0 0.5rem;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--wr-gold);
    opacity: 0.95;
    text-shadow:
        0 0 10px rgba(212, 175, 55, 0.4),
        0 1px 3px rgba(212, 175, 55, 0.25);
    line-height: 1.55;
    max-width: 100%;
    transition: opacity var(--wr-transition), max-height var(--wr-transition);
}

.wr-logo-glow::before {
    content: '';
    position: absolute;
    inset: -10px -10px 0;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.35) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(8px);
    z-index: 0;
}

.wr-sidebar-logo {
    position: relative;
    z-index: 1;
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: transparent;
    border: none;
    box-shadow: none;
    display: block;
}

.wr-sidebar-logo-fallback {
    position: relative;
    z-index: 1;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--wr-emerald);
}

.wr-sidebar-logo-fallback i { font-size: 2.25rem; }

.wr-brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.wr-brand-title {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.04em;
    color: #fff;
    line-height: 1.15;
}

.wr-brand-subtitle {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.1em;
    color: #8BC34A;
    margin-top: 0;
    line-height: 1.2;
}

.wr-brand-credit {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.3;
}

.wr-sidebar.collapsed .wr-brand-tagline {
    display: none;
}

.wr-sidebar-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 1rem 1rem;
}

.wr-sidebar-divider--header {
    margin: 0 1rem 0.75rem;
}

.wr-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.35rem 0.75rem 0.65rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.wr-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.wr-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.wr-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.wr-nav-section {
    margin-bottom: 0.35rem;
}

.wr-nav-section:not(:first-child) {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wr-nav-section-label {
    padding: 0.3rem 1rem 0.4rem;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(167, 243, 208, 0.48);
    user-select: none;
}

.wr-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all var(--wr-transition);
}

.wr-nav-link i {
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
    transition: color var(--wr-transition);
}

.wr-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.wr-nav-link.active {
    background: rgba(34, 197, 94, 0.18);
    color: #fff;
    border-left-color: var(--wr-emerald);
}

.wr-nav-link.active i { color: var(--wr-emerald); }

.wr-nav-link.disabled {
    opacity: 0.45;
    pointer-events: none;
}

.wr-sidebar-footer {
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 10;
    padding: 0.55rem 0.75rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(20, 90, 66, 0.95) 0%, var(--wr-forest-dark) 100%);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.18);
}

.wr-sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 48px;
}

.wr-sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
    padding: 0.2rem 0.35rem;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background var(--wr-transition);
}

.wr-sidebar-user-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
}

.wr-profile-card .wr-card-body {
    padding: 1.5rem;
}

.wr-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--wr-border);
}

.wr-profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wr-emerald-soft);
    border: 2px solid rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
}

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

.wr-profile-avatar-initials {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wr-primary-strong);
}

.wr-profile-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--wr-text);
}

.wr-profile-role {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--wr-text-muted);
}

.wr-profile-field {
    height: 100%;
}

.wr-profile-value {
    font-weight: 600;
    color: var(--wr-text);
}

.wr-sidebar-user-avatar {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.wr-sidebar-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wr-sidebar-user-initials {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #d4f4dd;
    line-height: 1;
}

.wr-sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.wr-sidebar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wr-sidebar-user-role {
    margin-top: 0.1rem;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wr-sidebar-user-logout {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.05rem;
    line-height: 1;
    transition: background var(--wr-transition), color var(--wr-transition);
    cursor: pointer;
}

.wr-sidebar-user-logout:hover {
    background: rgba(248, 113, 113, 0.18);
    color: #fecaca;
}

/* Main */
.wr-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wr-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.5rem 1.5rem;
    background: var(--wr-surface);
    border-bottom: 1px solid var(--wr-border);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.wr-topbar #sidebarToggle,
.wr-topbar-title-mobile {
    display: none;
}

.wr-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Notification bell */
.wr-notification-dropdown {
    position: relative;
}

.wr-notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--wr-border);
    border-radius: 12px;
    background: var(--wr-surface);
    color: var(--wr-text);
    transition: all var(--wr-transition);
}

.wr-notification-bell:hover,
.wr-notification-bell:focus,
.wr-notification-bell.show {
    background: var(--wr-emerald-soft);
    border-color: var(--wr-emerald);
    color: var(--wr-emerald);
    box-shadow: none;
}

.wr-notification-bell .bi-bell {
    font-size: 1.15rem;
}

.wr-topbar-filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--wr-border);
    border-radius: 12px;
    background: var(--wr-surface);
    color: var(--wr-text);
    transition: all var(--wr-transition);
}

.wr-topbar-filter-btn:hover,
.wr-topbar-filter-btn:focus {
    background: var(--wr-emerald-soft);
    border-color: var(--wr-emerald);
    color: var(--wr-emerald);
    box-shadow: none;
}

.wr-topbar-filter-btn .bi-funnel {
    font-size: 1.05rem;
}

.wr-topbar-filter-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.2rem;
    border-radius: 999px;
    background: var(--wr-emerald);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}

.wr-filter-offcanvas {
    width: min(100vw, 420px);
}

.wr-filter-offcanvas .offcanvas-title {
    font-size: 1rem;
    font-weight: 700;
}

.wr-filter-offcanvas .offcanvas-body {
    padding: 1.25rem;
}

.wr-filter-offcanvas .wr-dashboard-filter-form {
    gap: 0 !important;
}

.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-row-primary,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-row-secondary {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    margin-left: 0;
    margin-right: 0;
}

.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-row-primary > *,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-row-secondary > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
    margin-top: 0;
    flex: 0 0 auto;
}

.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field--estate,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field--divisi {
    min-width: 0;
    max-width: 100%;
    margin-bottom: 0;
}

.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field .form-select,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field .form-control,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field .ts-wrapper,
.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field .wr-datepicker-wrap {
    width: 100%;
}

.wr-filter-offcanvas .wr-dashboard-filter-form .wr-analytics-filter-field--estate .ts-dropdown {
    min-width: 100%;
    width: auto;
}

.wr-dashboard-filter-form .wr-analytics-filter-field {
    margin-bottom: 0;
}

.wr-notification-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.15rem;
    text-align: center;
    border: 2px solid var(--wr-surface);
}

.wr-notification-menu {
    width: min(22rem, calc(100vw - 2rem));
    padding: 0;
    border: 1px solid var(--wr-border);
    border-radius: 14px;
    box-shadow: var(--wr-shadow-lg);
    overflow: hidden;
}

.wr-notification-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--wr-border);
    background: var(--wr-surface);
}

.wr-notification-menu-list {
    max-height: 22rem;
    overflow-y: auto;
}

.wr-notification-item {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--wr-border);
    background: var(--wr-surface);
}

.wr-notification-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background var(--wr-transition);
}

.wr-notification-item-link:hover,
.wr-notification-item-link:focus {
    background: var(--wr-emerald-soft);
    color: inherit;
}

.wr-notification-item-link.is-unread .wr-notification-item {
    background: var(--wr-emerald-soft);
}

.wr-notification-item-link:hover .wr-notification-item,
.wr-notification-item-link:focus .wr-notification-item {
    background: transparent;
}

.wr-notification-item-link.is-unread {
    background: var(--wr-emerald-soft);
}

.wr-notification-item.is-unread {
    background: transparent;
}

.wr-review-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--wr-text-muted);
    margin-bottom: 0.35rem;
}

.wr-review-value {
    font-size: 1rem;
    color: var(--wr-text);
}

.wr-delete-confirm-details {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--wr-bg);
    border: 1px solid var(--wr-border);
}

.wr-delete-confirm-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.wr-delete-confirm-label {
    color: var(--wr-text-muted);
    font-weight: 600;
}

.wr-delete-confirm-value {
    color: var(--wr-text);
    font-weight: 600;
    text-align: right;
}

@media (min-width: 992px) {
    .wr-produksi-filter-form .wr-filter-field--estate {
        flex: 0 0 335px;
        width: 335px;
        max-width: 350px;
    }

    .wr-produksi-filter-form .wr-filter-field--divisi,
    .wr-produksi-filter-form .wr-filter-field--blok {
        flex: 0 0 230px;
        width: 230px;
        max-width: 240px;
    }

    .wr-produksi-filter-form .wr-filter-field--estate .form-select,
    .wr-produksi-filter-form .wr-filter-field--estate .ts-wrapper,
    .wr-produksi-filter-form .wr-filter-field--divisi .form-select,
    .wr-produksi-filter-form .wr-filter-field--divisi .ts-wrapper,
    .wr-produksi-filter-form .wr-filter-field--blok .form-select,
    .wr-produksi-filter-form .wr-filter-field--blok .ts-wrapper {
        width: 100%;
    }

    .wr-produksi-filter-form .wr-filter-field--estate .ts-dropdown {
        min-width: 100%;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-row-primary {
        --bs-gutter-x: 0;
        --bs-gutter-y: 0;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(320px, 1.5fr) minmax(200px, 1fr);
        gap: 1.5rem;
        align-items: end;
        margin-left: 0;
        margin-right: 0;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-row-primary > * {
        width: 100%;
        max-width: none;
        padding-left: 0;
        padding-right: 0;
        margin-top: 0;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field--estate {
        min-width: 320px;
        max-width: 350px;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field--divisi {
        min-width: 200px;
        max-width: 240px;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field .form-select,
    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field .ts-wrapper {
        width: 100%;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field--estate .ts-wrapper,
    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field--estate .ts-control {
        min-width: 0;
    }

    .wr-analytics-filter-form:not(.wr-dashboard-filter-form) .wr-analytics-filter-field--estate .ts-dropdown {
        min-width: 100%;
        width: auto;
    }
}

.wr-notification-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--wr-text-muted);
    margin-bottom: 0.35rem;
}

.wr-notification-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--wr-text);
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.wr-notification-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.wr-notification-type--review {
    background: rgba(255, 193, 7, 0.18);
    color: #b8860b;
}

.wr-notification-type--approval {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.wr-notification-type--approved {
    background: rgba(25, 135, 84, 0.15);
    color: #198754;
}

.wr-notification-type--rejected {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.wr-notification-type--health-critical {
    background: rgba(220, 38, 38, 0.14);
    color: #b91c1c;
}

.wr-notification-type--health-warning {
    background: rgba(250, 204, 21, 0.18);
    color: #a16207;
}

.wr-notification-type--health-recovered {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.wr-notification-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.02em;
}

.wr-notification-category--workflow {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.wr-notification-category--system {
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
}

.wr-notification-category--background {
    background: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
}

.wr-notification-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--wr-text-muted);
    font-size: 0.875rem;
}

.wr-notification-menu-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--wr-border);
    background: var(--wr-surface);
    text-align: center;
}

.wr-notification-view-all {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--wr-emerald);
    text-decoration: none;
}

.wr-notification-view-all:hover {
    color: var(--wr-primary-strong);
    text-decoration: underline;
}

.wr-notification-row--unread {
    background: var(--wr-emerald-soft);
}

.wr-content {
    padding: 2rem 2.25rem;
    flex: 1;
}

/* Page header */
.wr-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.wr-page-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: var(--wr-text);
}

.wr-page-subtitle {
    margin: 0;
    color: var(--wr-text-muted);
    font-size: 1rem;
    max-width: 560px;
}

.freeze-pane-container {
    position: sticky;
    top: var(--wr-topbar-h);
    z-index: 100;
    will-change: transform;
    background: var(--wr-bg);
    border-bottom: 1px solid rgba(15, 61, 46, 0.12);
    box-shadow: var(--wr-shadow-sm);
    margin: -2rem -2.25rem 24px;
    padding: 2rem 2.25rem 0;
}

/* Opsi C — mobile: intro scroll + context strip; desktop: sticky penuh seperti freeze-pane */
.wr-page-intro {
    margin-bottom: 24px;
}

.wr-page-intro .wr-page-header {
    margin-bottom: 1.25rem;
}

.wr-page-intro > .wr-dashboard-section:last-child {
    margin-bottom: 0;
}

.wr-page-intro > .wr-oc-hero:last-child {
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .wr-page-intro {
        background: var(--wr-bg);
        border-bottom: 1px solid rgba(15, 61, 46, 0.12);
        box-shadow: var(--wr-shadow-sm);
        margin: -2rem -2.25rem 24px;
        padding: 2rem 2.25rem 0;
        position: sticky;
        top: var(--wr-topbar-h);
        will-change: transform;
        z-index: 100;
    }

    .wr-page-intro > .wr-dashboard-section:last-child {
        margin-bottom: 24px;
    }

    .wr-page-intro > .wr-oc-hero:last-child {
        margin-bottom: 0;
    }

    .wr-context-strip-sentinel,
    .wr-context-strip {
        display: none !important;
    }
}

html[data-bs-theme="dark"] .wr-page-intro {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 991.98px) {
    .wr-page-intro {
        margin-bottom: 24px;
    }
}

.wr-context-strip-sentinel {
    height: 1px;
    margin: 0;
    pointer-events: none;
    width: 100%;
}

.wr-context-strip {
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(15, 61, 46, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: var(--wr-topbar-h);
    transform: translateY(-8px);
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 1020;
}

.wr-context-strip--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.wr-context-strip-inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    margin: 0 auto;
    max-width: 100%;
    padding: 0.5rem 2.25rem;
}

.wr-context-strip-item {
    align-items: center;
    color: var(--wr-text);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 600;
    gap: 0.35rem;
    min-width: 0;
}

.wr-context-strip-item .bi-calendar3,
.wr-context-strip-item .bi-clipboard-data {
    color: #16a34a;
    flex-shrink: 0;
    font-size: 0.82rem;
}

.wr-context-strip-live {
    color: #16a34a;
    flex-shrink: 0;
    font-size: 0.42rem;
}

.wr-context-strip-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-context-strip-text--muted {
    color: #64748b;
    font-weight: 500;
}

.wr-context-strip-source {
    color: #64748b;
    font-weight: 500;
}

.wr-context-strip-badge {
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.15rem 0.45rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.wr-context-strip-badge.is-default {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.22);
    color: #16a34a;
}

.wr-context-strip-badge.is-active {
    background: rgba(15, 61, 46, 0.08);
    border: 1px solid rgba(15, 61, 46, 0.14);
    color: #0f3d2e;
}

.wr-context-strip-divider {
    background: rgba(148, 163, 184, 0.45);
    flex-shrink: 0;
    height: 14px;
    width: 1px;
}

.wr-context-strip-status {
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    white-space: nowrap;
}

.wr-context-strip-status--complete {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
}

.wr-context-strip-status--incomplete {
    background: rgba(234, 179, 8, 0.16);
    color: #a16207;
}

.wr-context-strip-status--missing {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

html[data-bs-theme="dark"] .wr-context-strip {
    background: rgba(15, 23, 42, 0.96);
    border-bottom-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html[data-bs-theme="dark"] .wr-context-strip-item {
    color: #f8fafc;
}

html[data-bs-theme="dark"] .wr-context-strip-text--muted,
html[data-bs-theme="dark"] .wr-context-strip-source {
    color: #94a3b8;
}

html[data-bs-theme="dark"] .wr-context-strip-badge.is-active {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

@media (prefers-reduced-motion: reduce) {
    .wr-context-strip {
        transition: none;
    }
}

@media (max-width: 991.98px) {
    .wr-context-strip-inner {
        gap: 0.35rem 0.5rem;
        padding: 0.45rem 1.5rem;
    }

    .wr-context-strip-source {
        display: none;
    }

    .wr-context-strip-badge {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .wr-context-strip-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .wr-context-strip-divider {
        display: none;
    }

    .wr-context-strip-text {
        white-space: normal;
    }
}


.freeze-pane-container .wr-page-header {
    margin-bottom: 1.25rem;
}

.freeze-pane-container > .wr-dashboard-section:last-child {
    margin-bottom: 24px;
}

html[data-bs-theme="dark"] .freeze-pane-container {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.wr-page-alerts > .wr-dashboard-section:last-child {
    margin-bottom: 24px;
}

@media (max-width: 991.98px) {
    :root {
        /* Mobile topbar: padding 0.75rem×2 + hamburger icon ≈ 28px + 1px border */
        --wr-topbar-h: 57px;
    }

    .freeze-pane-container {
        margin: -1.5rem -1.5rem 24px;
        padding: 1.5rem 1.5rem 0;
    }
}

/* Buttons */
.wr-btn-primary {
    background: linear-gradient(135deg, var(--wr-emerald) 0%, var(--wr-primary-strong) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    transition: transform var(--wr-transition), box-shadow var(--wr-transition);
    will-change: transform;
    box-shadow: 0 4px 14px var(--wr-emerald-soft);
}

.wr-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--wr-emerald-soft);
    color: #fff;
}

.wr-btn-secondary {
    background: transparent;
    border: 1.5px solid var(--wr-emerald);
    color: var(--wr-emerald);
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    transition: background var(--wr-transition), color var(--wr-transition), border-color var(--wr-transition);
}

.wr-btn-secondary:hover {
    background: var(--wr-emerald-soft);
    color: #16a34a;
    border-color: #16a34a;
}

/* KPI Cards */
.wr-dashboard-section {
    margin-bottom: 24px;
}

/* Periode Data */
.wr-periode-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    box-shadow: var(--wr-shadow-sm);
}

.wr-periode-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.wr-periode-content {
    flex: 1;
    min-width: 0;
}

.wr-periode-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.15rem;
}

.wr-periode-range {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--wr-text);
    letter-spacing: -0.01em;
}

.wr-periode-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.wr-periode-badge.is-default {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
    border: 1px solid rgba(22, 163, 74, 0.25);
}

.wr-periode-badge.is-active {
    background: rgba(15, 61, 46, 0.08);
    color: #0F3D2E;
    border: 1px solid rgba(15, 61, 46, 0.15);
}

/* Data Status Panel — compact information status bar */
.wr-data-status-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #ffffff;
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 10px;
    padding: 0.4rem 1rem;
    box-shadow: var(--wr-shadow-sm);
}

.wr-data-status-row {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    min-height: 1.375rem;
    min-width: 0;
}

.wr-data-status-row--last-update {
    padding-bottom: 0.05rem;
}

.wr-data-status-row--completeness {
    padding-top: 0.05rem;
}

.wr-data-status-icon {
    align-items: center;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 6px;
    color: #16a34a;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.72rem;
    height: 22px;
    justify-content: center;
    width: 22px;
}

.wr-data-status-icon--live {
    background: rgba(22, 163, 74, 0.12);
    color: #16a34a;
    font-size: 0.42rem;
}

.wr-data-status-label {
    color: #5f7a70;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.wr-data-status-value {
    color: var(--wr-text);
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-data-status-value--empty {
    color: #64748b;
    font-weight: 500;
}

.wr-data-status-badge {
    align-items: center;
    display: inline-flex;
    font-size: inherit;
    font-weight: 700;
    gap: 0.15rem;
    white-space: nowrap;
}

.wr-data-status-badge--complete {
    color: #15803d;
}

.wr-data-status-badge--incomplete {
    color: #a16207;
}

.wr-data-status-badge--missing {
    color: #b91c1c;
}

.wr-data-status-row--incomplete .wr-data-status-icon:not(.wr-data-status-icon--live) {
    background: rgba(234, 179, 8, 0.14);
    color: #ca8a04;
}

.wr-data-status-row--missing .wr-data-status-icon:not(.wr-data-status-icon--live) {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.wr-data-status-divider {
    background: rgba(15, 61, 46, 0.1);
    flex-shrink: 0;
    height: 1px;
    margin: 0.3rem 0;
    width: 100%;
}

.wr-produksi-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wr-produksi-status--draft {
    background: rgba(100, 116, 139, 0.15);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.25);
}

.wr-produksi-status--submitted {
    background: rgba(234, 179, 8, 0.15);
    color: #a16207;
    border: 1px solid rgba(234, 179, 8, 0.3);
}

.wr-produksi-status--approved {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.28);
}

.wr-produksi-status--rejected {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(220, 38, 38, 0.25);
}

.wr-executive-alert {
    border-radius: 18px;
    border-width: 2px;
    border-style: solid;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 14px 32px rgba(15, 61, 46, 0.1);
}

.wr-executive-alert--green {
    border-color: rgba(22, 163, 74, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #f8fffb 55%, #ecfdf5 100%);
}

.wr-executive-alert--yellow {
    border-color: rgba(234, 179, 8, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #fffef8 55%, #fefce8 100%);
}

.wr-executive-alert--red {
    border-color: rgba(239, 68, 68, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #fffafa 55%, #fef2f2 100%);
}

.wr-executive-alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-executive-alert-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0F3D2E;
}

.wr-executive-alert-title i {
    color: #16a34a;
}

.wr-executive-alert-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wr-executive-alert--green .wr-executive-alert-status {
    color: #16a34a;
}

.wr-executive-alert--yellow .wr-executive-alert-status {
    color: #ca8a04;
}

.wr-executive-alert--red .wr-executive-alert-status {
    color: #dc2626;
}

.wr-executive-alert-headline {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
    color: #0F3D2E;
}

.wr-executive-alert-message {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #475569;
}

.wr-executive-alert-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.wr-executive-alert-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-executive-alert-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.wr-executive-alert-metric-value {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0F3D2E;
}

@media (max-width: 1199.98px) {
    .wr-executive-alert-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .wr-executive-alert-metrics {
        grid-template-columns: 1fr;
    }
}

.wr-progress-vs-hk {
    border-radius: 18px;
    border-width: 2px;
    border-style: solid;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 14px 32px rgba(15, 61, 46, 0.1);
}

.wr-progress-vs-hk--green {
    border-color: rgba(22, 163, 74, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #f8fffb 55%, #ecfdf5 100%);
}

.wr-progress-vs-hk--yellow {
    border-color: rgba(234, 179, 8, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #fffef8 55%, #fefce8 100%);
}

.wr-progress-vs-hk--red {
    border-color: rgba(239, 68, 68, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #fffafa 55%, #fef2f2 100%);
}

.wr-progress-vs-hk-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-progress-vs-hk-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0F3D2E;
}

.wr-progress-vs-hk-title i {
    color: #16a34a;
}

.wr-progress-vs-hk-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wr-progress-vs-hk--green .wr-progress-vs-hk-status {
    color: #16a34a;
}

.wr-progress-vs-hk--yellow .wr-progress-vs-hk-status {
    color: #ca8a04;
}

.wr-progress-vs-hk--red .wr-progress-vs-hk-status {
    color: #dc2626;
}

.wr-progress-vs-hk-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.wr-progress-vs-hk-metric {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-progress-vs-hk-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.wr-progress-vs-hk-metric-value {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0F3D2E;
}

.wr-progress-vs-hk-metric-value.is-green { color: #16a34a; }
.wr-progress-vs-hk-metric-value.is-yellow { color: #ca8a04; }
.wr-progress-vs-hk-metric-value.is-red { color: #dc2626; }

.wr-progress-vs-hk-bars {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    margin-bottom: 0.9rem;
}

.wr-progress-vs-hk-bar-item {
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-progress-vs-hk-bar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.wr-progress-vs-hk-bar-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.wr-progress-vs-hk-bar-value {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0F3D2E;
}

.wr-progress-vs-hk-bar-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.wr-progress-vs-hk-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
}

.wr-progress-vs-hk-bar-fill--hk {
    background: linear-gradient(90deg, #0F3D2E 0%, #166534 100%);
}

.wr-progress-vs-hk-bar-fill--green {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.wr-progress-vs-hk-bar-fill--yellow {
    background: linear-gradient(90deg, #ca8a04 0%, #eab308 100%);
}

.wr-progress-vs-hk-bar-fill--red {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.wr-progress-vs-hk-message {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #475569;
}

@media (max-width: 1199.98px) {
    .wr-progress-vs-hk-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wr-progress-vs-hk-bars {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .wr-progress-vs-hk-metrics {
        grid-template-columns: 1fr;
    }
}

/* Flatpickr — Datepicker Indonesia */
.wr-datepicker-wrap {
    position: relative;
}

.wr-datepicker-wrap .wr-datepicker-display {
    padding-left: 2.6rem;
    width: 100%;
}

.wr-datepicker-wrap .wr-datepicker-native.fp-hidden {
    display: none !important;
}

.wr-datepicker-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #16a34a;
    font-size: 1rem;
    pointer-events: none;
    z-index: 3;
}

.wr-datepicker-wrap .flatpickr-input[readonly] {
    background-color: #fff;
    cursor: pointer;
}

.wr-date-selected {
    margin-top: 0.45rem;
}

.wr-date-selected-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.1rem;
}

.wr-date-selected-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: #16a34a;
    letter-spacing: -0.01em;
}

.flatpickr-calendar {
    border-radius: 12px;
    border: 1px solid rgba(34, 197, 94, 0.25);
    box-shadow: var(--wr-shadow-md);
    font-family: inherit;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-weekdays,
.flatpickr-days {
    background: #fff;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #0F3D2E;
    fill: #0F3D2E;
}

span.flatpickr-weekday {
    color: #64748b;
    font-weight: 600;
}

.flatpickr-day {
    border-radius: 8px;
    color: var(--wr-text);
}

.flatpickr-day.today {
    border-color: #22C55E;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(22, 163, 74, 0.2);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    color: #cbd5e1;
}

.wr-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.25rem;
}

.wr-kpi-grid--7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.wr-kpi-grid--7 .wr-kpi-card {
    min-width: 0;
}

.wr-kpi-grid--7 .wr-kpi-label {
    line-height: 1.25;
    white-space: normal;
}

.wr-kpi-grid--7 .wr-kpi-value {
    font-size: clamp(1.05rem, 1.35vw, 2.25rem);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wr-kpi-grid--8 {
    grid-template-columns: repeat(4, 1fr);
}

.wr-kpi-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wr-kpi-grid--analytics {
    grid-template-columns: repeat(4, 1fr);
}

.wr-analytics-executive-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.35rem;
}

.wr-analytics-control-tower {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.wr-analytics-kpi-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wr-analytics-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0F3D2E;
}

.wr-analytics-kpi-row {
    display: grid;
    gap: 1.35rem;
}

.wr-analytics-kpi-row--management {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wr-analytics-kpi-row--operational {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wr-analytics-kpi-row--panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wr-kpi-card--primary {
    border-width: 1.5px;
    box-shadow: 0 14px 30px rgba(15, 61, 46, 0.1);
}

.wr-kpi-card--primary-green {
    border-color: rgba(22, 163, 74, 0.45);
    background: linear-gradient(145deg, #ffffff 0%, #f8fffb 60%, #f0fdf4 100%);
}

.wr-kpi-card--primary-yellow {
    border-color: rgba(234, 179, 8, 0.45);
    background: linear-gradient(145deg, #ffffff 0%, #fffef5 60%, #fefce8 100%);
}

.wr-kpi-card--primary-red {
    border-color: rgba(239, 68, 68, 0.4);
    background: linear-gradient(145deg, #ffffff 0%, #fffafa 60%, #fef2f2 100%);
}

.wr-kpi-primary-progress {
    margin-top: 0;
    width: 100%;
}

.wr-kpi-primary-progress-track {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.wr-kpi-primary-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.wr-kpi-primary-progress-fill--yellow {
    background: linear-gradient(90deg, #ca8a04 0%, #eab308 100%);
}

.wr-kpi-primary-progress-fill--red {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.wr-kpi-primary-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
}

.wr-kpi-primary-progress-meta strong.green { color: #16a34a; }
.wr-kpi-primary-progress-meta strong.red { color: #dc2626; }

.wr-kpi-primary-caption {
    margin-top: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    line-height: 1.35;
}

.wr-kpi-card--run-rate-status {
    border-width: 2px;
    min-height: 160px;
    box-shadow: 0 16px 34px rgba(15, 61, 46, 0.12);
}

.wr-kpi-card--run-rate-status--green {
    border-color: rgba(22, 163, 74, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 55%, #dcfce7 100%);
}

.wr-kpi-card--run-rate-status--yellow {
    border-color: rgba(234, 179, 8, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #fffef5 55%, #fef9c3 100%);
}

.wr-kpi-card--run-rate-status--red {
    border-color: rgba(239, 68, 68, 0.55);
    background: linear-gradient(145deg, #ffffff 0%, #fffafa 55%, #fee2e2 100%);
}

.wr-run-rate-status-display {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.wr-run-rate-status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
}

.wr-kpi-card--run-rate-status--green .wr-run-rate-status-dot { background: #16a34a; }
.wr-kpi-card--run-rate-status--yellow .wr-run-rate-status-dot { background: #ca8a04; }
.wr-kpi-card--run-rate-status--red .wr-run-rate-status-dot { background: #dc2626; }

.wr-run-rate-status-label {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.wr-kpi-card--run-rate-status--green .wr-run-rate-status-label { color: #16a34a; }
.wr-kpi-card--run-rate-status--yellow .wr-run-rate-status-label { color: #ca8a04; }
.wr-kpi-card--run-rate-status--red .wr-run-rate-status-label { color: #dc2626; }

.wr-kpi-value--status {
    line-height: 1.15;
}

.wr-analytics-panel {
    background: linear-gradient(145deg, #ffffff 0%, #f8fffb 55%, #f0fdf4 100%);
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 18px;
    padding: 1.35rem 1.6rem;
    box-shadow: 0 12px 28px rgba(15, 61, 46, 0.09);
    min-height: 220px;
}

.wr-analytics-panel--run-rate {
    background: linear-gradient(145deg, #ffffff 0%, #f8fffb 55%, #ecfdf5 100%);
}

.wr-analytics-panel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-analytics-panel-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(15, 61, 46, 0.1);
    color: #0F3D2E;
}

.wr-analytics-panel-title {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #0F3D2E;
}

.wr-analytics-panel-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.wr-analytics-panel--forecast .wr-analytics-panel-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wr-analytics-panel--run-rate .wr-analytics-panel-body {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wr-analytics-panel-metric-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.wr-analytics-panel-metric-value {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    font-weight: 800;
    line-height: 1.2;
    color: #0F3D2E;
}

.wr-executive-summary-ringkasan {
    margin-bottom: 1.15rem;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fffb 0%, #f0fdf4 100%);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.wr-executive-summary-ringkasan-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #0F3D2E;
    margin-bottom: 0.85rem;
}

.wr-executive-summary-ringkasan-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
}

.wr-executive-summary-ringkasan-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wr-executive-summary-ringkasan-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.wr-executive-summary-ringkasan-value {
    font-size: 1rem;
    font-weight: 800;
    color: #0F3D2E;
}

.wr-kpi-hero {
    grid-column: span 2;
    grid-row: span 1;
    background: linear-gradient(145deg, #ffffff 0%, #f8fffb 55%, #f0fdf4 100%);
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 18px;
    padding: 1.3rem 1.75rem;
    box-shadow: 0 12px 28px rgba(15, 61, 46, 0.09);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 255px;
}

.wr-kpi-hero-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.wr-kpi-hero-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(15, 61, 46, 0.1);
    color: #0F3D2E;
}

.wr-kpi-hero--green .wr-kpi-hero-icon {
    background: rgba(22, 163, 74, 0.14);
    color: #16a34a;
}

.wr-kpi-hero--yellow .wr-kpi-hero-icon {
    background: rgba(234, 179, 8, 0.16);
    color: #ca8a04;
}

.wr-kpi-hero--red .wr-kpi-hero-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.wr-kpi-hero-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
}

.wr-kpi-hero-value {
    font-size: clamp(2.05rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.05;
    margin-top: 0.2rem;
    color: #0F3D2E;
}

.wr-kpi-hero--green .wr-kpi-hero-value { color: #16a34a; }
.wr-kpi-hero--yellow .wr-kpi-hero-value { color: #ca8a04; }
.wr-kpi-hero--red .wr-kpi-hero-value { color: #dc2626; }

.wr-kpi-hero-progress {
    margin-top: 0.75rem;
}

.wr-kpi-hero-progress-track {
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.wr-kpi-hero-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.35s ease;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.wr-kpi-hero--yellow .wr-kpi-hero-progress-fill {
    background: linear-gradient(90deg, #ca8a04 0%, #eab308 100%);
}

.wr-kpi-hero--red .wr-kpi-hero-progress-fill {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.wr-kpi-hero-progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.wr-kpi-hero-footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-kpi-hero-metric {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.wr-kpi-hero-metric-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.wr-kpi-hero-metric-value {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0F3D2E;
}

.wr-kpi-hero-metric-value.red { color: #dc2626; }
.wr-kpi-hero-metric-value.green { color: #16a34a; }

.wr-analytics-executive-kpis > .wr-kpi-card,
.wr-analytics-control-tower .wr-kpi-card,
.wr-analytics-kpi-section .wr-kpi-card {
    justify-content: flex-start;
}

.wr-analytics-executive-kpis .wr-kpi-card-top,
.wr-analytics-control-tower .wr-kpi-card-top,
.wr-analytics-kpi-section .wr-kpi-card-top {
    flex: 0 0 auto;
}

.wr-analytics-executive-kpis .wr-kpi-card-metrics,
.wr-analytics-control-tower .wr-kpi-card-metrics,
.wr-analytics-kpi-section .wr-kpi-card-metrics {
    margin-top: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex: 1 1 auto;
}

.wr-analytics-executive-kpis .wr-kpi-card-metrics .wr-kpi-value,
.wr-analytics-control-tower .wr-kpi-card-metrics .wr-kpi-value,
.wr-analytics-kpi-section .wr-kpi-card-metrics .wr-kpi-value {
    line-height: 1.15;
    flex-shrink: 0;
}

.wr-analytics-kpi-row--management .wr-kpi-card-top,
.wr-analytics-kpi-row--operational .wr-kpi-card-top {
    min-height: 4.35rem;
}

.wr-kpi-metric-footer {
    min-height: 1.55rem;
    margin-top: 0.45rem;
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.wr-kpi-metric-footer--extended {
    min-height: 2.85rem;
}

.wr-kpi-trend {
    margin-top: 0;
    min-height: 1.1rem;
    width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: #64748b;
}

.wr-kpi-trend--empty {
    visibility: hidden;
}

.wr-kpi-trend--up { color: #16a34a; }
.wr-kpi-trend--down { color: #dc2626; }
.wr-kpi-trend--neutral { color: #64748b; }

.wr-executive-summary {
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.28);
    border-radius: 18px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 10px 28px rgba(15, 61, 46, 0.08);
}

.wr-executive-summary-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0F3D2E;
    margin-bottom: 1rem;
}

.wr-executive-summary-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.wr-executive-summary-paragraph {
    margin: 0;
    font-size: 0.96rem;
    line-height: 1.65;
    color: #334155;
}

@media (max-width: 1199.98px) {
    .wr-analytics-executive-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wr-analytics-kpi-row--management,
    .wr-analytics-kpi-row--operational {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wr-analytics-panel--forecast .wr-analytics-panel-body {
        grid-template-columns: 1fr;
    }

    .wr-analytics-panel-body {
        grid-template-columns: 1fr;
    }

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

    .wr-kpi-hero {
        grid-column: span 2;
        grid-row: span 1;
        min-height: auto;
    }

    .wr-kpi-hero-footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .wr-analytics-executive-kpis {
        grid-template-columns: 1fr;
    }

    .wr-analytics-kpi-row--management,
    .wr-analytics-kpi-row--operational,
    .wr-analytics-kpi-row--panels {
        grid-template-columns: 1fr;
    }

    .wr-executive-summary-ringkasan-grid {
        grid-template-columns: 1fr;
    }

    .wr-kpi-hero {
        grid-column: span 1;
    }
}

.wr-war-room-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--wr-shadow-sm);
}

.wr-war-room-summary-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0F3D2E;
    margin-bottom: 1rem;
}

.wr-war-room-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.wr-war-room-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wr-war-room-summary-item .label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.wr-war-room-summary-item .value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #16a34a;
}

.wr-war-room-summary-item .value.red { color: #dc2626; }
.wr-war-room-summary-item .value.green { color: #16a34a; }

.wr-kpi-gap {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.wr-kpi-gap-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wr-text-muted);
}

.wr-kpi-gap-value {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.wr-kpi-gap-value.red { color: #dc2626; }
.wr-kpi-gap-value.green { color: #16a34a; }

.wr-kpi-card {
    background: var(--wr-surface);
    border: 1px solid var(--wr-border);
    border-radius: var(--wr-radius-lg);
    min-height: 140px;
    padding: 1.25rem 1.35rem;
    box-shadow: var(--wr-shadow-md);
    transition: transform var(--wr-transition), box-shadow var(--wr-transition);
    will-change: transform;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wr-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--wr-shadow-lg);
}

.wr-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.wr-kpi-icon-svg {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
}

.wr-audit-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
    line-height: 1.2;
    opacity: 1;
}

.wr-table--audit-trail tbody tr:hover .wr-audit-badge {
    opacity: 1;
    filter: none;
}

.wr-audit-badge--export-pdf {
    background: rgba(59, 130, 246, 0.20);
    border-color: #3B82F6;
    color: #93C5FD;
}

.wr-audit-badge--export-excel {
    background: rgba(59, 130, 246, 0.20);
    border-color: #3B82F6;
    color: #93C5FD;
}

.wr-audit-badge--import-produksi {
    background: rgba(34, 197, 94, 0.20);
    border-color: #22C55E;
    color: #86EFAC;
}

.wr-audit-badge--approved {
    background: rgba(34, 197, 94, 0.20);
    border-color: #22C55E;
    color: #DCFCE7;
}

.wr-audit-badge--rejected {
    background: rgba(239, 68, 68, 0.20);
    border-color: #EF4444;
    color: #FECACA;
}

.wr-audit-badge--login {
    background: rgba(245, 158, 11, 0.20);
    border-color: #F59E0B;
    color: #FDE68A;
}

.wr-audit-badge--logout {
    background: rgba(107, 114, 128, 0.20);
    border-color: #9CA3AF;
    color: #374151;
}

html[data-bs-theme="dark"] .wr-audit-badge--logout {
    color: #F3F4F6;
}

.wr-audit-badge--create {
    background: rgba(34, 197, 94, 0.20);
    border-color: #22C55E;
    color: #86EFAC;
}

.wr-audit-badge--update {
    background: rgba(59, 130, 246, 0.20);
    border-color: #3B82F6;
    color: #93C5FD;
}

.wr-audit-badge--delete {
    background: rgba(239, 68, 68, 0.20);
    border-color: #EF4444;
    color: #FECACA;
}

.wr-audit-badge--import {
    background: rgba(245, 158, 11, 0.20);
    border-color: #F59E0B;
    color: #FDE68A;
}

.wr-audit-badge--failed {
    background: rgba(239, 68, 68, 0.25);
    border-color: #EF4444;
    color: #FECACA;
}

.wr-audit-badge--default {
    background: rgba(107, 114, 128, 0.20);
    border-color: #9CA3AF;
    color: #374151;
}

html[data-bs-theme="dark"] .wr-audit-badge--default {
    color: #E5E7EB;
}

html:not([data-bs-theme="dark"]) .wr-audit-badge--approved {
    color: #15803D;
}

html:not([data-bs-theme="dark"]) .wr-audit-badge--import-produksi,
html:not([data-bs-theme="dark"]) .wr-audit-badge--create {
    color: #15803D;
}

html:not([data-bs-theme="dark"]) .wr-audit-badge--export-pdf,
html:not([data-bs-theme="dark"]) .wr-audit-badge--export-excel,
html:not([data-bs-theme="dark"]) .wr-audit-badge--update {
    color: #1D4ED8;
}

html:not([data-bs-theme="dark"]) .wr-audit-badge--login,
html:not([data-bs-theme="dark"]) .wr-audit-badge--import {
    color: #a16207;
}

html:not([data-bs-theme="dark"]) .wr-audit-badge--rejected,
html:not([data-bs-theme="dark"]) .wr-audit-badge--delete,
html:not([data-bs-theme="dark"]) .wr-audit-badge--failed {
    color: #b91c1c;
}

.wr-table--audit-trail tbody tr:hover .wr-audit-badge--export-pdf,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--export-excel,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--import-produksi,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--approved,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--rejected,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--login,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--logout,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--create,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--update,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--delete,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--import,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--failed,
.wr-table--audit-trail tbody tr:hover .wr-audit-badge--default {
    opacity: 1;
    filter: none;
}

.wr-table--audit-trail td:nth-child(7) {
    min-width: 280px;
}

.wr-kpi-icon.emerald { background: var(--wr-emerald-soft); color: var(--wr-emerald); }
.wr-kpi-icon.gold { background: var(--wr-gold-soft); color: var(--wr-gold); }
.wr-kpi-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.wr-kpi-icon.red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.wr-kpi-icon.yellow { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.wr-kpi-icon.green { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.wr-kpi-icon.orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.wr-kpi-icon.forest { background: rgba(15, 61, 46, 0.12); color: #0F3D2E; }

.wr-kpi-value.forest { color: #0F3D2E; }

.wr-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wr-kpi-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--wr-text);
}

.wr-kpi-value.emerald { color: var(--wr-emerald); }
.wr-kpi-value.gold { color: var(--wr-gold); }
.wr-kpi-value.red { color: #ef4444; }
.wr-kpi-value.yellow { color: #ca8a04; }
.wr-kpi-value.green { color: #16a34a; }
.wr-kpi-value.orange { color: #ea580c; }

.wr-kpi-card--stat {
    min-height: auto;
    min-width: 0;
    padding: 1rem 1.05rem;
}

.wr-kpi-card--stat .wr-kpi-label {
    margin-bottom: 0.45rem;
    line-height: 1.35;
}

.wr-kpi-card--stat .wr-kpi-value {
    font-size: clamp(1.2rem, 4.2vw, 2rem);
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.wr-import-column-list {
    overflow-wrap: anywhere;
    word-break: break-word;
    padding-left: 1.1rem;
}

.wr-import-column-list li + li {
    margin-top: 0.35rem;
}

/* Dashboard Produksi Harian: Free Panes */
.wr-free-pane-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1rem;
}

.wr-free-pane {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 1.1rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--wr-radius);
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 38%),
        linear-gradient(145deg, #145a42 0%, var(--wr-forest) 52%, var(--wr-forest-dark) 100%);
    box-shadow: var(--wr-shadow-md);
    color: #ffffff;
    transition: transform var(--wr-transition), box-shadow var(--wr-transition), border-color var(--wr-transition);
}

.wr-free-pane::after {
    content: '';
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.wr-free-pane:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: var(--wr-shadow-lg);
}

.wr-free-pane-top {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.wr-free-pane-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.12);
}

.wr-free-pane-title {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.wr-free-pane-value {
    position: relative;
    z-index: 1;
    margin-bottom: 0.45rem;
    font-size: clamp(1.2rem, 1.7vw, 1.65rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
}

.wr-free-pane-subtitle {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.wr-free-pane-icon--green,
.wr-free-pane--green .wr-free-pane-value {
    color: #86efac;
}

.wr-free-pane-icon--blue,
.wr-free-pane--blue .wr-free-pane-value {
    color: #93c5fd;
}

.wr-free-pane-icon--red,
.wr-free-pane--red .wr-free-pane-value {
    color: #fca5a5;
}

.wr-free-pane-icon--orange,
.wr-free-pane--orange .wr-free-pane-value {
    color: #fdba74;
}

.wr-free-pane-icon--green { background: rgba(34, 197, 94, 0.16); }
.wr-free-pane-icon--blue { background: rgba(59, 130, 246, 0.16); }
.wr-free-pane-icon--red { background: rgba(239, 68, 68, 0.16); }
.wr-free-pane-icon--orange { background: rgba(249, 115, 22, 0.16); }

/* Ringkasan Produksi */
.wr-ringkasan {
    background: #ffffff;
    border: 1px solid var(--wr-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
}

.wr-ringkasan-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--wr-border);
}

.wr-ringkasan-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(10rem, 1fr));
    gap: 0.65rem 2.5rem;
    max-width: 36rem;
}

.wr-ringkasan-item {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-size: 0.95rem;
    white-space: nowrap;
}

.wr-ringkasan-item--reserved {
    display: none;
}

.wr-ringkasan-label {
    color: #475569;
    font-weight: 600;
}

.wr-ringkasan-sep {
    color: #94a3b8;
}

.wr-ringkasan-value {
    color: #16a34a;
    font-weight: 700;
}

/* Analytics Charts */
.wr-analytics-charts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.wr-analytics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .wr-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wr-analytics-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 992px) {
    .wr-analytics-row:not(.wr-analytics-row--full) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wr-analytics-row--full {
    grid-template-columns: 1fr;
}

.wr-analytics-row--full .wr-chart-card {
    width: 100%;
}

.wr-analytics-row--split {
    gap: 1.5rem;
}

.wr-analytics-row + .wr-card,
.wr-analytics-row--full + .wr-card {
    margin-top: 1.5rem;
}

.wr-analytics-row + .wr-analytics-row {
    margin-top: 1.5rem;
}

.wr-analytics-charts > .wr-analytics-row + .wr-analytics-row {
    margin-top: 0;
}

.wr-chart-card {
    background: #ffffff;
    border: 1px solid var(--wr-border);
    border-radius: 16px;
    box-shadow: var(--wr-shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--wr-transition);
}

.wr-chart-card:hover {
    box-shadow: var(--wr-shadow-md);
}

.wr-chart-card-header {
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--wr-border);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--wr-text);
}

.wr-chart-card-body {
    position: relative;
    padding: 1rem 1.25rem 1.25rem;
}

.wr-chart-card-body--produksi {
    height: 350px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}

.wr-chart-card-body--produksi .wr-chart-canvas-wrap {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
}

.wr-chart-color-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 2rem;
    padding-top: 0.65rem;
    flex-shrink: 0;
}

.wr-chart-color-legend__item {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--wr-text-muted);
    line-height: 1.3;
    white-space: nowrap;
}

.wr-chart-card-body--trend {
    height: 335px;
    min-height: 320px;
}

.wr-chart-card-body--achievement {
    height: 300px;
    min-height: 280px;
}

.wr-chart-card-body--achievement-estate {
    height: 200px;
    min-height: 180px;
    max-height: 220px;
}

.wr-chart-card-body--achievement-divisi {
    min-height: 280px;
    height: auto;
}

.wr-chart-card-body--tall {
    height: 350px;
}

.wr-chart-card-body--medium {
    height: 300px;
}

.wr-chart-card-body--ranking {
    padding: 1rem 1.35rem 1.5rem;
}

.wr-chart-card-body--ranking .wr-chart-canvas-wrap {
    margin-bottom: 0.35rem;
}

.wr-chart-card-body canvas {
    width: 100% !important;
    height: 100% !important;
}

.wr-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: var(--wr-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Cards */
.wr-card {
    background: var(--wr-surface);
    border: 1px solid var(--wr-border);
    border-radius: var(--wr-radius);
    box-shadow: var(--wr-shadow-sm);
}

.wr-card:hover { box-shadow: var(--wr-shadow-md); }

.wr-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--wr-border);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wr-card-body { padding: 1.5rem; }

/* Forms */
.wr-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--wr-text-muted);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wr-form-control,
.wr-form-select,
.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--wr-border);
    padding: 0.6rem 0.85rem;
    transition: border-color var(--wr-transition), box-shadow var(--wr-transition);
}

.wr-form-control:focus,
.wr-form-select:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--wr-emerald);
    box-shadow: 0 0 0 3px var(--wr-emerald-soft);
}

/* Appearance Settings */
.wr-appearance-card {
    position: relative;
}

.wr-appearance-header {
    justify-content: space-between;
}

.wr-appearance-header > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.wr-enterprise-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    color: var(--wr-forest);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, var(--wr-emerald-soft), var(--wr-gold-soft));
    border: 1px solid rgba(34, 197, 94, 0.18);
    white-space: nowrap;
}

.wr-appearance-section-title {
    margin-bottom: 0.35rem;
    color: var(--wr-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.wr-appearance-help {
    margin: 0 0 1rem;
    color: var(--wr-text-muted);
    font-size: 0.9rem;
}

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

.wr-theme-mode-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 64px;
    padding: 0.9rem 1rem;
    border: 1px solid var(--wr-border);
    border-radius: 14px;
    color: var(--wr-text);
    font-size: 0.88rem;
    font-weight: 600;
    background: var(--wr-surface);
    cursor: pointer;
    transition: border-color var(--wr-transition), box-shadow var(--wr-transition), transform var(--wr-transition);
}

.wr-theme-mode-option:hover {
    border-color: rgba(34, 197, 94, 0.35);
    box-shadow: var(--wr-shadow-sm);
    transform: translateY(-1px);
}

.wr-theme-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wr-theme-mode-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 10px;
    color: var(--wr-emerald);
    background: var(--wr-emerald-soft);
}

.wr-theme-mode-option:has(input:checked) {
    border-color: var(--wr-emerald);
    box-shadow: 0 0 0 3px var(--wr-emerald-soft);
}

.wr-appearance-divider {
    height: 1px;
    margin: 1.5rem 0;
    background: var(--wr-border);
}

.wr-theme-color-select {
    max-width: 360px;
}

.wr-appearance-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.wr-appearance-save-status {
    color: var(--wr-emerald);
    font-size: 0.86rem;
    font-weight: 600;
}

.wr-appearance-preview {
    height: 100%;
    min-height: 300px;
    padding: 1.25rem;
    border-radius: var(--wr-radius);
    border: 1px solid var(--wr-border);
    background:
        radial-gradient(circle at 90% 5%, var(--wr-emerald-soft), transparent 32%),
        var(--wr-bg);
}

.wr-appearance-preview-title {
    margin-bottom: 1rem;
    color: var(--wr-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.wr-preview-shell {
    display: grid;
    grid-template-columns: 84px 1fr;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid var(--wr-border);
    border-radius: 18px;
    background: var(--wr-surface);
    box-shadow: var(--wr-shadow-sm);
}

.wr-preview-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0.8rem;
    background: linear-gradient(180deg, var(--wr-forest) 0%, var(--wr-forest-dark) 100%);
}

.wr-preview-sidebar span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.wr-preview-sidebar span:first-child {
    width: 44px;
    height: 44px;
    margin-bottom: 0.5rem;
    border-radius: 14px;
    background: var(--wr-emerald);
}

.wr-preview-main {
    background: var(--wr-bg);
}

.wr-preview-header {
    height: 44px;
    border-bottom: 1px solid var(--wr-border);
    background: var(--wr-surface);
}

.wr-preview-content {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.wr-preview-card {
    min-height: 74px;
    padding: 0.85rem;
    border: 1px solid var(--wr-border);
    border-radius: 14px;
    background: var(--wr-surface);
}

.wr-preview-card-accent {
    border-color: rgba(34, 197, 94, 0.28);
}

.wr-preview-card-title,
.wr-preview-card-line,
.wr-preview-stat {
    border-radius: 999px;
    background: var(--wr-border);
}

.wr-preview-card-title {
    width: 52%;
    height: 10px;
    margin-bottom: 0.8rem;
}

.wr-preview-card-line {
    width: 80%;
    height: 8px;
}

.wr-preview-card-line.short {
    width: 48%;
    margin-top: 0.55rem;
}

.wr-preview-stat {
    width: 46px;
    height: 22px;
    margin-bottom: 0.7rem;
    background: var(--wr-emerald);
}

html[data-bs-theme="dark"] body.wr-app,
html[data-bs-theme="dark"] .wr-main,
html[data-bs-theme="dark"] .wr-content {
    background: var(--wr-bg);
    color: var(--wr-text);
}

html[data-bs-theme="dark"] .wr-topbar,
html[data-bs-theme="dark"] .wr-card,
html[data-bs-theme="dark"] .wr-notification-menu,
html[data-bs-theme="dark"] .wr-notification-menu-header,
html[data-bs-theme="dark"] .wr-notification-item,
html[data-bs-theme="dark"] .wr-notification-menu-footer,
html[data-bs-theme="dark"] .wr-notification-bell,
html[data-bs-theme="dark"] .wr-topbar-filter-btn,
html[data-bs-theme="dark"] .wr-filter-offcanvas,
html[data-bs-theme="dark"] .wr-kpi-card,
html[data-bs-theme="dark"] .wr-chart-card,
html[data-bs-theme="dark"] .wr-ringkasan,
html[data-bs-theme="dark"] .wr-periode-card,
html[data-bs-theme="dark"] .wr-data-status-panel,
html[data-bs-theme="dark"] .wr-table-wrap,
html[data-bs-theme="dark"] .modal-content {
    background: var(--wr-surface);
    border-color: var(--wr-border);
    color: var(--wr-text);
}

html[data-bs-theme="dark"] .wr-notification-item.is-unread,
html[data-bs-theme="dark"] .wr-notification-row--unread {
    background: rgba(25, 135, 84, 0.12);
}

html[data-bs-theme="dark"] .wr-notification-badge {
    border-color: var(--wr-surface);
}

html[data-bs-theme="dark"] .wr-page-title,
html[data-bs-theme="dark"] .wr-card-header,
html[data-bs-theme="dark"] .wr-chart-card-header,
html[data-bs-theme="dark"] .wr-analytics-section-title,
html[data-bs-theme="dark"] .wr-executive-summary-title,
html[data-bs-theme="dark"] .wr-war-room-summary-title,
html[data-bs-theme="dark"] .modal-title {
    color: #ffffff;
}

html[data-bs-theme="dark"] .wr-page-subtitle,
html[data-bs-theme="dark"] .wr-card,
html[data-bs-theme="dark"] .wr-chart-color-legend__item,
html[data-bs-theme="dark"] .wr-chart-empty,
html[data-bs-theme="dark"] .form-text,
html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .wr-kpi-trend--neutral,
html[data-bs-theme="dark"] .wr-kpi-primary-progress-meta,
html[data-bs-theme="dark"] .wr-kpi-primary-caption,
html[data-bs-theme="dark"] .wr-kpi-hero-progress-meta,
html[data-bs-theme="dark"] .wr-kpi-hero-metric-label,
html[data-bs-theme="dark"] .wr-kpi-gap-label,
html[data-bs-theme="dark"] .wr-appearance-help {
    color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] .text-dark,
html[data-bs-theme="dark"] .wr-topbar .fw-semibold,
html[data-bs-theme="dark"] .wr-topbar .btn-link {
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .wr-form-label,
html[data-bs-theme="dark"] .wr-kpi-label,
html[data-bs-theme="dark"] .wr-kpi-hero-label {
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .wr-kpi-value,
html[data-bs-theme="dark"] .wr-kpi-value.forest,
html[data-bs-theme="dark"] .wr-kpi-hero-value,
html[data-bs-theme="dark"] .wr-kpi-hero-metric-value,
html[data-bs-theme="dark"] .wr-kpi-gap-value,
html[data-bs-theme="dark"] .wr-ringkasan-value,
html[data-bs-theme="dark"] .wr-executive-summary-ringkasan-value {
    color: #ffffff;
}

html[data-bs-theme="dark"] .wr-kpi-value.emerald,
html[data-bs-theme="dark"] .wr-kpi-value.green,
html[data-bs-theme="dark"] .wr-kpi-hero--green .wr-kpi-hero-value,
html[data-bs-theme="dark"] .wr-kpi-gap-value.green,
html[data-bs-theme="dark"] .wr-kpi-hero-metric-value.green {
    color: #86efac;
}

html[data-bs-theme="dark"] .wr-kpi-value.gold,
html[data-bs-theme="dark"] .wr-kpi-value.yellow,
html[data-bs-theme="dark"] .wr-kpi-hero--yellow .wr-kpi-hero-value {
    color: #facc15;
}

html[data-bs-theme="dark"] .wr-kpi-value.red,
html[data-bs-theme="dark"] .wr-kpi-trend--down,
html[data-bs-theme="dark"] .wr-kpi-gap-value.red,
html[data-bs-theme="dark"] .wr-kpi-hero--red .wr-kpi-hero-value,
html[data-bs-theme="dark"] .wr-kpi-hero-metric-value.red {
    color: #fca5a5;
}

html[data-bs-theme="dark"] .wr-kpi-value.orange {
    color: #fdba74;
}

html[data-bs-theme="dark"] .wr-kpi-trend--up {
    color: #86efac;
}

html[data-bs-theme="dark"] .wr-periode-range {
    color: #ffffff;
}

html[data-bs-theme="dark"] .wr-periode-label,
html[data-bs-theme="dark"] .wr-periode-badge {
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .wr-periode-badge.is-default,
html[data-bs-theme="dark"] .wr-periode-badge.is-active,
html[data-bs-theme="dark"] .badge.text-bg-light {
    color: #e2e8f0 !important;
    background: rgba(34, 197, 94, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.32) !important;
}

html[data-bs-theme="dark"] .wr-data-status-panel {
    background: var(--wr-surface);
    border-color: var(--wr-border);
}

html[data-bs-theme="dark"] .wr-data-status-icon {
    background: rgba(34, 197, 94, 0.14);
    color: #86efac;
}

html[data-bs-theme="dark"] .wr-data-status-value {
    color: #ffffff;
}

html[data-bs-theme="dark"] .wr-data-status-value--empty {
    color: #94a3b8;
}

html[data-bs-theme="dark"] .wr-data-status-label {
    color: rgba(134, 239, 172, 0.78);
}

html[data-bs-theme="dark"] .wr-data-status-divider {
    background: rgba(255, 255, 255, 0.12);
}

html[data-bs-theme="dark"] .wr-data-status-badge--complete {
    color: #86efac;
}

html[data-bs-theme="dark"] .wr-data-status-badge--incomplete {
    color: #fde047;
}

html[data-bs-theme="dark"] .wr-data-status-badge--missing {
    color: #fca5a5;
}

html[data-bs-theme="dark"] .wr-produksi-status--draft {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.28);
}

html[data-bs-theme="dark"] .wr-produksi-status--submitted {
    background: rgba(234, 179, 8, 0.16);
    color: #fde047;
    border-color: rgba(234, 179, 8, 0.28);
}

html[data-bs-theme="dark"] .wr-produksi-status--approved {
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.28);
}

html[data-bs-theme="dark"] .wr-produksi-status--rejected {
    background: rgba(220, 38, 38, 0.16);
    color: #fca5a5;
    border-color: rgba(220, 38, 38, 0.28);
}

html[data-bs-theme="dark"] .wr-kpi-card--primary-green,
html[data-bs-theme="dark"] .wr-kpi-card--primary-yellow,
html[data-bs-theme="dark"] .wr-kpi-card--primary-red,
html[data-bs-theme="dark"] .wr-kpi-card--run-rate-status--green,
html[data-bs-theme="dark"] .wr-kpi-card--run-rate-status--yellow,
html[data-bs-theme="dark"] .wr-kpi-card--run-rate-status--red,
html[data-bs-theme="dark"] .wr-kpi-hero {
    background: linear-gradient(145deg, #10231d 0%, #132a23 62%, #0b1f1a 100%);
}

html[data-bs-theme="dark"] .wr-kpi-primary-progress-track,
html[data-bs-theme="dark"] .wr-kpi-hero-progress-track {
    background: #334155;
}

html[data-bs-theme="dark"] .wr-kpi-icon.forest {
    color: #86efac;
    background: rgba(34, 197, 94, 0.14);
}

html[data-bs-theme="dark"] .wr-ringkasan-heading,
html[data-bs-theme="dark"] .wr-ringkasan-label,
html[data-bs-theme="dark"] .wr-executive-summary-body,
html[data-bs-theme="dark"] .wr-executive-summary-paragraph,
html[data-bs-theme="dark"] .wr-executive-summary-ringkasan-label,
html[data-bs-theme="dark"] .wr-war-room-summary-item .label {
    color: #cbd5e1;
}

html[data-bs-theme="dark"] .wr-war-room-summary-item .value,
html[data-bs-theme="dark"] .wr-executive-summary-ringkasan-title {
    color: #ffffff;
}

html[data-bs-theme="dark"] .wr-executive-summary,
html[data-bs-theme="dark"] .wr-executive-summary-ringkasan,
html[data-bs-theme="dark"] .wr-war-room-summary,
html[data-bs-theme="dark"] .wr-war-room-summary-item,
html[data-bs-theme="dark"] .wr-ringkasan-item {
    background: #132a23;
    border-color: var(--wr-border);
}

html[data-bs-theme="dark"] .wr-form-control,
html[data-bs-theme="dark"] .wr-form-select,
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
    background-color: #0b1f1a;
    border-color: var(--wr-border);
    color: var(--wr-text);
}

html[data-bs-theme="dark"] .wr-form-control::placeholder,
html[data-bs-theme="dark"] .form-control::placeholder {
    color: #94a3b8;
}

html[data-bs-theme="dark"] .alert-light {
    background: #0b1f1a;
    border-color: var(--wr-border) !important;
    color: var(--wr-text-muted) !important;
}

html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .ts-dropdown,
html[data-bs-theme="dark"] .ts-control,
html[data-bs-theme="dark"] .ts-wrapper.single .ts-control,
html[data-bs-theme="dark"] .ts-wrapper.multi .ts-control {
    background: #0b1f1a !important;
    border-color: var(--wr-border) !important;
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .ts-dropdown .option,
html[data-bs-theme="dark"] .ts-dropdown .no-results,
html[data-bs-theme="dark"] .ts-control input,
html[data-bs-theme="dark"] .ts-control .item,
html[data-bs-theme="dark"] .dropdown-item {
    color: #e2e8f0 !important;
}

html[data-bs-theme="dark"] .ts-dropdown .active,
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
    background: rgba(34, 197, 94, 0.16) !important;
    color: #ffffff !important;
}

html[data-bs-theme="dark"] .flatpickr-calendar,
html[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
html[data-bs-theme="dark"] .flatpickr-current-month .flatpickr-monthDropdown-months,
html[data-bs-theme="dark"] .flatpickr-weekdays,
html[data-bs-theme="dark"] .flatpickr-days {
    background: #0f172a;
    border-color: var(--wr-border);
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .flatpickr-current-month,
html[data-bs-theme="dark"] .flatpickr-current-month input.cur-year,
html[data-bs-theme="dark"] span.flatpickr-weekday,
html[data-bs-theme="dark"] .flatpickr-day {
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .flatpickr-months .flatpickr-prev-month,
html[data-bs-theme="dark"] .flatpickr-months .flatpickr-next-month {
    color: #e2e8f0;
    fill: #e2e8f0;
}

html[data-bs-theme="dark"] .flatpickr-day:hover,
html[data-bs-theme="dark"] .flatpickr-day:focus {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.32);
}

html[data-bs-theme="dark"] .flatpickr-day.today {
    border-color: var(--wr-emerald);
}

html[data-bs-theme="dark"] .flatpickr-day.flatpickr-disabled,
html[data-bs-theme="dark"] .flatpickr-day.flatpickr-disabled:hover,
html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay,
html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay {
    color: #64748b;
}

/* Tom Select overrides */
.ts-wrapper.form-select { padding: 0; border: none; }
.ts-control {
    border-radius: 12px !important;
    border: 1px solid var(--wr-border) !important;
    padding: 0.5rem 0.75rem !important;
    min-height: 42px;
}

/* Table */
.wr-table-wrap {
    border-radius: var(--wr-radius);
    overflow: hidden;
    border: 1px solid var(--wr-border);
    background: var(--wr-surface);
    box-shadow: var(--wr-shadow-sm);
}

.wr-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.wr-table thead { will-change: transform; }

.wr-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
    color: var(--wr-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--wr-border);
    white-space: nowrap;
}

html[data-bs-theme="dark"] .wr-table thead th {
    background: #0F3D2E;
    color: #e2e8f0;
    border-bottom-color: rgba(226, 232, 240, 0.12);
}

.wr-table thead th .wr-table-sort-link,
.wr-table thead th .wr-table-sort-link:link,
.wr-table thead th .wr-table-sort-link:visited {
    align-items: center;
    color: inherit;
    display: inline-flex;
    gap: 0.35rem;
    opacity: 1;
    text-decoration: none;
    visibility: visible;
    white-space: nowrap;
}

.wr-table-sort-label {
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: 1.2;
    text-transform: inherit;
}

.wr-table-sort-icon {
    color: var(--wr-text-muted);
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    min-width: 0.85em;
    text-align: center;
}

.wr-table-sort-link.is-active .wr-table-sort-icon {
    color: var(--wr-gold, #D4AF37);
}

.wr-table-sort-link:hover,
.wr-table-sort-link:focus-visible {
    color: var(--wr-primary-strong, #16a34a);
}

.wr-table-sort-link.is-active {
    color: inherit;
    font-weight: 700;
}

html[data-bs-theme="dark"] .wr-table thead th .wr-table-sort-link:hover,
html[data-bs-theme="dark"] .wr-table thead th .wr-table-sort-link:focus-visible {
    color: var(--wr-emerald, #22C55E);
}

.wr-table-sort-badge {
    align-items: center;
    background: var(--wr-forest, #0F3D2E);
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    color: #e2e8f0;
    display: inline-flex;
    flex-wrap: wrap;
    font-size: 0.68rem;
    font-weight: 600;
    gap: 0.35rem;
    letter-spacing: 0.02em;
    line-height: 1.2;
    padding: 0.3rem 0.65rem;
    white-space: nowrap;
}

.wr-table-sort-badge-prefix {
    color: rgba(226, 232, 240, 0.78);
    font-weight: 500;
}

.wr-table-sort-badge-value {
    color: #f8fafc;
    font-weight: 700;
}

.wr-table-sort-badge--default .wr-table-sort-badge-value {
    color: var(--wr-gold, #D4AF37);
}

html[data-bs-theme="dark"] .wr-table-sort-badge {
    background: rgba(15, 61, 46, 0.92);
    border-color: rgba(212, 175, 55, 0.55);
}

.wr-table-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-left: auto;
}

.wr-table-static-th {
    cursor: default;
    display: inline-block;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: 1.2;
    text-transform: inherit;
    user-select: none;
}

.wr-table thead th .wr-table-static-th:hover {
    color: inherit;
}

.wr-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--wr-border);
    font-size: 0.9rem;
}

.wr-table tbody tr:nth-child(even) td { background: rgb(248, 250, 252); }
html[data-bs-theme="dark"] .wr-table tbody td {
    background: #132A23;
    color: #e2e8f0;
    border-bottom-color: rgba(226, 232, 240, 0.1);
}

html[data-bs-theme="dark"] .wr-table tbody tr:nth-child(even) td {
    background: #10231d;
}

.wr-table tbody tr:hover td { background: var(--wr-emerald-soft) !important; }
html[data-bs-theme="dark"] .wr-table tbody tr:hover td {
    background: rgba(34, 197, 94, 0.16) !important;
}

.wr-table-scroll {
    max-height: 520px;
    overflow: auto;
    transform: translateZ(0);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.wr-table--ringkasan-estate {
    table-layout: fixed;
    width: 100%;
}

.wr-table--ringkasan-estate th:nth-child(1),
.wr-table--ringkasan-estate td:nth-child(1) {
    width: 12%;
}

.wr-table--ringkasan-estate th:nth-child(2),
.wr-table--ringkasan-estate td:nth-child(2),
.wr-table--ringkasan-estate th:nth-child(3),
.wr-table--ringkasan-estate td:nth-child(3),
.wr-table--ringkasan-estate th:nth-child(4),
.wr-table--ringkasan-estate td:nth-child(4),
.wr-table--ringkasan-estate th:nth-child(5),
.wr-table--ringkasan-estate td:nth-child(5) {
    width: 17%;
}

.wr-table--ringkasan-estate th:nth-child(6),
.wr-table--ringkasan-estate td:nth-child(6) {
    width: 14%;
}

@media (max-width: 767.98px) {
    .wr-table--ringkasan-estate {
        table-layout: auto;
        width: max-content;
        min-width: 100%;
    }

    .wr-table--ringkasan-estate thead th {
        white-space: normal;
        line-height: 1.3;
        padding: 0.75rem 0.5rem;
        vertical-align: bottom;
    }

    .wr-table--ringkasan-estate tbody td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    .wr-table--ringkasan-estate th:nth-child(1),
    .wr-table--ringkasan-estate td:nth-child(1) {
        width: auto;
        min-width: 3.5rem;
    }

    .wr-table--ringkasan-estate th:nth-child(2),
    .wr-table--ringkasan-estate td:nth-child(2) {
        width: auto;
        min-width: 3.75rem;
    }

    .wr-table--ringkasan-estate th:nth-child(3),
    .wr-table--ringkasan-estate td:nth-child(3),
    .wr-table--ringkasan-estate th:nth-child(4),
    .wr-table--ringkasan-estate td:nth-child(4) {
        width: auto;
        min-width: 4.75rem;
    }

    .wr-table--ringkasan-estate th:nth-child(5),
    .wr-table--ringkasan-estate td:nth-child(5) {
        width: auto;
        min-width: 5.25rem;
    }

    .wr-table--ringkasan-estate th:nth-child(6),
    .wr-table--ringkasan-estate td:nth-child(6) {
        width: auto;
        min-width: 3.5rem;
    }
}

.wr-table--top-blok {
    table-layout: auto;
    width: 100%;
}

.wr-table--top-blok th:nth-child(1),
.wr-table--top-blok td:nth-child(1) {
    min-width: 90px;
    padding-left: 16px;
    padding-right: 16px;
    white-space: nowrap;
    width: 90px;
}

.bjr-table {
    min-width: 100%;
    table-layout: auto;
    width: 100%;
}

.bjr-table th:first-child,
.bjr-table td:first-child {
    max-width: 100px !important;
    min-width: 80px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    text-align: center;
    white-space: nowrap;
    width: 15% !important;
}

.bjr-table th:nth-child(2),
.bjr-table td:nth-child(2) {
    width: 13% !important;
}

.bjr-table th:nth-child(3),
.bjr-table td:nth-child(3) {
    width: 19% !important;
}

.bjr-table th:nth-child(4),
.bjr-table td:nth-child(4) {
    width: 15% !important;
}

.bjr-table th:nth-child(5),
.bjr-table td:nth-child(5),
.bjr-table th:nth-child(6),
.bjr-table td:nth-child(6) {
    text-align: center;
    width: 11% !important;
}

.bjr-table th:nth-child(7),
.bjr-table td:nth-child(7) {
    width: 16% !important;
}

.wr-table--top-blok th:nth-child(2),
.wr-table--top-blok td:nth-child(2) {
    width: 11%;
}

.wr-table--top-blok th:nth-child(3),
.wr-table--top-blok td:nth-child(3) {
    width: 14%;
}

.wr-table--top-blok th:nth-child(4),
.wr-table--top-blok td:nth-child(4) {
    width: 11%;
}

.wr-table--top-blok th:nth-child(5),
.wr-table--top-blok td:nth-child(5),
.wr-table--top-blok th:nth-child(6),
.wr-table--top-blok td:nth-child(6) {
    width: 8%;
    text-align: center;
}

.wr-table--top-blok th:nth-child(7),
.wr-table--top-blok td:nth-child(7) {
    width: 12%;
}

.wr-table--top-blok th:nth-child(8),
.wr-table--top-blok td:nth-child(8) {
    width: 16%;
}

.wr-table--top-blok th:nth-child(9),
.wr-table--top-blok td:nth-child(9) {
    width: 11%;
}

/* Empty state */
.wr-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.wr-empty-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 1.25rem;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--wr-emerald-soft), rgba(212, 175, 55, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--wr-emerald);
}

.wr-empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wr-text);
    margin-bottom: 0.35rem;
}

.wr-empty-text {
    color: var(--wr-text-muted);
    font-size: 0.95rem;
}

/* Pagination */
.wr-pagination .page-link {
    border-radius: 10px;
    margin: 0 0.15rem;
    border: 1px solid var(--wr-border);
    color: var(--wr-text);
    transition: all var(--wr-transition);
}

.wr-pagination .page-item.active .page-link {
    background: var(--wr-emerald);
    border-color: var(--wr-emerald);
}

/* Alerts */
.wr-alert {
    border-radius: 12px;
    border: none;
    box-shadow: var(--wr-shadow-sm);
}

/* Responsive */
@media (max-width: 1599.98px) {
    .wr-kpi-grid--7 {
        gap: 0.85rem;
    }

    .wr-kpi-grid--7 .wr-kpi-card {
        padding: 1rem 0.85rem;
        min-height: 128px;
    }

    .wr-kpi-grid--7 .wr-kpi-icon {
        width: 36px;
        height: 36px;
        font-size: 1.05rem;
        margin-bottom: 0.55rem;
    }
}

@media (max-width: 1399.98px) {
    .wr-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wr-kpi-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wr-kpi-grid--7 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wr-kpi-grid--8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wr-kpi-grid--analytics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wr-war-room-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px), (orientation: landscape) and (max-height: 520px) {
    .wr-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wr-kpi-grid--7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wr-free-pane-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wr-content { padding: 1.5rem; }

    .wr-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        max-height: 100vh;
        transform: translateX(-100%);
        box-shadow: var(--wr-shadow-lg);
    }

    .wr-sidebar-brand {
        padding: 0.85rem 0.75rem 0.5rem;
    }

    .wr-sidebar-logo,
    .wr-sidebar-logo-fallback {
        width: 110px;
        height: 110px;
    }

    .wr-brand-identity--sidebar {
        --wr-brand-logo-gap: 0.1875rem;
        --wr-brand-logo-trim: -0.625rem;
        --wr-brand-title-tagline-gap: 0.375rem;
    }

    .wr-brand-tagline {
        font-size: 9px;
        letter-spacing: 1.2px;
        margin-bottom: 0.375rem;
    }

    .wr-brand-title {
        font-size: 17px;
    }

    .wr-brand-subtitle {
        font-size: 14px;
    }

    .wr-sidebar-footer {
        padding: 0.5rem 0.65rem 0.7rem;
    }

    .wr-sidebar-user-avatar {
        width: 36px;
        height: 36px;
    }

    .wr-sidebar-user-name {
        font-size: 0.78rem;
    }

    .wr-sidebar.show { transform: translateX(0); }

    .wr-sidebar:not(.show) .wr-brand-tagline {
        display: none;
    }

    .wr-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1035;
    }

    .wr-sidebar-overlay.show { display: block; }

    .wr-topbar {
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }

    .wr-topbar #sidebarToggle,
    .wr-topbar-title-mobile {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .wr-kpi-grid--7 { grid-template-columns: minmax(0, 1fr); }
    .wr-kpi-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .wr-kpi-grid--8 { grid-template-columns: 1fr; }
    .wr-kpi-grid--analytics { grid-template-columns: 1fr; }
    .wr-war-room-summary-grid { grid-template-columns: 1fr; }
    .wr-free-pane-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .wr-kpi-card--stat {
        padding: 0.8rem 0.85rem;
    }

    .wr-kpi-card--stat .wr-kpi-label {
        font-size: 0.68rem;
        letter-spacing: 0.03em;
    }

    .wr-kpi-card--stat .wr-kpi-value {
        font-size: clamp(1rem, 4vw, 1.45rem);
        line-height: 1.15;
    }

    .wr-page-header .d-flex.flex-wrap.gap-2 {
        width: 100%;
    }

    .wr-page-header .d-flex.flex-wrap.gap-2 .btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }

    .wr-periode-card {
        align-items: flex-start;
    }

    .wr-data-status-panel {
        padding: 0.45rem 0.85rem;
    }

    .wr-data-status-row {
        align-items: flex-start;
        flex-wrap: wrap;
        row-gap: 0.15rem;
    }

    .wr-data-status-value {
        flex-basis: 100%;
        margin-left: calc(22px + 0.5rem);
        white-space: normal;
    }

    .wr-periode-badge {
        width: 100%;
        text-align: center;
    }

    .wr-ringkasan-metrics {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        max-width: none;
    }

    .wr-kpi-grid { grid-template-columns: 1fr; }
    .wr-free-pane-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .wr-page-title { font-size: 1.5rem; }
}

.wr-session-monitor-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(22, 163, 74, 0.25);
    border-radius: 999px;
    background: rgba(22, 163, 74, 0.08);
    color: inherit;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wr-session-monitor-badge:hover {
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.4);
    color: inherit;
}

.wr-session-monitor-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
}

@media (max-width: 767.98px) {
    .wr-topbar .wr-session-monitor-badge {
        display: none;
    }
}

.wr-session-widget {
    border: 1px solid rgba(22, 163, 74, 0.25);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.08), rgba(22, 163, 74, 0.02));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wr-session-widget:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.12);
}

.wr-session-widget-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #166534;
}

.wr-session-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    white-space: nowrap;
}

.wr-session-status--online {
    color: #16a34a;
}

.wr-session-status--offline {
    color: #dc2626;
}

.wr-health-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
    padding: 0.35rem 0.7rem;
    white-space: nowrap;
}

.wr-health-status--healthy {
    background: rgba(22, 163, 74, 0.14);
    color: #15803d;
}

.wr-health-status--warning {
    background: rgba(250, 204, 21, 0.18);
    color: #a16207;
}

.wr-health-status--critical {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.wr-health-status--unknown {
    background: rgba(148, 163, 184, 0.16);
    color: #64748b;
}

.wr-health-overall {
    border-radius: 16px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(15, 61, 46, 0.12);
    background: rgba(15, 61, 46, 0.04);
}

.wr-health-overall--healthy {
    border-color: rgba(22, 163, 74, 0.25);
    background: rgba(22, 163, 74, 0.08);
}

.wr-health-overall--warning {
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.1);
}

.wr-health-overall--critical {
    border-color: rgba(220, 38, 38, 0.25);
    background: rgba(220, 38, 38, 0.08);
}

.wr-health-overall--unknown {
    border-color: rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.08);
}

.wr-health-kpi-card--warning {
    border-color: rgba(250, 204, 21, 0.35) !important;
}

.wr-health-kpi-card--critical {
    border-color: rgba(220, 38, 38, 0.35) !important;
}

.wr-health-kpi-card--unknown {
    border-color: rgba(148, 163, 184, 0.35) !important;
}

.wr-health-detail-list {
    display: grid;
    gap: 0.55rem;
}

.wr-health-detail-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.875rem;
    min-width: 0;
}

.wr-health-detail-item span:first-child {
    color: var(--wr-muted, #64748b);
    flex-shrink: 0;
}

.wr-health-detail-item span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-align: right;
}

.wr-health-error-list {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
    max-width: 100%;
}

.wr-health-error-item {
    border-left: 3px solid #dc2626;
    padding-left: 0.85rem;
    min-width: 0;
    overflow: hidden;
}

.wr-health-error-time {
    color: var(--wr-muted, #64748b);
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
}

.wr-health-error-message {
    font-size: 0.82rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.wr-health-errors-body {
    min-width: 0;
    overflow-x: hidden;
}

html[data-bs-theme="dark"] .wr-health-overall--healthy {
    background: rgba(74, 222, 128, 0.08);
}

html[data-bs-theme="dark"] .wr-health-overall--warning {
    background: rgba(250, 204, 21, 0.08);
}

html[data-bs-theme="dark"] .wr-health-overall--critical {
    background: rgba(248, 113, 113, 0.08);
}

/* System Health Dashboard */
.wr-sh-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.wr-sh-page-header .wr-page-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.wr-sh-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem 1.25rem;
    align-items: center;
    border-radius: 18px;
    padding: 1.15rem 1.35rem;
    border: 1px solid rgba(22, 163, 74, 0.22);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.12), rgba(240, 253, 244, 0.95));
    margin-bottom: 1.25rem;
}

.wr-sh-banner--warning {
    border-color: rgba(202, 138, 4, 0.28);
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(255, 251, 235, 0.95));
}

.wr-sh-banner--critical {
    border-color: rgba(220, 38, 38, 0.25);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(254, 242, 242, 0.95));
}

.wr-sh-banner-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 163, 74, 0.16);
    color: #15803d;
    font-size: 1.45rem;
}

.wr-sh-banner--warning .wr-sh-banner-icon {
    background: rgba(202, 138, 4, 0.16);
    color: #a16207;
}

.wr-sh-banner--critical .wr-sh-banner-icon {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.wr-sh-banner-title {
    font-size: 1.05rem;
    color: #0F3D2E;
}

.wr-sh-banner-message {
    color: #64748b;
    font-size: 0.92rem;
    margin-top: 0.2rem;
}

.wr-sh-banner-meta {
    text-align: right;
    min-width: 12rem;
}

.wr-sh-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.wr-sh-resource-card {
    border-radius: 16px;
    border: 1px solid rgba(15, 61, 46, 0.1);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 61, 46, 0.06);
    padding: 1rem 1.1rem 0.75rem;
    min-height: 11.5rem;
}

.wr-sh-resource-card--warning {
    border-color: rgba(202, 138, 4, 0.28);
}

.wr-sh-resource-card--critical {
    border-color: rgba(220, 38, 38, 0.28);
}

.wr-sh-resource-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.wr-sh-resource-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #64748b;
}

.wr-sh-resource-value {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
    color: #0F3D2E;
}

.wr-sh-resource-hint {
    font-size: 0.82rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.wr-sh-resource-visual {
    margin-top: 0.35rem;
    min-height: 4.5rem;
}

.wr-sh-sparkline-wrap,
.wr-sh-gauge-wrap {
    height: 4.5rem;
    position: relative;
}

.wr-sh-middle-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
    gap: 1.15rem;
}

.wr-sh-panel .wr-card-body {
    padding-top: 0.85rem;
}

.wr-sh-chart-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.wr-sh-trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
    font-size: 0.78rem;
    color: #64748b;
}

.wr-sh-legend-dot {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.wr-sh-legend-dot--cpu { background: #16a34a; }
.wr-sh-legend-dot--memory { background: #2563eb; }
.wr-sh-legend-dot--disk { background: #ca8a04; }

.wr-sh-trend-canvas-wrap {
    height: 240px;
}

.wr-sh-service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0;
    border-bottom: 1px solid rgba(15, 61, 46, 0.08);
}

.wr-sh-service-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.wr-sh-service-name {
    font-size: 0.9rem;
    color: #0F3D2E;
}

.wr-sh-service-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.wr-sh-service-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: #16a34a;
}

.wr-sh-service-status--warning .wr-sh-service-dot { background: #ca8a04; }
.wr-sh-service-status--critical .wr-sh-service-dot { background: #dc2626; }
.wr-sh-service-status--unknown .wr-sh-service-dot { background: #94a3b8; }

.wr-sh-service-status--healthy { color: #15803d; }
.wr-sh-service-status--warning { color: #a16207; }
.wr-sh-service-status--critical { color: #b91c1c; }
.wr-sh-service-status--unknown { color: #64748b; }

.wr-sh-info-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.62rem 0;
    border-bottom: 1px solid rgba(15, 61, 46, 0.08);
    font-size: 0.875rem;
}

.wr-sh-info-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.wr-sh-info-row span:first-child {
    color: #64748b;
}

.wr-sh-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.wr-sh-metric-card {
    border-radius: 14px;
    border: 1px solid rgba(15, 61, 46, 0.1);
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 61, 46, 0.05);
    padding: 0.95rem 1rem;
    min-height: 7.5rem;
}

.wr-sh-metric-icon {
    color: #16a34a;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.wr-sh-metric-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    color: #64748b;
}

.wr-sh-metric-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0F3D2E;
    margin-top: 0.2rem;
}

.wr-sh-metric-hint {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.wr-sh-footer {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(22, 163, 74, 0.22);
    background: rgba(22, 163, 74, 0.08);
    color: #15803d;
}

.wr-sh-footer--warning {
    border-color: rgba(202, 138, 4, 0.25);
    background: rgba(250, 204, 21, 0.1);
    color: #a16207;
}

.wr-sh-footer--critical {
    border-color: rgba(220, 38, 38, 0.22);
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

.wr-sh-errors-details {
    border-radius: 12px;
}

.wr-sh-errors-summary {
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
}

@media (max-width: 1199.98px) {
    .wr-sh-middle-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 767.98px) {
    .wr-sh-banner {
        grid-template-columns: 1fr;
    }

    .wr-sh-banner-meta {
        text-align: left;
    }

    .wr-sh-resource-grid,
    .wr-sh-metrics-grid {
        grid-template-columns: 1fr;
    }
}

html[data-bs-theme="dark"] .wr-sh-resource-card,
html[data-bs-theme="dark"] .wr-sh-metric-card {
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.18);
}

html[data-bs-theme="dark"] .wr-sh-banner {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(15, 23, 42, 0.72));
}

html[data-bs-theme="dark"] .wr-sh-banner-title,
html[data-bs-theme="dark"] .wr-sh-resource-value,
html[data-bs-theme="dark"] .wr-sh-service-name,
html[data-bs-theme="dark"] .wr-sh-metric-value {
    color: #e2e8f0;
}

html[data-bs-theme="dark"] .wr-session-monitor-badge {
    border-color: rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.08);
}

html[data-bs-theme="dark"] .wr-session-widget {
    border-color: rgba(74, 222, 128, 0.25);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.12), rgba(15, 23, 42, 0.4));
}

html[data-bs-theme="dark"] .wr-session-widget-value {
    color: #86efac;
}

/* Login */
.wr-login-page {
    min-height: 100vh;
    background: #f3f7f2;
}

.wr-login-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 100vh;
}

.wr-login-hero,
.wr-login-panel {
    position: relative;
    min-height: 100vh;
}

.wr-login-hero {
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 4.5rem);
    color: #fff;
    background:
        radial-gradient(circle at 15% 15%, rgba(34, 197, 94, 0.28), transparent 28%),
        radial-gradient(circle at 85% 20%, rgba(212, 175, 55, 0.18), transparent 26%),
        linear-gradient(145deg, #145a42 0%, var(--wr-forest) 46%, var(--wr-forest-dark) 100%);
}

.wr-login-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(135deg, #000 0%, transparent 80%);
}

.wr-login-hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 620px;
}

.wr-login-hero-logo {
    position: relative;
    z-index: 0;
    width: 365px;
    min-height: 178px;
    display: flex;
    align-items: center;
    margin-left: clamp(0.25rem, 1.5vw, 1rem);
    margin-bottom: clamp(0.75rem, 1.4vw, 1rem);
}

.wr-login-hero-logo::before {
    content: '';
    position: absolute;
    inset: 8% 2% 0;
    z-index: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(34, 197, 94, 0.26) 0%, rgba(34, 197, 94, 0.13) 34%, transparent 68%),
        radial-gradient(circle at 58% 45%, rgba(212, 175, 55, 0.18) 0%, transparent 58%);
    filter: blur(24px);
    opacity: 0.78;
}

.wr-login-hero-logo img {
    position: relative;
    z-index: 1;
    width: 365px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.25));
}

.wr-login-hero-logo-fallback {
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 28px;
    color: #dfffea;
    font-size: 2.75rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}

.wr-login-eyebrow {
    width: fit-content;
    margin: 0 0 0.62rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    color: #b7f7c9;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.wr-login-hero h1 {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.08;
}

.wr-login-title-main,
.wr-login-title-accent {
    display: block;
    font-weight: 800;
    text-transform: uppercase;
}

.wr-login-title-main {
    color: #ffffff;
    font-size: clamp(2.15rem, 4vw, 4rem);
    letter-spacing: 0.04em;
    line-height: 1.15;
}

.wr-login-title-accent {
    color: #8BC34A;
    margin-top: 0.05rem;
    font-size: clamp(1.72rem, 3.2vw, 3.2rem);
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.wr-login-subtitle {
    margin: 0.82rem 0 0;
    color: rgba(248, 250, 252, 0.88);
    font-size: clamp(1.17rem, 1.7vw, 1.52rem);
    font-weight: 600;
}

.wr-login-tagline {
    margin: 0.48rem 0 0;
    color: var(--wr-gold);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.wr-login-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: clamp(1.25rem, 2.2vw, 1.75rem);
}

.wr-login-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 66px;
    padding: 1rem 1.15rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(14px);
    transition: transform var(--wr-transition), background var(--wr-transition), border-color var(--wr-transition);
}

.wr-login-feature:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.26);
}

.wr-login-feature i {
    color: #8befa9;
    font-size: 1.34rem;
}

.wr-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: clamp(1.5rem, 5vw, 4rem);
    background:
        radial-gradient(circle at 82% 12%, rgba(34, 197, 94, 0.08), transparent 26%),
        linear-gradient(180deg, #ffffff 0%, #f6f8f6 100%);
}

.wr-login-panel::before {
    content: '';
    position: absolute;
    top: 5%;
    right: 5%;
    width: 180px;
    height: 180px;
    opacity: 0.32;
    background-image: radial-gradient(rgba(15, 61, 46, 0.2) 1px, transparent 1px);
    background-size: 14px 14px;
    pointer-events: none;
}

.wr-login-panel::after {
    content: '';
    position: absolute;
    right: -48px;
    bottom: -36px;
    width: 260px;
    height: 180px;
    opacity: 0.16;
    background:
        linear-gradient(135deg, transparent 42%, rgba(15, 61, 46, 0.35) 43%, transparent 44%),
        linear-gradient(155deg, transparent 48%, rgba(34, 197, 94, 0.32) 49%, transparent 50%),
        linear-gradient(25deg, transparent 55%, rgba(15, 61, 46, 0.22) 56%, transparent 57%);
    pointer-events: none;
}

.wr-login-panel-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 470px;
}

.wr-login-card {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: clamp(2.5rem, 4.5vw, 3.125rem);
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(15, 61, 46, 0.06);
    margin: 0;
    box-shadow: 0 24px 64px rgba(15, 61, 46, 0.13);
    transition: transform var(--wr-transition), box-shadow var(--wr-transition), border-color var(--wr-transition);
}

.wr-login-card:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.16);
    box-shadow: 0 28px 72px rgba(15, 61, 46, 0.16);
}

.wr-login-card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
    text-align: center;
}

.wr-login-card-kicker,
.wr-login-card h2,
.wr-login-card-header p:last-child,
.wr-login-form .wr-form-label,
.wr-login-input-wrap .wr-form-control,
.wr-login-remember,
.wr-login-submit,
.wr-login-card-footer {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.wr-login-user-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
    border-radius: 22px;
    color: var(--wr-forest);
    font-size: 2rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.16);
}

.wr-login-security-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 16px;
    color: #fff;
    font-size: 1.35rem;
    background: linear-gradient(135deg, var(--wr-emerald) 0%, #15803d 100%);
    box-shadow: 0 14px 28px rgba(34, 197, 94, 0.28);
}

.wr-login-card-kicker {
    margin: 0 0 0.25rem;
    color: var(--wr-emerald);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wr-login-card h2 {
    margin: 0;
    color: var(--wr-forest-dark);
    font-size: clamp(2.5rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.04;
}

.wr-login-card-header p:last-child {
    margin: 0.75rem 0 0;
    color: var(--wr-text-muted);
    font-size: 0.96rem;
    line-height: 1.5;
}

.wr-login-input-wrap {
    position: relative;
}

.wr-login-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 1rem;
    z-index: 2;
    color: #7c8b83;
    font-size: 1rem;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color var(--wr-transition);
}

.wr-login-input-wrap .wr-form-control {
    min-height: 54px;
    padding-left: 2.85rem;
    border-radius: 12px;
    background: #ffffff;
    border-color: #d7e0db;
    box-shadow: none;
    transition: border-color var(--wr-transition), box-shadow var(--wr-transition), background var(--wr-transition);
}

.wr-login-input-wrap .wr-form-control:focus {
    background: #fff;
    border-color: rgba(34, 197, 94, 0.65);
    box-shadow: 0 0 0 0.22rem rgba(34, 197, 94, 0.13);
}

.wr-login-input-wrap:focus-within > i {
    color: var(--wr-emerald);
}

.wr-login-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    z-index: 3;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 10px;
    color: #7c8b83;
    background: transparent;
    transform: translateY(-50%);
    transition: color var(--wr-transition), background var(--wr-transition);
}

.wr-login-password-toggle:hover,
.wr-login-password-toggle:focus {
    color: var(--wr-forest);
    background: var(--wr-emerald-soft);
}

.wr-login-input-wrap--password .wr-form-control {
    padding-right: 3.1rem;
}

.wr-login-remember {
    color: var(--wr-text-muted);
    font-size: 0.88rem;
}

.wr-login-remember .form-check-input {
    width: 1rem;
    height: 1rem;
    border-color: #b9c8be;
}

.wr-login-remember .form-check-input:checked {
    background-color: var(--wr-emerald);
    border-color: var(--wr-emerald);
}

.wr-login-submit {
    min-height: 50px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, #16a34a 0%, var(--wr-forest) 100%);
    box-shadow: 0 16px 34px rgba(21, 128, 61, 0.28);
    transition: transform var(--wr-transition), background var(--wr-transition), box-shadow var(--wr-transition), opacity var(--wr-transition);
}

.wr-login-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    box-shadow: 0 20px 42px rgba(21, 128, 61, 0.36);
    color: #fff;
}

.wr-login-submit:disabled {
    opacity: 0.88;
    cursor: wait;
    box-shadow: none;
}

.wr-login-submit-spinner {
    margin-right: 0.25rem;
}

.wr-login-card-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 1.65rem;
}

.wr-login-card-footer-domain {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: var(--wr-forest);
    font-size: 0.82rem;
    font-weight: 700;
}

.wr-login-card-footer-credit {
    margin-top: 5px;
    color: #6B7280;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.3;
}

.wr-login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.wr-login-footer p {
    margin: 0.18rem 0;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--wr-text-muted);
    line-height: 1.4;
}

@media (max-width: 991.98px) {
    .wr-login-split {
        grid-template-columns: 1fr;
    }

    .wr-login-hero,
    .wr-login-panel {
        min-height: auto;
    }

    .wr-login-hero {
        padding: 2rem 1.25rem;
    }

    .wr-login-hero-content {
        max-width: none;
    }

    .wr-login-hero-logo {
        width: 245px;
        min-height: auto;
        margin-left: 0;
        margin-bottom: 0.75rem;
    }

    .wr-login-hero-logo img {
        width: 245px;
    }

    .wr-login-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 1.25rem;
    }

    .wr-login-panel {
        padding: 2rem 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .wr-login-hero {
        padding: 1.5rem 1rem;
    }

    .wr-login-eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

    .wr-login-tagline {
        font-size: 0.9rem;
    }

    .wr-login-features {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .wr-login-feature {
        min-height: 56px;
    }

    .wr-login-panel {
        padding: 1.5rem 1rem 2rem;
    }

    .wr-login-card {
        border-radius: 22px;
    }

    .wr-login-card-header {
        flex-direction: column;
        gap: 0.85rem;
    }

    .wr-login-submit {
        min-height: 50px;
        height: 50px;
    }

    .wr-login-footer {
        margin-top: 1rem;
    }
}

/* ============================================================
   SPRINT 1A — MOBILE UX QUICK WINS
   Semua rule di bawah hanya berlaku pada ≤767.98px.
   Desktop, tablet, dan business logic tidak terpengaruh.
   ============================================================ */

@media (max-width: 767.98px) {

    /* ── QW-1: iOS Safari zoom prevention ───────────────────────
       Safari otomatis zoom ketika font-size input < 16px.
       Rule ini mencegah zoom pada semua interactive form control
       termasuk TomSelect (.ts-control) dan Flatpickr. ────────── */
    input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]),
    select,
    textarea,
    .form-control,
    .form-select,
    .ts-control,
    .ts-control input,
    .flatpickr-input {
        font-size: 16px !important;
    }

    /* ── QW-2: Touch targets di dalam tabel ──────────────────────
       WCAG 2.5.5 & Apple HIG minimum touch target: 44×44px.
       Scope .wr-table agar tombol di luar tabel tidak terpengaruh. */
    .wr-table .btn,
    .wr-table .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    /* ── QW-3: Table header legibility ──────────────────────────
       0.72rem (~11.5px) di bawah ambang keterbacaan mobile.
       0.80rem (~12.8px) tetap kompak tanpa overflow. ─────────── */
    .wr-table thead th {
        font-size: 0.80rem;
    }

    /* ── QW-4: Settings — theme mode grid 1 kolom ────────────────
       3 kolom di layar ≤767px: setiap option hanya ~100px lebar.
       1 kolom memberi ruang cukup untuk label dan touch target. ── */
    .wr-theme-mode-grid {
        grid-template-columns: 1fr;
    }

    /* ── Mobile compact table: keep table layout, show priority columns only ── */
    .wr-table--mobile-compact {
        min-width: 0 !important;
        width: 100%;
        table-layout: auto;
    }

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

    .wr-table--mobile-compact thead th,
    .wr-table--mobile-compact tbody td {
        padding: 0.55rem 0.45rem;
        font-size: 0.82rem;
        vertical-align: middle;
    }

    .wr-table--mobile-compact .wr-mobile-primary {
        font-weight: 700;
        white-space: nowrap;
    }

    .wr-table--mobile-compact .wr-mobile-scope {
        color: var(--wr-muted);
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .wr-table--mobile-compact .wr-perf-badge,
    .wr-table--mobile-compact .wr-harvest-badge {
        font-size: 0.68rem;
        padding: 0.28rem 0.5rem;
    }

    .wr-block-perf-table.wr-table--mobile-compact tbody tr {
        cursor: pointer;
    }

    /* ── Analytics Top 10 mobile: grid rows (stabil di mobile browser) ── */
    .wr-top10-mobile {
        width: 100%;
    }

    .wr-top10-mobile-head,
    .wr-top10-mobile-row {
        align-items: center;
        column-gap: 0.35rem;
        display: grid;
        grid-template-columns: 2.85rem 3.1rem minmax(0, 1fr) 4.35rem;
        padding: 0.5rem 0.55rem;
    }

    .wr-top10-mobile-head {
        background: #f1f5f9;
        border-bottom: 1px solid var(--wr-border);
        color: var(--wr-text-muted);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        line-height: 1.15;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    html[data-bs-theme="dark"] .wr-top10-mobile-head {
        background: #0F3D2E;
        border-bottom-color: rgba(226, 232, 240, 0.12);
        color: #e2e8f0;
    }

    .wr-top10-mobile-row {
        border-bottom: 1px solid var(--wr-border);
        font-size: 0.82rem;
    }

    .wr-top10-mobile-row:last-child {
        border-bottom: 0;
    }

    .wr-top10-mobile-row:nth-child(even) {
        background: rgb(248, 250, 252);
    }

    html[data-bs-theme="dark"] .wr-top10-mobile-row:nth-child(even) {
        background: rgba(15, 61, 46, 0.35);
    }

    .wr-top10-mobile-cell--rank {
        justify-self: center;
        text-align: center;
    }

    .wr-top10-mobile-cell--blok {
        white-space: nowrap;
    }

    .wr-top10-mobile-cell--scope {
        min-width: 0;
    }

    .wr-top10-mobile-cell--metric {
        white-space: nowrap;
    }

    .wr-top10-mobile-scope {
        color: var(--wr-muted);
        display: block;
        font-size: 0.74rem;
        line-height: 1.2;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .wr-top10-mobile .badge {
        align-items: center;
        display: inline-flex;
        font-size: 0.72rem;
        justify-content: center;
        min-height: 0;
        min-width: 1.65rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ── Block Health Map (Operation Center) ─────────────────────── */
.wr-bhm-section {
    min-width: 0;
}

.wr-bhm-meta {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
}

.wr-bhm-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-bottom: 0.85rem;
}

.wr-bhm-legend-item {
    align-items: center;
    display: inline-flex;
    font-size: 0.82rem;
    gap: 0.4rem;
}

.wr-bhm-legend-swatch {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    display: inline-block;
    height: 12px;
    width: 12px;
}

.wr-bhm-legend-count {
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.wr-bhm-active-criteria {
    color: #475569;
    font-size: 0.78rem;
    margin: -0.35rem 0 0.75rem;
}

.wr-bhm-active-criteria strong {
    color: #0f3d2e;
    font-weight: 800;
}

.wr-bhm-threshold-details {
    border: 1px solid rgba(15, 61, 46, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.wr-bhm-threshold-summary {
    align-items: center;
    background: rgba(15, 61, 46, 0.04);
    color: #0f3d2e;
    cursor: pointer;
    display: flex;
    font-size: 0.82rem;
    font-weight: 700;
    gap: 0.5rem;
    justify-content: space-between;
    list-style: none;
    padding: 0.65rem 0.85rem;
    user-select: none;
}

.wr-bhm-threshold-summary::-webkit-details-marker {
    display: none;
}

.wr-bhm-threshold-summary-icon {
    color: #64748b;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.wr-bhm-threshold-details[open] .wr-bhm-threshold-summary {
    border-bottom: 1px solid rgba(15, 61, 46, 0.1);
}

.wr-bhm-threshold-details[open] .wr-bhm-threshold-summary-icon {
    transform: rotate(180deg);
}

.wr-bhm-threshold-legend {
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.wr-bhm-threshold-head {
    align-items: center;
    background: rgba(15, 61, 46, 0.04);
    border-bottom: 1px solid rgba(15, 61, 46, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
}

.wr-bhm-threshold-title {
    color: #0f172a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.wr-bhm-threshold-active {
    color: #0f3d2e;
    font-size: 0.74rem;
    font-weight: 700;
}

.wr-bhm-threshold-scroll {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
}

.wr-bhm-threshold-table {
    border-collapse: collapse;
    font-size: 0.74rem;
    min-width: 640px;
    width: 100%;
}

.wr-bhm-threshold-table th,
.wr-bhm-threshold-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.42rem 0.55rem;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.wr-bhm-threshold-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
}

.wr-bhm-threshold-table tbody th[scope="row"] {
    background: #fff;
    color: #0f172a;
    font-weight: 700;
    text-align: left;
}

.wr-bhm-threshold-table tbody tr.is-active th,
.wr-bhm-threshold-table tbody tr.is-active td {
    background: rgba(22, 163, 74, 0.08);
}

.wr-bhm-threshold-table tbody tr.is-active th[scope="row"] {
    box-shadow: inset 3px 0 0 #16a34a;
}

.wr-bhm-threshold-col {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: center;
}

.wr-bhm-scroll {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    overflow-y: hidden;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
}

.wr-bhm-canvas {
    display: grid;
    gap: 1rem;
    min-width: min-content;
}

.wr-bhm-estate-label {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.wr-bhm-divisi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
}

.wr-bhm-divisi-group {
    min-width: 0;
}

.wr-bhm-divisi-label {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.wr-bhm-svg {
    display: block;
    height: auto;
    max-width: 100%;
}

.wr-bhm-hex-link {
    cursor: pointer;
    outline: none;
    text-decoration: none;
}

.wr-bhm-hex-group {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 180ms ease;
}

.wr-bhm-hex-link:hover .wr-bhm-hex-group,
.wr-bhm-hex-link:focus-visible .wr-bhm-hex-group {
    transform: scale(1.05);
}

.wr-bhm-hex {
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 1;
    transition: filter 180ms ease, opacity 180ms ease;
}

.wr-bhm-hex-label {
    font-size: 7px;
    font-weight: 800;
    pointer-events: none;
    user-select: none;
}

.wr-bhm-hex--pulse {
    animation: wr-bhm-pulse 900ms ease-out 1;
}

@keyframes wr-bhm-pulse {
    0% {
        filter: brightness(1);
        opacity: 0.55;
        transform: scale(0.92);
    }

    45% {
        filter: brightness(1.12);
        opacity: 1;
        transform: scale(1.04);
    }

    100% {
        filter: brightness(1);
        opacity: 1;
        transform: scale(1);
    }
}

.wr-bhm-tooltip {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.28);
    color: #f8fafc;
    max-width: min(280px, calc(100vw - 24px));
    padding: 0.7rem 0.8rem;
    pointer-events: none;
    position: fixed;
    z-index: 1095;
}

.wr-bhm-tooltip-title {
    font-size: 0.86rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.wr-bhm-tooltip-grid {
    display: grid;
    gap: 0.2rem 0.55rem;
    grid-template-columns: auto 1fr;
    margin: 0;
}

.wr-bhm-tooltip-grid dt {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    margin: 0;
}

.wr-bhm-tooltip-grid dd {
    font-size: 0.74rem;
    font-variant-numeric: tabular-nums;
    margin: 0;
    text-align: right;
}

[data-bs-theme="dark"] .wr-bhm-estate-label {
    color: #f8fafc;
}

[data-bs-theme="dark"] .wr-bhm-divisi-label,
[data-bs-theme="dark"] .wr-bhm-meta,
[data-bs-theme="dark"] .wr-bhm-legend-count {
    color: #94a3b8;
}

[data-bs-theme="dark"] .wr-bhm-active-criteria {
    color: #94a3b8;
}

[data-bs-theme="dark"] .wr-bhm-active-criteria strong {
    color: #86efac;
}

[data-bs-theme="dark"] .wr-bhm-threshold-details {
    border-color: rgba(226, 232, 240, 0.12);
}

[data-bs-theme="dark"] .wr-bhm-threshold-summary {
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
}

[data-bs-theme="dark"] .wr-bhm-threshold-details[open] .wr-bhm-threshold-summary {
    border-bottom-color: rgba(226, 232, 240, 0.1);
}

[data-bs-theme="dark"] .wr-bhm-threshold-legend {
    border-color: rgba(226, 232, 240, 0.12);
}

[data-bs-theme="dark"] .wr-bhm-threshold-head {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(226, 232, 240, 0.1);
}

[data-bs-theme="dark"] .wr-bhm-threshold-title,
[data-bs-theme="dark"] .wr-bhm-threshold-table tbody th[scope="row"] {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .wr-bhm-threshold-active {
    color: #86efac;
}

[data-bs-theme="dark"] .wr-bhm-threshold-table thead th {
    background: #0f3d2e;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .wr-bhm-threshold-table tbody th[scope="row"],
[data-bs-theme="dark"] .wr-bhm-threshold-table tbody td {
    background: #132a23;
    border-bottom-color: rgba(226, 232, 240, 0.08);
}

[data-bs-theme="dark"] .wr-bhm-threshold-table tbody tr.is-active th,
[data-bs-theme="dark"] .wr-bhm-threshold-table tbody tr.is-active td {
    background: rgba(34, 197, 94, 0.14);
}

@media (max-width: 767.98px) {
    .wr-bhm-hex-label {
        font-size: 6px;
    }
}

.wr-report-loading-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    inset: 0;
    justify-content: center;
    position: fixed;
    z-index: 2000;
}

.wr-report-loading-overlay[hidden] {
    display: none !important;
}

.wr-report-loading-panel {
    background: var(--wr-surface, #fff);
    border-radius: 16px;
    box-shadow: var(--wr-shadow-lg, 0 20px 45px rgba(15, 23, 42, 0.18));
    max-width: 320px;
    padding: 1.5rem 1.75rem;
    text-align: center;
    width: calc(100% - 2rem);
}

[data-bs-theme="dark"] .wr-report-loading-panel {
    background: #132a23;
}
