/* ===== Design tokens ===== */
:root {
  --color-bg: #f4f6f5;
  --color-bg-elevated: #ffffff;
  --color-sidebar: #ffffff;
  --color-border: #e4e8e7;
  --color-text: #1c2321;
  --color-text-muted: #667169;
  --color-text-faint: #97a19b;

  --color-primary: #0d9488;
  --color-primary-hover: #0b7f75;
  --color-primary-soft: #e3f5f2;
  --color-primary-contrast: #ffffff;

  --color-success: #16a34a;
  --color-success-soft: #e7f7ed;
  --color-warning: #d97706;
  --color-warning-soft: #fdf1de;
  --color-danger: #dc2626;
  --color-danger-soft: #fdeaea;
  --color-info: #2563eb;
  --color-info-soft: #e8f0fe;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 28, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 30, 28, 0.08);
  --shadow-lg: 0 16px 40px rgba(20, 30, 28, 0.14);

  --sidebar-width: 260px;
  --bottom-nav-height: 64px;
  --topbar-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1512;
    --color-bg-elevated: #171f1b;
    --color-sidebar: #131a17;
    --color-border: #263029;
    --color-text: #eef2f0;
    --color-text-muted: #9fada6;
    --color-text-faint: #6f7c76;

    --color-primary: #2dd4bf;
    --color-primary-hover: #5eead4;
    --color-primary-soft: #123531;
    --color-primary-contrast: #052e2b;

    --color-success: #4ade80;
    --color-success-soft: #12301f;
    --color-warning: #fbbf24;
    --color-warning-soft: #33260c;
    --color-danger: #f87171;
    --color-danger-soft: #341616;
    --color-info: #60a5fa;
    --color-info-soft: #12243f;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ===== App shell / layout ===== */
.app-shell {
  min-height: 100vh;
  display: flex;
}
.app-shell[hidden] { display: none; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-sidebar);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 22px;
}
.brand-icon { font-size: 24px; }
.brand-text { font-size: 17px; font-weight: 800; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-link:hover { background: var(--color-primary-soft); color: var(--color-text); }
.nav-link--active { background: var(--color-primary-soft); color: var(--color-primary); }
.nav-icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sidebar-footer {
  font-size: 11px;
  color: var(--color-text-faint);
  padding: 10px;
}

.main-col {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(10px);
  z-index: 20;
  border-bottom: 1px solid transparent;
}
.topbar h1 { font-size: 19px; }
.hamburger { display: none; }

.view-root {
  flex: 1;
  padding: 8px 24px 48px;
  max-width: 1080px;
  width: 100%;
}

.bottom-nav { display: none; }

.scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 13, 0.45);
  z-index: 30;
}

/* ===== Mobile layout ===== */
@media (max-width: 899px) {
  .sidebar {
    transform: translateX(-100%);
    width: min(80vw, 300px);
    padding-top: calc(20px + var(--safe-top));
    box-shadow: var(--shadow-lg);
  }
  .sidebar.sidebar--open { transform: translateX(0); }
  .scrim.scrim--visible { display: block; }

  .main-col { margin-left: 0; }
  .topbar { padding: calc(var(--safe-top)) 16px 0; height: calc(var(--topbar-height) + var(--safe-top)); }
  .hamburger { display: inline-flex; }
  .view-root { padding: 8px 16px calc(var(--bottom-nav-height) + var(--safe-bottom) + 24px); }

  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: color-mix(in srgb, var(--color-bg-elevated) 92%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--color-border);
    z-index: 25;
  }
  .bottom-nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--color-text-faint);
    font-size: 10.5px;
    font-weight: 600;
  }
  .bottom-nav-link .nav-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav-link.nav-link--active { color: var(--color-primary); }
}

