/* =============================================================
   OneFikti — Custom Stylesheet
   Tema: Biru Tua → Biru Muda (Elegant Navy-to-Sky)
   ============================================================= */

/* ---------- CSS Variables ---------- */
:root {
    --of-navy:       #0d2a4e;   /* biru tua utama */
    --of-blue-d:     #1a4580;   /* biru menengah gelap */
    --of-blue:       #1e5faa;   /* biru utama */
    --of-blue-m:     #2979c8;   /* biru menengah */
    --of-blue-l:     #5ba4e5;   /* biru muda */
    --of-blue-xl:    #c8e0f8;   /* biru sangat muda */
    --of-sky:        #e8f3fd;   /* latar biru */

    --of-white:      #ffffff;
    --of-gray-50:    #f8f9fc;
    --of-gray-100:   #eef1f7;
    --of-gray-200:   #d9dfe9;
    --of-gray-400:   #8a95a8;
    --of-gray-600:   #4e5a6d;
    --of-gray-800:   #1e2637;

    --sidebar-width: 250px;
    --topbar-height: 62px;
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;

    --shadow-card:   0 2px 12px rgba(13, 42, 78, 0.08);
    --shadow-hover:  0 6px 24px rgba(13, 42, 78, 0.16);
    --transition:    all 0.22s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--of-gray-50);
    color: var(--of-gray-800);
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---------- LOGIN PAGE ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(145deg, var(--of-navy) 0%, var(--of-blue-d) 40%, var(--of-blue) 100%);
}

.login-brand-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 60px 64px;
    color: var(--of-white);
    position: relative;
    overflow: hidden;
}

.login-brand-panel::before {
    content: '';
    position: absolute;
    width: 480px; height: 480px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.07);
    top: -120px; left: -80px;
    pointer-events: none;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.05);
    bottom: -60px; left: 160px;
    pointer-events: none;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 56px;
}

.brand-logo-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    color: var(--of-white);
}

.brand-logo-text {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.3px;
}

.brand-logo-text span {
    color: var(--of-blue-xl);
}

.brand-headline {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.5px;
    margin: 0 0 18px;
}

.brand-sub {
    font-size: 15px;
    color: rgba(255,255,255,.7);
    max-width: 380px;
    line-height: 1.7;
    margin-bottom: 48px;
}

.brand-features {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    color: rgba(255,255,255,.8);
}

.brand-features li i {
    width: 28px; height: 28px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

/* Login Form Panel */
.login-form-panel {
    width: 440px;
    background: var(--of-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 48px;
    border-radius: 0;
}

.login-form-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--of-navy);
    margin: 0 0 6px;
}

.login-form-sub {
    font-size: 13.5px;
    color: var(--of-gray-400);
    margin: 0 0 36px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--of-gray-600);
    margin-bottom: 7px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.form-control-of {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--of-gray-200);
    border-radius: var(--radius-sm);
    padding: 0 40px 0 14px;
    font-size: 14px;
    color: var(--of-gray-800);
    background: var(--of-white);
    transition: var(--transition);
    outline: none;
}

.form-control-of:focus {
    border-color: var(--of-blue);
    box-shadow: 0 0 0 3px rgba(30,95,170,.12);
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--of-gray-400);
    font-size: 15px;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, var(--of-blue-d) 0%, var(--of-blue) 100%);
    color: var(--of-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: .3px;
    margin-top: 8px;
    transition: var(--transition);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--of-navy) 0%, var(--of-blue-d) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 42, 78, .28);
}

.btn-login:active { transform: translateY(0); }

.alert-login {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-login.error {
    background: #fff0f0;
    color: #b91c1c;
    border-left: 3px solid #ef4444;
}

.login-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--of-gray-100);
    font-size: 12px;
    color: var(--of-gray-400);
    text-align: center;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--of-navy) 0%, var(--of-blue-d) 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.sidebar-brand-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,.15);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    color: var(--of-white);
    flex-shrink: 0;
}

.sidebar-brand-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--of-white);
    letter-spacing: -.2px;
}

.sidebar-brand-name span {
    color: var(--of-blue-xl);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 16px 18px;
    background: rgba(255,255,255,.06);
    margin: 12px 12px 4px;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--of-blue-m);
    color: var(--of-white);
    font-size: 13px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--of-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,.55);
    margin-top: 1px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.15) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,.35);
    padding: 14px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.72);
    font-size: 13.5px;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255,255,255,.1);
    color: var(--of-white);
}

