/* ═══════════════════════════════════════════════════════════════════════
   GALia Belleza — Balanced Slate Theme v2.1
   Paleta: Slate medio · Violeta brand · Teal accent
   Inspiración: Notion / Linear / Stripe Dashboard
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────────────── */
:root {
  /* Brand colors */
  --c-violet:      #7B4CC0;
  --c-violet-mid:  #5C46A0;
  --c-violet-dark: #3A3880;
  --c-navy:        #243E72;
  --c-teal:        #1AA7A1;
  --c-teal-mid:    #148E88;
  --c-amber:       #D4A017;
  --c-red:         #E05252;

  /* Balanced slate surfaces — ni negro ni blanco */
  --bg:            #1C1B2E;   /* slate-blue profundo, no negro puro  */
  --bg-2:          #222135;   /* sidebar / panel lateral             */
  --bg-3:          #28273F;   /* hover sobre sidebar                 */
  --bg-4:          #2E2D4A;   /* secondary hover                     */
  --surface:       #252438;   /* tarjetas principales                */
  --surface-2:     #2D2C44;   /* input backgrounds, rows hover       */
  --surface-3:     #343350;   /* borders visibles, separadores       */
  --border:        rgba(255,255,255,0.08);
  --border-mid:    rgba(255,255,255,0.13);

  /* Text — más luminoso sobre slate */
  --text-1:        #F0EDF8;   /* texto principal, casi blanco        */
  --text-2:        #B8B3D4;   /* texto secundario                    */
  --text-3:        #7E7A9C;   /* placeholder, meta, labels           */
  --text-accent:   #C4A8F5;   /* accent violeta claro                */

  /* Glow */
  --glow-v:        rgba(123,76,192,0.38);
  --glow-t:        rgba(26,167,161,0.28);

  /* Spacing */
  --header-h:      60px;
  --sidebar-w:     220px;
  --bnav-h:        62px;
  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     18px;
}

/* ── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-violet-mid); }

/* ── Animations ────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse-rec {
  0%,100% { box-shadow: 0 0 0 0 rgba(224,82,82,0.5); }
  50%     { box-shadow: 0 0 0 16px rgba(224,82,82,0); }
}
.fade-in { animation: fadeIn .25s ease both; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.g-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
}
.g-main {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--bnav-h);
}
@media (min-width: 1024px) {
  .g-main { margin-left: var(--sidebar-w); padding-bottom: 32px; }
}
.g-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px;
}
@media (min-width: 640px) { .g-content { padding: 28px 24px; } }
@media (min-width: 1024px) { .g-content { padding: 32px 32px; } }

/* ── Header ─────────────────────────────────────────────────────────── */
.g-header {
  position: fixed; top:0; left:0; right:0; z-index: 50;
  height: var(--header-h);
  background: rgba(28,27,46,0.93);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.g-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 16px;
  max-width: 100%;
}
.g-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.g-logo-mark {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  border-radius: 10px;
  border: 1px solid var(--border-mid);
}
.g-brand-text {
  display: flex; align-items: baseline; gap: 0; line-height: 1;
}
.g-brand-gal {
  font-size: 20px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--c-violet);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
}
.g-brand-ia {
  font-size: 20px; font-weight: 700;
  color: var(--c-teal);
  margin-right: 6px;
}
.g-brand-sub {
  font-size: 11px; font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.5px;
  align-self: center;
  display: none;
}
@media (min-width: 480px) { .g-brand-sub { display: inline; } }
.g-header-meta {
  display: flex; align-items: center; gap: 8px;
}
.g-pill {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
}
.g-pill-date {
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
  display: none;
}
@media (min-width: 520px) { .g-pill-date { display: flex; } }
.g-pill-count {
  background: rgba(26,167,161,0.15); color: var(--c-teal);
  border: 1px solid rgba(26,167,161,0.25);
}
.g-icon-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); border-radius: 9px;
  transition: all .15s ease;
  background: var(--surface-2); border: 1px solid var(--border);
}
.g-icon-btn:hover { color: var(--text-1); border-color: var(--border-mid); }