/* ===== Icon button ===== */
.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--color-primary-soft); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--color-primary); color: var(--color-primary-contrast); }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-secondary { background: var(--color-bg-elevated); color: var(--color-text); border-color: var(--color-border); }
.btn-secondary:hover { border-color: var(--color-primary); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { color: var(--color-text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: default; pointer-events: none; }

/* ===== Page header ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}
.page-header h2 { font-size: 22px; }
.page-header p { color: var(--color-text-muted); font-size: 13.5px; margin-top: 3px; }

/* ===== Cards ===== */
.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card-title .link-btn { font-size: 13px; font-weight: 600; color: var(--color-primary); }

.grid { display: grid; gap: 16px; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 640px) {
  .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
}

/* ===== Stat cards ===== */
.stat-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label { font-size: 12.5px; color: var(--color-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.02em; }
.stat-card .stat-sub { font-size: 12.5px; color: var(--color-text-faint); margin-top: 4px; }
.stat-card--accent { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover)); border: none; color: var(--color-primary-contrast); }
.stat-card--accent .stat-label { color: color-mix(in srgb, var(--color-primary-contrast) 75%, transparent); }
.stat-card--accent .stat-sub { color: color-mix(in srgb, var(--color-primary-contrast) 75%, transparent); }

/* ===== List rows ===== */
.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
}
.item-row:hover { border-color: color-mix(in srgb, var(--color-primary) 40%, var(--color-border)); }
.item-row--clickable { cursor: pointer; }
.item-row-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft); color: var(--color-primary);
  font-size: 18px; flex-shrink: 0;
}
.item-row-main { flex: 1; min-width: 0; }
.item-row-title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-row-sub { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }
.item-row-end { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.item-row-actions { display: flex; gap: 4px; }

/* Sotto i 640px l'icona/titolo e il blocco badge+azioni non stanno più su una riga sola:
   il blocco finale va a capo a piena larghezza invece di schiacciare il testo principale. */
@media (max-width: 640px) {
  .item-row { flex-wrap: wrap; }
  .item-row-end { flex-basis: 100%; justify-content: flex-end; margin-top: 4px; }
}

/* ===== Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge-primary { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-warning { background: var(--color-warning-soft); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-info { background: var(--color-info-soft); color: var(--color-info); }
.badge-muted { background: var(--color-bg); color: var(--color-text-faint); border: 1px solid var(--color-border); }

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--color-text-muted);
}
.empty-state .empty-icon { font-size: 34px; margin-bottom: 10px; }
.empty-state h3 { font-size: 15px; color: var(--color-text); margin-bottom: 4px; }
.empty-state p { font-size: 13.5px; }

/* ===== Skeleton / loading ===== */
.view-loading { position: relative; min-height: 160px; }
.skeleton { background: linear-gradient(90deg, var(--color-border) 25%, color-mix(in srgb, var(--color-border) 60%, transparent) 37%, var(--color-border) 63%); background-size: 400% 100%; animation: skeleton-pulse 1.4s ease infinite; border-radius: var(--radius-md); }
@keyframes skeleton-pulse { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ===== Forms ===== */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); }
.field input, .field select, .field textarea {
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.field textarea { resize: vertical; min-height: 70px; }
.field-hint { font-size: 11.5px; color: var(--color-text-faint); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-width: 0; }
.form-row > * { min-width: 0; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

/* ===== Detail view (read-only) ===== */
.detail-list { display: flex; flex-direction: column; margin-bottom: 6px; }
.detail-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 12.5px; font-weight: 700; color: var(--color-text-muted); flex-shrink: 0; }
.detail-value { font-size: 14.5px; color: var(--color-text); text-align: right; }
@media (max-width: 480px) {
  .detail-row { flex-direction: column; gap: 3px; }
  .detail-value { text-align: left; }
}

.times-editor { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.time-add-row { display: flex; flex-wrap: wrap; gap: 8px; }
.time-add-row input[type="time"] { flex: 1 1 120px; min-width: 0; }
.time-add-row button { flex-shrink: 0; }
.time-chip { display: flex; align-items: center; gap: 6px; background: var(--color-primary-soft); color: var(--color-primary); padding: 5px 6px 5px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.time-chip button { background: none; border: none; color: inherit; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.time-chip button:hover { background: rgba(0,0,0,0.08); }

/* ===== Modal ===== */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8, 14, 12, 0.5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.2s ease;
  padding: 0;
}
.overlay--visible { opacity: 1; }
.modal {
  background: var(--color-bg-elevated);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(16px);
  transition: transform 0.22s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.overlay--visible .modal { transform: translateY(0); }
.modal--small { max-width: 420px; }
@media (min-width: 640px) {
  .overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius-lg); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--color-border);
  position: sticky; top: 0; background: var(--color-bg-elevated); z-index: 1;
  border-radius: 22px 22px 0 0;
}
.modal-header h2 { font-size: 17px; }
.modal-body { padding: 20px; }
.confirm-message { color: var(--color-text-muted); font-size: 14px; margin-bottom: 18px; line-height: 1.5; }

/* ===== Toast ===== */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
}
@media (min-width: 900px) { .toast-stack { bottom: 24px; } }
.toast {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast--visible { opacity: 1; transform: translateY(0); }
.toast--success { background: var(--color-success); color: #06280f; }
.toast--error { background: var(--color-danger); color: #fff; }

/* ===== Dose checklist ===== */
.dose-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.dose-row + .dose-row { margin-top: 8px; }
.dose-check {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer;
  background: var(--color-bg-elevated); color: transparent; transition: all 0.15s ease;
}
.dose-check svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dose-check.dose-check--taken { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.dose-check.dose-check--skipped { background: var(--color-text-faint); border-color: var(--color-text-faint); color: #fff; }
.dose-row-time { font-weight: 800; font-size: 15px; width: 52px; flex-shrink: 0; }
.dose-row-main { flex: 1; min-width: 0; }
.dose-row-title { font-weight: 700; font-size: 14px; }
.dose-row-sub { font-size: 12px; color: var(--color-text-muted); }
.dose-row.dose-row--done { opacity: 0.6; }
.dose-row.dose-row--done .dose-row-title { text-decoration: line-through; }

/* ===== Weight sparkline / misc ===== */
.subtle-divider { height: 1px; background: var(--color-border); margin: 16px 0; }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.avatar {
  width: 88px; height: 88px; border-radius: 26px; object-fit: cover;
  background: var(--color-primary-soft); display: flex; align-items: center; justify-content: center;
  font-size: 36px; flex-shrink: 0; border: 1px solid var(--color-border);
}
.dog-header { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.dog-header-info h2 { font-size: 22px; }
.dog-header-info p { color: var(--color-text-muted); font-size: 13.5px; margin-top: 3px; }

.tag-select { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag-select button {
  border: 1px solid var(--color-border); background: var(--color-bg-elevated); color: var(--color-text-muted);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.tag-select button.tag-select--active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-contrast); }

.clinic-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

.receipt-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; border: 1px solid var(--color-border); }

.helper-card { background: var(--color-primary-soft); border-radius: var(--radius-lg); padding: 18px 20px; }
.helper-card code { background: var(--color-bg-elevated); padding: 2px 6px; border-radius: 6px; font-size: 12.5px; }
.step-list { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.step-item { display: flex; gap: 12px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--color-primary); color: var(--color-primary-contrast); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.step-item p { font-size: 13.5px; color: var(--color-text-muted); line-height: 1.5; }
.step-item strong { color: var(--color-text); }

.copy-field { display: flex; gap: 8px; margin-top: 10px; }
.copy-field input { flex: 1; border: 1px solid var(--color-border); background: var(--color-bg-elevated); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; color: var(--color-text-muted); }

/* ===== Auth screen ===== */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.auth-screen[hidden] { display: none; }
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 28px;
  text-align: center;
}
.auth-logo { font-size: 40px; margin-bottom: 6px; }
.auth-card h1 { font-size: 20px; margin-bottom: 8px; }
.auth-card > p { margin-bottom: 22px; font-size: 13.5px; }
.auth-card form { text-align: left; }

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; margin-bottom: 6px; }
.profile-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 2px solid transparent; border-radius: var(--radius-md);
  padding: 10px 6px; cursor: pointer; color: var(--color-text);
}
.profile-btn:hover { background: var(--color-primary-soft); }
.profile-btn--active { border-color: var(--color-primary); background: var(--color-primary-soft); }
.profile-btn span:last-child { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 76px; }
.profile-avatar {
  width: 56px; height: 56px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 22px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.profile-avatar--sm { width: 30px; height: 30px; font-size: 13px; }
.auth-card #login-form { margin-top: 18px; }

/* ===== Account widget (sidebar) ===== */
.account-widget-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: 8px 10px; cursor: pointer; color: var(--color-text); font-weight: 700; font-size: 13px;
}
.account-widget-btn:hover { background: var(--color-primary-soft); }
.account-widget-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--color-border); }
.account-tab { background: none; border: none; padding: 10px 4px; margin-right: 14px; font-weight: 700; font-size: 13.5px; color: var(--color-text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.account-tab--active { color: var(--color-primary); border-color: var(--color-primary); }

.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.color-swatch--active { border-color: var(--color-text); }

.info-list { display: flex; flex-direction: column; gap: 10px; }
.info-list li { position: relative; padding-left: 20px; font-size: 13.5px; color: var(--color-text-muted); line-height: 1.55; }
.info-list li::before { content: ''; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); }
.info-list a { color: var(--color-primary); font-weight: 600; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 8px; }
.bar-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.bar-chart-bar { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--color-primary); min-height: 3px; }
.bar-chart-label { font-size: 10px; color: var(--color-text-faint); font-weight: 600; }
