/* ============================================================
   Murphy's Coffee — Custom Design System
   Versi    : 1.0
   Deskripsi: Admin dashboard dengan tema kopi
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Variables (Light Mode) ───────────────────────────── */
:root {
    --coffee:           #6F4E37;
    --coffee-dark:      #4a3020;
    --coffee-light:     #a87a5a;
    --cream:            #F5F5DC;
    --cream-dark:       #e8e8c0;
    --charcoal:         #2F2F2F;

    --bg-primary:       #f8f5f0;
    --bg-secondary:     #f0ede6;
    --bg-input:         #ffffff;
    --surface:          #ffffff;
    --surface-raised:   #fdfdfd;

    --text-primary:     #1e1a16;
    --text-secondary:   #5a4a3a;
    --text-muted:       #9a8a7a;

    --border:           #ddd5c5;
    --border-focus:     #6F4E37;

    --sidebar-bg:       #2F2F2F;
    --sidebar-text:     #d4c4b0;
    --sidebar-active:   #6F4E37;
    --sidebar-hover:    rgba(111,78,55,0.15);

    --success:          #22c55e;
    --warning:          #f59e0b;
    --danger:           #ef4444;
    --info:             #3b82f6;

    --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:        0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:        0 8px 32px rgba(0,0,0,0.12);

    --sidebar-w:        260px;
    --navbar-h:         64px;
    --radius:           12px;
    --radius-sm:        8px;
    --radius-lg:        16px;

    --font-display:     'Playfair Display', Georgia, serif;
    --font-body:        'Plus Jakarta Sans', system-ui, sans-serif;

    --transition:       0.2s ease;
}

/* ── Dark Mode Variables ──────────────────────────────────── */
[data-theme="dark"] {
    --bg-primary:       #1a1410;
    --bg-secondary:     #221c16;
    --bg-input:         #2a221a;
    --surface:          #221c16;
    --surface-raised:   #2a221a;

    --text-primary:     #f0e8d8;
    --text-secondary:   #c4a880;
    --text-muted:       #8a7060;

    --border:           #3a2e24;
    --border-focus:     #a87a5a;

    --sidebar-bg:       #141008;
    --sidebar-text:     #c4a880;
    --sidebar-active:   #6F4E37;
    --sidebar-hover:    rgba(111,78,55,0.25);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--coffee); text-decoration: none; }
a:hover { color: var(--coffee-light); }

