/* Fonts loaded via preconnect <link> in HTML head for optimum load performance */
:root {
    --bg: #fdfaf3;
    --surface: #ffffff;
    --surface-soft: #fefce8;
    --surface-tint: #fffbeb;
    --ink: #1c1917;
    --muted: #78716c;
    --line: #ede5d0;
    --nav: #9a3412;
    --nav-soft: #d78216;
    --blue: #d78216;
    --teal: #b45309;
    --green: #059669;
    --amber: #d78216;
    --red: #dc2626;
    --gold: #fde68a;
    --shadow: 0 12px 32px -4px rgba(215, 130, 22, 0.08), 0 4px 12px -2px rgba(215, 130, 22, 0.03);
    --shadow-soft: 0 6px 18px -2px rgba(215, 130, 22, 0.06), 0 2px 6px -1px rgba(215, 130, 22, 0.02);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 10%, rgba(215, 130, 22, 0.06), transparent 35%),
        radial-gradient(circle at 90% 85%, rgba(245, 158, 11, 0.04), transparent 40%),
        linear-gradient(135deg, #fefce8 0%, #fbf8f0 50%, #f8f5eb 100%);
    color: var(--ink);
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.2px;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.app-shell.login-only {
    display: block;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 22px 16px;
    background:
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 50%),
        linear-gradient(180deg, #431407 0%, #6c2307 20%, #832d0c 55%, #642006 85%, #431407 100%);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.35);
    border-right: 1px solid rgba(254, 243, 199, 0.15);
    color: #fff;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(254, 243, 199, 0.28) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(254, 243, 199, 0.28);
    border-radius: 99px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(254, 243, 199, 0.5);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(254, 243, 199, 0.15);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f4df96, var(--gold));
    color: #102033;
    font-weight: 800;
}

.brand-logo-badge {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28), 0 1px 3px rgba(0, 0, 0, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
    box-sizing: border-box;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.brand-logo-badge:hover {
    transform: scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.brand-logo-badge .brand-mark-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 6px;
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
}

.brand-mark-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    display: block;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.6px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.brand small {
    margin-top: 3px;
    color: #fde68a;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-group-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #fde68a;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    margin-top: 6px;
    margin-bottom: 6px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 12px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.91rem;
    font-weight: 650;
    letter-spacing: 0.15px;
    line-height: 1.35;
    position: relative;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    border: 1px solid transparent;
}

.nav-menu a .nav-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(0, 0, 0, 0.18) 100%);
    color: #ffffff;
    flex: 0 0 32px;
    transition: all 0.22s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(4px);
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateX(4px);
    border-color: rgba(254, 243, 199, 0.28);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.nav-menu a:hover .nav-icon {
    border-color: rgba(254, 243, 199, 0.6);
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.nav-menu a.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.12) 100%);
    color: #ffffff;
    font-weight: 800;
    border: 1px solid rgba(254, 243, 199, 0.55);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
}

.nav-menu a.active::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 15%;
    height: 70%;
    width: 5px;
    background: #fbbf24;
    border-radius: 99px;
    box-shadow: 0 0 14px #fbbf24, 0 0 6px #f59e0b;
}

.nav-menu a.active .nav-icon {
    background: #ffffff;
    border-color: #ffffff;
    color: #b45309;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3), 0 0 8px rgba(255, 255, 255, 0.6);
    transform: scale(1.04);
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 14px 14px;
    border: 1px solid rgba(254, 243, 199, 0.25);
    border-radius: 14px;
    background: rgba(20, 8, 2, 0.65);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-footer span,
.sidebar-footer strong {
    display: block;
}

.db-status {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.2px;
}

.db-status i {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex: 0 0 12px;
    transition: all 0.3s ease;
}

.db-status.is-active i {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 12px #22c55e, 0 0 20px #22c55e;
}

.db-status.is-inactive i {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95), 0 0 12px #ef4444, 0 0 20px #ef4444;
}

.logout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: rgba(239, 68, 68, 0.85);
    border-color: rgba(239, 68, 68, 1);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.main-content {
    min-width: 0;
    padding: 24px;
}

.login-only .main-content {
    min-height: 100vh;
    padding: 0;
}

.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(245, 158, 11, 0.14) 0%, transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(215, 130, 22, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(254, 243, 199, 0.45) 0%, transparent 70%),
        linear-gradient(135deg, #fdfaf3 0%, #f7f0df 50%, #faf5ea 100%);
    box-sizing: border-box;
    padding: 24px;
}

.login-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 660px;
    width: 100%;
    max-width: 1080px;
    border: 1px solid rgba(215, 130, 22, 0.22);
    border-radius: 20px;
    box-shadow:
        0 24px 64px -12px rgba(67, 20, 7, 0.12),
        0 8px 24px -4px rgba(215, 130, 22, 0.08),
        0 0 0 1px rgba(254, 240, 138, 0.45);
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

/* Background Decorative Shapes - Harmonious Amber, Gold & Velvet Cognac Palette */
.decor-shape {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.shape-top-left {
    top: 0;
    left: 0;
    width: clamp(130px, 14vw, 200px);
    height: auto;
    color: #fde68a;
    opacity: 0.95;
}

.shape-top-right {
    top: 0;
    right: 0;
    width: clamp(150px, 16vw, 230px);
    height: auto;
    color: #f59e0b;
    opacity: 0.88;
}

.shape-bottom-left {
    bottom: 44px;
    left: 0;
    width: clamp(140px, 16vw, 190px);
    height: auto;
    max-height: 75px;
    color: #431407;
    opacity: 0.95;
}

.shape-bottom-right {
    bottom: 44px;
    right: 0;
    width: clamp(160px, 18vw, 280px);
    height: auto;
    color: #d78216;
    opacity: 0.88;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px 6px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.login-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-header-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header-logo:hover {
    transform: rotate(8deg) scale(1.08);
}

.login-header-title {
    font-size: 0.95rem;
    font-weight: 750;
    color: #1c1917;
    line-height: 1.35;
}

.login-header-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 850;
    color: #9a3412;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid rgba(245, 158, 11, 0.45);
    padding: 5px 14px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(215, 130, 22, 0.12);
}

.login-top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 32px 10px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.login-app-badge {
    display: none;
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin: 0 auto 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08));
}

