@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --gov-dark: #002B5B; 
    --gov-primary: #F2A900;
    --gov-accent: #E53935;
    --bg-main: #f8f9fa;
    --bg-gradient: #eef2f5;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

* { font-family: 'Plus Jakarta Sans', sans-serif; }
body { background: var(--bg-main); color: var(--text-dark); }

.text-dark-green { color: var(--gov-dark); }

/* Legacy Auth Styles (if any pages still use it) */
.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-gradient) 100%);
    overflow-x: hidden;
    position: relative;
}

.auth-bg-orb { position: fixed; border-radius: 999px; filter: blur(10px); opacity: .45; z-index: 0; }
.orb-1 { width: 240px; height: 240px; background: var(--gov-primary); top: 8%; right: 10%; }
.orb-2 { width: 190px; height: 190px; background: var(--gov-dark); bottom: 10%; left: 8%; }
.auth-shell { position: relative; z-index: 2; }

.glass-card { background: rgba(255,255,255,.72); backdrop-filter: blur(22px); border: 1px solid rgba(255,255,255,.72); border-radius: 28px; }

.brand-mark {
    width: 48px; height: 48px; border-radius: 14px;
    background: linear-gradient(135deg, #FFD54F, var(--gov-primary));
    color: var(--gov-dark); display: flex; align-items: center; justify-content: center;
    font-weight: 800; box-shadow: 0 4px 10px rgba(242, 169, 0, 0.3);
}

.btn-gov { background: var(--gov-primary); color: var(--gov-dark); font-weight: 800; border: none; border-radius: 14px; }
.btn-gov:hover { background: #FFB300; color: var(--gov-dark); }

.gov-badge { background: rgba(242, 169, 0, 0.15); color: var(--gov-dark); border: 1px solid rgba(242, 169, 0, 0.3); padding: .6rem 1rem; }

.input-group-text, .form-control { border-radius: 14px; }
.input-group .input-group-text:first-child { border-radius: 14px 0 0 14px; }
.input-group .form-control:last-child { border-radius: 0 14px 14px 0; }

.secure-note { background: rgba(0, 43, 91, 0.05); color: var(--gov-dark); border-radius: 14px; padding: .85rem 1rem; font-size: .9rem; }

.otp-card { max-width: 460px; width: 100%; }
.otp-input { letter-spacing: 12px; font-weight: 800; }
.page-bg { background: var(--bg-main); }

.sidebar { min-height: 100vh; background: var(--gov-dark); color: #fff; }
.sidebar a { color: rgba(255,255,255,.82); text-decoration: none; display: block; padding: .85rem 1rem; border-radius: 14px; margin-bottom: .35rem; }
.sidebar a:hover, .sidebar a.active { background: rgba(242, 169, 0, 0.2); color: #fff; }

.role-column { min-height: 420px; background: #fff; border-radius: 20px; padding: 18px; border: 1px solid #e9ecef; }
.system-card { cursor: grab; border: 1px solid #eef0f2; background: #f8f9fa; border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.system-card:active { cursor: grabbing; }

/* =========================================================
   Admin Dashboard V2 — myID@MBIP (Aligned with Login)
   ========================================================= */

.admin-v2-body {
    background: linear-gradient(135deg, var(--bg-main) 0%, var(--bg-gradient) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    perspective: 1000px;
    color: var(--text-dark);
}

/* Background Particles / Grid Animation */
.admin-v2-body::before {
    content: ''; position: fixed; inset: 0;
    background-image: 
        linear-gradient(rgba(0, 43, 91, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 43, 91, 0.04) 1px, transparent 1px);
    background-size: 40px 40px; z-index: 0;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMoveAdmin 25s linear infinite; pointer-events: none;
}
@keyframes gridMoveAdmin {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(40px) translateZ(-200px); }
}

.admin-v2-body::after {
    content: ''; position: fixed; top: 10%; left: 10%; right: 10%; bottom: 10%;
    background: radial-gradient(circle at 50% 50%, rgba(242, 169, 0, 0.08) 0%, transparent 60%);
    z-index: 0; pointer-events: none;
}

.admin-v2-shell { display: flex; min-height: 100vh; position: relative; z-index: 10; }

.admin-v2-sidebar {
    width: 280px; min-height: 100vh; position: sticky; top: 0;
    background: rgba(0, 43, 91, 0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.1); color: #fff; padding: 22px;
    display: flex; flex-direction: column; gap: 18px; box-shadow: 10px 0 30px rgba(0, 43, 91, 0.15); z-index: 20;
}

.sidebar-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; }
.sidebar-brand strong { display: block; font-size: 1.05rem; letter-spacing: -.02em; }
.sidebar-brand span { color: rgba(255,255,255,.6); font-size: .82rem; }

.sidebar-section-label { color: rgba(255,255,255,.42); text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; margin-top: 8px; }
.sidebar-nav { display: grid; gap: 8px; }
.sidebar-nav a, .sidebar-logout {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px;
    color: rgba(255,255,255,.78); text-decoration: none; transition: all .3s ease;
}
.sidebar-nav a i, .sidebar-logout i { width: 22px; text-align: center; font-size: 1.05rem; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(242, 169, 0, 0.15); color: #fff; transform: translateX(4px); }
.sidebar-nav a.active { border: 1px solid rgba(242, 169, 0, 0.3); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }

.sidebar-mini-card {
    margin-top: auto; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px; padding: 18px; display: grid; gap: 5px;
}
.sidebar-mini-card i {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--gov-primary); color: var(--gov-dark); font-size: 1.35rem; margin-bottom: 6px;
}
.sidebar-mini-card strong { font-size: .96rem; }
.sidebar-mini-card span { color: rgba(255,255,255,.6); font-size: .82rem; }

.sidebar-logout { background: rgba(255,255,255,.05); }
.sidebar-logout:hover { background: rgba(229, 57, 53, 0.2); color: #fff; }

.admin-v2-main { flex: 1; padding: 30px; min-width: 0; position: relative; z-index: 10; }

.admin-v2-topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; margin-bottom: 22px; }
.admin-v2-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
    background: rgba(242, 169, 0, 0.15); color: var(--gov-dark); font-weight: 800; font-size: .78rem;
    margin-bottom: 12px; border: 1px solid rgba(242, 169, 0, 0.3);
}
.admin-v2-topbar h1 { font-size: clamp(1.8rem, 2.6vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; color: var(--gov-dark); margin: 0; }
.admin-v2-topbar p { color: var(--text-muted); margin: 6px 0 0; font-weight: 500; }

.admin-v2-profile {
    display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.8);
    border: 1px solid rgba(255,255,255,.5); backdrop-filter: blur(18px); border-radius: 20px;
    padding: 10px 14px; box-shadow: 0 8px 25px rgba(0, 43, 91, 0.05);
}
.profile-text { text-align: right; }
.profile-text strong { display: block; color: var(--gov-dark); font-size: .92rem; font-weight: 800; }
.profile-text span { display: block; color: var(--text-muted); font-size: .78rem; font-weight: 500; }
.profile-avatar {
    width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    background: var(--gov-dark); color: var(--gov-primary); font-weight: 800; font-size: 1.1rem;
}

/* Digital Hero Card Animation */
.hero-console-card {
    position: relative; overflow: hidden; border-radius: 28px; padding: clamp(24px, 4vw, 42px);
    background: rgba(0, 43, 91, 0.9); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; display: grid; grid-template-columns: 1.45fr .75fr;
    gap: 30px; box-shadow: 0 30px 60px rgba(0, 43, 91, 0.25), inset 0 0 20px rgba(255, 255, 255, 0.05);
    transform-style: preserve-3d; animation: floatHero 8s ease-in-out infinite;
}
@keyframes floatHero {
    0% { transform: translateY(0px) rotateY(-1deg) rotateX(1deg); }
    50% { transform: translateY(-8px) rotateY(1deg) rotateX(-1deg); box-shadow: 0 40px 70px rgba(0, 43, 91, 0.3), inset 0 0 30px rgba(255, 255, 255, 0.08); }
    100% { transform: translateY(0px) rotateY(-1deg) rotateX(1deg); }
}

.hero-console-card::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--gov-primary); box-shadow: 0 0 15px 5px rgba(242, 169, 0, 0.4);
    animation: scanHero 4s ease-in-out infinite alternate; z-index: 5; pointer-events: none;
}
@keyframes scanHero { 0% { top: 5%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 95%; opacity: 0; } }

.hero-console-content, .hero-console-visual { position: relative; z-index: 10; }
.hero-pill {
    display: inline-flex; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2); color: var(--gov-primary); font-weight: 800;
    font-size: .78rem; margin-bottom: 18px; backdrop-filter: blur(10px);
}
.hero-console-card h2 { max-width: 720px; font-size: clamp(1.65rem, 3vw, 2.8rem); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.hero-console-card p { max-width: 660px; color: rgba(255,255,255,.7); font-size: 1rem; font-weight: 500; margin: 16px 0 0; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-actions .btn { border-radius: 14px; font-weight: 800; padding: 12px 24px; transition: all 0.3s; }
.hero-actions .btn-gov { background: var(--gov-primary); color: var(--gov-dark); box-shadow: 0 6px 20px rgba(242, 169, 0, 0.3); border: none; }
.hero-actions .btn-gov:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(242, 169, 0, 0.45); background: #FFB300; }
.hero-actions .btn-light { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; backdrop-filter: blur(10px); }
.hero-actions .btn-light:hover { background: rgba(255,255,255,0.2); color: #fff; transform: translateY(-3px); }

.hero-console-visual { display: grid; place-items: center; min-height: 230px; perspective: 800px; }
.identity-orbit {
    position: relative; width: 200px; height: 200px; border-radius: 50%;
    border: 1px dashed rgba(255,255,255,.2); display: grid; place-items: center;
    transform-style: preserve-3d; animation: rotateOrbit 20s linear infinite;
}
@keyframes rotateOrbit { 100% { transform: rotate(360deg); } }

.identity-orbit::before {
    content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
    border: 1px dashed rgba(242, 169, 0, 0.4); animation: rotateOrbit 15s linear infinite reverse;
}
.orbit-core {
    width: 80px; height: 80px; border-radius: 24px; display: grid; place-items: center;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(16px); box-shadow: 0 20px 45px rgba(0,0,0,.3);
    animation: rotateOrbit 20s linear infinite reverse;
}
.orbit-core i { color: var(--gov-primary); font-size: 2.5rem; animation: pulseGlow 2s infinite alternate; }
@keyframes pulseGlow { 0% { text-shadow: 0 0 10px rgba(242, 169, 0, 0.2); } 100% { text-shadow: 0 0 25px rgba(242, 169, 0, 0.8); } }

.orbit-node {
    position: absolute; background: #fff; color: var(--gov-dark); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800;
    box-shadow: 0 10px 25px rgba(0,0,0,.2); border: 2px solid var(--gov-dark);
    animation: rotateOrbit 20s linear infinite reverse;
}
.node-a { top: -10px; right: 20px; width: 50px; height: 50px; border-color: var(--gov-primary); color: var(--gov-primary); }
.node-b { bottom: 10px; right: -10px; width: 60px; height: 60px; }
.node-c { left: -15px; bottom: 40px; width: 45px; height: 45px; border-color: var(--gov-accent); color: var(--gov-accent); }

/* Metric Cards with Glassmorphism */
.metric-card {
    position: relative; min-height: 132px; background: rgba(255,255,255,.85);
    border: 1px solid rgba(255,255,255,.6); backdrop-filter: blur(20px); border-radius: 24px;
    padding: 22px; display: flex; align-items: center; gap: 16px;
    box-shadow: 0 15px 35px rgba(0, 43, 91, 0.05); transition: transform 0.3s, box-shadow 0.3s;
}
.metric-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0, 43, 91, 0.08); }
.metric-icon {
    width: 58px; height: 58px; flex: 0 0 58px; border-radius: 18px;
    display: grid; place-items: center; font-size: 1.45rem;
}
.icon-yellow { background: rgba(242, 169, 0, 0.15); color: #c98c00; }
.icon-green { background: rgba(16, 185, 129, 0.15); color: #059669; }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.icon-red { background: rgba(229, 57, 53, 0.15); color: #dc2626; }
.metric-card span { color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.metric-card h3 { color: var(--gov-dark); font-size: 2rem; font-weight: 800; margin: 2px 0 0; letter-spacing: -.03em; }
.metric-link {
    position: absolute; top: 18px; right: 18px; width: 34px; height: 34px;
    border-radius: 12px; display: grid; place-items: center; background: var(--bg-gradient);
    color: var(--gov-dark); text-decoration: none; transition: all 0.2s;
}
.metric-link:hover { background: var(--gov-primary); color: #fff; }

/* Console Panel */
.console-panel {
    background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.6);
    backdrop-filter: blur(20px); border-radius: 28px; padding: 25px;
    box-shadow: 0 15px 35px rgba(0, 43, 91, 0.05);
}
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 22px; }
.panel-header h5 { color: var(--gov-dark); font-weight: 800; margin: 0; letter-spacing: -.02em; font-size: 1.2rem; }
.panel-header p { color: var(--text-muted); margin: 4px 0 0; font-size: .9rem; font-weight: 500; }

.modern-table thead th { color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 2px solid var(--bg-gradient); padding: 16px 12px; }
.modern-table tbody td { padding: 18px 12px; border-color: var(--bg-gradient); }
.table-main { color: var(--gov-dark); font-weight: 800; font-size: 0.95rem; }
.table-sub { color: var(--text-muted); font-size: .85rem; font-weight: 500; }

.role-stack { display: grid; gap: 14px; }
.role-stat { border-radius: 20px; padding: 18px; display: flex; justify-content: space-between; align-items: center; border: 1px solid transparent; }
.role-stat strong { display: block; color: var(--gov-dark); font-weight: 800; }
.role-stat span { color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.role-stat b { font-size: 1.4rem; color: var(--gov-dark); font-weight: 800; }
.role-admin { background: rgba(242, 169, 0, 0.1); border-color: rgba(242, 169, 0, 0.2); }
.role-kerani { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.2); }
.role-user { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.2); }

.security-note-card {
    display: flex; gap: 16px; background: var(--gov-dark); color: #fff;
    border-radius: 24px; padding: 20px; box-shadow: 0 10px 30px rgba(0, 43, 91, 0.2);
}
.security-icon {
    width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
    background: var(--gov-primary); color: var(--gov-dark); flex: 0 0 52px; font-size: 1.5rem;
}
.security-note-card strong { display: block; font-size: 1.05rem; font-weight: 800; }
.security-note-card p { color: rgba(255,255,255,.7); margin: 6px 0 0; font-size: .88rem; line-height: 1.4; font-weight: 500; }

.system-overview-card {
    background: rgba(255,255,255,0.7); border: 1px solid rgba(0, 43, 91, 0.08); border-radius: 24px;
    padding: 22px; height: 100%; transition: all .3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.system-overview-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0, 43, 91, 0.08); border-color: rgba(242, 169, 0, 0.3); background: #fff; }
.system-code {
    display: inline-flex; padding: 6px 14px; background: rgba(242, 169, 0, 0.15);
    color: #c98c00; border-radius: 999px; font-size: .75rem; font-weight: 800; margin-bottom: 16px;
    border: 1px solid rgba(242, 169, 0, 0.2);
}
.system-overview-card h6 { color: var(--gov-dark); font-weight: 800; min-height: 42px; font-size: 1.1rem; line-height: 1.3; }
.system-meta {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    color: var(--text-muted); font-size: .9rem; font-weight: 600; margin-top: 18px;
    padding-top: 18px; border-top: 1px dashed rgba(0, 43, 91, 0.1);
}
.system-meta a { color: var(--gov-primary); font-weight: 800; text-decoration: none; transition: color 0.2s; }
.system-meta a:hover { color: #c98c00; }

@media (max-width: 991.98px) {
    .admin-v2-shell { display: block; }
    .admin-v2-sidebar { width: 100%; min-height: auto; position: relative; border-radius: 0 0 28px 28px; }
    .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sidebar-mini-card { display: none; }
    .admin-v2-main { padding: 20px; }
    .admin-v2-topbar { display: grid; gap: 15px; }
    .admin-v2-profile { justify-content: space-between; width: 100%; }
    .profile-text { text-align: left; }
    .hero-console-card { grid-template-columns: 1fr; text-align: center; }
    .hero-console-card h2, .hero-console-card p { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
    .hero-console-visual { min-height: 220px; }
}
@media (max-width: 575.98px) {
    .sidebar-nav { grid-template-columns: 1fr; }
    .hero-actions .btn { width: 100%; }
    .panel-header { display: grid; gap: 12px; }
    .metric-card { min-height: auto; }
}

/* Extra patch for Admin V2 sub-pages */
.mini-avatar {
    width: 44px; height: 44px; border-radius: 14px; background: var(--gov-dark);
    color: var(--gov-primary); display: grid; place-items: center; font-weight: 800; flex: 0 0 44px;
}
.mini-avatar.big { width: 62px; height: 62px; border-radius: 20px; font-size: 1.35rem; }
.selected-user-card {
    background: linear-gradient(135deg, rgba(242, 169, 0, 0.1), rgba(255,255,255,.9));
    border: 1px solid rgba(255,255,255,.8); border-radius: 24px; padding: 22px;
    display: flex; align-items: center; gap: 18px; box-shadow: 0 15px 35px rgba(0, 43, 91, 0.05);
}
.selected-user-card strong { display: block; color: var(--gov-dark); font-size: 1.1rem; font-weight: 800; }
.selected-user-card span { display: block; color: var(--text-muted); font-size: .95rem; font-weight: 500; }
.role-column-admin { border-top: 5px solid var(--gov-primary); }
.role-column-kerani { border-top: 5px solid #3b82f6; }
.role-column-user { border-top: 5px solid #10b981; }
.role-dropzone { min-height: 320px; }
@media (max-width: 991.98px) { .role-dropzone { min-height: 180px; } }

.btn-outline-dark { border-color: rgba(0, 43, 91, 0.2); color: var(--gov-dark); font-weight: 800; }
.btn-outline-dark:hover { background: var(--gov-dark); color: #fff; }