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

:root {
    --bg-color: #f7f9fc;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    --sidebar-text: #e2e8f0;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --accent-color: #0f172a;
    --accent-hover: #334155;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --success: #059669;
    --success-bg: #d1fae5;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --user-bg: #e0e7ff;
    --user-color: #4f46e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    padding: 1.5rem 1rem;
    z-index: 100;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.sidebar h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.nav-item {
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}

.nav-item.active {
    background: var(--sidebar-hover);
    color: #ffffff;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2.5rem 3rem;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary { 
    background: var(--accent-color); 
    color: #ffffff; 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-outline { 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    color: var(--text-primary); 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

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

.stat-card.glass {
    /* Removed glassmorphism, replaced with clean cards */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card h3 { 
    font-size: 0.875rem; 
    color: var(--text-secondary); 
    font-weight: 500;
    margin-bottom: 0.5rem; 
}

.stat-card .value { 
    font-size: 1.75rem; 
    font-weight: 700; 
    color: var(--text-primary);
}

/* Table Section */
.table-container.glass {
    /* Removed glassmorphism, replaced with clean container */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

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

th { 
    text-align: left; 
    color: var(--text-secondary); 
    font-size: 0.75rem; 
    font-weight: 600;
    padding: 0.75rem 1.5rem; 
    border-bottom: 1px solid var(--border-color); 
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #f8fafc;
}

td { 
    padding: 1rem 1.5rem; 
    border-bottom: 1px solid var(--border-color); 
    font-size: 0.875rem; 
    color: var(--text-primary);
    vertical-align: middle;
}

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

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

/* Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-active { background: var(--success-bg); color: var(--success); }
.status-inactive { background: var(--danger-bg); color: var(--danger); }
.status-admin { background: var(--warning-bg); color: var(--warning); }
.status-user { background: var(--user-bg); color: var(--user-color); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.modal-overlay.show {
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 500px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2rem;
    transform: translateY(10px) scale(0.98);
    transition: all 0.2s ease-out;
    border: 1px solid var(--border-color);
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

.modal h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.form-group { margin-bottom: 1rem; }
.form-group label { 
    display: block; 
    margin-bottom: 0.35rem; 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
    font-weight: 500;
}

.form-group input { 
    width: 100%; 
    padding: 0.6rem 0.75rem; 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    color: var(--text-primary); 
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) inset;
}

.form-group input:focus {
    outline: none;
    border-color: #cbd5e1;
    box-shadow: 0 0 0 3px rgba(226, 232, 240, 0.5);
}