.login-welcome-section h1 {
    font-size: 1.85rem;
    font-weight: 900;
    color: #1c1917;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}

.login-welcome-section h1 span {
    display: inline-block;
    background: linear-gradient(135deg, #b45309 0%, #d78216 45%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 6px rgba(215, 130, 22, 0.22));
}

.login-sub-dept {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1c1917;
    margin: 0 0 2px;
}

.login-app-desc {
    font-size: 0.88rem;
    font-weight: 800;
    color: #78350f;
    margin: 4px 0 0;
    letter-spacing: 0.6px;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.process-flow .flow-step {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1.5px solid rgba(215, 130, 22, 0.22);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(215, 130, 22, 0.06);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.process-flow .flow-step:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 24px rgba(215, 130, 22, 0.18);
    border-color: #d78216;
}

.process-flow .flow-step svg {
    width: 38px !important;
    height: 38px !important;
}

.process-flow svg.flow-arrow {
    width: 20px;
    height: 20px;
    stroke: #b45309;
}

.login-bottom-split {
    display: flex;
    flex: 1;
    padding: 0 32px 20px;
    box-sizing: border-box;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.login-panel {
    flex: 0.75;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-right: 24px;
    box-sizing: border-box;
}

.brand-logo-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    cursor: default;
}

.brand-logo-lockup svg.g-logo-svg,
.brand-logo-lockup img.g-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brand-logo-lockup:hover svg.g-logo-svg,
.brand-logo-lockup:hover img.g-logo-img {
    transform: rotate(6deg) scale(1.06);
}

.brand-logo-text {
    font-size: 1.15rem;
    font-weight: 900;
    color: #1c1917;
    line-height: 1.15;
    text-transform: uppercase;
    margin: 0;
    text-align: left;
}

.brand-logo-text span {
    display: block;
    color: #d78216;
}

.login-visual {
    flex: 1.25;
    position: relative;
    display: flex;
    background: #ffffff;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 12px;
}

.visual-illustration {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    filter: drop-shadow(-8px -8px 24px rgba(215, 130, 22, 0.05));
}

.login-form {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 380px;
}

.login-form label {
    display: grid;
    gap: 3px;
    width: 100%;
}

.login-form span {
    color: #1c1917;
    font-size: 0.82rem;
    font-weight: 700;
}

.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover, 
.login-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
    transition: background-color 5000s ease-in-out 0s;
}

.login-input-wrap {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-input-wrap:focus-within {
    border-color: #d78216;
    box-shadow: 0 0 0 3.5px rgba(215, 130, 22, 0.16);
    transform: translateY(-1px);
}

.login-input-wrap i {
    display: grid;
    place-items: center;
    width: 44px;
    color: #94a3b8;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
    transition: color 0.2s ease;
}

.login-input-wrap i svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.login-input-wrap:focus-within i {
    color: #d78216;
}

.login-form input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.login-form input::placeholder {
    color: #94a3b8;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 1px 0 10px;
}

.remember-check {
    display: flex !important;
    grid-template-columns: none;
    align-items: center;
    gap: 8px !important;
    min-width: 0;
}

.remember-check input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--blue);
}

.remember-check span,
.forgot-link {
    color: #111827;
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.forgot-link {
    color: var(--blue);
    text-decoration: none;
}

.forgot-link:hover,
.login-back-link:hover {
    text-decoration: underline;
}

.login-panel .login-submit {
    min-height: 48px;
    height: auto;
    padding: 8px 18px;
    border: 1px solid #b45309;
    border-radius: 24px;
    background: linear-gradient(135deg, #d78216 0%, #b45309 100%) !important;
    box-shadow: 0 6px 18px rgba(215, 130, 22, 0.32);
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.login-panel .login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(215, 130, 22, 0.42);
    background: linear-gradient(135deg, #f59e0b 0%, #d78216 100%) !important;
}

.login-panel .login-submit span {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: none;
    opacity: 0.95;
    margin-top: 1px;
    color: #fef08a !important;
}

.login-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 380px;
    margin-top: 22px;
    padding-bottom: 2px;
    gap: 12px;
}

.login-links a {
    font-size: 0.76rem;
    font-weight: 850;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-links a.register-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, #431407 0%, #6c2307 100%);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(67, 20, 7, 0.22);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
}

.login-links a.register-link:hover {
    transform: translateY(-1.5px);
    background: linear-gradient(135deg, #5d1c06 0%, #832d0c 100%);
    border-color: #f59e0b;
    box-shadow: 0 6px 14px rgba(67, 20, 7, 0.32);
    color: #fef08a !important;
    text-decoration: none;
}

.login-links a.forgot-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: #9a3412;
    font-weight: 850;
    white-space: nowrap;
    text-shadow: none;
    letter-spacing: 0.4px;
    border-radius: 6px;
}

.login-links a.forgot-link-btn:hover {
    color: #d78216;
    background: rgba(215, 130, 22, 0.08);
    text-decoration: none;
}

.login-security-note {
    margin: 20px 0 0;
    color: #111827;
    font-size: 0.78rem;
    line-height: 1.45;
    text-align: center;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid rgba(199, 168, 90, 0.34);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 248, 220, 0.98), rgba(255, 242, 194, 0.9)),
        #fff8df;
    box-shadow: var(--shadow-soft);
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--teal);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    color: var(--ink);
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    line-height: 1.15;
}

