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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --light: #f3f4f6;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-light: #6b7280;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header {
    background: white;
    border-bottom: 2px solid var(--primary);
    padding: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 15px;
    padding: 0 20px;
    font-weight: 700;
}

nav {
    padding: 0 20px;
}

nav a {
    display: inline-block;
    margin-right: 20px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: var(--light);
    color: var(--primary);
}

nav a:active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

/* Main Content */
main {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Headings */
h2 {
    font-size: 24px;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 600;
}

h3 {
    font-size: 18px;
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Forms */
form {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text);
}

label:first-child {
    margin-top: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    color: var(--text);
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
button,
.btn,
a.btn {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    margin-top: 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
}

button:hover,
.btn:hover,
a.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

button:active,
.btn:active {
    transform: translateY(0);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

.table thead {
    background: var(--primary);
    color: white;
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.table tbody tr:hover {
    background: var(--light);
}

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

/* Flash Messages */
.flashes {
    list-style: none;
    margin-bottom: 20px;
}

.flash {
    padding: 14px 16px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash.success {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success);
    color: #065f46;
}

.flash.danger {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: var(--danger);
    color: #7f1d1d;
}

.flash.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: var(--warning);
    color: #78350f;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Utility Classes */
.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-center {
    text-align: center;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-light {
    color: var(--text-light);
}

/* Lists */
ul {
    margin-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 22px;
    }

    nav {
        overflow-x: auto;
    }

    nav a {
        margin-right: 12px;
        font-size: 13px;
    }

    main {
        padding: 15px 10px;
    }

    h2 {
        font-size: 20px;
    }

    form {
        padding: 15px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 10px;
    }

    button,
    .btn {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
}
