/* ── Reset & tokens ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* ── Campingpark Oase palette ── */
    --yellow:          #F5A800;
    --yellow-dark:     #D48A00;
    --yellow-light:    #FFF3CC;
    --yellow-pale:     #FFFBEE;

    --green:           #2D6A4F;
    --green-dark:      #1B4332;
    --green-mid:       #40916C;
    --green-light:     #D8F3DC;
    --green-pale:      #F0FAF3;

    /* ── Role aliases ── */
    --primary:         var(--green);
    --primary-dark:    var(--green-dark);
    --primary-light:   var(--green-light);
    --primary-pale:    var(--green-pale);
    --accent:          var(--yellow);
    --accent-dark:     var(--yellow-dark);
    --accent-light:    var(--yellow-light);

    --success:         #40916C;
    --danger:          #C0392B;
    --danger-light:    #FDECEA;
    --warning:         #F5A800;
    --info:            #2D6A4F;

    /* ── Surfaces (warm-toned) ── */
    --bg:              #F5F2EA;
    --surface:         #FFFFFF;
    --surface-2:       #EFEBE0;
    --surface-3:       #E8E3D6;

    /* ── Borders & text ── */
    --border:          #DDD6C5;
    --border-dark:     #C8BFA8;
    --text:            #1E1A10;
    --text-muted:      #6B6147;
    --text-light:      #9C9278;

    /* ── Layout ── */
    --sidebar-w:       256px;
    --topbar-h:        64px;
    --radius-xs:       4px;
    --radius-sm:       8px;
    --radius:          12px;
    --radius-lg:       18px;
    --radius-xl:       24px;

    /* ── Shadows ── */
    --shadow-xs:  0 1px 2px rgba(30,26,16,.06);
    --shadow-sm:  0 1px 4px rgba(30,26,16,.08), 0 1px 2px rgba(30,26,16,.05);
    --shadow:     0 4px 12px rgba(30,26,16,.10), 0 1px 3px rgba(30,26,16,.07);
    --shadow-md:  0 8px 20px rgba(30,26,16,.12), 0 2px 6px rgba(30,26,16,.07);
    --shadow-lg:  0 16px 40px rgba(30,26,16,.16), 0 4px 12px rgba(30,26,16,.09);

    --transition: .18s ease;
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
}

body { background: var(--bg); color: var(--text); line-height: 1.55; min-height: 100vh; }

svg  { fill: none; stroke: currentColor; stroke-width: 1.8;
       stroke-linecap: round; stroke-linejoin: round;
       width: 18px; height: 18px; flex-shrink: 0; }

a    { text-decoration: none; color: inherit; }
input, select, button, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }

/* ── Utilities ──────────────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ════════════════════════════════════════════════════════════════════════
   LOGIN
════════════════════════════════════════════════════════════════════════ */
.login-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    background: linear-gradient(160deg, var(--green-dark) 0%, var(--green) 55%, var(--green-mid) 100%);
}

/* Decorative nature circles */
.login-overlay::before,
.login-overlay::after {
    content: ''; position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.05); pointer-events: none;
}
.login-overlay::before { width: 500px; height: 500px; top: -120px; right: -80px; }
.login-overlay::after  { width: 320px; height: 320px; bottom: -80px; left: -60px; }

.login-card {
    position: relative; z-index: 1;
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2.75rem 2.25rem 2.25rem;
    width: 100%; max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideUp .38s cubic-bezier(.22,.68,0,1.2);
}

.login-logo {
    display: flex; justify-content: center;
    margin-bottom: 1.25rem;
}
.login-logo img {
    height: 80px; width: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.15));
}

.login-divider {
    display: flex; align-items: center; gap: .75rem;
    margin: 1rem 0 1.5rem;
    color: var(--text-light); font-size: .8125rem;
}
.login-divider::before,
.login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.login-title    { text-align: center; font-size: 1.3rem; font-weight: 800; color: var(--text); margin-bottom: .2rem; }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: .875rem; margin-bottom: 1.5rem; }

