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

:root {
    --brand-blue: #2e3192;
    --brand-blue-rgb: 46, 49, 146;
    --brand-red: #ed1b24;
    --brand-red-rgb: 237, 27, 36;

    --dark-bg: #0e1022;
    /* Deep space navy */
    --dark-bg-card: #151833;
    /* Sleek dark card */
    --light-bg: #f5f7fb;
    /* Soft light grey-blue */

    --text-main: #2b303a;
    --text-muted: #6c757d;
    --text-light: #f8f9fa;

    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    padding-top: 70px;
}

/* PREMIUM NAVBAR */
.navbar-premium {
    background: rgba(14, 16, 34, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 1030;
    padding: 0.6rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Accent gradient line at the very top of navbar */
.navbar-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-red) 50%, var(--brand-blue) 100%);
    background-size: 200% auto;
    animation: shineLine 4s linear infinite;
}

@keyframes shineLine {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    color: #ffffff !important;
    transition: var(--transition-smooth);
}

.navbar-brand img {
    max-height: 34px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transition: var(--transition-smooth);
}

.navbar-brand:hover img {
    transform: scale(1.08) rotate(-3deg);
}

/* MENU SYSTEM BUTTON (toggle sidebar buka/tutup) */
.btn-menu-system {
    background: linear-gradient(135deg, var(--brand-blue) 0%, rgba(46, 49, 146, 0.7) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff !important;
    padding: 0.45rem 0.7rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(46, 49, 146, 0.2);
    transition: var(--transition-smooth);
}

.btn-menu-system:hover {
    background: linear-gradient(135deg, var(--brand-red) 0%, rgba(237, 27, 36, 0.7) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(237, 27, 36, 0.3);
    transform: translateY(-1px);
}

.btn-menu-system:active {
    transform: translateY(1px);
}

/* USER BADGE */
.user-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-smooth);
    max-height: 42px;
}

.user-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-red) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.user-name {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* PREMIUM SIDEBAR (slide toggle) */
.sidebar-premium {
    background-color: var(--dark-bg) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px;
    left: 0;
    bottom: 0;
    width: 220px;
    z-index: 1020;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
}

body.sidebar-open .sidebar-premium {
    transform: translateX(0);
}

.sidebar-header-premium {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(46, 49, 146, 0.1) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin: 0;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-title-badge {
    background: var(--brand-red);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.sidebar-body-premium {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1.5rem;
    color: rgba(255, 255, 255, 0.65) !important;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: var(--transition-smooth);
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff !important;
    padding-left: 1.75rem;
    /* Slide effect */
    border-left-color: var(--brand-blue);
}

.sidebar-item.active {
    background: rgba(46, 49, 146, 0.15);
    color: #ffffff !important;
    font-weight: 600;
    border-left-color: var(--brand-red);
}

.sidebar-section-label {
    padding: 0.9rem 1.5rem 0.4rem !important;
    margin: 0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.sidebar-footer-premium {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.15);
}

.logout-btn-premium {
    background: linear-gradient(135deg, var(--brand-red) 0%, #b4131a 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff !important;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: center;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(237, 27, 36, 0.2);
    transition: var(--transition-smooth);
    text-decoration: none;
}

.logout-btn-premium:hover {
    background: linear-gradient(135deg, #ff2a34 0%, var(--brand-red) 100%);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(237, 27, 36, 0.35);
}

.logout-btn-premium:active {
    transform: translateY(0);
}

/* ==========================================================================
   GLOBAL FONT SIZE OVERRIDES (Judul: 12pt, Sub Judul: 10pt, Isi: 10pt)
   ========================================================================== */

/* Isi (Content / Text / Forms / Tables) */
body,
p,
span,
a,
button,
input,
select,
textarea,
table,
tr,
td,
th,
li,
label,
.form-control,
.btn,
.list-group-item,
.navbar-text,
.sidebar-item,
.user-name,
.user-role,
.small,
small,
.fs-6 {
    font-size: 10pt !important;
}

/* Sub Judul (Subheadings / Cards / Offcanvas Header / Sidebar Titles) */
h3,
h4,
h5,
h6,
.h3,
.h4,
.h5,
.h6,
.sidebar-title,
.card-title,
.card-subtitle,
.fs-3,
.fs-4,
.fs-5 {
    font-size: 10pt !important;
}

/* Judul (Main Page Headings / Brand Title) */
h1,
h2,
.h1,
.h2,
.navbar-brand,
.fs-1,
.fs-2 {
    font-weight: 800;
    font-size: 12pt !important;
}

/* ==========================================================================
   SIDEBAR TOGGLE (slide buka/tutup, terpisah untuk desktop & mobile)
   ========================================================================== */

/* Transisi halus saat konten bergeser mengikuti sidebar */
.py-4 {
    transition: padding-left 0.28s ease;
}

/* Backdrop gelap di belakang sidebar saat mode overlay (mobile) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1015;
}

/* DESKTOP (>=992px): sidebar mendorong konten (docked), bukan menimpa */
@media (min-width: 992px) {
    body.sidebar-open .py-4 {
        padding-left: 235px !important;
        padding-right: 15px !important;
    }

    body.sidebar-open footer {
        margin-left: 220px !important;
    }
}

/* MOBILE (<992px): sidebar menimpa konten (overlay) + backdrop aktif */
@media (max-width: 991.98px) {
    body.sidebar-open .sidebar-backdrop {
        display: block;
    }
}

/* ==========================================================================
   DROPDOWN USER PROFILE MENU
   ========================================================================== */
.dropdown-menu-dark {
    background-color: var(--dark-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 0.5rem !important;
}

.dropdown-menu-dark .dropdown-item {
    border-radius: 6px !important;
    font-size: 10pt !important;
    transition: var(--transition-smooth) !important;
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: rgba(46, 49, 146, 0.15) !important;
    /* Brand Blue Hover */
    color: #ffffff !important;
}

.dropdown-menu-dark .dropdown-item.text-danger:hover {
    background-color: rgba(237, 27, 36, 0.12) !important;
    /* Brand Red Hover */
    color: #ff4d5a !important;
}

/* Dynamic navbar brand slide is deprecated because the sidebar is now positioned below the fixed header. */

/* ==========================================================================
   LARGE USER AVATAR FOR PROFILE PAGE
   ========================================================================== */
.user-avatar-large {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-red) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 2.2rem;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.profile-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    background-color: #ffffff;
}

.profile-header-gradient {
    height: 80px;
    background: linear-gradient(90deg, rgba(46, 49, 146, 0.1) 0%, rgba(237, 27, 36, 0.05) 100%);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}