/* ═══════════════════════════════════════════════
   PawClean Admin Dashboard — Shared Stylesheet
   Designed by SNKA Systems
   ═══════════════════════════════════════════════ */

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

:root {
  --bg:            #f6f3ee;
  --surface:       #ffffff;
  --surface2:      #faf8f5;
  --surface3:      #f2ede6;
  --border:        #e4dbd0;
  --border2:       #d0c4b4;
  --tan:           #bfa98e;
  --dark:          #1e1610;
  --text:          #362a1c;
  --muted:         #7a6a57;
  --accent:        #b85c28;
  --accent2:       #d97a40;
  --accent-bg:     #fff5f0;
  --accent-border: #f2d4c2;
  --accent-glow:   rgba(184,92,40,0.12);
  --green:         #3d6b4f;
  --green-bg:      #eaf2ec;
  --green-border:  #c8e0d0;
  --yellow:        #9a6c10;
  --yellow-bg:     #fdf8ee;
  --yellow-border: #e8d090;
  --red:           #b83232;
  --red-bg:        #fdf2f0;
  --red-border:    #f5c6be;
  --blue:          #2c5f8a;
  --blue-bg:       #eef4fb;
  --blue-border:   #b8d4ee;
  --sidebar-w:     248px;
  --navbar-h:      64px;
  --r:             14px;
  --r-sm:          9px;
  --r-xs:          6px;
  --sh:            0 2px 12px rgba(30,22,16,0.07);
  --sh-md:         0 6px 28px rgba(30,22,16,0.10);
  --tr:            all 0.2s cubic-bezier(0.4,0,0.2,1);
}

html, body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 10px; }
svg { display: block; flex-shrink: 0; }

/* ─── NAVBAR ─── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  background: rgba(246,243,238,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 14px;
  z-index: 100;
  transition: box-shadow 0.3s;
}
.navbar.scrolled { box-shadow: var(--sh); }

.navbar-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.navbar-logo img.logo-img {
  height: 34px; width: auto; object-fit: contain;
}
.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 18px; font-weight: 700;
  color: var(--dark); letter-spacing: -0.02em;
}
.logo-text span { color: var(--accent); }

.navbar-divider { width: 1px; height: 20px; background: var(--border2); flex-shrink: 0; }
.navbar-title { font-size: 13px; font-weight: 400; color: var(--muted); }
.navbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.notif-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  transition: var(--tr); color: var(--muted);
}
.notif-btn:hover { background: var(--surface2); border-color: var(--border2); color: var(--text); }
.notif-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--accent); border-radius: 50%;
  border: 1.5px solid var(--bg);
}

.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer; transition: var(--tr);
}
.user-chip:hover { background: var(--surface2); border-color: var(--border2); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 11px; font-weight: 700; color: #fff;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--dark); }
.user-role { font-size: 11px; color: var(--muted); }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px; background: none; border: none;
}
.hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--muted); border-radius: 2px;
  transition: var(--tr);
}

/* ─── LAYOUT ─── */
.layout { display: flex; padding-top: var(--navbar-h); align-items: flex-start; }

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed; top: var(--navbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex; flex-direction: column;
  gap: 2px; overflow-y: auto; z-index: 90;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.sidebar-section {
  font-size: 10px; font-weight: 600; color: var(--tan);
  letter-spacing: 0.9px; text-transform: uppercase;
  padding: 14px 12px 6px; margin-top: 4px;
}
.sidebar-section:first-child { margin-top: 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  cursor: pointer; transition: var(--tr); color: var(--muted);
  font-size: 13.5px; font-weight: 400; position: relative;
  text-decoration: none;
}
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: var(--accent-bg); color: var(--accent); font-weight: 500;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2.5px; height: 16px; background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; flex-shrink: 0; }

.nav-badge {
  margin-left: auto; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 600; padding: 2px 7px;
  border-radius: 20px; font-family: 'DM Mono', monospace;
}

.sidebar-bottom {
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--border);
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(30,22,16,0.45); z-index: 89;
  backdrop-filter: blur(3px);
}

/* ─── MAIN CONTENT ─── */
.main { margin-left: var(--sidebar-w); flex: 1; min-width: 0; padding: 28px 28px 28px; overflow: hidden; }

/* ─── PAGE HEADER ─── */
.page-header { margin-bottom: 24px; }
.page-header h1 {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 700;
  color: var(--dark); letter-spacing: -0.03em;
}
.page-header p { font-size: 13.5px; color: var(--muted); margin-top: 3px; }

