/* ── Reset & Base ─────────────────────────────────────────────────────────── */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f5f6f8;
    color: #1a1a2e;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Main Content ────────────────────────────────────────────────────────── */

.main-content {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ── Flash Messages ──────────────────────────────────────────────────────── */

.flash-messages {
    margin-bottom: 24px;
}

.flash {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 8px;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ── Login ────────────────────────────────────────────────────────────────── */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px);
    padding: 24px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.login-subtitle {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a2e;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.btn-login {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
    margin-top: 4px;
}

.btn-login:hover {
    background: #2d2d4a;
}

/* ── Dashboard List ──────────────────────────────────────────────────────── */

.dashboard-list-wrapper {
    padding-top: 8px;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.dashboard-card:hover {
    border-color: #4f46e5;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.dashboard-card-icon {
    width: 56px;
    height: 56px;
    background: #f0f0ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
}

.dashboard-card-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a2e;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 64px 24px;
    color: #6b7280;
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 13px;
    color: #9ca3af;
}

/* ── Error Page ──────────────────────────────────────────────────────────── */

.error-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 24px;
}

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

.error-code {
    font-size: 72px;
    font-weight: 700;
    color: #d1d5db;
    line-height: 1;
    margin-bottom: 12px;
}

.error-message {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 32px;
}

.btn-back {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.btn-back:hover {
    background: #2d2d4a;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