.dashboard-heading {
    display: grid;
    gap: 0;
    color: var(--ink);
    line-height: 1;
}

.dashboard-heading-main,
.dashboard-heading-brand {
    display: block;
    letter-spacing: 0;
}

.dashboard-heading-main {
    color: #071a33;
    font-size: clamp(1.95rem, 3.7vw, 2.9rem);
    font-weight: 950;
}

.dashboard-heading-brand {
    color: var(--nav);
    font-size: clamp(1.35rem, 2.35vw, 1.95rem);
    font-weight: 850;
}

h2 {
    margin-bottom: 0;
    font-size: 1.03rem;
    line-height: 1.25;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.welcome-ticker {
    display: flex;
    align-items: center;
    width: min(320px, 24vw);
    min-height: 42px;
    overflow: hidden;
    border: 1px solid rgba(215, 130, 22, 0.25);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(215, 130, 22, 0.1), rgba(245, 158, 11, 0.06)),
        var(--surface-tint);
    color: #b45309;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.welcome-ticker span {
    display: inline-block;
    min-width: max-content;
    padding-left: 100%;
    animation: sibaper-welcome-ticker 14s linear infinite;
}

@keyframes sibaper-welcome-ticker {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(360px, 34vw);
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
}

.search-box span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.search-box input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.icon-button,
.user-button,
.text-button,
.primary-button,
.primary-inline-button {
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(16, 40, 95, 0.04);
}

.icon-button {
    width: 42px;
    height: 42px;
}

.user-button {
    min-height: 42px;
    padding: 0 14px;
}

a.icon-button,
a.user-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.anti-corruption-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 128px;
    height: 54px;
    padding: 4px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 14px rgba(16, 40, 95, 0.04);
    overflow: hidden;
}

.anti-corruption-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.text-button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue);
    background: var(--surface-soft);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-button:hover {
    background: #ffffff;
    border-color: var(--blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(215, 130, 22, 0.12);
}

.text-button,
.primary-inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.primary-button {
    width: 100%;
    min-height: 42px;
    border-radius: 8px;
    border: 1px solid #c25e00;
    background: linear-gradient(135deg, #b45309 0%, #d78216 50%, #f59e0b 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(215, 130, 22, 0.28);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-inline-button {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid #c25e00;
    background: linear-gradient(135deg, #b45309 0%, #d78216 50%, #f59e0b 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(215, 130, 22, 0.28);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.primary-button:hover,
.primary-inline-button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(215, 130, 22, 0.38);
}

.danger-inline-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 6px;
    border: 1px solid #dc2626;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

.danger-inline-button:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3);
}

.danger-outline-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid #fca5a5;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}

.danger-outline-button:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.table-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.table-filter-pills {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    flex-wrap: wrap;
}

.table-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.18s ease;
}

.table-filter-pill:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.7);
}

.table-filter-pill.active {
    background: #ffffff;
    color: var(--blue);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.table-filter-pill .pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--line);
    color: var(--muted);
}

.table-filter-pill.active .pill-count {
    background: #fef3c7;
    color: var(--blue);
}

.table-filter-pill.pill-rejected.active .pill-count {
    background: #fee2e2;
    color: var(--red);
}

.table-status.safe {
    background: #dcfce7;
    color: #15803d;
}

.table-status.warning {
    background: #f8edcf;
    color: var(--amber);
}

.table-status.danger {
    background: #fee2e2;
    color: var(--red);
}

.summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.operation-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.leader-brief {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.leader-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stock-card,
.stock-card,
.panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 249, 0.95)),
        var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.stock-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px -4px rgba(20, 40, 25, 0.12), 0 6px 16px -2px rgba(20, 40, 25, 0.04);
}

.stock-card::before,
.panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--blue), var(--gold));
}

/* ==========================================================================
   VIBRANT KPI METRIC CARDS (Fresh Modern Gradient Palette)
   ========================================================================== */

.operation-card,
.leader-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    padding: 20px 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 156px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 2px 0 rgba(0, 0, 0, 0.15),
        0 12px 30px -4px rgba(0, 0, 0, 0.22);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.26s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
}

/* Ambient Radial Specular Glow in top right of card */
.operation-card::before,
.leader-card::before {
    content: '' !important;
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 42%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    border-top-left-radius: 17px;
    border-top-right-radius: 17px;
}

.operation-card::after,
.leader-card::after {
    content: '';
    position: absolute;
    top: -35px;
    right: -35px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.06) 50%, transparent 75%);
    pointer-events: none;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.operation-card:hover::after,
.leader-card:hover::after {
    transform: scale(1.3);
    opacity: 0.95;
}

/* Theme 1: Sapphire Royal Blue (Master Barang Aktif / Database) */
.card-theme-blue,
.operation-grid > article:nth-child(1),
.leader-brief > article:nth-child(1) {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 45%, #0f2b66 100%);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.6),
        0 14px 32px -4px rgba(29, 78, 216, 0.45), 
        0 4px 12px -2px rgba(29, 78, 216, 0.22);
}

/* Theme 2: Sunset Amber / Golden Marigold (Perlu Perhatian / Pantau / Pilar SI-BAPER) */
.card-theme-orange,
.card-theme-amber,
.operation-grid > article:nth-child(2),
.leader-brief > article:nth-child(2) {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 45%, #9a3412 100%);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.6),
        0 14px 32px -4px rgba(217, 119, 6, 0.48), 
        0 4px 12px -2px rgba(217, 119, 6, 0.22);
}

