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

/* ====================================================================
   PENGATURAN WARNA TEMA (TEMA UNGU & MERAH MAROON)
   Ubah kode warna di bawah ini untuk mengganti tema keseluruhan aplikasi
   ==================================================================== */
:root {
    /* --- Warna Utama (Aksen Tombol & Menu Aktif) --- */
    --primary-color: #9c1717;
    /* Merah Maroon: Warna utama untuk menu aktif */
    --primary-hover: #7f1d1d;
    /* Maroon Gelap: Warna saat tombol di-hover */
    --primary-light: #fef2f2;
    /* Maroon Sangat Terang: Warna latar tipis */

    /* --- Warna Tema Gelap (Sidebar & Background Login) --- */
    --dark-color: #9c1717;
    /* Ungu Gelap: Background utama login */
    --sidebar-bg-top: #4a044e;
    /* Ungu Terang: Gradasi atas sidebar */
    --sidebar-bg-bottom: #2e1065;
    /* Ungu Gelap: Gradasi bawah sidebar */
    --sidebar-text: #e0e7ff;
    /* Putih Kebiruan: Warna teks di sidebar */

    /* --- Warna Status & Alert --- */
    --success-color: #10b981;
    /* Hijau: Untuk status Sukses/Selesai */
    --warning-color: #f59e0b;
    /* Kuning/Oranye: Untuk Peringatan */
    --danger-color: #ef4444;
    /* Merah: Untuk status Error/Pending */
    --secondary-color: #64748b;
    /* Abu-abu: Untuk elemen sekunder */

    /* --- Warna Layout Dasar --- */
    --body-bg: #f8fafc;
    /* Abu-abu Sangat Terang: Background halaman */
    --card-border: #e2e8f0;
    /* Abu-abu Terang: Warna garis batas (border) card */
}

/* ====================================================================
   PENGATURAN DASAR (BODY & FONT)
   ==================================================================== */
body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--body-bg);
    color: #1e293b;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* App Wrapper Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ====================================================================
   SIDEBAR (MENU KIRI)
   ==================================================================== */
.app-sidebar {
    width: 270px;
    background: linear-gradient(180deg, var(--sidebar-bg-top) 0%, var(--sidebar-bg-bottom) 100%);
    color: var(--sidebar-text);
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 1040;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.sidebar-menu {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

/* Kategori Menu Sidebar */
.menu-category {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 0.75rem 0.35rem;
    font-weight: 700;
}

/* Link Menu Sidebar Default */
.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

/* Link Menu Sidebar Saat Diarahkan Kursor (Hover) */
.nav-link-custom:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

/* Link Menu Sidebar Saat Aktif (Terpilih) */
.nav-link-custom.active {
    color: #ffffff;
    background: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(156, 23, 23, 0.35);
    /* Sesuaikan rgba jika ganti primary-color */
}

.nav-link-custom i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ====================================================================
   KONTEN UTAMA (MAIN AREA)
   ==================================================================== */
.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: blur(8px);
}

.content-body {
    padding: 1.75rem;
    flex-grow: 1;
}

/* ====================================================================
   KOMPONEN KOTAK (CARD) & STATISTIK
   ==================================================================== */
.card-custom {
    background: #ffffff;
    border-radius: 0.85rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card-custom:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

.card-header-custom {
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.stat-card {
    background: #ffffff;
    border-radius: 0.85rem;
    border: 1px solid var(--card-border);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* ====================================================================
   BANNER PERINGATAN (UNTUK PENERJEMAH)
   ==================================================================== */
.persistent-lock-banner {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b91c1c 100%);
    color: #ffffff;
    border-radius: 0.75rem;
    padding: 1.15rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
    border: 1px solid #dc2626;
    animation: gentle-pulse 2.5s infinite;
}

@keyframes gentle-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.lock-badge-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: #b91c1c;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ====================================================================
   LABEL STATUS (BADGES)
   ==================================================================== */
.badge-status {
    padding: 0.3em 0.65em;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.badge-pending {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.badge-proses {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
}

.badge-siap-review {
    background-color: #fefce8;
    color: #a16207;
    border: 1px solid #fef9c3;
}

.badge-revisi {
    background-color: #fff1f2;
    color: #be123c;
    border: 1px solid #ffe4e6;
}

.badge-siap-print {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.badge-selesai {
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* ====================================================================
   TABEL BERSIH & MINIMALIS
   ==================================================================== */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--card-border);
    padding: 0.75rem 0.95rem;
    white-space: nowrap;
}

.table-custom td {
    padding: 0.75rem 0.95rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
}

.table-custom tbody tr:hover {
    background-color: #f8fafc;
}

/* Helper Typografi Sel Tabel */
.cell-title {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

.cell-sub {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}

.cell-meta {
    font-size: 0.74rem;
    color: #94a3b8;
}

.btn-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* ====================================================================
   RESPONSIVE (UNTUK LAYAR KECIL / HP)
   ==================================================================== */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -270px;
    }

    .app-sidebar.show {
        left: 0;
    }

    .content-body {
        padding: 1rem;
    }

    .persistent-lock-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }
}