/* ─── STAT CARDS ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 22px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: var(--tr);
}
.stat-card:hover { border-color: var(--border2); box-shadow: var(--sh); transform: translateY(-1px); }
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-label {
  font-size: 10.5px; font-weight: 600; color: var(--tan);
  letter-spacing: 0.6px; text-transform: uppercase;
}
.stat-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 15px; height: 15px; fill: none; stroke-width: 1.8; }
.stat-icon.brown  { background: var(--accent-bg);  } .stat-icon.brown  svg { stroke: var(--accent); }
.stat-icon.green  { background: var(--green-bg);   } .stat-icon.green  svg { stroke: var(--green); }
.stat-icon.yellow { background: var(--yellow-bg);  } .stat-icon.yellow svg { stroke: var(--yellow); }
.stat-icon.red    { background: var(--red-bg);     } .stat-icon.red    svg { stroke: var(--red); }
.stat-icon.blue   { background: var(--blue-bg);    } .stat-icon.blue   svg { stroke: var(--blue); }
.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 30px; font-weight: 700;
  color: var(--dark); letter-spacing: -0.04em; line-height: 1;
}
.stat-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat-sub .up   { color: var(--green); font-weight: 500; }
.stat-sub .down { color: var(--red);   font-weight: 500; }

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 332px; gap: 18px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-col { display: flex; flex-direction: column; gap: 18px; }

/* ─── CARD ─── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 13.5px; font-weight: 600; color: var(--dark); }
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-action {
  font-size: 12px; font-weight: 500; color: var(--accent);
  cursor: pointer; text-decoration: none; transition: var(--tr); white-space: nowrap;
}
.card-action:hover { color: var(--accent2); }
.card-body { padding: 18px 20px; }

/* ─── FILTERS ─── */
.filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.search-wrap { position: relative; flex: 1; min-width: 160px; }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-icon svg { width: 14px; height: 14px; fill: none; stroke: var(--tan); stroke-width: 1.8; }
.search-inp {
  width: 100%; padding: 8px 11px 8px 34px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-family: inherit; font-size: 13px; outline: none; transition: var(--tr);
}
.search-inp::placeholder { color: var(--tan); }
.search-inp:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.filter-select {
  padding: 8px 30px 8px 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--muted);
  font-family: inherit; font-size: 13px; outline: none;
  cursor: pointer; transition: var(--tr); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23bfa98e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.filter-select:focus { border-color: var(--accent); color: var(--text); }

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 16px; text-align: left;
  font-size: 10.5px; font-weight: 600; color: var(--tan);
  letter-spacing: 0.7px; text-transform: uppercase;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: var(--tr); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
tbody td { padding: 12px 16px; font-size: 13.5px; color: var(--text); white-space: nowrap; }
.td-name  { font-weight: 600; color: var(--dark); }
.td-phone { font-family: 'DM Mono', monospace; font-size: 12px; color: var(--muted); }
.td-service { color: var(--muted); font-size: 13px; }
.td-date  { color: var(--muted); font-size: 12.5px; }
.td-time  { font-family: 'DM Mono', monospace; font-size: 12.5px; font-weight: 500; color: var(--accent); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 500;
  white-space: nowrap; border: 1px solid;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-green  { background: var(--green-bg);  color: var(--green);  border-color: var(--green-border); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border-color: var(--yellow-border); }
.badge-red    { background: var(--red-bg);    color: var(--red);    border-color: var(--red-border); }
.badge-blue   { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue-border); }
.badge-brown  { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }

/* ─── SCHEDULE ─── */
.schedule-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; border-bottom: 1px solid var(--border);
  transition: var(--tr);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item:hover { background: var(--surface2); }