/* Theme 3: Emerald Jade / Fresh Mint (Publikasi Terakhir / Layanan Publik) */
.card-theme-green,
.operation-grid > article:nth-child(3),
.leader-brief > article:nth-child(3) {
    background: linear-gradient(135deg, #10b981 0%, #059669 45%, #064e3b 100%);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.6),
        0 14px 32px -4px rgba(16, 185, 129, 0.45), 
        0 4px 12px -2px rgba(16, 185, 129, 0.22);
}

/* Theme 4: Royal Amethyst / Velvet Violet (Opname Terakhir / Audit & Verifikasi) */
.card-theme-purple,
.card-theme-rose,
.operation-grid > article:nth-child(4),
.leader-brief > article:nth-child(4) {
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 45%, #4c1d95 100%);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.6),
        0 14px 32px -4px rgba(124, 58, 237, 0.45), 
        0 4px 12px -2px rgba(124, 58, 237, 0.22);
}

/* Hover effects with luminous glowing colored shadows */
.card-theme-blue:hover,
.operation-grid > article:nth-child(1):hover,
.leader-brief > article:nth-child(1):hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
        0 24px 44px -6px rgba(29, 78, 216, 0.62), 
        0 8px 18px -2px rgba(29, 78, 216, 0.32);
}

.card-theme-orange:hover,
.card-theme-amber:hover,
.operation-grid > article:nth-child(2):hover,
.leader-brief > article:nth-child(2):hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
        0 24px 44px -6px rgba(217, 119, 6, 0.62), 
        0 8px 18px -2px rgba(217, 119, 6, 0.32);
}

.card-theme-green:hover,
.operation-grid > article:nth-child(3):hover,
.leader-brief > article:nth-child(3):hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
        0 24px 44px -6px rgba(16, 185, 129, 0.62), 
        0 8px 18px -2px rgba(16, 185, 129, 0.32);
}

.card-theme-purple:hover,
.card-theme-rose:hover,
.operation-grid > article:nth-child(4):hover,
.leader-brief > article:nth-child(4):hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.8),
        0 24px 44px -6px rgba(124, 58, 237, 0.62), 
        0 8px 18px -2px rgba(124, 58, 237, 0.32);
}

/* Card Elements Typography & Layout */
.operation-card .card-head,
.leader-card .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.operation-card .stock-method,
.leader-card .stock-method {
    color: rgba(255, 255, 255, 0.96);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.operation-card .status-pill,
.leader-card .status-pill {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #ffffff !important;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    padding: 3px 11px;
    border-radius: 999px;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.45) !important;
}

.kpi-main-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0;
    position: relative;
    z-index: 1;
}

.kpi-count,
.operation-card strong,
.leader-card strong {
    color: #ffffff !important;
    font-size: clamp(1.45rem, 2.8vw, 2.35rem);
    font-weight: 950;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    overflow-wrap: anywhere;
}

.kpi-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.12) 100%);
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}

.operation-card:hover .kpi-icon-badge,
.leader-card:hover .kpi-icon-badge {
    transform: scale(1.12) rotate(6deg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0.18) 100%);
}

.kpi-icon-badge svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.kpi-track-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.22);
    border-radius: 99px;
    overflow: hidden;
    margin: 8px 0 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
    position: relative;
    z-index: 1;
}

.kpi-track-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), #ffffff);
    border-radius: 99px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.kpi-desc,
.operation-card p,
.leader-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.83rem;
    font-weight: 500;
    line-height: 1.45;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.dashboard-greeting-user {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
}

.wave-hand-anim {
    display: inline-block;
    animation: waveHand 2.2s infinite ease-in-out;
    transform-origin: 70% 70%;
    margin-left: 4px;
}

@keyframes waveHand {
    0%, 100% { transform: rotate(0deg); }
    20%, 60% { transform: rotate(14deg); }
    40%, 80% { transform: rotate(-10deg); }
}

.leader-stock-list,
.leader-verification-list,
.leader-note-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.leader-stock-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.leader-stock-row:last-child {
    border-bottom: 0;
}

.leader-stock-row strong,
.leader-stock-row span {
    display: block;
}

.leader-stock-row strong {
    color: var(--ink);
    font-size: 0.95rem;
}

.leader-stock-row div > span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.leader-stock-row p {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}

.leader-verification-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
    color: var(--ink);
    text-decoration: none;
}

.leader-verification-list a:hover {
    border-color: var(--teal);
}

.leader-verification-list span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.leader-verification-list strong {
    font-size: 1.2rem;
}

