/* =========================================================
   SANDTEKNO Cafe Suite — Design System v1
   "Warm Artisanal Utility" • Step 1: Foundation
   ========================================================= */

/* ============ TOKENS ============ */
:root {
  --espresso: #3D2817;
  --espresso-dark: #291A0E;
  --caramel: #C67E3D;
  --caramel-dark: #A5652D;
  --caramel-light: #F5EBE1;
  --matcha: #5C8A4A;
  --matcha-light: #EBF3E7;
  --chili: #C73E3E;
  --chili-light: #FCEBEB;
  --cream: #FAF6F0;
  --cream-muted: #F2ECE1;
  --border-subtle: #E8E0D5;
  --text-primary: #1A1410;
  --text-secondary: #6B5F52;
  --text-muted: #96897B;
  --surface: #FFFFFF;
  --warning-bg: #FEF3C7;
  --warning-fg: #92400E;

  --r-card: 12px;
  --r-button: 8px;
  --r-input: 8px;
  --r-pill: 999px;

  --shadow-soft: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-card: 0 4px 16px -2px rgba(61,40,23,0.06);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --topbar-h: 64px;
  --sidebar-w: 240px;
  --sidebar-w-tablet: 64px;
  --bottomnav-h: 64px;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0;
}
h1 { font-size: 26px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
h3 { font-size: 16px; font-weight: 600; }

.mono { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  user-select: none;
}
.icon-filled { font-variation-settings: 'FILL' 1; }

/* ============ LAYOUT SHELL ============ */
.app-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top, 0);
  z-index: 50;
}
.app-topbar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-topbar .brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--espresso); color: var(--caramel);
  display: flex; align-items: center; justify-content: center;
}
.app-topbar .brand-icon .material-symbols-outlined { font-size: 20px; }
.app-topbar .brand-text { display: flex; flex-direction: column; line-height: 1; }
.app-topbar .brand-name {
  font-family: var(--font-heading); font-size: 14px; font-weight: 800;
  letter-spacing: -0.01em; color: var(--espresso);
}
.app-topbar .brand-suite {
  font-family: var(--font-heading); font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--caramel); text-transform: uppercase;
}
.app-topbar .spacer { flex: 1; }

.user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--cream);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-pill);
}
.user-pill .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--caramel-light); color: var(--espresso);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 12px;
  border: 2px solid rgba(198,126,61,0.3);
}
.user-pill .user-info { display: flex; flex-direction: column; line-height: 1.1; }
.user-pill .user-name { font-family: var(--font-heading); font-size: 11px; font-weight: 700; color: var(--espresso); }
.user-pill .user-role { font-size: 9px; color: var(--caramel); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
@media (max-width: 640px) { .user-pill .user-info { display: none; } }

.app-sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border-subtle);
  overflow-y: auto;
  display: none;
  flex-direction: column;
  padding: 12px 0;
  z-index: 40;
}
.app-main {
  padding-top: calc(var(--topbar-h) + env(safe-area-inset-top, 0));
  padding-bottom: calc(var(--bottomnav-h) + 16px);
  min-height: 100vh;
}
.app-container { padding: 20px 16px; max-width: 1440px; margin: 0 auto; }
.app-bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: space-around;
  z-index: 50;
}
.app-bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 6px 12px; border-radius: 8px;
  text-decoration: none; color: var(--text-secondary);
  font-family: var(--font-heading); font-size: 10px; font-weight: 600;
  min-width: 56px; min-height: 44px;
  transition: all 0.15s;
}
.app-bottomnav a .material-symbols-outlined { font-size: 22px; }
.app-bottomnav a.active, .app-bottomnav a:hover { color: var(--caramel); }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.sidebar-section {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); padding: 12px 12px 4px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-button);
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-heading); font-size: 13px; font-weight: 500;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-item .material-symbols-outlined { font-size: 18px; color: var(--text-muted); transition: color 0.15s; }
.sidebar-item:hover { background: var(--cream); color: var(--espresso); }
.sidebar-item:hover .material-symbols-outlined { color: var(--espresso); }
.sidebar-item.active {
  background: var(--caramel-light);
  color: var(--espresso);
  font-weight: 700;
  border-left-color: var(--caramel);
}
.sidebar-item.active .material-symbols-outlined { color: var(--caramel); }