/* ── Sidebar ─────────────────────────────────────────────────────────── */
.g-sidebar {
  display: none;
  position: fixed; top: var(--header-h); left:0; bottom:0;
  width: var(--sidebar-w);
  background: var(--bg-2); /* #222135 — slate medio legible */
  border-right: 1px solid var(--border);
  flex-direction: column;
  padding: 16px 12px;
  z-index: 30;
  overflow-y: auto;
}
@media (min-width: 1024px) { .g-sidebar { display: flex; } }
.g-sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.g-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text-2); font-size: 13.5px; font-weight: 400;
  transition: all .15s ease; text-align: left; width: 100%;
}
.g-nav-item:hover { background: var(--surface-2); color: var(--text-1); }
.g-nav-active {
  background: rgba(123,76,192,0.22) !important;
  color: var(--text-accent) !important;
  font-weight: 600;
  border: 1px solid rgba(123,76,192,0.35);
}
.g-nav-active svg { color: var(--c-violet); }
.g-sidebar-footer {
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.g-sidebar-action {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 9px 12px; border-radius: 9px;
  font-size: 12px; color: var(--text-3);
  transition: all .15s ease;
}
.g-sidebar-action:hover { background: var(--surface-2); color: var(--text-2); }
.g-sidebar-meta {
  text-align: center; font-size: 11px; color: var(--text-3);
  margin-top: 8px;
}

/* ── Bottom nav (mobile) ─────────────────────────────────────────────── */
.g-bottom-nav {
  position: fixed; bottom:0; left:0; right:0; z-index: 40;
  display: flex; height: var(--bnav-h);
  background: rgba(28,27,46,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
@media (min-width: 1024px) { .g-bottom-nav { display: none; } }
.g-bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 10px; font-weight: 400;
  transition: all .15s ease;
  padding: 8px 4px;
}
.g-bn-item svg { transition: transform .15s ease; }
.g-bn-active { color: var(--c-violet); }
.g-bn-active svg { transform: scale(1.1); }
.g-bn-accent {
  color: var(--c-teal) !important;
  font-weight: 600;
}
.g-bn-accent svg { color: var(--c-teal); }

/* ── Toast ────────────────────────────────────────────────────────────── */
.g-toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  z-index: 100;
  background: var(--surface-3); color: var(--text-1);
  border: 1px solid var(--border-mid);
  padding: 10px 20px; border-radius: 24px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  white-space: nowrap;
  max-width: calc(100vw - 40px);
}
.g-toast-error { background: rgba(224,82,82,0.15); border-color: rgba(224,82,82,0.3); color: #F87171; }

/* ── Page structure ──────────────────────────────────────────────────── */
.g-page { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.g-page-center { max-width: 600px; margin: 0 auto; width: 100%; }
.g-page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.g-page-title { font-size: 22px; font-weight: 800; color: var(--text-1); letter-spacing: -0.5px; }
.g-page-sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.g-back-row { display: flex; align-items: center; gap: 10px; }
.g-back-btn {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); flex-shrink: 0;
  transition: all .15s ease;
}
.g-back-btn:hover { color: var(--text-1); }
.g-ai-tag {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--c-teal); font-weight: 500;
  margin-top: 3px;
}

/* ── Cards ───────────────────────────────────────────────────────────── */
.g-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.g-card-teal { border-color: rgba(26,167,161,0.2); }
.g-card-brand { background: linear-gradient(135deg, var(--surface) 0%, rgba(46,53,127,0.4) 100%); }
.g-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.g-card-title { font-size: 13px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.g-card-sub { font-size: 12px; color: var(--text-3); }

/* ── Stats ───────────────────────────────────────────────────────────── */
.g-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
@media (min-width: 640px) { .g-stats-grid { grid-template-columns: repeat(4, 1fr); } }
.g-stats-grid-3 { grid-template-columns: repeat(3, 1fr); }
.g-stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 14px;
  transition: border-color .15s ease;
}
.g-stat-card:hover { border-color: var(--border-mid); }
.g-stat-icon { margin-bottom: 10px; }
.g-stat-val { font-size: 28px; font-weight: 900; line-height: 1; letter-spacing: -1px; color: var(--text-1); }
.g-stat-label { font-size: 11.5px; color: var(--text-3); margin-top: 4px; font-weight: 400; }

/* ── Quick actions ───────────────────────────────────────────────────── */
.g-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-action-card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; border-radius: var(--radius);
  text-align: left; transition: all .15s ease;
  border: 1px solid transparent;
}
.g-action-card:active { transform: scale(0.98); }
.g-action-primary {
  background: linear-gradient(135deg, #7B4CC0 0%, #5C46A0 100%);
  box-shadow: 0 4px 20px rgba(123,76,192,0.4);
}
.g-action-primary:hover { box-shadow: 0 6px 28px var(--glow-v); }
.g-action-secondary {
  background: var(--surface);
  border-color: var(--border-mid);
}
.g-action-secondary:hover { border-color: rgba(107,53,176,0.4); background: var(--surface-2); }
.g-action-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.15); color: white; flex-shrink: 0;
}
.g-action-icon-alt {
  background: rgba(107,53,176,0.2); color: var(--c-violet);
}
.g-action-title { font-size: 13.5px; font-weight: 700; color: white; line-height: 1.2; }
.g-action-secondary .g-action-title { color: var(--text-1); }
.g-action-sub { font-size: 11.5px; color: rgba(255,255,255,0.65); margin-top: 2px; }
.g-action-secondary .g-action-sub { color: var(--text-3); }