.leader-note-list p {
    margin: 0;
    padding: 10px 12px;
    border-left: 3px solid var(--teal);
    border-radius: 8px;
    background: var(--surface-tint);
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.leader-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.stock-card {
    display: flex;
    flex-direction: column;
    min-height: 172px;
    padding: 18px 16px 16px;
}

.card-head,
.card-foot,
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.stock-method {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-pill.safe {
    background: #dcfce7;
    color: #15803d;
}

.status-pill.warning {
    background: #f8edcf;
    color: var(--amber);
}

.status-pill.danger {
    background: #fee2e2;
    color: var(--red);
}

.stock-card h2 {
    margin-top: 18px;
}

.stock-number {
    margin: 12px 0 18px;
    color: var(--blue);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.stock-number span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.card-foot {
    margin-top: auto;
    align-items: flex-end;
    color: var(--muted);
    font-size: 0.78rem;
}

.card-foot strong {
    color: var(--ink);
    text-align: right;
}

.work-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
    gap: 16px;
    margin-bottom: 16px;
}

.method-panel {
    margin-bottom: 16px;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.method-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 12px 14px;
    min-height: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.method-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.method-card > div,
.method-card > p {
    grid-column: 1 / -1;
}

.method-card strong,
.method-card span {
    display: block;
}

.method-card strong {
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.method-card span {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.method-card label,
.method-readout {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.method-card select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}

.method-readout strong {
    display: inline-flex;
    align-items: center;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d4ddd3;
    border-radius: 8px;
    background: #f4f7f4;
    color: var(--blue);
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.method-card p {
    margin: 0;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: normal;
}

.method-card p a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--blue);
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
}

.method-card p a:hover {
    color: var(--teal);
    text-decoration: underline;
    transform: translateX(2px);
}

.panel {
    padding: 16px;
}

.usage-panel {
    min-height: 280px;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(36px, 1fr));
    gap: 14px;
    height: 190px;
    margin-top: 24px;
    padding-top: 6px;
}

.bar-item {
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 10px;
    justify-items: center;
    color: var(--muted);
    font-size: 0.8rem;
}

.bar-track {
    position: relative;
    width: 100%;
    max-width: 46px;
    border-radius: 8px;
    background: #e8f1f4;
    overflow: hidden;
}

.bar-track span {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--blue), var(--teal));
}

.publish-number {
    margin: 28px 0 8px;
    color: var(--blue);
    font-size: 2.4rem;
    font-weight: 800;
}

.muted {
    color: var(--muted);
    line-height: 1.55;
}

.table-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 16px;
}

.table-wrap {
    width: 100%;
    margin-top: 16px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.86rem;
    white-space: nowrap;
}

th {
    color: var(--blue);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.table-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--ink);
    font-size: 0.73rem;
    font-weight: 800;
}

.table-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 170px;
}

.table-input-label span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.table-input {
    width: 120px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
    color: var(--ink);
}

.table-input-wide {
    width: min(360px, 42vw);
}

.attention-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.attention-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
}

.attention-row strong,
.attention-row span,
.attention-row small {
    display: block;
}

.attention-row span,
.attention-row small {
    color: var(--muted);
    font-size: 0.78rem;
}

.attention-row p {
    margin: 0;
    min-width: 110px;
    text-align: right;
    font-weight: 800;
}

.flash-message {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 700;
}

.flash-message.success {
    border-color: #bcebd0;
    background: #f0fbf5;
    color: var(--green);
}

.flash-message.error {
    border-color: #fecaca;
    background: #fef2f2;
    color: var(--red);
}

.table-link {
    color: var(--blue);
    font-weight: 800;
    text-decoration: none;
}

.table-link:hover {
    text-decoration: underline;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 16px;
    margin-bottom: 16px;
}

.item-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.item-form label {
    display: grid;
    gap: 6px;
}

.item-form label span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.item-form input,
.item-form select,
.item-form textarea {
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
    color: var(--ink);
}

.item-form textarea {
    min-height: 82px;
    padding-top: 10px;
    resize: vertical;
}

