:root {
    --primary-color: #042047;
    --primary-light: #0a3161;
    --accent-color: #e67e22;
    --accent-gold: #d4af37;
    --text-light: #ffffff;
    --text-dark: #2c3e50;
    --bg-light: #f4f6f9;
    --bg-dark: #02132b;
    --sidebar-width: 260px;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* -------------------------------------
 * Login Page
 * ------------------------------------- */
.login-body {
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-color));
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: var(--accent-gold);
}

.login-logo {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 2rem;
}

.login-logo span {
    color: var(--accent-gold);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-gold), #b8962c);
    color: var(--text-dark);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

#loginError {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 10px;
    display: none;
}

/* -------------------------------------
 * Dashboard Layout
 * ------------------------------------- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.sidebar-header {
    padding: 20px;
    background-color: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    text-align: center;
}

.sidebar-header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
}
.sidebar-header .logo span {
    color: var(--accent-gold);
}

.sidebar-user {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-user img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    margin-bottom: 10px;
}

.sidebar-user .user-role {
    font-size: 0.8rem;
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}

.sidebar-nav {
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1rem;
}

.sidebar-nav li a i {
    width: 24px;
    margin-right: 15px;
    font-size: 1.1rem;
}

.sidebar-nav li a:hover, .sidebar-nav li.active a {
    background-color: var(--primary-light);
    color: var(--accent-gold);
    border-left: 4px solid var(--accent-gold);
}

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

.sidebar-footer a {
    display: flex;
    align-items: center;
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-footer a:hover {
    color: var(--danger);
}

.sidebar-footer a i {
    margin-right: 10px;
}

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

.topbar {
    height: 70px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.topbar-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.topbar-actions .icon-btn {
    position: relative;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.topbar-actions .icon-btn:hover {
    color: var(--primary-color);
}

.topbar-actions .badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 700;
}

.dashboard-content {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    transition: transform 0.2s;
    border-left: 4px solid var(--accent-gold);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    margin-right: 20px;
}

.stat-info h3 {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-info .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-info .trend {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
}
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }

/* Tables and Panels */
.panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 30px;
    overflow: hidden;
}

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.panel-body {
    padding: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

table th {
    background-color: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 0.9rem;
}

table td {
    color: var(--text-dark);
    font-size: 0.95rem;
}

table tr:hover {
    background-color: #f8fafc;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.status-info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

.action-btn {
    padding: 5px 10px;
    background: var(--bg-light);
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}
.action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Shared Notification Dropdown and Item Styles */
.notification-item-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #334155;
    transition: background 0.2s;
    font-size: 0.85rem;
    cursor: pointer;
}
.notification-item-link:hover {
    background: #f8fafc;
}
.notification-item-link i {
    margin-right: 12px;
    font-size: 1.1rem;
}
.notification-item-link .details {
    flex-grow: 1;
}
.notification-item-link .time {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 2px;
}