@media (min-width: 768px) {
  .app-bottomnav { display: none; }
  .app-main { padding-bottom: 16px; }
  .app-sidebar { display: flex; width: var(--sidebar-w-tablet); }
  .app-main { margin-left: var(--sidebar-w-tablet); }
  .sidebar-item { justify-content: center; padding: 12px; }
  .sidebar-item > span:not(.material-symbols-outlined) { display: none; }
  .sidebar-section { display: none; }
}
@media (min-width: 1024px) {
  .app-sidebar { width: var(--sidebar-w); }
  .app-main { margin-left: var(--sidebar-w); }
  .sidebar-item { justify-content: flex-start; padding: 10px 12px; }
  .sidebar-item > span:not(.material-symbols-outlined) { display: inline; }
  .sidebar-section { display: block; }
  .app-container { padding: 28px 32px; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 16px; min-height: 44px;
  border-radius: var(--r-button);
  border: 1px solid transparent;
  font-family: var(--font-heading); font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.btn .material-symbols-outlined { font-size: 18px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--caramel); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--caramel-dark); }
.btn-secondary { background: var(--caramel-light); color: var(--caramel-dark); }
.btn-secondary:hover:not(:disabled) { background: #eeddd0; }
.btn-danger { background: var(--chili-light); color: var(--chili); }
.btn-danger:hover:not(:disabled) { background: #f8dada; }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover:not(:disabled) { background: var(--cream); color: var(--espresso); }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: 12px; }
.btn-sm .material-symbols-outlined { font-size: 16px; }
.btn-block { width: 100%; }

/* ============ INPUTS ============ */
label {
  display: block; margin-bottom: 6px;
  font-family: var(--font-heading); font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
}
.form-control,
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="file"], select, textarea {
  width: 100%; padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-input);
  background: #fff; color: var(--text-primary); font-size: 14px;
  transition: all 0.15s;
}
.form-control:focus,
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(198,126,61,0.15);
}
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.card-title { font-family: var(--font-heading); font-size: 16px; font-weight: 700; color: var(--espresso); }

/* ============ BADGES ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600;
  font-family: var(--font-heading); white-space: nowrap;
}
.badge-success { background: var(--matcha-light); color: var(--matcha); }
.badge-warning { background: var(--warning-bg); color: var(--warning-fg); }
.badge-danger { background: var(--chili-light); color: var(--chili); }
.badge-neutral { background: var(--cream-muted); color: var(--text-secondary); }
.badge .material-symbols-outlined { font-size: 14px; }

/* ============ FLASH ============ */
.flash {
  padding: 12px 16px; border-radius: var(--r-button); margin-bottom: 16px;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.flash.success { background: var(--matcha-light); color: var(--matcha); border: 1px solid rgba(92,138,74,0.2); }
.flash.error { background: var(--chili-light); color: var(--chili); border: 1px solid rgba(199,62,62,0.2); }
.flash.info { background: #DBEAFE; color: #1E40AF; border: 1px solid rgba(30,64,175,0.15); }

/* ============ TABLE ============ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th {
  font-family: var(--font-heading); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); background: var(--cream);
}
tr:hover td { background: var(--cream); }

/* ============ STAT CARD (legacy compat) ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-card); padding: 16px; text-align: center;
  box-shadow: var(--shadow-soft);
}
.stat .n { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--caramel); }
.stat .l { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* ============ AUTH LAYOUT ============ */
.auth-body { background: var(--espresso); min-height: 100vh; display: flex; align-items: stretch; }
.auth-shell { display: flex; width: 100%; min-height: 100vh; flex-direction: column; }

.auth-visual {
  position: relative; padding: 32px; color: #fff; overflow: hidden;
  display: none;
  background:
    radial-gradient(circle at 30% 80%, rgba(198,126,61,0.15) 0%, transparent 45%),
    radial-gradient(circle at 80% 20%, rgba(198,126,61,0.1) 0%, transparent 45%),
    linear-gradient(135deg, var(--espresso) 0%, var(--espresso-dark) 100%);
  min-height: 100vh;
}
.auth-visual::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(250,246,240,0.06) 1px, transparent 1px);
  background-size: 20px 20px; pointer-events: none;
}
.auth-visual-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  height: 100%; max-width: 520px;
}
.auth-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-pill);
  backdrop-filter: blur(8px);
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.9); align-self: flex-start;
}
.auth-badge .material-symbols-outlined { color: #FCD34D; font-size: 16px; }
.auth-quote {
  font-family: var(--font-heading);
  font-size: 40px; font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; color: #fff;
  margin: 0 0 16px; max-width: 460px;
}
.auth-subquote { color: rgba(255,255,255,0.75); font-size: 15px; line-height: 1.6; max-width: 420px; margin: 0; }
.auth-proof {
  display: flex; gap: 24px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.auth-proof-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.7); }
.auth-proof-item .material-symbols-outlined { font-size: 18px; color: var(--caramel); }