.full-field,
.form-actions {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.inline-verify-form {
    display: grid;
    grid-template-columns: minmax(170px, 0.8fr) minmax(150px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    min-width: 540px;
}

.inline-verify-form input {
    min-height: 36px;
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--surface-tint);
    color: var(--ink);
}

.opname-form .table-wrap {
    margin-top: 14px;
}

.opname-actions {
    margin-top: 14px;
}

.policy-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.policy-list p {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
}

.policy-list strong,
.policy-list span {
    display: block;
}

.policy-list span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.backup-last-box {
    display: grid;
    gap: 6px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(18, 146, 127, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(18, 146, 127, 0.1), rgba(23, 60, 136, 0.06)),
        var(--surface-tint);
}

.backup-last-box span,
.backup-last-box small {
    color: var(--muted);
    font-size: 0.78rem;
}

.backup-last-box strong {
    color: var(--blue);
    font-size: 1rem;
    line-height: 1.25;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.form-divider {
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(18, 146, 127, 0.18);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(18, 146, 127, 0.09), rgba(199, 168, 90, 0.08)),
        var(--surface-tint);
    color: var(--blue);
}

.report-preview-panel {
    position: sticky;
    top: 18px;
}

.official-letter-preview {
    display: grid;
    gap: 14px;
    margin-top: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.letterhead-lines {
    display: grid;
    gap: 3px;
    text-align: center;
}

.letterhead-lines strong {
    font-size: 0.95rem;
    line-height: 1.2;
}

.letterhead-lines span {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.letterhead-rule {
    height: 4px;
    border-top: 2px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.preview-report-title {
    display: grid;
    gap: 4px;
    text-align: center;
}

.preview-report-title span,
.preview-report-title small {
    color: var(--muted);
    font-size: 0.78rem;
}

.preview-report-title strong {
    font-size: 1rem;
}

.preview-table {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.7fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.76rem;
}

.preview-table span,
.preview-table strong {
    padding: 8px;
    border-right: 1px solid var(--line);
}

.preview-table span:nth-child(3),
.preview-table strong:nth-child(6) {
    border-right: 0;
}

.preview-table span {
    background: #eef3f8;
    color: var(--muted);
    font-weight: 800;
}

.signature-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 8px;
}

.signature-preview div {
    display: grid;
    gap: 4px;
    min-height: 128px;
    align-content: start;
    color: var(--muted);
    font-size: 0.76rem;
}

.signature-preview strong {
    color: var(--ink);
}

.signature-preview em {
    margin-top: 42px;
    color: var(--ink);
    font-style: normal;
    font-weight: 800;
    text-decoration: underline;
}

.signature-preview small,
.preview-footer-note {
    color: var(--muted);
    font-size: 0.74rem;
}

.allocation-list {
    display: grid;
    gap: 12px;
    margin: 16px 0;
}

.allocation-list div {
    display: grid;
    gap: 7px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-tint);
}

.allocation-list strong,
.allocation-list span {
    display: block;
}

.allocation-list span {
    color: var(--muted);
    font-size: 0.82rem;
}

.allocation-list i {
    display: block;
    height: 8px;
    max-width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
}

.metric-grid,
.report-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.main-content > .panel + .panel {
    margin-top: 16px;
}

.metric-card,
.report-card {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 150px;
}

.metric-card h2 {
    font-size: 1.65rem;
}

.metric-card span,
.report-card span {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.report-card .text-button {
    width: max-content;
    margin-top: auto;
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    .summary-strip,
    .leader-brief {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .operation-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .work-grid,
    .leader-grid,
    .table-grid,
    .method-grid,
    .editor-grid,
    .settings-layout,
    .metric-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .report-preview-panel {
        position: static;
    }

    .method-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .login-shell {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        padding: 12px 10px;
        background: #dbdad0;
    }

    .login-card {
        display: flex;
        flex-direction: column;
        height: auto;
        width: 100%;
        max-height: none;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(28, 40, 30, 0.1);
    }

    /* Soften background decorative shapes on mobile to avoid clashing with text */
    .decor-shape {
        opacity: 0.18;
    }

    .shape-top-right {
        width: 100px;
        opacity: 0.15;
    }

    .shape-top-left {
        width: 80px;
        opacity: 0.15;
    }

    .shape-bottom-left {
        width: 140px;
        opacity: 0.18;
    }

    .shape-bottom-right {
        width: 120px;
        opacity: 0.18;
    }

    /* Header centered and well-spaced */
    .login-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        max-width: 100%;
        margin-bottom: 6px;
        padding: 16px 16px 0;
    }

    .login-header-left {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .login-header-logo {
        width: 44px;
        height: 44px;
    }

    .login-header-title {
        font-size: 0.82rem;
        line-height: 1.35;
        text-align: center;
        font-weight: 700;
    }

    .login-header-date {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.6px;
        color: #83271c;
        background: rgba(150, 40, 27, 0.08);
        border: 1px solid rgba(150, 40, 27, 0.2);
        padding: 3px 14px;
        border-radius: 999px;
        text-shadow: none;
        margin-top: 2px;
    }

    .login-top-section {
        padding: 8px 16px 6px;
    }

    .login-app-badge {
        display: block;
        width: 46px;
        height: 46px;
        margin-bottom: 6px;
    }

    .login-welcome-section h1 {
        font-size: 1.35rem;
        line-height: 1.25;
        margin: 0 0 2px;
    }

    .login-app-desc {
        font-size: 0.78rem;
        letter-spacing: 0.25px;
        margin: 2px 0 0;
    }

    /* Compact flow icons */
    .process-flow {
        gap: 8px;
        margin-top: 8px;
    }

    .process-flow .flow-step {
        padding: 5px;
        border-radius: 8px;
    }

    .process-flow .flow-step svg {
        width: 26px !important;
        height: 26px !important;
    }

    .process-flow svg.flow-arrow {
        width: 14px;
        height: 14px;
    }

    .login-bottom-split {
        display: flex;
        flex-direction: column;
        padding: 0 16px 16px;
    }

    .login-panel {
        order: 1;
        width: 100%;
        padding: 8px 0 12px;
        overflow-y: visible;
        align-items: center;
    }

    /* Hide redundant duplicate logo/title inside form panel on mobile */
    .brand-logo-lockup {
        display: none;
    }

    .login-form {
        max-width: 100%;
        width: 100%;
        gap: 10px;
    }

    .login-input-wrap {
        min-height: 44px;
    }

    .login-submit {
        width: 100%;
        padding: 12px 18px;
        font-size: 0.88rem;
    }

    .login-links {
        max-width: 100%;
        margin-top: 8px;
        gap: 8px;
    }

    .login-links a.register-link {
        color: #1c281e;
        text-shadow: none;
        font-weight: 700;
        font-size: 0.74rem;
    }

    .login-links a.forgot-link-btn {
        font-size: 0.74rem;
    }

    .login-visual {
        order: 2;
        min-height: 160px;
        max-height: 200px;
        padding: 14px 0 0;
    }

    .visual-illustration {
        max-height: 170px;
    }

    .login-visual-badge {
        bottom: 10px;
        left: 10px;
        padding: 4px 8px;
    }

    .login-visual-badge img {
        height: 24px;
    }

    .login-footer-links {
        order: 3;
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 14px 16px;
    }

    .login-footer-text {
        font-size: 0.74rem;
        line-height: 1.4;
    }

    .footer-badges {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .footer-logo-link img {
        height: 26px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        min-height: auto;
        padding: 14px;
    }

    .nav-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 16px;
    }

    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

    .welcome-ticker {
        width: 100%;
        order: 1;
    }

    .search-box {
        width: 100%;
        order: 3;
    }

    .user-button {
        flex: 1;
    }

    .primary-inline-button {
        flex: 1;
    }
}

@media (max-width: 620px) {
    .summary-strip,
    .leader-brief {
        grid-template-columns: 1fr;
    }

    .operation-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        grid-template-columns: 1fr;
    }

    .bar-chart {
        gap: 8px;
    }

    .card-head,
    .card-foot,
    .panel-head,
    .panel-actions,
    .attention-row,
    .method-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .method-card {
        grid-template-columns: 1fr;
    }

    .card-foot strong,
    .attention-row p {
        text-align: left;
    }

    .item-form {
        grid-template-columns: 1fr;
    }

    .leader-stock-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .leader-stock-row p {
        white-space: normal;
    }

    .form-actions {
        flex-direction: column;
    }

    .inline-verify-form {
        grid-template-columns: 1fr;
        min-width: 220px;
    }

    .official-letter-preview {
        padding: 16px;
    }

    .signature-preview {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* Badges for Outer and Inner Numbers */
.ktp-badge-container {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.ktp-badge-container .badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
}

.ktp-badge-container .badge-outer {
    background: rgba(23, 60, 136, 0.1);
    color: var(--blue);
    border: 1px solid rgba(23, 60, 136, 0.2);
}

.ktp-badge-container .badge-inner {
    background: rgba(18, 146, 127, 0.1);
    color: var(--teal);
    border: 1px solid rgba(18, 146, 127, 0.2);
}

.ktp-badge-container .badge-box {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* App & Login Footer Styles */
.login-footer-links {
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, #431407 0%, #5d1c06 50%, #7c2d12 100%);
    border-top: 1px solid rgba(245, 158, 11, 0.35);
    padding: 12px 36px;
    color: #fef3c7;
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 -4px 16px rgba(67, 20, 7, 0.15);
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
}

.login-footer-text {
    letter-spacing: 0.3px;
    color: #fde68a;
}

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border: 0;
    border-radius: 6px;
    padding: 3px 10px;
    height: 32px;
    box-shadow: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-logo-link img {
    height: 22px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
    transition: all 0.2s ease;
}

.footer-logo-link:hover {
    transform: translateY(-3px) scale(1.03);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22), 0 0 12px rgba(255, 255, 255, 0.3);
}

.footer-logo-link:hover img {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.07)) scale(1.02);
}

/* App Footer (Logged In) */
.app-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* Zona Integritas Watermark Badge */
.login-visual-badge {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 6px 10px;
    box-shadow: 0 8px 32px rgba(5, 12, 22, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-visual-badge img {
    height: 38px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.login-visual-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(5, 12, 22, 0.22);
}

.login-visual-badge:hover img {
    opacity: 1;
    transform: scale(1.03);
}

/* ==========================================================================
   Early Warning System (EWS) - Run-Out Forecast & Visual Analytics Styles
   ========================================================================== */

.panel-intro-text {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.65;
    margin: 8px 0 22px 0;
    max-width: 880px;
    letter-spacing: 0.01em;
}

.forecast-panel {
    margin-top: 24px;
    margin-bottom: 24px;
    border-top: 3px solid #10b981;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 16px;
}

.forecast-card {
    background: #ffffff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.forecast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #cbd5e1;
}

.forecast-card.aman::before {
    background: #10b981;
}

.forecast-card.waspada::before {
    background: #f59e0b;
}

.forecast-card.kritis::before,
.forecast-card.habis::before {
    background: #ef4444;
}

.forecast-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}

.forecast-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.forecast-item-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--foreground, #0f172a);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.forecast-sub {
    font-size: 0.8rem;
    color: var(--muted, #64748b);
}

.forecast-sub strong {
    color: var(--foreground, #1e293b);
}

.forecast-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: #f8fafc;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border: 1px solid #f1f5f9;
}

.fc-metric-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fc-metric-item span {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #64748b;
}

.fc-metric-item strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.fc-metric-item strong small {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
}

.runout-date-highlight {
    color: #047857 !important;
}

.forecast-card.waspada .runout-date-highlight {
    color: #b45309 !important;
}

.forecast-card.kritis .runout-date-highlight,
.forecast-card.habis .runout-date-highlight {
    color: #b91c1c !important;
}

.forecast-recommendation {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.78rem;
    color: #334155;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 8px 10px;
    line-height: 1.4;
}

.forecast-card.waspada .forecast-recommendation {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fef3c7;
}

.forecast-card.kritis .forecast-recommendation,
.forecast-card.habis .forecast-recommendation {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fee2e2;
}

.forecast-recommendation i {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Analytics Chart Styles */
.analytics-chart-panel {
    margin-top: 24px;
    margin-bottom: 24px;
}

.chart-legend-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-legend-item:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.chart-legend-item.inactive {
    opacity: 0.45;
    text-decoration: line-through;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.chart-canvas-container {
    width: 100%;
    position: relative;
    padding: 12px 0 6px 0;
}

.chart-canvas-container canvas {
    display: block;
    width: 100%;
    height: 260px;
}

/* ==========================================================================
   MODE ENVIRONMENT (TRIAL VS PRODUCTION) & PENGATURAN MODE STYLES
   ========================================================================== */

/* 1. Topbar Mode Badge */
.topbar-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.topbar-mode-badge.is-trial {
    background: #fffbeb;
    color: #b45309;
    border: 1.5px solid #fcd34d;
}

.topbar-mode-badge.is-trial .badge-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: pulse-amber 1.8s infinite;
}

.topbar-mode-badge.is-prod {
    background: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #6ee7b7;
}

.topbar-mode-badge.is-prod .badge-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-emerald 2s infinite;
}

@keyframes pulse-amber {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

@keyframes pulse-emerald {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* 2. Sidebar Footer Mode Indicator */
.footer-mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    width: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.footer-mode-pill.is-trial {
    background: #fffbeb;
    color: #b45309;
    border: 1.5px solid #fcd34d;
}

.footer-mode-pill.is-trial .mode-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), 0 0 8px #f59e0b;
    animation: trialDotPulse 2s infinite ease-in-out;
}

.footer-mode-pill.is-prod {
    background: #ecfdf5;
    color: #047857;
    border: 1.5px solid #6ee7b7;
}

.footer-mode-pill.is-prod .mode-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35), 0 0 8px #10b981;
    animation: prodDotPulse 2s infinite ease-in-out;
}

@keyframes trialDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.75; }
}