/* ════════════════════════════════════════════════════════════════════════
   FORMS
════════════════════════════════════════════════════════════════════════ */
.form-group  { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1rem; }
.form-label  {
    font-size: .8rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .05em;
}
.form-input {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .625rem .9rem;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    outline: none; width: 100%; background: var(--surface); color: var(--text);
}
.form-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(45,106,79,.15);
}
.form-input.changed {
    border-color: var(--success);
    background: var(--green-pale);
}
.form-input.error  { border-color: var(--danger); }

.form-select {
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: .5rem .9rem; outline: none; background: var(--surface); color: var(--text);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6147' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
    padding-right: 2.2rem;
}
.form-select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,106,79,.15); outline: none; }

.form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.span-2     { grid-column: span 2; }

.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 2.6rem; }
.toggle-pw {
    position: absolute; right: .65rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); padding: 0;
    display: flex; align-items: center; transition: color var(--transition);
}
.toggle-pw:hover { color: var(--green); }

/* Image preview */
.img-preview-wrap { margin-top: .5rem; }
.img-preview {
    width: 80px; height: 80px; border-radius: var(--radius-sm);
    object-fit: cover; border: 2px solid var(--border);
    display: block;
}

/* ════════════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    border: none; border-radius: var(--radius-sm);
    padding: .5625rem 1.1rem;
    font-size: .875rem; font-weight: 700;
    transition: all var(--transition); white-space: nowrap;
    letter-spacing: .01em;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: var(--green); color: #fff;
    box-shadow: 0 2px 6px rgba(45,106,79,.35);
}
.btn-primary:hover:not(:disabled) {
    background: var(--green-dark);
    box-shadow: 0 4px 12px rgba(45,106,79,.45);
    transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-accent {
    background: var(--yellow); color: var(--green-dark);
    box-shadow: 0 2px 6px rgba(245,168,0,.4);
}
.btn-accent:hover:not(:disabled) {
    background: var(--yellow-dark); color: #fff;
    box-shadow: 0 4px 12px rgba(245,168,0,.5);
    transform: translateY(-1px);
}

.btn-danger  { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled)  { background: #a93226; transform: translateY(-1px); }

.btn-ghost   { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover:not(:disabled)   { background: var(--surface-2); color: var(--text); border-color: var(--border-dark); }

.btn-outline-green {
    background: transparent; color: var(--green);
    border: 1.5px solid var(--green);
}
.btn-outline-green:hover:not(:disabled) { background: var(--green); color: #fff; }

.btn-sm    { padding: .375rem .8rem; font-size: .8125rem; }
.btn-icon  { padding: .5rem; border-radius: var(--radius-sm); border: none; }
.btn-icon.btn-ghost { border: 1.5px solid var(--border); }
.btn-full  { width: 100%; justify-content: center; padding: .8rem; font-size: .9375rem; }

.btn-spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes slideUp  { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:none; } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }
@keyframes popIn    { from { opacity:0; transform:scale(.94); } to { opacity:1; transform:scale(1); } }
@keyframes slideInRight { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:none; } }

/* ════════════════════════════════════════════════════════════════════════
   ALERTS & BADGES
════════════════════════════════════════════════════════════════════════ */
.alert {
    padding: .625rem .9rem; border-radius: var(--radius-sm);
    font-size: .875rem; margin-bottom: 1rem;
    display: flex; align-items: flex-start; gap: .5rem;
}
.alert-error   { background: var(--danger-light); color: #7B241C; border: 1px solid #F1948A; }
.alert-success { background: var(--green-light);  color: var(--green-dark); border: 1px solid #95DEB5; }
.alert-info    { background: var(--yellow-light);  color: #7D5800; border: 1px solid #F5C842; }

.badge {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 20px; font-size: .72rem; font-weight: 700;
    padding: 2px 8px; white-space: nowrap;
}
.badge-important { background: var(--yellow-light); color: #7D5800; }
.badge-green     { background: var(--green-light);  color: var(--green-dark); }
.badge-red       { background: var(--danger-light); color: #7B241C; }
.badge-gray      { background: var(--surface-2);    color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════════════════
   TOGGLE SWITCH
════════════════════════════════════════════════════════════════════════ */
.toggle-label { display: flex; align-items: center; gap: .625rem; cursor: pointer; user-select: none; font-size: .9rem; }
.toggle-input { display: none; }
.toggle-track {
    width: 42px; height: 24px; background: var(--border); border-radius: 12px;
    position: relative; transition: background var(--transition); flex-shrink: 0;
}
.toggle-track::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%; background: #fff;
    transition: transform var(--transition); box-shadow: var(--shadow-xs);
}
.toggle-input:checked + .toggle-track { background: var(--green); }
.toggle-input:checked + .toggle-track::after { transform: translateX(18px); }

/* ════════════════════════════════════════════════════════════════════════
   CHIPS
════════════════════════════════════════════════════════════════════════ */
.filter-chips { display: flex; gap: .375rem; flex-wrap: wrap; }
.chip {
    padding: .375rem .9rem; border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface); color: var(--text-muted);
    font-size: .8125rem; font-weight: 700;
    transition: all var(--transition);
}
.chip:hover  { border-color: var(--green); color: var(--green); }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 6px rgba(45,106,79,.3); }
.chip.accent-chip.active { background: var(--yellow); border-color: var(--yellow); color: var(--green-dark); }

/* ════════════════════════════════════════════════════════════════════════
   APP SHELL
════════════════════════════════════════════════════════════════════════ */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--green-dark);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    transition: transform var(--transition);
    box-shadow: 2px 0 12px rgba(0,0,0,.15);
}

.sidebar-brand {
    display: flex; align-items: center; justify-content: center;
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-brand img {
    height: 68px; width: auto;
    filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0,0,0,.3));
}

