/* assets/style.css */

/* 1. Global Reset & Variables */
:root {
    --primary: #2563eb;       /* Modern Blue */
    --primary-dark: #1e40af;
    --secondary: #64748b;     /* Slate Gray */
    --success: #10b981;       /* Emerald Green */
    --danger: #ef4444;        /* Red */
    --background: #f1f5f9;    /* Light Blue-Gray BG */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

a { text-decoration: none; color: var(--primary); transition: 0.2s; }
a:hover { color: var(--primary-dark); }

/* 2. Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* 3. Navigation Bar */
.navbar {
    background: #1e293b; /* Dark Navy */
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar h2 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.navbar a.logout {
    background: rgba(255,255,255,0.1);
    padding: 8px 16px;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}
.navbar a.logout:hover { background: var(--danger); }

/* 4. Form Elements */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
    background: #f8fafc;
    transition: border-color 0.2s;
    margin-bottom: 10px;
    display: block;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
    margin-top: 10px;
}

button, .btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.1s, opacity 0.2s;
    text-align: center;
}

button:hover, .btn:hover { opacity: 0.9; transform: translateY(-1px); }
button:active { transform: translateY(0); }

.btn-danger { background-color: var(--danger); }
.btn-success { background-color: var(--success); }
.btn-secondary { background-color: var(--secondary); }

/* 5. Tables */
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background-color: #f8fafc; font-weight: 600; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover { background-color: #f1f5f9; }

/* 6. Utility Classes */
.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.alert { padding: 12px; border-radius: 6px; margin-bottom: 15px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* 7. Responsive adjustments */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; gap: 10px; text-align: center; }
}