@keyframes prodDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.75; }
}

/* 3. Dashboard Announcement Banner */
.mode-announcement-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    animation: banner-slide-down 0.4s ease-out;
}

@keyframes banner-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mode-announcement-banner.trial {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 60%, #fef9c3 100%);
    border: 1.5px solid #fde047;
    color: #92400e;
}

.mode-announcement-banner.trial::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: #f59e0b;
}

.mode-announcement-banner.production {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 60%, #e6fffa 100%);
    border: 1.5px solid #a7f3d0;
    color: #064e3b;
}

.mode-announcement-banner.production::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: #10b981;
}

.banner-icon-col {
    font-size: 2.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.banner-content-col {
    flex: 1;
    min-width: 0;
}

.banner-badge-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.mode-announcement-banner.trial .banner-badge-tag {
    background: #f59e0b;
    color: #ffffff;
}

.mode-announcement-banner.production .banner-badge-tag {
    background: #059669;
    color: #ffffff;
}

.banner-content-col h3 {
    margin: 2px 0 4px 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: inherit;
    letter-spacing: -0.2px;
}

.banner-content-col p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.45;
    opacity: 0.9;
}

.banner-actions-col {
    flex-shrink: 0;
}

.banner-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    background: #d97706;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28);
    transition: all 0.2s ease;
    border: none;
}