.sidebar-section-label {
    font-size: .7rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: rgba(255,255,255,.4);
    padding: .875rem 1rem .375rem;
}

.sidebar-nav { flex: 1; padding: .5rem .625rem; display: flex; flex-direction: column; gap: .2rem; overflow-y: auto; }

.nav-item {
    display: flex; align-items: center; gap: .75rem;
    padding: .625rem .875rem; border-radius: var(--radius-sm);
    color: rgba(255,255,255,.65); font-size: .875rem; font-weight: 600;
    transition: all var(--transition);
}
.nav-item svg { stroke: rgba(255,255,255,.55); transition: stroke var(--transition); }
.nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-item:hover svg { stroke: #fff; }
.nav-item.active {
    background: var(--yellow);
    color: var(--green-dark);
    box-shadow: 0 2px 8px rgba(245,168,0,.4);
}
.nav-item.active svg { stroke: var(--green-dark); }

.sidebar-footer {
    padding: .875rem 1rem; border-top: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; gap: .5rem;
}
.user-pill { display: flex; align-items: center; gap: .625rem; flex: 1; min-width: 0; }
.user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--yellow); color: var(--green-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: .875rem; font-weight: 800; flex-shrink: 0;
}
.user-info   { min-width: 0; }
.user-name   { display: block; font-size: .8125rem; font-weight: 700; color: #fff; }
.user-role   { display: block; font-size: .72rem; color: rgba(255,255,255,.5); text-transform: capitalize; }
.btn-logout  {
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    color: rgba(255,255,255,.7); border-radius: var(--radius-sm);
    padding: .45rem; display: flex; align-items: center;
    transition: all var(--transition);
}
.btn-logout:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-logout svg { width: 15px; height: 15px; }

/* ── Main content ────────────────────────────────────────────────────── */
.main-content {
    flex: 1; margin-left: var(--sidebar-w);
    display: flex; flex-direction: column; min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h); background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.5rem; position: sticky; top: 0; z-index: 50;
    box-shadow: var(--shadow-xs);
}
.topbar-title { font-size: 1.05rem; font-weight: 800; flex: 1; color: var(--text); }
.topbar-badge {
    display: inline-flex; align-items: center; gap: .375rem;
    background: var(--yellow-light); color: var(--yellow-dark);
    border: 1px solid #F5C842; border-radius: 20px;
    font-size: .78rem; font-weight: 700; padding: .25rem .75rem;
}
.topbar-badge svg { width: 13px; height: 13px; stroke: var(--yellow-dark); }
.topbar-actions { display: flex; gap: .5rem; align-items: center; }
.sidebar-toggle { display: none; }