.schedule-time {
  font-family: 'DM Mono', monospace;
  font-size: 11.5px; font-weight: 500;
  color: var(--accent); width: 40px; flex-shrink: 0;
}
.schedule-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.schedule-dot.done     { background: var(--green); }
.schedule-dot.current  { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.schedule-dot.upcoming { background: var(--border2); }
.schedule-info { flex: 1; min-width: 0; }
.schedule-name { font-size: 13px; font-weight: 600; color: var(--dark); }
.schedule-svc  { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.schedule-status { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.schedule-status.done    { color: var(--green); }
.schedule-status.current { color: var(--accent); font-weight: 600; }

/* ─── CALENDAR ─── */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-month { font-family: 'Fraunces', serif; font-size: 14px; font-weight: 600; color: var(--dark); }
.cal-nav { display: flex; gap: 4px; }
.cal-btn {
  width: 27px; height: 27px; border-radius: var(--r-xs);
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--tr);
}
.cal-btn:hover { background: var(--surface3); color: var(--dark); border-color: var(--border2); }
.cal-btn svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day-label {
  text-align: center; font-size: 9.5px; font-weight: 600;
  color: var(--tan); padding: 4px 0; letter-spacing: 0.4px;
}
.cal-day {
  text-align: center; font-size: 12px; color: var(--muted);
  padding: 6px 2px; border-radius: var(--r-xs);
  cursor: pointer; transition: var(--tr); position: relative; line-height: 1;
}
.cal-day:hover { background: var(--surface2); color: var(--text); }
.cal-day.today { background: var(--dark); color: #fff; font-weight: 600; }
.cal-day.has-event::after {
  content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; background: var(--accent); border-radius: 50%;
}
.cal-day.today.has-event::after { background: rgba(255,255,255,0.55); }
.cal-day.other { color: var(--border2); }

/* ─── ACTIVITY ─── */
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border);
  transition: var(--tr);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--surface2); }
.activity-icon {
  width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border: 1px solid;
}
.activity-icon svg { width: 14px; height: 14px; fill: none; stroke-width: 1.8; }
.activity-icon.new    { background: var(--accent-bg); border-color: var(--accent-border); } .activity-icon.new    svg { stroke: var(--accent); }
.activity-icon.cancel { background: var(--red-bg);    border-color: var(--red-border); }    .activity-icon.cancel svg { stroke: var(--red); }
.activity-icon.ok     { background: var(--green-bg);  border-color: var(--green-border); }  .activity-icon.ok     svg { stroke: var(--green); }
.activity-icon.user   { background: var(--blue-bg);   border-color: var(--blue-border); }   .activity-icon.user   svg { stroke: var(--blue); }
.activity-body { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; font-weight: 500; color: var(--dark); }
.activity-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.activity-time { font-size: 11px; color: var(--tan); flex-shrink: 0; margin-top: 2px; white-space: nowrap; }

/* ─── QUICK ACTIONS ─── */
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-sm);
  background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; transition: var(--tr); color: var(--text);
  font-size: 13px; font-weight: 500; font-family: inherit; text-align: left;
}
.quick-btn:hover { background: var(--surface3); border-color: var(--border2); transform: translateY(-1px); box-shadow: var(--sh); }
.quick-btn-icon {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border: 1px solid;
}
.quick-btn-icon svg { width: 13px; height: 13px; fill: none; stroke-width: 1.9; }
.qbi-a { background: var(--accent-bg); border-color: var(--accent-border); } .qbi-a svg { stroke: var(--accent); }
.qbi-g { background: var(--green-bg);  border-color: var(--green-border); }  .qbi-g svg { stroke: var(--green); }
.qbi-y { background: var(--yellow-bg); border-color: var(--yellow-border); } .qbi-y svg { stroke: var(--yellow); }
.qbi-b { background: var(--blue-bg);   border-color: var(--blue-border); }   .qbi-b svg { stroke: var(--blue); }

/* ─── CHART BARS ─── */
.chart-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.chart-bar {
  flex: 1; border-radius: 4px 4px 0 0;
  background: var(--surface3); transition: var(--tr); cursor: pointer; position: relative;
}
.chart-bar:hover { background: var(--accent2); }
.chart-bar.active { background: var(--accent); }
.chart-bar:hover::after {
  content: attr(data-val);
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: var(--dark); font-weight: 600; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 4px; pointer-events: none;
}
.chart-labels { display: flex; gap: 5px; margin-top: 4px; }
.chart-label { flex: 1; text-align: center; font-size: 9.5px; color: var(--tan); }

/* ─── REVENUE ROWS ─── */
.revenue-row {
  display: flex; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.revenue-row:last-child { border-bottom: none; }
.rev-label { font-size: 12.5px; color: var(--muted); width: 130px; flex-shrink: 0; }
.rev-bar-wrap { flex: 1; margin: 0 12px; height: 4px; background: var(--surface3); border-radius: 10px; overflow: hidden; }
.rev-bar { height: 100%; border-radius: 10px; background: var(--accent); opacity: 0.75; }
.rev-val { font-family: 'DM Mono', monospace; font-size: 12px; font-weight: 500; color: var(--dark); width: 76px; text-align: right; flex-shrink: 0; }

/* ─── CUSTOMER ROWS ─── */
.customer-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  transition: var(--tr);
}
.customer-item:last-child { border-bottom: none; }
.customer-item:hover { background: var(--surface2); }
.c-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif; font-size: 11px; font-weight: 700;
  background: var(--dark); color: #fff;
}
.c-info { flex: 1; min-width: 0; }
.c-name { font-size: 13px; font-weight: 600; color: var(--dark); }
.c-visits { font-size: 11.5px; color: var(--muted); }

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--muted);
}
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 14px; fill: none; stroke: var(--border2); stroke-width: 1.3; }
.empty-state p { font-size: 14px; }

