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

body {
    font-family: system-ui, sans-serif;
    background: #f5f5f5;
    color: #222;
    min-height: 100vh;
}

/* ─── Nav ─────────────────────────────────────────────── */
nav {
    background: #1a1a2e;
    color: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand { color: white; text-decoration: none; font-size: 1.2rem; font-weight: bold; }
.nav-links { display: flex; gap: 1.2rem; align-items: center; }
.nav-links a { color: #ccc; text-decoration: none; }
.nav-links a:hover { color: white; }
.nav-user { color: #aaa; font-size: 0.9rem; }

/* ─── Main ────────────────────────────────────────────── */
main { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; }
h1 { margin-bottom: 1.5rem; }
h2 { margin: 1.5rem 0 1rem; }

/* ─── Alerts ──────────────────────────────────────────── */
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }

/* ─── Forms ───────────────────────────────────────────── */
.form-container { max-width: 400px; background: white; padding: 2rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; margin-top: 1rem; }
input[type=text], input[type=password], input[type=number] {
    width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #ddd;
    border-radius: 6px; font-size: 1rem;
}
button[type=submit], .btn {
    display: inline-block; margin-top: 1.2rem; padding: 0.6rem 1.4rem;
    background: #1a1a2e; color: white; border: none; border-radius: 6px;
    font-size: 1rem; cursor: pointer; text-decoration: none;
}
button[type=submit]:hover, .btn:hover { background: #2d2d50; }
.btn-danger { background: #dc2626; color: white; border: none; border-radius: 4px; padding: 0.3rem 0.7rem; cursor: pointer; }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: #16a34a; color: white; border: none; border-radius: 6px; padding: 0.7rem 1.5rem; font-size: 1rem; cursor: pointer; margin-top: 1rem; }
.btn-success:hover { background: #15803d; }

/* ─── Product Grid ────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.product-card {
    background: white; border-radius: 10px; padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.product-card h3 { margin-bottom: 0.5rem; }
.product-card p { color: #555; margin-bottom: 0.4rem; font-size: 0.95rem; }
.price { font-size: 1.2rem; font-weight: bold; color: #1a1a2e !important; }
.stock { font-size: 0.85rem; color: #888 !important; }
.product-card input[type=number] { width: 70px; margin-right: 0.5rem; }
.product-card button { margin-top: 0.8rem; }

/* ─── Tables ──────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #eee; }
th { background: #1a1a2e; color: white; font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* ─── Orders ──────────────────────────────────────────── */
.order-card { background: white; border-radius: 10px; padding: 1.5rem; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.order-card h3 { margin-bottom: 0.75rem; }
.order-card ul { padding-left: 1.2rem; margin-bottom: 0.75rem; }
.order-card li { margin-bottom: 0.3rem; color: #555; }
.date { font-size: 0.85rem; color: #888; font-weight: normal; margin-left: 0.5rem; }
.total { margin-top: 1rem; font-size: 1.1rem; }

.product-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.product-card-top h3 { margin: 0; }
.fav-btn { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: #ccc; padding: 0; line-height: 1; }
.fav-btn:hover { color: #e53; }
.fav-active { color: #e53 !important; }
.btn-edit { display: inline-block; padding: 4px 10px; background: var(--color-info, #2563eb); color: white; border-radius: 6px; font-size: 12px; text-decoration: none; }
.btn-edit:hover { opacity: 0.85; }
