
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5; --primary-hover: #4338ca;
    --sidebar-bg: #111827; --sidebar-hover: #1f2937; --sidebar-active: #374151;
    --bg-color: #f3f4f6; --card-bg: #ffffff;
    --text-main: #111827; --text-muted: #6b7280;
    --border-color: #e5e7eb; --radius: 8px;
    --danger: #ef4444; --success: #10b981; --warning: #f59e0b;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
body { background: var(--bg-color); color: var(--text-main); display: flex; height: 100vh; overflow: hidden; }

/* Login Page Styles */
.login-body { background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%); display: flex; justify-content: center; align-items: center; height: 100vh; flex-direction: column;}
.login-card { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2); width: 100%; max-width: 400px; text-align: center; }
.login-card h2 { margin-bottom: 25px; color: #111827; font-size: 24px; font-weight: 700; }
.login-card .form-group { text-align: left; margin-bottom: 20px; }
.login-card .form-group input { padding: 12px; font-size:15px; }
.login-card .btn { width: 100%; justify-content: center; padding: 12px; font-size: 16px; margin-top: 10px; border-radius: 8px;}
.login-logo { font-size: 45px; color: var(--primary); margin-bottom: 15px; }
.login-footer { margin-top: 20px; font-size: 13px; color: #e5e7eb; }

/* Sidebar */
.sidebar { width: 260px; background: var(--sidebar-bg); color: #fff; display: flex; flex-direction: column; overflow-y: auto; transition: 0.3s; flex-shrink: 0; z-index: 50;}
.sidebar-header { padding: 20px; font-size: 22px; font-weight: 700; text-align: center; border-bottom: 1px solid #374151; color: #fff;}
.sidebar a { display: flex; align-items: center; padding: 12px 20px; color: #9ca3af; text-decoration: none; font-size: 14px; font-weight: 500; transition: 0.2s; border-left: 4px solid transparent; }
.sidebar a i { margin-right: 12px; width: 20px; text-align: center; font-size: 16px; }
.sidebar a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar a.active { background: var(--sidebar-active); color: #fff; border-left: 4px solid var(--primary); }
.menu-label { padding: 15px 20px 5px; font-size: 11px; color: #6b7280; text-transform: uppercase; font-weight: 700; }

/* Main Content & Header */
.main-content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; background: var(--bg-color); position: relative; }
.topbar { background: var(--card-bg); padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 10;}
.topbar h3 { font-size: 18px; font-weight: 600; margin: 0;}
.user-profile { display: flex; align-items: center; gap: 15px; font-size: 14px; font-weight: 500; }
.logout-btn { color: var(--danger); text-decoration: none; font-weight: 600; padding: 6px 12px; border-radius: var(--radius); background:#fee2e2; transition: 0.2s; display: flex; align-items: center; gap: 5px;}
.logout-btn:hover { background: #fca5a5; color: #fff;}

/* Content */
.content { padding: 30px; max-width: 1200px; width: 100%; margin: 0 auto; }
.card { background: var(--card-bg); padding: 25px; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid var(--border-color); margin-bottom: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }

/* Buttons */
.btn { padding: 8px 16px; background: var(--primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600; transition: 0.2s; display: inline-flex; align-items: center; gap: 8px; }
.btn:hover { background: var(--primary-hover); }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-danger { background: var(--danger); } .btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; } .btn-warning:hover { background: #d97706; }
.btn-outline { background: transparent; border: 1px solid #d1d5db; color: #374151; } .btn-outline:hover { background: #f3f4f6; }

/* Dashboard Cards */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 25px;}
.dash-card { background: #fff; padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 2px rgba(0,0,0,0.05);}
.dash-card h4 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 5px;}
.dash-card h2 { font-size: 24px; color: var(--text-main); font-weight: 700;}
.dash-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* Data Tables */
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table th, table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color); font-size: 14px; }
table th { background: #f9fafb; font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 12px; }
table tr:hover { background: #f9fafb; }
.actions { display: flex; gap: 8px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.full-width { grid-column: span 2; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; outline: none; transition: 0.2s;}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

/* Right Slide Drawer Styling */
.drawer-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.5); z-index: 999; backdrop-filter: blur(2px);
    opacity: 0; transition: opacity 0.3s ease;
}
.drawer-overlay.show { display: block; opacity: 1; }

.drawer {
    position: fixed; top: 0; right: -480px; width: 450px; max-width: 100%; height: 100vh;
    background: #fff; z-index: 1000; box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    display: flex; flex-direction: column; transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.drawer.open { right: 0; }

.drawer-header {
    padding: 20px; border-bottom: 1px solid var(--border-color); display: flex;
    justify-content: space-between; align-items: center; background: #f9fafb;
}
.drawer-header h3 { font-size: 18px; margin: 0; color: var(--text-main); font-weight: 700; }
.close-drawer { font-size: 26px; cursor: pointer; color: #9ca3af; line-height: 1; transition: 0.2s; }
.close-drawer:hover { color: var(--danger); }

.drawer-body { padding: 25px; flex: 1; overflow-y: auto; }

.drawer-footer {
    padding: 15px 25px; border-top: 1px solid var(--border-color);
    display: flex; justify-content: flex-end; gap: 12px; background: #f9fafb;
}
