:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --secondary: #3b82f6;
    --dark: #1f2937;
    --light: #f3f4f6;
    --gray: #9ca3af;
    --danger: #ef4444;
    --success: #10b981;
    --white: #ffffff;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--light);
    color: var(--dark);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--white);
    height: 100vh;
    position: fixed;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.sidebar-menu {
    flex: 1;
    padding: 0 1rem;
    list-style: none;
}

.menu-item {
    margin-bottom: 0.5rem;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    gap: 0.75rem;
}

.menu-link i {
    width: 20px;
    text-align: center;
}

.menu-link:hover {
    background-color: #f9fafb;
    color: var(--primary);
}

.menu-link.active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 70px;
    background-color: var(--white);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.mobile-toggle {
    display: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--dark);
}

.content-body {
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: visible;
}

.table-container {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 500px;
}

table.table-compact {
    min-width: 0 !important;
}

th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

td {
    padding: 1.25rem 1.5rem;
    color: #334155;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

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

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background-color: #dcfce7; color: #15803d; }
.badge-warning { background-color: #fef9c3; color: #854d0e; }
.badge-danger { background-color: #fee2e2; color: #b91c1c; }
.badge-info { background-color: #e0f2fe; color: #0369a1; }

/* Action Buttons in Tables */
.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #64748b;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.action-btn:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.action-btn.btn-edit { color: var(--secondary); }
.action-btn.btn-delete { color: var(--danger); }

/* Forms & Buttons */
.form-group { 
    margin-bottom: 1.25rem; 
    position: relative;
    overflow: visible;
}
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; color: #374151; }
.form-input { 
    width: 100%; 
    padding: 0.75rem 1rem; 
    border: 1px solid #d1d5db; 
    border-radius: 10px; 
    outline: none; 
    transition: var(--transition);
    position: relative;
    z-index: 10;
}
.form-input:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    z-index: 100;
}
.form-input:focus-visible {
    position: relative;
    z-index: 100;
}
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.75rem 1.5rem; border-radius: 10px; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; text-decoration: none; gap: 0.5rem; }
.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-1px); }

/* Auth Pages */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
    padding: 1.5rem;
    flex-direction: column;
}

.auth-card {
    background: var(--white);
    padding: 3rem 2.5rem;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 440px;
}

.text-center { text-align: center; }
.text-gray-500 { color: #6b7280; }
.text-sm { font-size: 0.875rem; }

/* Responsive Dashboard */
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .sidebar { left: -280px; width: 280px; }
    .sidebar.active { left: 0; }
    .main-content { margin-left: 0; }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
    .sidebar-overlay.active { display: block; }
}