/* ─── FORM ELEMENTS ─── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-row.full { grid-template-columns: 1fr; }
.field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--tan); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-family: inherit; font-size: 13.5px; outline: none;
  transition: var(--tr); appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23bfa98e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.field input::placeholder, .field textarea::placeholder { color: var(--tan); }
.field textarea { resize: vertical; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--r-sm);
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: var(--tr); border: 1px solid; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #a04e20; border-color: #a04e20; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(184,92,40,0.28); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface2); border-color: var(--border2); }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.btn-danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ─── INFO ROWS (detail pages) ─── */
.info-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 12px; font-weight: 600; color: var(--tan); text-transform: uppercase; letter-spacing: 0.4px; width: 140px; flex-shrink: 0; padding-top: 1px; }
.info-value { font-size: 13.5px; color: var(--dark); }

/* ─── SECTION HEADING ─── */
.section-heading { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; color: var(--dark); margin-bottom: 14px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1200px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hamburger { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.active { display: block; }
  .main { margin-left: 0; padding: 20px 16px 24px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .navbar-title { display: none; }
  .navbar-divider { display: none; }
  thead th:nth-child(4), tbody td:nth-child(4),
  thead th:nth-child(5), tbody td:nth-child(5) { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .card-header { flex-wrap: wrap; gap: 10px; }
  .page-header h1 { font-size: 19px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}
@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .user-role { display: none; }
  .main { padding: 16px 12px 20px; }
  .stat-card { padding: 16px; }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 14px 16px; }
  .card-footer { padding: 12px 16px; }
  thead th:nth-child(3), tbody td:nth-child(3) { display: none; }
  .page-header { margin-bottom: 16px; }
}

/* ─── PAGE LOAD ANIMATION ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.4s cubic-bezier(0.4,0,0.2,1) both; }
.delay-1 { animation-delay: 0.05s; }
.delay-2 { animation-delay: 0.10s; }
.delay-3 { animation-delay: 0.15s; }
.delay-4 { animation-delay: 0.20s; }

/* ═══════════════════════════════════════════════
   DEMO POPUP MODAL
   ═══════════════════════════════════════════════ */
@keyframes snka-backdropIn  { from { opacity: 0; }               to { opacity: 1; } }
@keyframes snka-modalIn     { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes snka-modalOut    { from { opacity: 1; transform: translateY(0) scale(1); }       to { opacity: 0; transform: translateY(16px) scale(.97); } }

#snka-demo-backdrop {
  position: fixed; inset: 0; z-index: 9900;
  background: rgba(20, 14, 8, 0.55);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: snka-backdropIn .3s ease both;
}
#snka-demo-backdrop.snka-closing {
  animation: snka-backdropIn .25s ease reverse both;
}
#snka-demo-modal {
  background: var(--surface);
  border-radius: 20px;
  padding: 44px 40px 36px;
  max-width: 460px; width: 100%;
  box-shadow: 0 24px 64px rgba(20,14,8,.22), 0 2px 8px rgba(20,14,8,.08);
  border: 1px solid var(--border);
  animation: snka-modalIn .38s cubic-bezier(.22,.68,0,1.18) both;
  position: relative;
}
#snka-demo-backdrop.snka-closing #snka-demo-modal {
  animation: snka-modalOut .22s ease both;
}
.snka-modal-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-bg); color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 99px; padding: 5px 13px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 20px;
}
.snka-modal-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
  animation: snka-pulse 1.8s ease-in-out infinite;
}
@keyframes snka-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.7); }
}
#snka-demo-modal h2 {
  font-family: 'Fraunces', serif;
  font-size: 26px; font-weight: 700;
  color: var(--dark); line-height: 1.18; letter-spacing: -.02em;
  margin-bottom: 14px;
}
#snka-demo-modal p {
  font-size: 14.5px; color: var(--muted); line-height: 1.72;
  margin-bottom: 30px;
}
.snka-modal-divider {
  height: 1px; background: var(--border); margin: 0 0 24px;
}
.snka-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.snka-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff;
  font-family: 'DM Sans', sans-serif; font-size: 14.5px; font-weight: 500;
  padding: 13px 24px; border-radius: var(--r-sm); border: none; cursor: pointer;
  box-shadow: 0 4px 16px rgba(184,92,40,.28);
  transition: background .2s, transform .15s, box-shadow .2s;
  text-decoration: none;
}
.snka-btn-primary:hover { background: #a04e20; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(184,92,40,.38); }
.snka-btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 400;
  padding: 12px 24px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
  text-decoration: none;
}
.snka-btn-secondary:hover { border-color: var(--border2); background: var(--surface2); color: var(--dark); }
.snka-modal-footnote {
  margin-top: 18px; text-align: center;
  font-size: 12px; color: var(--tan);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.snka-modal-footnote::before {
  content: '';
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--tan); flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   STICKY CHAT BUBBLE + PANEL
   ═══════════════════════════════════════════════ */
#snka-chat-root {
  position: fixed; bottom: 28px; right: 28px;
  z-index: 9800;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}

