/* ==========================================================================
   i-SES v5 Modern Corporate Design System
   Color Palette: White, Dark Blue (#0f172a / #1e3a8a), Gold (#f59e0b / #d97706), Grey (#64748b / #f1f5f9)
   ========================================================================== */

:root {
    --navy-dark: #0f172a;
    --navy-primary: #1e3a8a;
    --navy-surface: #1e293b;
    --navy-hover: #334155;
    
    --gold-primary: #d97706;
    --gold-bright: #f59e0b;
    --gold-dark: #b45309;
    --gold-light: #fef3c7;
    --gold-glow: rgba(245, 158, 11, 0.25);

    --white: #ffffff;
    --white-soft: #f8fafc;
    
    --grey-50: #f8fafc;
    --grey-100: #f1f5f9;
    --grey-200: #e2e8f0;
    --grey-300: #cbd5e1;
    --grey-400: #94a3b8;
    --grey-500: #64748b;
    --grey-600: #475569;
    --grey-700: #334155;
    --grey-800: #1e293b;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-gold: 0 4px 14px rgba(217, 119, 6, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--grey-100);
    color: var(--text-main);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Navbar Custom Styling */
.navbar-custom {
    background: #0f172a !important;
    border-bottom: 3px solid #f59e0b !important;
    padding: 0.75rem 1.75rem;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}

.brand-sub {
    font-size: 10px;
    font-weight: 700;
    color: #f59e0b !important;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.user-card-wrapper {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid #f59e0b !important;
    border-radius: var(--radius-md);
    padding: 6px 14px;
    display: flex;
    align-items: center;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.user-card-wrapper:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #fbbf24 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.user-display-name {
    color: #ffffff !important;
    font-weight: 700;
    font-size: 13px;
}

.role-badge {
    font-size: 10px;
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 800;
    text-transform: uppercase;
    display: inline-block;
    letter-spacing: 0.5px;
}

.bg-superadmin { background: #dc2626 !important; color: white !important; }
.bg-admin { background: var(--gold-primary) !important; color: white !important; }
.bg-user { background: var(--navy-primary) !important; color: white !important; }

/* Sidebar Premium Corporate */
#sidebar {
    background: var(--navy-dark) !important;
    min-height: 100vh;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-header-box {
    padding: 24px 20px;
    background: linear-gradient(180deg, rgba(30, 58, 138, 0.3) 0%, rgba(15, 23, 42, 0) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#sidebar .nav-link, .offcanvas-body .nav-link {
    color: var(--grey-300) !important;
    padding: 12px 18px;
    margin: 4px 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

#sidebar .nav-link i, .offcanvas-body .nav-link i {
    width: 26px;
    font-size: 1.1rem;
    color: var(--grey-400);
}

#sidebar .nav-link:hover, .offcanvas-body .nav-link:hover {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

#sidebar .nav-link:hover i, .offcanvas-body .nav-link:hover i {
    color: var(--gold-bright);
}

#sidebar .nav-link.active, .offcanvas-body .nav-link.active {
    background: linear-gradient(135deg, var(--navy-primary) 0%, #1d4ed8 100%) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
    border-left: 4px solid var(--gold-bright);
}

#sidebar .nav-link.active i, .offcanvas-body .nav-link.active i {
    color: var(--gold-bright);
}

/* Card Styling */
.card-custom {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--grey-300);
}

.card-header-navy {
    background: var(--navy-dark);
    color: var(--white);
    padding: 1.2rem 1.5rem;
    border-bottom: 3px solid var(--gold-primary);
}

.card-header-navy .card-title {
    color: var(--white);
    font-weight: 700;
    margin: 0;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 100%);
    color: var(--white);
    border-radius: var(--radius-xl);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.welcome-banner::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-banner h2 {
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.welcome-banner p {
    color: var(--grey-300);
}

.welcome-banner .highlight-gold {
    color: var(--gold-bright);
    font-weight: 700;
}

/* Form Controls */
.form-control, .form-select {
    border: 1.5px solid var(--grey-200);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-color: var(--white);
    color: var(--navy-dark);
}

.form-control:focus, .form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 4px var(--gold-glow);
    outline: none;
}

/* Buttons */
.btn-gold {
    background: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    color: var(--white) !important;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.4rem;
    box-shadow: var(--shadow-gold);
    transition: all 0.25s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-bright) 0%, var(--gold-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.4);
}

.btn-navy {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 100%);
    color: var(--white) !important;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.65rem 1.4rem;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
}

.btn-navy:hover {
    background: linear-gradient(135deg, var(--navy-surface) 0%, var(--navy-dark) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Tables */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--grey-200);
}

.table-custom thead {
    background: var(--navy-dark);
    color: var(--white);
}

.table-custom thead th {
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid var(--gold-primary);
}

.table-custom tbody tr {
    transition: all 0.15s ease;
    background: var(--white);
}

.table-custom tbody tr:nth-child(even) {
    background: var(--white-soft);
}

.table-custom tbody tr:hover {
    background: var(--gold-light);
}

.table-custom td {
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid var(--grey-200);
    color: var(--navy-dark);
    font-size: 0.9rem;
}

/* Stat Widgets */
.stat-card {
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold-bright);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 18px;
    flex-shrink: 0;
}

.stat-icon-navy {
    background: rgba(30, 58, 138, 0.1);
    color: var(--navy-primary);
}

.stat-icon-gold {
    background: var(--gold-light);
    color: var(--gold-primary);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy-dark);
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--grey-500);
    margin-top: 4px;
}

/* Footer Styling */
.footer-custom {
    background: var(--white);
    border-top: 1px solid var(--grey-200);
    padding: 1.2rem 0;
    margin-top: auto;
    font-size: 0.85rem;
    color: var(--grey-500);
}

.footer-custom strong {
    color: var(--navy-dark);
}
