/* ===== AGRIVAAN ADMIN - MAIN CSS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --bg-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-sidebar: #0d0d0d;
    --text-light: #e5e5e5;
    --text-gray: #9ca3af;
    --border-color: #2a2a2a;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 24px;
    color: white;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-gray);
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.input-group input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.login-hint {
    text-align: center;
    margin-top: 15px;
    color: var(--text-gray);
    font-size: 12px;
}

/* Dashboard Layout */
#dashboardContent {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-header {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
}

.sidebar-header h3 {
    color: white;
    font-size: 20px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 15px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 5px;
    transition: all 0.2s;
}

.nav-item i {
    width: 20px;
}

.nav-item:hover {
    background: rgba(16, 185, 129, 0.1);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 25px 30px;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-left h1 {
    font-size: 28px;
    color: white;
    margin-bottom: 5px;
}

.header-left p {
    color: var(--text-gray);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 40px;
    border: 1px solid var(--border-color);
}

.admin-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.blue { background: #3b82f620; color: #3b82f6; }
.stat-icon.green { background: #10b98120; color: #10b981; }
.stat-icon.red { background: #ef444420; color: #ef4444; }
.stat-icon.purple { background: #8b5cf620; color: #8b5cf6; }
.stat-icon.orange { background: #f59e0b20; color: #f59e0b; }
.stat-icon.cyan { background: #06b6d420; color: #06b6d4; }

.stat-info h3 {
    font-size: 28px;
    color: white;
    margin-bottom: 3px;
}

.stat-info p {
    color: var(--text-gray);
    font-size: 13px;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.action-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.chart-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.chart-card h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

/* Info Row */
.info-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.recent-card, .events-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.recent-card h3, .events-card h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 18px;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 10px;
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-color);
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.employee-cell img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active { background: #10b98120; color: #10b981; }
.status-badge.inactive { background: #ef444420; color: #ef4444; }
.status-badge.onLeave { background: #f59e0b20; color: #f59e0b; }

.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 10px;
}

/* Department Stats */
.dept-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.dept-stat-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.dept-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.dept-info h4 {
    color: white;
    margin-bottom: 5px;
}

.dept-count {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.dept-active {
    color: var(--text-gray);
    font-size: 12px;
}

.text-center { text-align: center; }

/* Responsive */
@media (max-width: 1400px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .sidebar { width: 80px; }
    .sidebar-header h3, .nav-item span, .btn-logout span { display: none; }
    .nav-item { justify-content: center; }
    .charts-row, .info-row { grid-template-columns: 1fr; }
    .dept-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    #dashboardContent { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
}