:root {
    --brand-dark:         #0d1117;
    --brand-purple:       #6c6ef5;
    --brand-purple-hover: #5a5ce8;
    --body-bg:            #f5f5f5;
    --text-dark:          #111827;
    --text-muted:         #6b7280;
    --border:             #e5e7eb;
}

* { box-sizing: border-box; }

body { font-family: sans-serif; margin: 0; background: var(--body-bg); }

/* ── Nav ──────────────────────────────────────────────────────────────────── */

nav {
    background: var(--brand-dark);
    color: white;
    padding: 0.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-wordmark img { display: block; height: 60px; width: auto; }

.nav-right { display: flex; align-items: center; gap: 1rem; }

nav a { color: white; text-decoration: none; }
nav a:hover { opacity: 0.85; }

.cart-btn {
    background: white;
    color: var(--brand-purple);
    border: none;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.cart-btn:hover { background: #ece9fd; opacity: 1; color: var(--brand-purple); }

.login-btn {
    background: var(--brand-purple);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}
.login-btn:hover { background: var(--brand-purple-hover); opacity: 1; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; font-size: 0.875rem; color: white; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary::after { content: " ▾"; }
.user-menu-dropdown {
    position: absolute; right: 0; top: 100%;
    margin-top: 0.4rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 100;
    overflow: hidden;
}
.user-menu-dropdown a { display: block; padding: 0.6rem 1rem; color: var(--text-dark); font-size: 0.875rem; text-decoration: none; }
.user-menu-dropdown a:hover { background: #f3f4f6; opacity: 1; }
.user-menu-dropdown hr { margin: 0; border: none; border-top: 1px solid var(--border); }

.nav-badge { font-size: 0.75rem; color: #9ca3af; }
.nav-link-muted { color: #9ca3af !important; font-size: 0.875rem; }
.nav-link-muted:hover { color: white !important; opacity: 1; }

/* ── Layout ───────────────────────────────────────────────────────────────── */

main { padding: 2rem; max-width: 1100px; margin: 0 auto; }

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

.btn {
    background: var(--brand-purple);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
}
.btn:hover { background: var(--brand-purple-hover); }

.btn-danger { background: #dc2626; color: white; border: none; padding: 0.5rem 1rem; border-radius: 4px; cursor: pointer; font-size: 0.875rem; }
.btn-danger:hover { background: #b91c1c; }
.btn-danger:disabled { background: #9ca3af; cursor: not-allowed; }

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

.card { background: white; padding: 1.5rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.card h2 { margin-top: 0; font-size: 1.1rem; color: var(--text-dark); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }

/* ── Alerts ───────────────────────────────────────────────────────────────── */

.alert-success { background: #dcfce7; color: #15803d; padding: 0.6rem 0.9rem; border-radius: 4px; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-error   { background: #fee2e2; color: #b91c1c;  padding: 0.6rem 0.9rem; border-radius: 4px; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-warn    { background: #fef9c3; color: #713f12;  padding: 0.6rem 0.9rem; border-radius: 4px; font-size: 0.875rem; margin-bottom: 1rem; }

/* ── Forms ────────────────────────────────────────────────────────────────── */

label { display: block; font-size: 0.875rem; font-weight: 600; color: #374151; margin-bottom: 0.25rem; margin-top: 1rem; }

input[type=text],
input[type=number],
input[type=email],
input[type=password],
textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.875rem;
}
textarea { resize: vertical; }
