
:root {
    /* Inheriting Brand Colors */
    --primary: #2E3192; 
    --primary-light: #4facfe;
    --accent-pink: #ff9a9e;
    --accent-violet: #a18cd1;
    --gradient-nav: linear-gradient(180deg, #2E3192 0%, #1a237e 100%);
    
    /* Admin Specific Colors */
    --bg-body: #f3f4f7;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #8898aa;
    --border-color: #e9ecef;
    --success: #2dce89;
    --danger: #f5365c;
    --warning: #fb6340;
    
    --sidebar-width: 250px;
    --header-height: 70px;
    --shadow-card: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-nav);
    color: #fff;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    transition: width 0.3s ease;
    display: flex;
    flex-direction: column;
}

.brand-logo {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    background: rgba(0,0,0,0.1);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-logo i { margin-right: 10px; color: var(--accent-pink); }

.nav-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
    border-left: 4px solid var(--accent-pink);
}

.nav-link i {
    width: 25px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    background: rgba(245, 54, 92, 0.1);
    color: var(--accent-pink);
    border: 1px solid rgba(245, 54, 92, 0.3);
    border-radius: 5px;
    text-decoration: none;
    transition: 0.3s;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* --- HEADER --- */
.top-header {
    height: var(--header-height);
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.header-left h2 {
    font-size: 1.4rem;
    color: var(--primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-violet);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* --- DASHBOARD CARDS --- */
.page-content {
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-5px); }

.stat-info h5 {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.stat-info h2 {
    font-size: 1.8rem;
    color: var(--text-main);
    font-weight: 700;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-blue { background: rgba(46, 49, 146, 0.1); color: var(--primary); }
.icon-pink { background: rgba(255, 154, 158, 0.1); color: var(--accent-pink); }
.icon-green { background: rgba(45, 206, 137, 0.1); color: var(--success); }
.icon-orange { background: rgba(251, 99, 64, 0.1); color: var(--warning); }

.trend-indicator {
    margin-top: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* --- FORMS & EDITOR --- */
.card-wrapper {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 30px;
    margin-bottom: 30px;
}

.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-main); }
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
}
.form-control:focus { outline: none; border-color: var(--primary-light); }

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}
.btn-primary:hover { background: #1a237e; box-shadow: 0 4px 10px rgba(46, 49, 146, 0.3); }

/* --- LOGIN PAGE --- */
.login-body {
    background: linear-gradient(135deg, #fdfbf7 0%, #fff0f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}
.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border-top: 5px solid var(--primary);
}

@media (max-width: 992px) {
    .sidebar { width: 0; overflow: hidden; }
    .main-content { margin-left: 0; }
    .sidebar.active { width: 250px; }
}