.banner-action-btn:hover {
    background: #b45309;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.36);
    color: #ffffff;
}

.banner-action-btn.secondary {
    background: #ffffff;
    color: #065f46;
    border: 1.5px solid #a7f3d0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.banner-action-btn.secondary:hover {
    background: #f0fdf4;
    border-color: #6ee7b7;
    color: #047857;
}

/* 4. Page Pengaturan Mode Hero */
.mode-status-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 26px 30px;
    border-radius: 14px;
    margin-bottom: 28px;
    position: relative;
    box-shadow: var(--shadow);
}

.mode-status-hero.is-trial {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 70%, #fff 100%);
    border: 2px solid #fde047;
    color: #78350f;
}

.mode-status-hero.is-prod {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 70%, #fff 100%);
    border: 2px solid #6ee7b7;
    color: #064e3b;
}

.hero-icon-container {
    font-size: 3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.hero-body {
    flex: 1;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 4px;
}

.hero-body h2 {
    margin: 0 0 6px 0;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    color: inherit;
}

.hero-body p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.92;
}

.hero-badge-metric {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    padding: 12px 18px;
    text-align: right;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.hero-badge-metric span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.hero-badge-metric strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 2px 0;
}

.hero-badge-metric small {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
}

/* 5. Settings Grid & Cards */
.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .mode-announcement-banner,
    .mode-status-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-badge-metric {
        text-align: left;
        width: 100%;
    }
}

.settings-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.form-description {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 18px 0;
}

/* Radio Mode Option Card */
.mode-options-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}

.mode-option-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    background: var(--surface-soft);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-option-label:hover {
    border-color: #94a3b8;
    background: #ffffff;
}

.mode-option-label.is-active {
    border-color: var(--blue);
    background: #fffbeb;
    box-shadow: 0 4px 12px rgba(215, 130, 22, 0.08);
}

.mode-option-label input[type="radio"] {
    margin-top: 4px;
    accent-color: var(--blue);
    transform: scale(1.15);
    cursor: pointer;
}

.mode-option-content {
    flex: 1;
}

.mode-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.mode-title-row strong {
    font-size: 0.95rem;
    color: var(--ink);
}

.mode-badge-mini {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}

.mode-badge-mini.trial {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.mode-badge-mini.production {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.mode-option-content p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

.form-actions-row {
    display: flex;
    justify-content: flex-end;
}

/* 6. Danger Zone / Reset Trial Card */
.danger-zone-card {
    border: 1.5px solid #fca5a5;
    background: linear-gradient(180deg, #fff 0%, #fffdfd 100%);
    position: relative;
}

.danger-head {
    border-bottom: 1px solid #fee2e2;
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.danger-eyebrow {
    color: #dc2626 !important;
    font-weight: 800;
}

.danger-explanation {
    margin-bottom: 18px;
}

.danger-explanation p {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.security-safe-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #9a3412;
    line-height: 1.45;
}

.security-safe-note svg {
    color: #d78216;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Reset Checklist Box */
.reset-checklist-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checklist-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.check-item-locked {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: #64748b;
    cursor: not-allowed;
}

.check-item-locked input {
    accent-color: #ef4444;
}

.check-item-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: #1e293b;
    cursor: pointer;
}

.check-item-option input {
    accent-color: var(--blue);
}

.check-item-option.checked-by-default {
    color: #047857;
    background: #ecfdf5;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #a7f3d0;
}

.checklist-divider {
    border: none;
    border-top: 1px dashed #cbd5e1;
    margin: 4px 0;
}

/* Guard Inputs Grid */
.guard-inputs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 22px;
}

@media (max-width: 640px) {
    .guard-inputs-grid {
        grid-template-columns: 1fr;
    }
}

.guard-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guard-field label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
}

.guard-field input {
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #ffffff;
    transition: all 0.2s ease;
}

.guard-field input:focus {
    border-color: #dc2626;
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.guard-field small {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.35;
}

.guard-field code {
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 5px;
    border-radius: 4px;
    font-weight: 700;
}

/* Danger Action Button */
.danger-actions-row {
    display: flex;
    justify-content: flex-end;
}

.danger-action-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border: 1px solid #991b1b;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-action-button:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
    transform: translateY(-1px);
}