.auth-form-wrap {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; min-height: 100vh;
  background:
    radial-gradient(circle at 20% 80%, rgba(198,126,61,0.08) 0%, transparent 40%),
    linear-gradient(135deg, var(--espresso) 0%, var(--espresso-dark) 100%);
  position: relative;
}
.auth-form-wrap::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(250,246,240,0.04) 1px, transparent 1px);
  background-size: 20px 20px; pointer-events: none;
}
.auth-card {
  position: relative;
  background: #fff; border-radius: 16px; padding: 32px 28px;
  width: 100%; max-width: 440px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.35);
  z-index: 2;
}
.auth-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-logo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--espresso); color: var(--caramel);
  display: flex; align-items: center; justify-content: center;
}
.auth-logo-icon .material-symbols-outlined { font-size: 22px; }
.auth-logo-text { line-height: 1.05; }
.auth-logo-text strong {
  font-family: var(--font-heading); font-size: 18px; font-weight: 800;
  color: var(--espresso); letter-spacing: -0.01em; display: block;
}
.auth-logo-text span {
  font-family: var(--font-heading); font-size: 9px; font-weight: 700;
  color: var(--caramel); letter-spacing: 0.1em; text-transform: uppercase;
}
.auth-title { font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; margin: 0 0 6px; }
.auth-subtitle { font-size: 13px; color: var(--text-secondary); margin: 0 0 20px; }

/* old form elements inside auth-card */
.auth-card form label {
  display: block; margin: 14px 0 6px;
  font-family: var(--font-heading); font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
}
.auth-card form input[type="email"],
.auth-card form input[type="password"],
.auth-card form input[type="text"] {
  width: 100%; padding: 12px 14px; min-height: 46px;
  border: 1px solid var(--border-subtle); border-radius: var(--r-input);
  font-size: 14px; background: #fff; transition: all 0.15s;
}
.auth-card form input:focus {
  outline: none; border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(198,126,61,0.15);
}
.auth-card form button[type="submit"] {
  width: 100%; margin-top: 20px;
  padding: 12px 16px; min-height: 48px;
  background: var(--caramel); color: #fff;
  border: 0; border-radius: var(--r-button);
  font-family: var(--font-heading); font-weight: 700; font-size: 15px;
  cursor: pointer; transition: background 0.15s;
}
.auth-card form button[type="submit"]:hover { background: var(--caramel-dark); }
.auth-footer {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  text-align: center; font-size: 12px; color: var(--text-secondary);
}
.auth-footer a { color: var(--caramel); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.error-banner {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--chili-light);
  border: 1px solid rgba(199,62,62,0.2);
  border-radius: var(--r-button);
  color: var(--chili); font-size: 12px; font-weight: 600;
  margin-bottom: 16px;
}

@media (min-width: 1024px) {
  .auth-shell { flex-direction: row; }
  .auth-visual { display: flex; flex: 0 0 55%; }
  .auth-form-wrap { flex: 0 0 45%; background: var(--cream); }
  .auth-form-wrap::before { display: none; }
  .auth-card { box-shadow: 0 24px 60px -12px rgba(61,40,23,0.15); }
}

/* ============================================================
   STEP 2: Login Form Enhancements
   ============================================================ */

/* Input dengan ikon di kiri */
.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 20px; pointer-events: none;
  user-select: none;
}
.input-wrap input {
  padding-left: 44px !important;
}
.input-wrap.has-trailing input {
  padding-right: 46px !important;
}
.input-wrap .input-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; cursor: pointer;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.input-wrap .input-toggle:hover { color: var(--espresso); background: var(--cream); }
.input-wrap .input-toggle .material-symbols-outlined { font-size: 20px; }

/* Label row dengan link di kanan */
.label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.label-row label { margin-bottom: 0; }
.label-row a {
  font-size: 12px; font-weight: 600; color: var(--caramel);
  text-decoration: none; transition: color 0.15s;
}
.label-row a:hover { color: var(--caramel-dark); text-decoration: underline; }

/* Button loading state */
.btn.is-loading { pointer-events: none; opacity: 0.8; }
.btn-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Password field autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 30px #fff inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
   STEP 3: Dashboard Owner
   ============================================================ */

.dashboard-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.dashboard-greeting {
  font-family: var(--font-heading); font-size: 26px; font-weight: 800;
  color: var(--espresso); letter-spacing: -0.02em;
  margin: 0 0 6px; line-height: 1.15;
}
.dashboard-date {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-secondary); margin: 0;
}
.dashboard-date .dot { color: var(--border-subtle); }
.dashboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .dashboard-greeting { font-size: 20px; }
  .dashboard-actions { width: 100%; }
  .dashboard-actions .btn { flex: 1; }
}