/* Season toggle in topbar */
.season-toggle {
    display: flex; align-items: center; background: var(--surface-2);
    border-radius: 20px; padding: 3px; gap: 2px;
    border: 1.5px solid var(--border);
}
.season-btn {
    padding: .3rem .85rem; border-radius: 16px; border: none;
    font-size: .8rem; font-weight: 700; transition: all var(--transition);
    background: transparent; color: var(--text-muted);
}
.season-btn.active {
    background: var(--green); color: #fff;
    box-shadow: 0 1px 4px rgba(45,106,79,.35);
}

/* ── Dashboard stats bar ─────────────────────────────────────────────── */
.stats-bar {
    display: flex; gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.5rem 0;
}
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .875rem 1.25rem;
    display: flex; align-items: center; gap: .875rem;
    flex: 1; min-width: 160px; box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-sm); }
.stat-icon {
    width: 42px; height: 42px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-icon--green  { background: var(--green-light);  }
.stat-icon--green svg  { stroke: var(--green); }
.stat-icon--yellow { background: var(--yellow-light); }
.stat-icon--yellow svg { stroke: var(--yellow-dark); }
.stat-icon--red    { background: var(--danger-light); }
.stat-icon--red svg    { stroke: var(--danger); }
.stat-info  { min-width: 0; }
.stat-value { font-size: 1.4rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 600; margin-top: .1rem; }

/* ── Tab panels ──────────────────────────────────────────────────────── */
.tab-panel { display: none; flex-direction: column; gap: 1rem; padding: 1rem 1.5rem 2rem; animation: fadeIn .2s ease; }
.tab-panel.active { display: flex; }

/* ── Toolbar ─────────────────────────────────────────────────────────── */
.panel-toolbar {
    display: flex; align-items: center; gap: .875rem; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: .875rem 1.125rem;
    box-shadow: var(--shadow-xs);
}
.toolbar-left  { display: flex; align-items: center; gap: .75rem; flex: 1; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.filter-group  { display: flex; align-items: center; gap: .5rem; }
.filter-label  { font-size: .78rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }

/* Search input */
.search-input-wrap { position: relative; }
.search-input-wrap svg {
    position: absolute; left: .7rem; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; stroke: var(--text-muted); pointer-events: none;
}
.search-input {
    border: 1.5px solid var(--border); border-radius: 20px;
    padding: .4rem .8rem .4rem 2.1rem;
    font-size: .8125rem; outline: none; background: var(--bg);
    width: 190px; transition: all var(--transition); color: var(--text);
}
.search-input:focus { border-color: var(--green); background: var(--surface); box-shadow: 0 0 0 3px rgba(45,106,79,.12); width: 220px; }

/* ── Status bar ──────────────────────────────────────────────────────── */
.status-bar {
    display: flex; align-items: center; gap: .5rem;
    font-size: .8rem; color: var(--text-muted); font-weight: 600;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .5rem 1rem;
}
.status-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(64,145,108,.2);
}

/* Sticky save button */
.sticky-save {
    position: sticky; bottom: 1.5rem; align-self: flex-end;
    z-index: 40; margin-top: auto;
}
.sticky-save .btn {
    box-shadow: var(--shadow-md);
    padding: .75rem 1.5rem;
}

/* ── Progress bar ────────────────────────────────────────────────────── */
.progress-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .875rem 1.25rem; }
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.progress-title { font-size: .8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.progress-pct   { font-size: .875rem; font-weight: 800; color: var(--green); }
.progress-bar   { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.progress-fill  { height: 100%; background: linear-gradient(90deg, var(--green-mid), var(--green)); border-radius: 4px; transition: width .5s ease; }

/* ── Tables ──────────────────────────────────────────────────────────── */
.table-wrap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-xs);
}
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table thead th {
    padding: .75rem 1rem; text-align: left;
    background: var(--surface-2);
    font-size: .72rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.data-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.data-table tbody tr:last-child  { border-bottom: none; }
.data-table tbody tr:hover       { background: var(--green-pale); }
.data-table td { padding: .75rem 1rem; vertical-align: middle; }

.col-num    { text-align: right; width: 90px; }
.col-center { text-align: center; width: 80px; }

/* Product image */
.product-img {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    object-fit: cover; border: 2px solid var(--border);
}
.product-img-placeholder {
    width: 44px; height: 44px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
}

.product-name { font-weight: 700; color: var(--text); }

.market-tag {
    display: inline-block; background: var(--green-light); color: var(--green-dark);
    border-radius: var(--radius-xs); font-size: .72rem; padding: 2px 8px; font-weight: 700;
}

/* Stock input */
.stock-input {
    width: 72px; text-align: right;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: .4rem .6rem; font-size: .875rem; font-weight: 700;
    transition: all var(--transition); background: var(--surface);
}
.stock-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(45,106,79,.15); }
.stock-input.changed { border-color: var(--success); background: var(--green-pale); color: var(--green-dark); }