/* ── Visit rows ──────────────────────────────────────────────────────── */
.g-visit-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  transition: background .12s ease;
}
.g-visit-row:last-child { border-bottom: none; }
.g-visit-row:hover { background: var(--surface-2); }
.g-visit-info { flex: 1; min-width: 0; }
.g-visit-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-visit-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.g-visit-meta {
  display: flex; align-items: center; gap: 10px; margin-top: 3px; flex-wrap: wrap;
}
.g-visit-meta span { font-size: 12px; color: var(--text-3); }
.g-visit-time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.g-visit-next { font-size: 12px; color: var(--c-teal); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.g-visit-actions { display: flex; gap: 6px; flex-shrink: 0; padding-top: 1px; }

/* ── Action buttons ──────────────────────────────────────────────────── */
.g-act-btn {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s ease;
}
.g-act-edit { background: rgba(123,76,192,0.14); color: var(--c-violet); }
.g-act-edit:hover { background: rgba(123,76,192,0.28); }
.g-act-del { background: rgba(224,82,82,0.1); color: var(--c-red); }
.g-act-del:hover { background: rgba(224,82,82,0.2); }

/* ── Badges ──────────────────────────────────────────────────────────── */
.g-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 20px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.g-badge-dot {
  width: 5px; height: 5px; border-radius: 50%;
}
.g-badge-alto  { background: rgba(22,163,74,0.16); color: #4ADE80; border: 1px solid rgba(74,222,128,0.28); }
.g-badge-alto .g-badge-dot  { background: #4ADE80; }
.g-badge-medio { background: rgba(234,179,8,0.14); color: #FCD34D; border: 1px solid rgba(252,211,77,0.28); }
.g-badge-medio .g-badge-dot { background: #FCD34D; }
.g-badge-bajo  { background: rgba(239,68,68,0.12); color: #FCA5A5; border: 1px solid rgba(252,165,165,0.28); }
.g-badge-bajo .g-badge-dot  { background: #FCA5A5; }
.g-badge-nil   { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }

/* ── Seguimientos ────────────────────────────────────────────────────── */
.g-seg-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.g-seg-row:last-child { border-bottom: none; }
.g-seg-name { font-size: 13.5px; font-weight: 500; color: var(--text-1); }
.g-seg-action { font-size: 12px; color: var(--c-teal); margin-top: 2px; }
.g-count-pill {
  background: rgba(123,76,192,0.20); color: var(--c-violet);
  border: 1px solid rgba(123,76,192,0.32);
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}
.g-count-pill-active { background: rgba(26,167,161,0.2); color: var(--c-teal); border-color: rgba(26,167,161,0.3); }

/* ── Empty state ─────────────────────────────────────────────────────── */
.g-empty { padding: 36px 20px; text-align: center; color: var(--text-3); }
.g-empty p { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }
.g-empty span { font-size: 12px; }
.g-empty-icon { margin-bottom: 12px; opacity: 0.25; display: flex; justify-content: center; }
.g-empty-icon svg { width: 36px; height: 36px; }

/* ── Links ───────────────────────────────────────────────────────────── */
.g-link { font-size: 13px; color: var(--c-violet); font-weight: 500; transition: color .12s ease; }
.g-link:hover { color: var(--text-accent); }
.g-link-sm { font-size: 12px; color: var(--c-teal); font-weight: 500; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.g-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #7B4CC0 0%, #5C46A0 100%);
  color: white; padding: 11px 20px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600;
  box-shadow: 0 2px 12px rgba(123,76,192,0.40);
  transition: all .15s ease;
  white-space: nowrap;
}
.g-btn-primary:hover { opacity: 0.92; box-shadow: 0 4px 16px var(--glow-v); }
.g-btn-primary:active { transform: scale(0.98); }
.g-btn-full { width: 100%; }
.g-btn-disabled { opacity: 0.5; cursor: not-allowed; }
.g-btn-teal {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: rgba(26,167,161,0.15); color: var(--c-teal);
  border: 1px solid rgba(26,167,161,0.3);
  padding: 9px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  transition: all .15s ease; white-space: nowrap;
}
.g-btn-teal:hover { background: rgba(26,167,161,0.25); }
.g-btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border-mid);
  padding: 11px 20px; border-radius: 11px;
  font-size: 13.5px; font-weight: 500;
  transition: all .15s ease;
}
.g-btn-ghost:hover { color: var(--text-1); border-color: var(--border-mid); }

/* ── Form ────────────────────────────────────────────────────────────── */
.g-form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.g-form-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--text-accent);
  padding: 12px 18px;
  background: rgba(123,76,192,0.10);
  border-bottom: 1px solid var(--border);
}
.g-form-section-body { padding: 16px 18px; }
.g-grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 520px) { .g-grid-2 { grid-template-columns: 1fr 1fr; } }
.g-grid-2-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-field { display: flex; flex-direction: column; gap: 5px; }
.g-field-mt { margin-top: 12px; }
.g-field-compact { flex: 1; min-width: 0; }
.g-field-full { flex: 1 1 200px; }
.g-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-3);
}
.g-input {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-1); border-radius: 9px;
  padding: 10px 12px; font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.g-input:focus {
  outline: none; border-color: rgba(123,76,192,0.65);
  box-shadow: 0 0 0 3px rgba(123,76,192,0.14);
}
.g-input::placeholder { color: var(--text-3); }
.g-input-sm { padding: 8px 10px; font-size: 13px; }
.g-mt { margin-top: 8px; }
.g-textarea {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-1); border-radius: 10px;
  padding: 11px 13px; font-size: 13.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%; resize: vertical; min-height: 80px;
  line-height: 1.55;
}
.g-textarea:focus {
  outline: none; border-color: rgba(123,76,192,0.65);
  box-shadow: 0 0 0 3px rgba(123,76,192,0.14);
}
.g-textarea::placeholder { color: var(--text-3); font-size: 13px; }
.g-select {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-1); border-radius: 9px;
  padding: 10px 32px 10px 12px; font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237E7A9C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color .15s ease;
  width: 100%;
}
.g-select:focus { outline: none; border-color: rgba(123,76,192,0.65); }
.g-form-actions {
  display: flex; gap: 10px; align-items: center;
  position: sticky; bottom: calc(var(--bnav-h) + 8px);
  background: var(--bg); /* #1C1B2E — coincide con body */
  padding: 12px 0 4px;
  margin-top: 4px;
}
@media (min-width: 1024px) { .g-form-actions { bottom: 16px; } }
.g-form-actions .g-btn-ghost { flex: 1; }
.g-form-actions .g-btn-primary { flex: 2; }

