:root {
    --primary: #1a73e8;
    --primary-dark: #174ea6;
    --primary-light: #e8f0fe;
    --secondary: #4285f4;
    --secondary-dark: #1967d2;
    --secondary-light: #f1f3f4;
    --bg-light: #f8f9fa;
    --text: #202124;
    --text-muted: #5f6368;
    --border: #dadce0;
    --glass: rgba(255, 255, 255, 0.95);
    --glass-border: #dadce0;
    --white: #ffffff;
    --success: #1e8e3e;
    --danger: #d93025;
    --warning: #f9ab00;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
    --shadow: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    --shadow-md: 0 4px 4px 0 rgba(60,64,67,0.30), 0 8px 12px 6px rgba(60,64,67,0.15);
    --radius: 1.5rem;
    --radius-sm: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lexend', 'Google Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Material Components */
.glass-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    box-shadow: var(--shadow);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--primary-light);
    color: var(--primary);
}

/* Header & Navigation */
header {
    background: var(--white);
    color: var(--text);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

nav.horizontal-nav {
    display: flex;
    gap: 0.5rem;
    background: var(--secondary-light);
    padding: 0.25rem;
    border-radius: 2rem;
}

nav.horizontal-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    border-radius: 2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav.horizontal-nav a:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

nav.horizontal-nav a.active {
    color: var(--primary-dark);
    background: var(--primary-light);
    font-weight: 600;
}

.content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Buttons (Material 3 Style) */
.btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-family: 'Lexend', sans-serif;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-light);
    color: var(--text);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--border);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-family: 'Lexend', sans-serif;
    outline: none;
    transition: all 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInDown 0.4s ease-out;
}

.alert-success { background: #e6f4ea; color: #137333; border: 1px solid #ceead6; }
.alert-danger { background: #fce8e6; color: #c5221f; border: 1px solid #fad2cf; }
.alert-warning { background: #fef7e0; color: #ea8600; border: 1px solid #feefc3; }

@keyframes slideInDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 33, 36, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--white);
    border-radius: 1.75rem;
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-md);
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-body {
    padding: 0.5rem 1.5rem 1.5rem;
    color: var(--text-muted);
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Tables */
.table-container {
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.sticky-table thead th {
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.sticky-table tbody tr {
    transition: background 0.2s;
}

.sticky-table tbody tr:hover {
    background: #f1f3f4;
}

.sticky-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Toast */
#toast-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9999;
}

.toast {
    background: #323336;
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    margin-top: 0.75rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