img { max-width: 100%; display: block; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-icon {
    width: 44px; height: 44px;
    background: var(--coffee);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(111,78,55,0.4);
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.1rem; color: #fff; font-weight: 700; line-height: 1.2; }
.brand-sub  { font-size: 0.72rem; color: var(--sidebar-text); opacity: 0.7; letter-spacing: 0.5px; text-transform: uppercase; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(2px);
    text-decoration: none;
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 4px 12px rgba(111,78,55,0.35);
}

.nav-icon { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; }
.nav-label { flex: 1; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 36px; height: 36px;
    background: var(--coffee);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { color: #fff; font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { color: var(--sidebar-text); font-size: 0.72rem; opacity: 0.7; text-transform: capitalize; }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    backdrop-filter: blur(2px);
}

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

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    height: var(--navbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-left { display: flex; align-items: center; gap: 14px; }

.btn-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.btn-hamburger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--coffee);
    font-weight: 600;
}

.navbar-right { display: flex; align-items: center; gap: 10px; }

.btn-darkmode {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}
.btn-darkmode:hover { background: var(--bg-secondary); }

.btn-logout {
    padding: 7px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
}
.btn-logout:hover { background: var(--danger); color: #fff; border-color: var(--danger); text-decoration: none; }

/* Notifikasi */
.notif-wrapper { position: relative; }
.btn-notif {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
}
.btn-notif:hover { background: var(--bg-secondary); }
.notif-badge {
    position: absolute;
    top: -6px; right: -6px;
    background: var(--danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px); right: 0;
    width: 280px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    overflow: hidden;
}

.notif-dropdown.show { display: block; animation: fadeDown 0.15s ease; }
.notif-header { padding: 12px 16px; font-weight: 700; font-size: 0.82rem; background: var(--bg-secondary); border-bottom: 1px solid var(--border); color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.notif-item { padding: 12px 16px; font-size: 0.85rem; border-bottom: 1px solid var(--border); line-height: 1.5; }
.notif-item a { color: var(--coffee); font-weight: 600; display: block; margin-top: 4px; }
.notif-warn { background: #fef3c7; }

@keyframes fadeDown { from{opacity:0;transform:translateY(-8px)} to{opacity:1;transform:translateY(0)} }

/* ── Content Area ─────────────────────────────────────────── */
.content-area {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Flash Alerts ─────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 24px;
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.4s ease;
}

.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid var(--success); }
.alert-error   { background: #fee2e2; color: #dc2626; border-left: 4px solid var(--danger); }

.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    line-height: 1;
}
.alert-close:hover { opacity: 1; }

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--coffee);
    border-radius: 4px 0 0 4px;
}

.stat-card--warn::before { background: var(--danger); }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.stat-icon--bahan    { background: #fef3c7; }
.stat-icon--supplier { background: #dbeafe; }
.stat-icon--pembelian{ background: #dcfce7; }
.stat-icon--stok     { background: #fee2e2; }

.stat-body { flex: 1; min-width: 0; }
.stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.stat-link {
    font-size: 0.78rem;
    color: var(--coffee);
    font-weight: 600;
    white-space: nowrap;
}

/* ── Dashboard Layout ─────────────────────────────────────── */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 20px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-toolbar {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.card-body { padding: 20px; }
.card-body.p-0 { padding: 0; }
.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    font-size: 0.82rem;
    background: var(--bg-secondary);
}

/* ── Tables ───────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }

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

.table th {
    padding: 9px 14px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr:hover { background: var(--bg-secondary); }
.table tbody tr:last-child td { border-bottom: none; }

.row-danger { background: #fff5f5 !important; }
.row-warn   { background: #fffbeb !important; }
[data-theme="dark"] .row-danger { background: rgba(239,68,68,0.08) !important; }
[data-theme="dark"] .row-warn   { background: rgba(245,158,11,0.08) !important; }

.table-total td {
    background: var(--bg-secondary);
    font-size: 0.9rem;
    border-top: 2px solid var(--border) !important;
}
.table-total td:empty { background: var(--bg-secondary); }

/* Kolom aksi tidak wrap */
.table td.text-center:last-child,
.table th.text-center:last-child { white-space: nowrap; }

/* Alamat panjang di tabel supplier */
.table td.td-address {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-right  { text-align: right; }
.text-center { text-align: center; }

/* Pastikan text-right & text-center pada <th> tidak ditimpa oleh .table th */
.table th.text-right  { text-align: right; }
.table th.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--coffee); color: #fff; }
.btn-primary:hover { background: var(--coffee-dark); color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(111,78,55,0.3); }

.btn-outline { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--coffee); color: var(--coffee); background: rgba(111,78,55,0.05); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 28px; font-size: 1rem; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.required { color: var(--danger); }

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--coffee);
    box-shadow: 0 0 0 4px rgba(111,78,55,0.12);
}

.form-control::placeholder { color: var(--text-muted); opacity: 0.7; }

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

select.form-control { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236F4E37' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}

.form-hint { display: block; margin-top: 5px; font-size: 0.76rem; color: var(--text-muted); }

.form-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--coffee);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.form-actions {
    display: flex;
    gap: 10px;
    padding-top: 8px;
}

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* ── Search / Filter ──────────────────────────────────────── */
.search-form { display: flex; }
.filter-form {}
.filter-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.filter-row .form-group { margin-bottom: 0; min-width: 160px; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.input-group { display: flex; gap: 8px; align-items: center; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.badge-success  { background: #dcfce7; color: #15803d; }
.badge-warning  { background: #fef3c7; color: #92400e; }
.badge-danger   { background: #fee2e2; color: #dc2626; }
.badge-info     { background: #dbeafe; color: #1d4ed8; }
.badge-rendah   { background: #fee2e2; color: #dc2626; }
.badge-sedang   { background: #fef3c7; color: #92400e; }
.badge-aman     { background: #dcfce7; color: #15803d; }

/* ── Progress Bar ─────────────────────────────────────────── */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 3px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ── Stok List (Dashboard) ────────────────────────────────── */
.stok-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.stok-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
}

.stok-info { display: flex; flex-direction: column; }
.stok-info strong { font-size: 0.88rem; }
.stok-info span { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.stok-item--rendah { background: #fff5f5; border-color: #fecaca; }
.stok-item--sedang { background: #fffbeb; border-color: #fde68a; }
[data-theme="dark"] .stok-item--rendah { background: rgba(239,68,68,0.1); }
[data-theme="dark"] .stok-item--sedang { background: rgba(245,158,11,0.1); }

/* ── Detail View ──────────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
}

.detail-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item:nth-child(odd) { border-right: 1px solid var(--border); }
.detail-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.detail-value { font-size: 0.9rem; color: var(--text-primary); }

.detail-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--coffee);
    color: #fff;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-top: 16px;
    font-size: 1rem;
    font-weight: 700;
}

/* ── Stats Row (Laporan) ──────────────────────────────────── */
.stats-row { display: flex; gap: 32px; flex-wrap: wrap; font-size: 0.88rem; }

/* ── Legend Row ───────────────────────────────────────────── */
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; }

/* ── Chart Card ───────────────────────────────────────────── */
.chart-card canvas { width: 100%; display: block; }

/* ── Toast Notification ───────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px; right: 24px;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: var(--charcoal);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    min-width: 220px;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast--success { background: #15803d; }
.toast--error   { background: #dc2626; }
.toast--warning { background: #d97706; }

@keyframes slideIn { from{opacity:0;transform:translateX(100px)} to{opacity:1;transform:translateX(0)} }
@keyframes slideOut { to{opacity:0;transform:translateX(100px)} }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state p { margin-top: 8px; font-size: 0.9rem; }

/* ── Utility ──────────────────────────────────────────────── */
.mt-2 { margin-top: 12px; }
.py-4 { padding-top: 32px !important; padding-bottom: 32px !important; }

/* ── Modal Confirm ────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

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

.modal-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: fadeUp 0.2s ease;
    text-align: center;
}

.modal-icon { font-size: 3rem; margin-bottom: 12px; }
.modal-title { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px; color: var(--danger); }
.modal-msg { color: var(--text-muted); margin-bottom: 24px; font-size: 0.92rem; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }

@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* ── Dashboard: Stok Card & Badge ───────────────────────────── */
.stok-card { min-width: 0; }

.stok-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.stok-badge--rendah { background: #fee2e2; color: #dc2626; }
.stok-badge--sedang { background: #fef9c3; color: #ca8a04; }
.stok-badge--aman   { background: #dcfce7; color: #16a34a; }

[data-theme="dark"] .stok-badge--rendah { background: rgba(220,38,38,0.2); color: #f87171; }
[data-theme="dark"] .stok-badge--sedang { background: rgba(202,138,4,0.2); color: #fbbf24; }
[data-theme="dark"] .stok-badge--aman   { background: rgba(22,163,74,0.2); color: #4ade80; }

/* ── Responsive card untuk form (create/edit/detail) ───────── */
.card-form-wrap {
    max-width: 720px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .card-form-wrap {
        max-width: 100%;
    }
}

/* ── Mobile scroll hint for tables ─────────────────────────── */
.table-scroll-hint {
    display: none;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    padding: 4px 0 6px;
    letter-spacing: 0.2px;
}

@media (max-width: 768px) {
    .table-scroll-hint { display: block; }
}