.nav-item.active {
    background: rgba(255,255,255,.15);
    color: var(--of-white);
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    font-size: 15px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.65);
    font-size: 13.5px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 80, 80, .15);
    color: #ffaaaa;
}

/* ---------- TOPBAR ---------- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--of-white);
    border-bottom: 1px solid var(--of-gray-100);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    z-index: 900;
    box-shadow: 0 1px 8px rgba(13,42,78,.05);
}

.topbar-toggle {
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--of-gray-600);
    font-size: 16px;
    display: none;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--of-navy);
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--of-gray-50);
    color: var(--of-gray-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.topbar-btn:hover {
    background: var(--of-sky);
    color: var(--of-blue);
}

.badge-notif {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--of-white);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.topbar-user:hover {
    background: var(--of-sky);
    border-color: var(--of-blue-xl);
}

.topbar-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--of-blue);
    color: var(--of-white);
    font-size: 12px;
    font-weight: 600;
    display: flex; align-items: center; justify-content: center;
}

.topbar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--of-gray-800);
}

.topbar-user-role {
    font-size: 11px;
    color: var(--of-gray-400);
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: var(--transition);
}

.page-content {
    padding: 28px;
}

/* ---------- DASHBOARD CARDS ---------- */
.welcome-card {
    background: linear-gradient(135deg, var(--of-navy) 0%, var(--of-blue-d) 50%, var(--of-blue) 100%);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    color: var(--of-white);
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.welcome-card::after {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    right: -40px; top: -60px;
    pointer-events: none;
}

.welcome-text h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px;
}

.welcome-text p {
    font-size: 13.5px;
    color: rgba(255,255,255,.7);
    margin: 0;
}

.welcome-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.12);
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

/* Module Grid */
.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--of-gray-600);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--of-gray-200);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 32px;
}

.module-card {
    background: var(--of-white);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    border: 1.5px solid var(--of-gray-100);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mod-color, var(--of-blue)), var(--mod-color-l, var(--of-blue-m)));
    opacity: 0;
    transition: var(--transition);
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--of-blue-xl);
}

.module-card:hover::before { opacity: 1; }

.module-icon-wrap {
    width: 48px; height: 48px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    color: var(--of-white);
    background: var(--mod-color, var(--of-blue));
    flex-shrink: 0;
}

.module-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--of-navy);
    margin: 0;
}

.module-desc {
    font-size: 12px;
    color: var(--of-gray-400);
    line-height: 1.5;
    margin: 0;
}

.module-arrow {
    margin-top: auto;
    font-size: 12px;
    color: var(--mod-color, var(--of-blue));
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateX(-4px);
    transition: var(--transition);
}

.module-card:hover .module-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Stats */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    border-radius: 14px;
    padding: 20px 22px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,.13);
}

/* Ikon besar transparan di background */
.stat-bg-icon {
    position: absolute;
    right: 14px;
    top: 14px;
    font-size: 36px;
    opacity: .18;
}

/* Pseudo lingkaran dekoratif */
.stat-card::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    right: -24px;
    bottom: -32px;
}

/* Warna per kartu */
.sc-blue   { background: linear-gradient(135deg, #1a4580, #2979c8); }
.sc-green  { background: linear-gradient(135deg, #065f46, #10b981); }
.sc-orange { background: linear-gradient(135deg, #7c2d12, #ea580c); }
.sc-purple { background: linear-gradient(135deg, #4c1d95, #7c3aed); }

.stat-label {
    font-size: 10.5px;
    color: rgba(255,255,255,.75);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}

.stat-sub {
    font-size: 12px;
    color: rgba(255,255,255,.68);
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Hapus span lama */
.stat-value span {
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
    margin-left: 0;
    opacity: .75;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }

    .sidebar {
        width: 250px;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        width: 250px;
    }

    .topbar { left: 0; }
    .topbar-toggle { display: flex; }
    .main-content { margin-left: 0; }

    .login-brand-panel { display: none; }
    .login-form-panel { width: 100%; padding: 40px 28px; }

    .modules-grid { grid-template-columns: repeat(2, 1fr); }
}