:root {
    /* Color Palette */
    --bg-dark: #121418;       /* Very dark greyish, almost black */
    --bg-darker: #0d0f12;     /* Darker shade for accents */
    --accent-blue: #0b3d91;   /* CBP Blue */
    --accent-green: #10b981;  /* CBP Green */
    --accent-red: #b31942;    /* CBP Red */
    --text-main: #f0f4f8;
    --text-muted: #a0aec0;
    
    /* Glassmorphism settings */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #0d0d10;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Background ambient light effects (optional) */
body::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(11, 61, 145, 0.15) 0%, rgba(18, 20, 24, 0) 70%);
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(195, 146, 46, 0.1) 0%, rgba(18, 20, 24, 0) 70%);
    z-index: 0;
}

/* Login Container Layout */
.login-container {
    position: relative;
    z-index: 1; /* Keep above ambient lights */
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

/* Glassmorphism Box */
.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--glass-shadow);
    text-align: center;
    
    /* Animation */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUpIn 0.8s ease forwards;
}

/* Logo styling */
.logo-container {
    margin-bottom: 1.5rem;
}

.cbp-logo {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.cbp-logo:hover {
    transform: scale(1.05);
}

/* Typography */
.login-box h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Form Elements */
.input-group {
    text-align: left;
    margin-bottom: 1.2rem;
}

.input-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--accent-blue);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(11, 61, 145, 0.3);
}

.input-group input::placeholder {
    color: rgba(160, 174, 192, 0.4);
}

/* Options */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.remember {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
}

.remember input {
    margin-right: 0.5rem;
    accent-color: var(--accent-blue);
}

.forgot-password {
    color: var(--accent-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #fff;
    text-decoration: underline;
}

/* Submit Button */
.btn-login {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-blue) 0%, #1a56b8 100%);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(11, 61, 145, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 61, 145, 0.6);
}

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

/* Utility / Messages */
.message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

.message.hidden {
    display: none;
}

.message.error {
    background: rgba(179, 25, 66, 0.2);
    border: 1px solid var(--accent-red);
    color: #ff8a8a;
}

/* Animations */
@keyframes fadeUpIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =========================================
   DASHBOARD LAYOUT (Carolina PD Style)
   ========================================= */
.dashboard-wrapper { display: flex; width: 100vw; height: 100vh; overflow: hidden; background-color: #0d0d10; }
.sidebar { width: 280px; background: rgba(13, 15, 18, 0.95); border-right: 1px solid var(--glass-border); display: flex; flex-direction: column; padding: 2rem 1.5rem; z-index: 10; }
.sidebar-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.sidebar-header img { width: 45px; }
.sidebar-header h2 { font-size: 1.2rem; color: white; font-weight: 700; }
.nav-menu { display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.nav-item { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1rem; color: var(--text-muted); text-decoration: none; border-radius: 8px; transition: all 0.3s; font-weight: 500; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.nav-item.active { background: linear-gradient(90deg, rgba(11, 61, 145, 0.4) 0%, transparent 100%); color: white; border-left: 3px solid var(--accent-blue); }
.nav-item.restricted { color: var(--accent-green); }
.nav-item.restricted:hover, .nav-item.restricted.active { background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, transparent 100%); border-left-color: var(--accent-green); color: var(--accent-green); }
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; position: relative; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 3rem; background: rgba(18, 20, 24, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 1.5rem; color: white; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 2rem; }
.user-profile { display: flex; align-items: center; gap: 1rem; text-align: right; }
.user-profile .name { display: block; color: white; font-weight: 600; }
.user-profile .name { display: block; color: white; font-weight: 600; font-size: 1.2rem; }
.user-profile .role { display: block; font-size: 1rem; color: var(--accent-blue); text-transform: uppercase; letter-spacing: 1px; font-weight: bold; }
.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 1.6rem;
}
.content-pad { padding: 3rem; max-width: 1400px; margin: 0 auto; width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.stat-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 1.5rem; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--accent-blue); }
.stat-card.green::before { background: var(--accent-green); }
.stat-card.red::before { background: var(--accent-red); }
.stat-value { font-size: 2.5rem; font-weight: 800; color: white; margin-bottom: 0.5rem; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.data-panel { background: rgba(0,0,0,0.2); border: 1px solid var(--glass-border); border-radius: 12px; overflow: hidden; margin-bottom: 2rem; }
.panel-header { background: rgba(255,255,255,0.03); padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--glass-border); display: flex; justify-content: space-between; align-items: center; }
.panel-header h3 { color: white; font-size: 1.1rem; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 1rem 1.5rem; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.data-table th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; background: rgba(0,0,0,0.3); }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.badge { padding: 0.25rem 0.75rem; border-radius: 50px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge.active { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge.danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }



/* Remove old dashboard styles if they conflict */
body.dashboard-body { align-items: stretch; justify-content: flex-start; padding: 0; }
