:root {
    --primary-color: #0B1F2A; /* Dark Navy Left Sidebar */
    --primary-gradient: linear-gradient(135deg, #081B29 0%, #12344D 100%);
    --secondary-color: #0F3D45; /* Deep Teal Topbar */
    --accent-color: #14B8C4;  /* Teal active menu */
    --bg-color: #F5F8FC; /* Light gray */
    --text-color: #334155;
    --text-muted: #64748b;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-soft: 0 15px 40px rgba(0,0,0,0.08);
    --radius-lg: 16px;
    --radius-md: 12px;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Layout */
.wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Premium Sidebar */
.sidebar {
    width: 280px;
    background: var(--primary-gradient);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 100;
}

.sidebar.collapsed { width: 80px; }
.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .sidebar-header .sub-brand,
.sidebar.collapsed .nav-links li a span { display: none; }
.sidebar.collapsed .nav-links li a i { margin: 0 auto !important; }

.sidebar-header {
    height: 100px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-header i { font-size: 2.2rem; color: var(--accent-color); }
.sidebar-header h2 { font-size: 1.6rem; font-weight: 800; margin: 0; letter-spacing: 1px; color: var(--white); }

.nav-links {
    list-style: none; padding: 1.5rem 1rem; margin: 0;
    flex-grow: 1; overflow-y: auto;
}

.nav-links li { margin-bottom: 0.5rem; }

.nav-links li a {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.nav-links li a i { width: 35px; font-size: 1.25rem; transition: transform 0.3s ease; color: #94a3b8; }

.nav-links li a:hover {
    color: var(--accent-color);
    background-color: rgba(20, 184, 196, 0.15);
    transform: translateX(5px);
}
.nav-links li a:hover i {
    color: var(--accent-color);
}

.nav-links li.active a {
    background-color: var(--accent-color);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(20, 184, 196, 0.3);
}

.nav-links li.active a i {
    color: #ffffff;
}

/* Main Content & Header */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.topbar {
    height: 80px;
    min-height: 80px;
    background-color: var(--secondary-color);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    z-index: 10;
    color: white;
}

/* Topbar Premium Components */
.topbar-search {
    position: relative;
    width: 300px;
    margin-left: 20px;
}
.topbar-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    font-size: 0.9rem;
    transition: all 0.3s;
    color: white;
}
.topbar-search input::placeholder {
    color: rgba(255,255,255,0.6);
}
.topbar-search input:focus {
    background: rgba(255,255,255,1);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(20,184,196,0.3);
    outline: none;
    color: var(--text-color);
}
.topbar-search i {
    position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.6);
}

.topbar-actions {
    display: flex; align-items: center; gap: 1.5rem;
}
.action-btn {
    position: relative; color: rgba(255,255,255,0.8); font-size: 1.25rem; transition: 0.3s; cursor: pointer;
}
.action-btn:hover { color: var(--accent-color); }
.action-badge {
    position: absolute; top: -5px; right: -8px; background: #ef4444; color: white;
    font-size: 0.65rem; padding: 2px 5px; border-radius: 10px; font-weight: bold; border: 2px solid white;
}
.user-profile {
    display: flex; align-items: center; gap: 1rem; padding-left: 1rem; border-left: 1px solid rgba(255,255,255,0.2);
}
.user-avatar {
    width: 42px; height: 42px; border-radius: 50%; background: var(--primary-color);
    display: flex; align-items: center; justify-content: center; color: white; font-weight: bold;
    box-shadow: 0 4px 10px rgba(8, 27, 41, 0.2);
}

.content-area {
    padding: 2.5rem;
}

.breadcrumb-premium {
    font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-bottom: 2rem;
}
.breadcrumb-premium span { color: var(--primary-color); font-weight: 600; margin-left: 5px;}

/* Premium Dash Cards */
.theme-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: none;
    transition: transform 0.3s ease;
}

/* Stat Widgets */
.stat-widget {
    background: white; border-radius: var(--radius-lg); padding: 1.75rem; 
    box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
    color: white; border: none; z-index: 1;
}
.stat-widget::before {
    content: ''; position: absolute; right: -20px; top: -20px; width: 120px; height: 120px;
    background: rgba(255,255,255,0.15); border-radius: 50%; z-index: -1;
}
.stat-widget-blue { background: linear-gradient(135deg, #2563EB, #1d4ed8); }
.stat-widget-cyan { background: linear-gradient(135deg, #14B8C4, #0b9ea8); }
.stat-widget-green { background: linear-gradient(135deg, #10B981, #059669); }
.stat-widget-orange { background: linear-gradient(135deg, #F59E0B, #d97706); }

.stat-widget h6 { font-size: 0.95rem; font-weight: 500; opacity: 0.9; margin-bottom: 2rem; letter-spacing: 0.5px; }
.stat-widget h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.stat-widget i { font-size: 3.5rem; position: absolute; right: 20px; top: 30px; opacity: 0.3; }

.stat-progress {
    height: 6px; background: rgba(255,255,255,0.2); border-radius: 10px; margin-bottom: 0.5rem; width: 100%;
}
.stat-progress-bar { height: 100%; background: white; border-radius: 10px; }
.stat-trend { font-size: 0.85rem; font-weight: 500; opacity: 0.9; display: flex; justify-content: space-between;}

/* Grid Layout container */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.chart-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .dash-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-grid { grid-template-columns: 1fr; }
}

.table-premium th {
    background: #f8fafc; font-weight: 600; color: #475569; letter-spacing: 0.5px; 
    text-transform: uppercase; font-size: 0.75rem; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-color);
}
.table-premium td {
    padding: 1rem 1.5rem; vertical-align: middle; color: var(--text-color); font-size: 0.95rem; border-bottom: 1px solid var(--border-color);
}

/* Login Page Styles */
.login-page {
    height: 100vh;
    display: flex;
    margin: 0;
}

.login-container {
    display: flex;
    width: 100%;
}

.login-left {
    width: 60%;
    background: linear-gradient(135deg, rgba(12, 26, 46, 0.95), rgba(27, 54, 93, 0.85)), url('https://images.unsplash.com/photo-1598284534720-33ddab71aee0?auto=format&fit=crop&q=80') center/cover;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset -10px 0 20px rgba(0, 0, 0, 0.3);
}

.login-left .brand {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem;
}

.login-left h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5);
}

.tracking-wide {
    letter-spacing: 2px;
    color: var(--accent-color);
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.5);
}

.divider {
    height: 3px;
    width: 80px;
    background-color: var(--accent-color);
    margin: 20px auto;
    border-radius: 2px;
}

.login-left p {
    font-size: 1.2rem;
    font-weight: 300;
}

.login-right {
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card .input-group-text {
    background-color: transparent;
    border-right: none;
    color: var(--text-muted);
}

.login-card .form-control {
    border-left: none;
}

.login-card .form-control:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.login-card select {
    color: var(--text-muted);
}

.btn-login {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    padding: 0.6rem;
    font-weight: 600;
}

.btn-login:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.forgot-pwd {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
}