/* ── Shopping list ───────────────────────────────────────────────────── */
.data-table tbody tr.row-checked { background: var(--green-pale); }
.data-table tbody tr.row-checked:hover { background: var(--green-light); }
.product-name.line-through { text-decoration: line-through; opacity: .55; }

.check-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border);
    background: var(--surface); display: flex; align-items: center; justify-content: center;
    transition: all var(--transition); margin: 0 auto; color: transparent;
}
.check-btn.checked { background: var(--green); border-color: var(--green); color: #fff; }
.check-btn:hover:not(.checked) { border-color: var(--green); color: var(--green); }
.check-btn svg { width: 14px; height: 14px; stroke-width: 2.5; }

.miss-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 26px; border-radius: 13px;
    background: var(--danger-light); color: var(--danger);
    font-weight: 800; font-size: .8125rem; padding: 0 7px;
}

/* ── Manage / order buttons ──────────────────────────────────────────── */
.order-btns { display: flex; gap: .25rem; }
.order-btn {
    width: 30px; height: 30px; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: all var(--transition);
}
.order-btn:hover:not(:disabled) { background: var(--green); border-color: var(--green); color: #fff; }
.order-btn:disabled { opacity: .35; cursor: not-allowed; }
.order-btn svg { width: 12px; height: 12px; }

.action-btns { display: flex; gap: .375rem; }

/* ── Empty states ────────────────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    padding: 3.5rem 1.5rem; color: var(--text-muted); text-align: center;
}
.empty-state svg   { width: 52px; height: 52px; stroke: var(--text-light); }
.empty-state p     { font-size: .9375rem; max-width: 300px; line-height: 1.5; }
.empty-state .btn  { margin-top: .5rem; }

/* ── Modals ──────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(27,67,50,.45); backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem; animation: fadeIn .15s ease;
}
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    width: 100%; max-width: 540px; box-shadow: var(--shadow-lg);
    animation: popIn .25s cubic-bezier(.22,.68,0,1.2);
}
.modal--sm { max-width: 400px; }
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
    background: var(--surface-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-title  { font-size: 1rem; font-weight: 800; color: var(--text); }
.modal-body   { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: .625rem;
}

/* ── Toasts ──────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed; bottom: 1.5rem; right: 1.5rem;
    display: flex; flex-direction: column; gap: .5rem; z-index: 1000;
}
.toast {
    padding: .75rem 1.1rem; border-radius: var(--radius);
    font-size: .875rem; font-weight: 600; box-shadow: var(--shadow-md);
    animation: slideInRight .25s ease; display: flex; align-items: center; gap: .5rem;
    max-width: 320px; min-width: 200px;
}
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast-success { background: var(--green-light);  color: var(--green-dark); border-left: 4px solid var(--green); }
.toast-success svg { stroke: var(--green); }
.toast-error   { background: var(--danger-light); color: #7B241C; border-left: 4px solid var(--danger); }
.toast-error svg { stroke: var(--danger); }
.toast-info    { background: var(--yellow-light); color: #7D5800; border-left: 4px solid var(--yellow); }
.toast-info svg { stroke: var(--yellow-dark); }

/* ── Unsaved changes banner ──────────────────────────────────────────── */
.unsaved-banner {
    position: sticky; top: var(--topbar-h); z-index: 45;
    background: var(--yellow-light); border: 1px solid #F5C842;
    border-radius: 0; padding: .6rem 1.5rem;
    display: flex; align-items: center; gap: .75rem;
    font-size: .875rem; font-weight: 600; color: #7D5800;
    animation: slideUp .2s ease;
}
.unsaved-banner svg { stroke: var(--yellow-dark); }

/* ── Complete-shop action bar ────────────────────────────────────────────── */
.complete-bar {
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
    gap: .75rem;
    background: var(--green-light);
    border: 1.5px solid var(--green-mid);
    border-radius: var(--radius);
    padding: .875rem 1.125rem;
    animation: slideUp .22s ease;
}
.complete-bar-left {
    display: flex; align-items: center; gap: .625rem;
    font-weight: 700; font-size: .9375rem; color: var(--green-dark);
}
.complete-bar-actions { display: flex; align-items: center; gap: .5rem; }
.complete-bar-badge {
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--green-dark);
    border-radius: 12px; min-width: 22px; height: 22px;
    font-size: .78rem; font-weight: 800; padding: 0 6px; margin-left: .25rem;
}