/* --- 4 STAT CARDS --- */
.stat-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 12px; margin-bottom: 20px;
}
@media (min-width: 640px)  { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-card); padding: 16px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.15s;
}
.stat-card:hover { box-shadow: var(--shadow-card); }
.stat-card.alert { border-left: 3px solid var(--caramel); }

.stat-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; gap: 8px;
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.stat-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon .material-symbols-outlined { font-size: 18px; }
.stat-icon.caramel { background: var(--caramel-light); color: var(--caramel); }
.stat-icon.cream   { background: var(--cream); color: var(--espresso); }
.stat-icon.matcha  { background: var(--matcha-light); color: var(--matcha); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning-fg); }

.stat-value {
  font-family: var(--font-mono); font-size: 26px; font-weight: 700;
  color: var(--espresso); letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 8px;
}
.stat-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; flex-wrap: wrap; margin-top: 4px;
}
.stat-link {
  font-size: 12px; font-weight: 600; color: var(--caramel);
  text-decoration: none; transition: color 0.15s;
}
.stat-link:hover { color: var(--caramel-dark); text-decoration: underline; }

.progress-bar {
  flex: 1; height: 6px; background: var(--cream-muted);
  border-radius: var(--r-pill); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: var(--r-pill);
  transition: width 0.3s;
}
.progress-fill.matcha  { background: var(--matcha); }
.progress-fill.caramel { background: var(--caramel); }

/* --- 2-COLUMN SECTION (chart + recent) --- */
.dashboard-2col {
  display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 16px;
}
@media (min-width: 1024px) {
  .dashboard-2col { grid-template-columns: 1.4fr 1fr; }
}

.chart-card { display: flex; flex-direction: column; }
.card-title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.chart-empty {
  flex: 1; min-height: 240px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 8px;
  color: var(--text-muted);
}
.chart-empty .material-symbols-outlined {
  font-size: 48px; color: var(--caramel);
  opacity: 0.4; margin-bottom: 4px;
}
.chart-empty h3 {
  font-family: var(--font-heading); font-size: 15px; font-weight: 700;
  color: var(--espresso); margin: 0;
}
.chart-empty p {
  font-size: 12px; color: var(--text-secondary);
  max-width: 320px; margin: 0 0 8px;
}

/* --- RECENT PRODUCTS LIST --- */
.recent-list { display: flex; flex-direction: column; gap: 4px; }
.recent-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border-radius: var(--r-button);
  transition: background 0.15s;
}
.recent-item:hover { background: var(--cream); }
.recent-thumb {
  width: 40px; height: 40px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--border-subtle);
  background: var(--cream);
}
.recent-thumb.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.recent-thumb.placeholder .material-symbols-outlined { font-size: 20px; }
.recent-info { flex: 1; min-width: 0; }
.recent-name {
  font-family: var(--font-heading); font-size: 13px; font-weight: 700;
  color: var(--espresso);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.recent-meta {
  font-size: 11px; color: var(--text-secondary); margin-top: 2px;
  display: flex; align-items: center; gap: 4px;
}
.recent-meta .dot { color: var(--border-subtle); }

/* --- QUICK ACTIONS --- */
.quick-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (min-width: 768px) {
  .quick-actions { grid-template-columns: repeat(4, 1fr); }
}
.quick-action {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; text-decoration: none; color: inherit;
  background: var(--cream); border: 1px solid var(--border-subtle);
  border-radius: var(--r-card); min-height: 120px;
  transition: all 0.15s;
}
.quick-action:hover {
  border-color: var(--caramel); background: var(--surface);
  transform: translateY(-1px);
}
.quick-action.primary {
  background: var(--caramel-light);
  border: 2px dashed rgba(198,126,61,0.4);
}
.quick-action.primary:hover {
  background: var(--caramel); color: #fff;
  border-style: solid; border-color: var(--caramel);
}
.quick-action.primary:hover .qa-icon {
  background: #fff; color: var(--caramel);
}
.quick-action.primary:hover .qa-title,
.quick-action.primary:hover .qa-subtitle { color: #fff; }

.qa-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--espresso); flex-shrink: 0;
}
.qa-icon .material-symbols-outlined { font-size: 20px; }
.quick-action.primary .qa-icon {
  background: var(--caramel); color: #fff; border: 0;
}
.qa-title {
  font-family: var(--font-heading); font-size: 13px; font-weight: 700;
  color: var(--espresso); display: block; line-height: 1.2;
}
.qa-subtitle {
  font-size: 11px; color: var(--text-secondary);
  display: block; margin-top: 2px;
}