/* ── Bubble button ── */
.snka-bubble-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--dark); color: #fff;
  border: none; cursor: pointer;
  padding: 12px 18px 12px 14px;
  border-radius: 99px;
  box-shadow: 0 8px 28px rgba(20,14,8,.30);
  font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 500;
  transition: background .2s, transform .2s, box-shadow .2s;
  white-space: nowrap;
}
.snka-bubble-btn:hover { background: #2e2318; transform: translateY(-2px); box-shadow: 0 12px 36px rgba(20,14,8,.38); }
.snka-bubble-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
}
.snka-bubble-avatar svg { width: 16px; height: 16px; fill: #fff; }
.snka-bubble-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #4ade80; border: 2px solid var(--dark);
  position: absolute; top: 10px; left: 38px;
}

/* ── Chat panel ── */
.snka-chat-panel {
  width: 320px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(20,14,8,.18), 0 2px 8px rgba(20,14,8,.06);
  border: 1px solid var(--border);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(.88) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.22,.68,0,1.2), opacity .22s ease;
}
.snka-chat-panel.snka-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Panel header */
.snka-chat-header {
  background: var(--dark);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
}
.snka-chat-header-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
}
.snka-chat-header-avatar svg { width: 18px; height: 18px; fill: #fff; }
.snka-chat-header-info { flex: 1; min-width: 0; }
.snka-chat-header-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.snka-chat-header-status {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: rgba(255,255,255,.55); margin-top: 2px;
}
.snka-chat-header-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex-shrink: 0;
}
.snka-chat-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.4); padding: 4px;
  border-radius: 6px; line-height: 1; font-size: 16px;
  transition: color .2s, background .2s;
}
.snka-chat-close:hover { color: #fff; background: rgba(255,255,255,.1); }

/* Messages */
.snka-chat-messages {
  padding: 18px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface2);
}
.snka-msg {
  display: flex; align-items: flex-start; gap: 9px;
}
.snka-msg-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.snka-msg-avatar svg { width: 13px; height: 13px; fill: #fff; }
.snka-msg-bubble {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 13px;
  font-size: 13px; color: var(--text); line-height: 1.6;
  box-shadow: 0 1px 4px rgba(20,14,8,.05);
  max-width: 220px;
}
/* staggered fade-in for messages */
.snka-msg:nth-child(1) { animation: snka-msgIn .3s .05s ease both; }
.snka-msg:nth-child(2) { animation: snka-msgIn .3s .18s ease both; }
.snka-msg:nth-child(3) { animation: snka-msgIn .3s .31s ease both; }
@keyframes snka-msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Quick action buttons */
.snka-chat-actions {
  padding: 12px 16px 16px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 7px;
  border-top: 1px solid var(--border);
}
.snka-chat-action-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 13px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text); text-decoration: none;
  transition: border-color .18s, background .18s, transform .15s;
}
.snka-chat-action-btn:hover {
  border-color: var(--accent); background: var(--accent-bg); color: var(--accent);
  transform: translateX(2px);
}
.snka-chat-action-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; opacity: .5; }

/* ── Mobile overrides ── */
@media (max-width: 480px) {
  #snka-chat-root { bottom: 16px; right: 16px; }
  .snka-chat-panel { width: calc(100vw - 32px); }
  #snka-demo-modal { padding: 32px 22px 28px; }
  #snka-demo-modal h2 { font-size: 22px; }
  .snka-bubble-btn span { display: none; }
  .snka-bubble-btn { padding: 12px; border-radius: 50%; width: 52px; height: 52px; justify-content: center; }
  .snka-bubble-avatar { width: 28px; height: 28px; }
}