/* ── Filters ─────────────────────────────────────────────────────────── */
.g-filters {
  display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 18px; align-items: flex-end;
}
.g-filter-check { display: flex; align-items: center; padding-bottom: 2px; }
.g-checkbox-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.g-checkbox { accent-color: var(--c-violet); width: 15px; height: 15px; }

/* ── Table ───────────────────────────────────────────────────────────── */
.g-card-table { overflow: hidden; }
.g-table-scroll { overflow-x: auto; }
.g-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.g-table thead tr { background: rgba(123,76,192,0.10); }
.g-table th {
  padding: 11px 12px; text-align: left;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-accent);
  white-space: nowrap; border-bottom: 1px solid var(--border);
}
.g-table td {
  padding: 11px 12px; border-bottom: 1px solid var(--border);
  vertical-align: top; color: var(--text-2);
}
.g-table tbody tr:last-child td { border-bottom: none; }
.g-table tbody tr:hover td { background: var(--surface-2); }
.g-td-name { font-weight: 600; color: var(--text-1); font-size: 13px; }
.g-td-sub { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.g-td-time { white-space: nowrap; color: var(--text-3); font-variant-numeric: tabular-nums; }
.g-td-center { text-align: center; font-weight: 700; color: var(--text-accent); }
.g-td-wrap { max-width: 140px; }
.g-td-wrap span { display: -webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.g-td-problem { color: #F87171 !important; }
.g-td-next { color: var(--c-teal) !important; }
.g-td-acts { display: flex; gap: 4px; }
.g-mobile-only { display: flex; flex-direction: column; gap: 10px; }
.g-desktop-only { display: none; }
@media (min-width: 720px) { .g-mobile-only { display: none; } .g-desktop-only { display: block; } }

/* ── Visit card (mobile table) ───────────────────────────────────────── */
.g-card-visit { cursor: default; }
.g-vc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.g-vc-name { font-size: 14px; font-weight: 700; color: var(--text-1); }
.g-vc-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.g-vc-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.g-vc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; padding: 12px 16px; font-size: 12.5px; color: var(--text-2); }
.g-vc-full { grid-column: span 2; }
.g-vc-lbl { color: var(--text-3); margin-right: 5px; }
.g-vc-prob { color: #F87171; }
.g-vc-next { color: var(--c-teal); font-weight: 500; }

/* ── Audio ────────────────────────────────────────────────────────────── */
.g-text-center { text-align: center; }
.g-processing { padding: 32px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.g-proc-title { font-size: 15px; font-weight: 600; color: var(--text-1); }
.g-proc-sub { font-size: 13px; color: var(--text-3); }
.g-record-btn {
  width: 110px; height: 110px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  margin: 24px auto 16px;
  background: linear-gradient(135deg, #7B4CC0 0%, #5C46A0 100%);
  color: white;
  box-shadow: 0 0 0 6px rgba(123,76,192,0.14), 0 8px 32px rgba(123,76,192,0.40);
  transition: all .2s ease;
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
}
.g-record-btn:hover { transform: scale(1.04); box-shadow: 0 0 0 8px rgba(123,76,192,0.18), 0 12px 40px rgba(123,76,192,0.45); }
.g-record-active {
  background: linear-gradient(135deg, #B03535 0%, #8A2424 100%) !important;
  box-shadow: 0 0 0 6px rgba(176,53,53,0.15), 0 8px 32px rgba(176,53,53,0.4) !important;
  animation: pulse-rec 1.5s ease-in-out infinite;
}
.g-record-hint { font-size: 13px; color: var(--text-3); padding-bottom: 20px; }
.g-record-hint-active { color: #F87171; font-weight: 500; }

/* ── Spinner ─────────────────────────────────────────────────────────── */
.g-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(107,53,176,0.2);
  border-top-color: var(--c-violet);
  animation: spin 0.75s linear infinite;
  display: inline-block;
}
.g-spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.g-spinner-white { border-color: rgba(255,255,255,0.25); border-top-color: white; }

/* ── Hint box ────────────────────────────────────────────────────────── */
.g-hint-box {
  background: rgba(123,76,192,0.10);
  border: 1px solid rgba(123,76,192,0.22);
  border-radius: var(--radius); padding: 16px 18px;
}
.g-hint-title { font-size: 12px; font-weight: 700; color: var(--text-accent); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.4px; }
.g-hint-list { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.g-hint-list li { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.g-hint-list li::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--c-violet); flex-shrink: 0; }
.g-hint-cols { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.g-hint-cols span { font-size: 12px; background: var(--surface-2); color: var(--text-2); padding: 3px 9px; border-radius: 6px; border: 1px solid var(--border); }
.g-hint-note { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* ── Historial ───────────────────────────────────────────────────────── */
.g-hist-layout { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 720px) { .g-hist-layout { display: grid; grid-template-columns: 200px 1fr; align-items: start; } }
.g-hist-dates { height: fit-content; }
.g-date-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 12px 18px; border-bottom: 1px solid var(--border);
  text-align: left; transition: background .12s ease;
}
.g-date-item:last-child { border-bottom: none; }
.g-date-item:hover { background: var(--surface-2); }
.g-date-active { background: rgba(123,76,192,0.14) !important; }
.g-date-label { font-size: 13px; font-weight: 500; color: var(--text-1); }
.g-date-today { font-size: 11px; color: var(--c-teal); font-weight: 600; margin-top: 1px; }

/* ── Export page ─────────────────────────────────────────────────────── */
.g-export-grid { display: flex; flex-direction: column; gap: 10px; }
.g-card-export {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
}
.g-export-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.g-export-icon-violet { background: rgba(107,53,176,0.18); color: var(--c-violet); }
.g-export-icon-teal   { background: rgba(26,167,161,0.15); color: var(--c-teal); }
.g-export-icon-mid    { background: rgba(74,58,140,0.15); color: var(--text-accent); }
.g-export-info { flex: 1; min-width: 0; }
.g-export-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.g-export-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ── Settings ────────────────────────────────────────────────────────── */
.g-settings-actions { display: flex; flex-direction: column; }
.g-settings-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  text-align: left; transition: background .12s ease; width: 100%;
}
.g-settings-row:last-child { border-bottom: none; }
.g-settings-row:hover { background: var(--surface-2); }
.g-settings-danger:hover { background: rgba(224,82,82,0.06); }
.g-settings-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.g-settings-title { font-size: 13.5px; font-weight: 500; color: var(--text-1); }
.g-settings-title-danger { color: var(--c-red); }
.g-settings-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.g-brand-card-inner { display: flex; align-items: center; gap: 16px; padding: 20px 20px; }
.g-brand-logo { flex-shrink: 0; }
.g-brand-name { font-size: 22px; font-weight: 800; line-height: 1.1; }
.g-brand-belleza { font-size: 14px; font-weight: 400; color: var(--text-3); vertical-align: middle; }
.g-brand-ver { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.g-brand-note { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* ── Touch targets mobile ────────────────────────────────────────────── */
@media (max-width: 639px) {
  .g-act-btn { width: 36px; height: 36px; }
  .g-record-btn { width: 120px; height: 120px; }
  .g-input, .g-select { font-size: 16px; } /* prevent iOS zoom */
  .g-textarea { font-size: 16px; }
}
