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

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

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

a {
    color: #4361ee;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Navbar ──────────────────────────────────────────────── */

.navbar {
    background: #1a1a2e;
    color: #fff;
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-brand a {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #c4c4d4;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
    text-decoration: none;
}

/* ── Container ───────────────────────────────────────────── */

.container {
    max-width: 800px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 1rem;
    flex: 1;
}

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #4361ee;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #3a56d4;
    text-decoration: none;
}

.btn-secondary {
    background: #e8e8f0;
    color: #1a1a2e;
}

.btn-secondary:hover:not(:disabled) {
    background: #d4d4e0;
    text-decoration: none;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-full {
    width: 100%;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome {
    font-size: 1.2rem;
    color: #2ecc71;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ── Feature Cards ───────────────────────────────────────── */

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
}

/* ── Auth Card ───────────────────────────────────────────── */

.auth-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    max-width: 420px;
    margin: 2rem auto;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-desc {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-alt {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* ── Form ────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #4361ee;
}

/* ── Message ─────────────────────────────────────────────── */

.message {
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.dashboard h2 {
    margin-bottom: 1.5rem;
}

.user-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 64px;
    height: 64px;
    background: #4361ee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.user-details h3 {
    font-size: 1.2rem;
}

.user-meta {
    color: #888;
    font-size: 0.9rem;
}

.info-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.info-card h3 {
    margin-bottom: 0.5rem;
}

.info-card p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

.logout-form {
    margin-top: 2rem;
}

/* ── Footer ──────────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 1.5rem;
    color: #999;
    font-size: 0.8rem;
}

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

@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .navbar {
        padding: 0 1rem;
    }
    .container {
        margin: 1rem auto;
    }
    .auth-card {
        padding: 1.5rem;
    }
}
