:root {
    --honey:   #f5a623;
    --amber:   #d4870a;
    --dark:    #1a1a1a;
    --cream:   #fffdf5;
    --light:   #fff8e7;
    --border:  #e8d5a3;
    --text:    #333333;
    --muted:   #777777;
    --danger:  #c0392b;
    --success: #27ae60;
    --info:    #2980b9;
    --radius:  8px;
    --shadow:  0 2px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
}

/* ─── NAV ─────────────────────────────────────────────── */
nav {
    background: var(--dark);
    color: #fff;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

nav .brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--honey);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav .brand span { font-size: 1.5rem; }

nav ul {
    list-style: none;
    display: flex;
    gap: 0.25rem;
}

nav ul li a {
    color: #ccc;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
}

nav ul li a:hover, nav ul li a.active {
    background: var(--honey);
    color: var(--dark);
}

nav .nav-user {
    font-size: 0.85rem;
    color: #aaa;
}

/* ─── LAYOUT ──────────────────────────────────────────── */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.page-header {
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
}

.page-header h1 {
    font-size: 1.6rem;
    color: var(--dark);
}

.page-header p { color: var(--muted); margin-top: 0.25rem; }

/* ─── CARDS ───────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
}

.stat-sub { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

@media (max-width: 700px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* ─── FORMS ───────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #444;
}

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=tel], select, textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--honey);
    box-shadow: 0 0 0 3px rgba(245,166,35,0.2);
}

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

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--honey); color: var(--dark); }
.btn-dark      { background: var(--dark);  color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-outline   { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-sm        { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-block     { width: 100%; justify-content: center; padding: 0.75rem; font-size: 1rem; }

/* ─── ALERTS ──────────────────────────────────────────── */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* ─── TABLES ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

thead th {
    background: var(--light);
    color: var(--dark);
    font-weight: 600;
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--light); }

/* ─── BADGES ──────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-warning  { background: #fff3cd; color: #856404; }
.badge-info     { background: #d1ecf1; color: #0c5460; }
.badge-primary  { background: #cce5ff; color: #004085; }
.badge-success  { background: #d4edda; color: #155724; }
.badge-danger   { background: #f8d7da; color: #721c24; }
.badge-secondary{ background: #e2e3e5; color: #383d41; }
.badge-byflugur { background: #fff3cd; color: #856404; }
.badge-drottning{ background: #f3d4f1; color: #5a1a58; }

/* ─── LOGIN / REGISTER ────────────────────────────────── */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    padding: 2rem;
}

.auth-box {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo .bee { font-size: 3rem; }

.auth-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: 0.5rem;
}

.auth-logo p { color: var(--muted); font-size: 0.875rem; }

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.auth-footer a { color: var(--amber); text-decoration: none; font-weight: 600; }

/* ─── PRODUCT CARDS ───────────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: #fff;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    border-color: var(--honey);
    box-shadow: 0 4px 16px rgba(245,166,35,0.2);
}

.product-card .product-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.product-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }

.product-card .price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--amber);
    margin: 0.5rem 0;
}

.product-card p { font-size: 0.875rem; color: var(--muted); }

.qty-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.qty-row input[type=number] {
    width: 70px;
    text-align: center;
}

/* ─── ORDER SUMMARY ───────────────────────────────────── */
.order-summary {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.order-summary h3 { margin-bottom: 0.75rem; }

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    border-bottom: 1px dashed var(--border);
}

.summary-row:last-child { border-bottom: none; }

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--dark);
}

/* ─── MISC ────────────────────────────────────────────── */
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.empty   { text-align: center; padding: 3rem; color: var(--muted); }
.empty .icon { font-size: 3rem; margin-bottom: 0.5rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); font-size: 0.875rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ─── ADMIN SIDEBAR LAYOUT ────────────────────────────── */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 60px);
}

.sidebar {
    background: #222;
    padding: 1.5rem 0;
}

.sidebar-section {
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #666;
    margin-top: 1rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    color: #bbb;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar a:hover, .sidebar a.active {
    background: rgba(245,166,35,0.15);
    color: var(--honey);
}

.sidebar a .icon { font-size: 1rem; width: 20px; }

.admin-content { padding: 2rem; overflow-y: auto; }

@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.75rem; }
    .sidebar a { padding: 0.4rem 0.75rem; border-radius: var(--radius); }
    .sidebar-section { display: none; }
}

/* ─── MODAL ───────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal h2 { margin-bottom: 1.25rem; }

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}