/* ── Complete-shop modal summary pill ──────────────────────────────────── */
.complete-summary-pill {
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    background: var(--green-pale); border: 1px solid var(--green-light);
    border-radius: var(--radius-sm); padding: .875rem 1.125rem;
}
.summary-stat { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.summary-stat-value { font-size: 1.5rem; font-weight: 900; color: var(--green); line-height: 1; }
.summary-stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.summary-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }

/* ── Add-count badge ────────────────────────────────────────────────────── */
.add-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 26px; border-radius: 13px;
    background: var(--green-light); color: var(--green-dark);
    font-weight: 800; font-size: .8125rem; padding: 0 7px;
}

/* ── Complete-shop quantity input ───────────────────────────────────────── */
.complete-qty-input { font-weight: 800; }
.complete-qty-input.changed {
    border-color: var(--yellow-dark);
    background: var(--yellow-pale);
    color: var(--yellow-dark);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    :root { --sidebar-w: 220px; }
    .stats-bar { gap: .625rem; }
    .stat-card { min-width: 130px; padding: .75rem 1rem; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .tab-panel  { padding: .875rem 1rem 2rem; }
    .stats-bar  { padding: .875rem 1rem 0; }
    .form-grid  { grid-template-columns: 1fr; }
    .span-2     { grid-column: span 1; }
    .search-input { width: 150px; }
    .search-input:focus { width: 170px; }
    .data-table thead th:nth-child(1),
    .data-table td:nth-child(1) { display: none; }
    .season-toggle { display: none; } /* moved to tab toolbar on mobile */
}
@media (max-width: 480px) {
    .stats-bar { flex-direction: column; }
    .topbar-badge { display: none; }
}
