/* ============================================
   RENOVAR S C E · CRM DEMO
   Brand identity: Teal + Navy premium
   ============================================ */

:root {
  /* Brand */
  --teal: #2CBCA4;
  --teal-dark: #1D7D6D;
  --teal-deep: #0F3F37;
  --teal-soft: #B4EDE4;
  --teal-50: #E6F8F5;
  --navy: #141732;
  --navy-2: #1A2244;
  --navy-3: #2A3258;
  --gold: #C9A961;
  --gold-dark: #8B6F2A;
  --gold-soft: #F4ECD9;

  /* States */
  --success: #10B981;
  --success-soft: #D1FAE5;
  --warning: #F59E0B;
  --warning-soft: #FEF3C7;
  --danger: #EF4444;
  --danger-soft: #FEE2E2;
  --info: #3B82F6;
  --info-soft: #DBEAFE;

  /* Neutral */
  --bg: #F6F8FA;
  --bg-2: #EEF2F6;
  --card: #FFFFFF;
  --border: #E5E9F0;
  --border-2: #EEF1F6;
  --text: #141732;
  --text-2: #4A5168;
  --text-3: #8B91A7;
  --text-4: #B5BBC9;

  /* Effects */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(20,23,50,0.04), 0 1px 3px rgba(20,23,50,0.06);
  --shadow: 0 4px 16px rgba(20,23,50,0.06), 0 1px 3px rgba(20,23,50,0.04);
  --shadow-lg: 0 20px 50px rgba(15,63,55,0.10), 0 4px 12px rgba(20,23,50,0.06);
  --shadow-xl: 0 30px 80px rgba(15,63,55,0.18), 0 8px 20px rgba(20,23,50,0.08);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
}

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

html, body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { overflow-x: hidden; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; outline: none; }
a { text-decoration: none; color: inherit; }

.view { display: none; }
.view.active { display: block; }


/* ============================================
   COVER
   ============================================ */
.view-cover {
  min-height: 100vh;
  background: linear-gradient(135deg, #0F3F37 0%, #141732 100%);
  position: relative;
  overflow: hidden;
  color: #fff;
}

.cover-bg {
  position: absolute; inset: 0;
  pointer-events: none;
}

.cover-glow {
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(44,188,164,0.25) 0%, transparent 70%);
  top: -200px; right: -200px;
  filter: blur(40px);
}
.cover-glow-2 {
  background: radial-gradient(circle, rgba(201,169,97,0.18) 0%, transparent 70%);
  bottom: -300px; left: -200px; top: auto; right: auto;
}

.cover-content {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px 80px;
  z-index: 2;
}

.cover-header {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 60px;
}
.cover-logo { height: 72px; }
.cover-tag {
  font-size: 11px; letter-spacing: 3px; font-weight: 600;
  padding: 8px 18px; border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px; color: rgba(255,255,255,0.85);
  text-transform: uppercase;
}

.cover-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.cover-title em {
  font-style: italic;
  background: linear-gradient(135deg, #2CBCA4 0%, #C9A961 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.cover-subtitle {
  display: block;
  font-size: 0.5em;
  color: rgba(255,255,255,0.65);
  font-weight: 400;
  margin-top: 8px;
  letter-spacing: 0.01em;
}

.cover-desc {
  max-width: 560px;
  font-size: 16px; line-height: 1.7;
  color: rgba(255,255,255,0.75);
  margin-bottom: 56px;
}
.cover-desc strong { color: #2CBCA4; font-weight: 500; }

.cover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 80px;
}

.entry-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  color: #fff;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.entry-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(44,188,164,0.15), transparent 50%);
  opacity: 0; transition: opacity 0.3s;
}
.entry-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(44,188,164,0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.entry-card:hover::before { opacity: 1; }

.entry-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(44,188,164,0.2), rgba(44,188,164,0.05));
  border: 1px solid rgba(44,188,164,0.3);
  display: grid; place-items: center;
  flex-shrink: 0;
  position: relative;
}
.entry-icon svg { width: 24px; height: 24px; color: #2CBCA4; }

.entry-info { flex: 1; position: relative; }
.entry-num {
  font-size: 10px; letter-spacing: 2px; font-weight: 700;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}
.entry-title {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.entry-desc { font-size: 13px; color: rgba(255,255,255,0.6); }

.entry-arrow {
  font-size: 24px; color: #2CBCA4;
  transition: transform 0.3s;
  position: relative;
}
.entry-card:hover .entry-arrow { transform: translateX(6px); }

.cover-footer {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,0.5);
  letter-spacing: 0.5px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2CBCA4;
  box-shadow: 0 0 12px #2CBCA4;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}


/* ============================================
   DASHBOARD / CRM LAYOUT (DESKTOP)
   ============================================ */
.view-dashboard, .view-crm, .view-registro {
  display: none;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
.view-dashboard.active, .view-crm.active, .view-registro.active {
  display: grid;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, #0F3F37 0%, #141732 100%);
  color: #fff;
  padding: 24px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 0 8px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}
.sidebar-logo img {
  height: 56px;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(44,188,164,0.20), rgba(44,188,164,0.05));
  color: #fff;
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: #2CBCA4;
  border-radius: 0 3px 3px 0;
}
.nav-item.active svg { color: #2CBCA4; }

.nav-badge {
  margin-left: auto;
  background: #C9A961;
  color: #141732;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 100px;
}

.sidebar-foot {
  padding-top: 20px; margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px;
}
.user-chip .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2CBCA4, #1D7D6D);
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 12px;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; color: #fff; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.5); }

/* Main area */
.main-area { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.back-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-2); font-size: 13px; font-weight: 500;
  padding: 6px 10px; border-radius: 8px;
  transition: all 0.2s;
}
.back-btn svg { width: 16px; height: 16px; }
.back-btn:hover { background: var(--bg); color: var(--teal-dark); }

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-search {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  width: 320px;
}
.topbar-search svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.topbar-search input {
  border: none; background: transparent;
  padding: 9px 10px; font-size: 13px;
  width: 100%; color: var(--text);
}
.topbar-search input::placeholder { color: var(--text-3); }
.topbar-search:focus-within { border-color: var(--teal); background: #fff; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--text-2);
  transition: all 0.2s;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--bg); color: var(--teal-dark); }
.dot-indicator {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid #fff;
}

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2CBCA4, #1D7D6D);
  display: grid; place-items: center;
  color: #fff; font-weight: 600; font-size: 11px;
  flex-shrink: 0;
}
.avatar-md { width: 36px; height: 36px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 15px; }
.avatar-xl { width: 80px; height: 80px; font-size: 26px; }

/* Page content */
.page-content { padding: 32px; max-width: 1600px; width: 100%; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  margin-bottom: 28px;
}
.breadcrumb {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--teal-dark); font-weight: 600;
  margin-bottom: 8px;
}
.page-title {
  font-family: var(--font-serif);
  font-size: 32px; font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.page-sub { color: var(--text-3); font-size: 14px; margin-top: 6px; }

.page-filters, .page-actions { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.select { display: flex; flex-direction: column; gap: 4px; }
.select label, .filter label {
  font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.select select, .filter select, .filter input {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px; color: var(--text);
  min-width: 180px;
  cursor: pointer;
}
.select select:focus, .filter select:focus, .filter input:focus { border-color: var(--teal); }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #2CBCA4 0%, #1D7D6D 100%);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 12px rgba(44,188,164,0.30);
  transition: all 0.2s;
}
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(44,188,164,0.4); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px; font-weight: 500;
  transition: all 0.2s;
}
.btn-ghost svg { width: 16px; height: 16px; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }

.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; padding: 14px; font-size: 14px; margin-top: 20px; }


/* ============================================
   KPI CARDS
   ============================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--border-2);
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
}
.kpi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi-card::before {
  content: ''; position: absolute;
  top: 0; right: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  transform: translate(40%, -40%);
}
.kpi-teal::before { background: radial-gradient(circle, rgba(44,188,164,0.18), transparent 70%); }
.kpi-gold::before { background: radial-gradient(circle, rgba(201,169,97,0.20), transparent 70%); }
.kpi-dark::before { background: radial-gradient(circle, rgba(20,23,50,0.10), transparent 70%); }
.kpi-mint::before { background: radial-gradient(circle, rgba(136,201,123,0.20), transparent 70%); }

.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.kpi-teal .kpi-icon { background: rgba(44,188,164,0.12); color: var(--teal); }
.kpi-gold .kpi-icon { background: rgba(201,169,97,0.15); color: var(--gold-dark); }
.kpi-dark .kpi-icon { background: rgba(20,23,50,0.10); color: var(--navy); }
.kpi-mint .kpi-icon { background: rgba(136,201,123,0.18); color: #488938; }
.kpi-icon svg { width: 22px; height: 22px; }

.kpi-label {
  font-size: 12px; font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-serif);
  font-size: 34px; font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}
.kpi-trend {
  font-size: 11.5px; font-weight: 500;
  color: var(--success);
}
.kpi-trend.up::before { content: '↑ '; }


/* ============================================
   CARD
   ============================================ */
.card {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.card.no-pad { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.card-sub { font-size: 12.5px; color: var(--text-3); }

.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-2); }
.dot-teal, .dot-gold { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: middle; }
.dot-teal { background: var(--teal); }
.dot-gold { background: var(--gold); }


/* ============================================
   CHART
   ============================================ */
.grid-2-1 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.chart-wrap { width: 100%; height: 280px; }
.bar-chart { width: 100%; height: 100%; }

/* Services */
.service-list { display: flex; flex-direction: column; gap: 18px; }
.service-item {
  display: flex; align-items: center; gap: 16px;
}
.service-info { flex: 1; }
.service-name {
  font-size: 13.5px; font-weight: 500; color: var(--text);
  margin-bottom: 8px;
}
.service-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 100px;
  overflow: hidden;
}
.service-bar span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-dark));
  border-radius: 100px;
}
.service-num {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 600;
  color: var(--navy);
  min-width: 40px; text-align: right;
}

/* Top comisionistas */
.top-list { display: flex; flex-direction: column; gap: 12px; }
.top-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border-2);
  transition: all 0.2s;
}
.top-card:hover { background: #fff; box-shadow: var(--shadow); border-color: var(--teal-soft); }
.rank {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-2);
  display: grid; place-items: center;
  font-weight: 700; color: var(--text-3);
  font-size: 13px;
  flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #C9A961, #8B6F2A); color: #fff; }
.rank-2 { background: linear-gradient(135deg, #94A3B8, #64748B); color: #fff; }
.rank-3 { background: linear-gradient(135deg, #B45309, #92400E); color: #fff; }

.top-info { flex: 1; min-width: 0; }
.top-name { font-weight: 600; color: var(--text); font-size: 14.5px; }
.top-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.top-stats { display: flex; gap: 24px; }
.ts { display: flex; flex-direction: column; gap: 2px; }
.ts span { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; }
.ts strong { font-size: 14px; font-weight: 600; color: var(--text); }
.ts.warn strong { color: var(--warning); }
.ts.ok strong { color: var(--success); }


/* ============================================
   CRM TABLE
   ============================================ */
.mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border-2);
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border-2);
  margin-bottom: 20px;
}
.ms-item { background: #fff; padding: 18px 20px; }
.ms-label { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.ms-val { font-family: var(--font-serif); font-size: 22px; font-weight: 600; color: var(--navy); }
.ms-val.ok { color: var(--success); }
.ms-val.warn { color: var(--warning); }

.filters-bar {
  display: flex; align-items: flex-end; gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  margin-bottom: 16px;
}
.filter { display: flex; flex-direction: column; gap: 4px; }
.filter-search input { min-width: 240px; }
.filters-bar .btn-ghost { margin-left: auto; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px; font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.6px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th.num { text-align: right; }
.data-table td {
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.td-patient { display: flex; align-items: center; gap: 12px; }
.td-name { font-weight: 500; }
.td-email { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.2px;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge-paid { background: var(--success-soft); color: #047857; }
.badge-paid::before { background: var(--success); }
.badge-pending { background: var(--warning-soft); color: #92400E; }
.badge-pending::before { background: var(--warning); }
.badge-new { background: rgba(44,188,164,0.12); color: var(--teal-dark); }
.badge-new::before { background: var(--teal); }

.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-top: 1px solid var(--border-2);
  font-size: 13px; color: var(--text-2);
}
.pager { display: flex; gap: 4px; }
.pager button {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  font-size: 13px; color: var(--text-2); font-weight: 500;
  transition: all 0.15s;
}
.pager button:hover { background: var(--bg); }
.pager button.active { background: var(--teal); color: #fff; }


/* ============================================
   REGISTRAR PACIENTE
   ============================================ */
.grid-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.3px;
}
.req { color: var(--danger); }
.field input, .field select, .field textarea {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
  color: var(--text);
  transition: all 0.15s;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(44,188,164,0.10);
}
.code-input {
  font-family: 'Courier New', monospace;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: var(--teal-50) !important;
  color: var(--teal-dark) !important;
  border-color: var(--teal-soft) !important;
}
.prefix-input {
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.prefix-input:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(44,188,164,0.10); }
.prefix-input span {
  padding: 0 12px;
  color: var(--text-3);
  font-weight: 600;
  border-right: 1px solid var(--border);
  background: var(--bg);
  align-self: stretch; display: grid; place-items: center;
  font-size: 14px;
}
.prefix-input input {
  border: none !important; background: transparent !important;
  flex: 1; padding: 11px 12px !important; box-shadow: none !important;
}
.prefix-teal { border-color: var(--teal-soft); background: var(--teal-50); }
.prefix-teal span { background: rgba(44,188,164,0.08); color: var(--teal-dark); }

.summary-box {
  margin-top: 20px;
  padding: 18px;
  background: linear-gradient(135deg, var(--teal-50) 0%, #fff 100%);
  border: 1px solid var(--teal-soft);
  border-radius: 12px;
}
.sb-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 13px; color: var(--text-2);
  border-bottom: 1px dashed var(--border);
}
.sb-row:last-child { border-bottom: none; }
.sb-row strong { color: var(--text); font-weight: 600; }
.sb-row strong.teal { color: var(--teal-dark); }
.sb-row.total {
  margin-top: 4px; padding-top: 14px;
  border-top: 2px solid var(--teal-soft);
  border-bottom: none;
  font-size: 15px; font-weight: 600;
  color: var(--navy);
}
.sb-row.total strong { color: var(--navy); font-size: 18px; font-family: var(--font-serif); }


/* ============================================
   MODAL
   ============================================ */
.modal {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal.show { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  max-width: 440px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-xl);
  animation: pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.modal-icon {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 10px 30px rgba(44,188,164,0.3);
}
.modal-icon svg { width: 40px; height: 40px; }
.modal h3 {
  font-family: var(--font-serif);
  font-size: 24px; font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}
.modal p { font-size: 14px; color: var(--text-2); line-height: 1.6; margin-bottom: 24px; }
.modal p strong { color: var(--teal-dark); }
.modal-actions { display: flex; gap: 10px; justify-content: center; }


/* ============================================
   MOBILE STAGE
   ============================================ */
.view-app, .view-notif {
  display: none;
  min-height: 100vh;
  background: linear-gradient(135deg, #0F3F37 0%, #141732 100%);
  position: relative;
  overflow: hidden;
}
.view-app.active, .view-notif.active { display: block; }

.view-app::before, .view-notif::before {
  content: ''; position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(44,188,164,0.20), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.phone-stage {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  gap: 60px;
  padding: 40px;
  flex-wrap: wrap;
  z-index: 2;
}

.phone-frame {
  position: relative;
  width: 380px;
  height: 780px;
  background: #1a1a1a;
  border-radius: 50px;
  padding: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 50px 100px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.1);
}
.phone-notch {
  position: absolute; top: 14px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 28px;
  background: #1a1a1a;
  border-radius: 0 0 18px 18px;
  z-index: 5;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  background: #F6F8FA;
  border-radius: 38px;
  overflow: hidden;
  display: flex; flex-direction: column;
}

/* Stage side info */
.stage-side {
  max-width: 420px;
  color: #fff;
}
.back-stage {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  color: rgba(255,255,255,0.85);
  font-size: 12.5px; font-weight: 500;
  margin-bottom: 32px;
  transition: all 0.2s;
}
.back-stage svg { width: 14px; height: 14px; }
.back-stage:hover { background: rgba(255,255,255,0.12); color: #fff; }

.stage-eyebrow {
  font-size: 11px; letter-spacing: 3px; font-weight: 600;
  color: #2CBCA4; text-transform: uppercase;
  margin-bottom: 12px;
}
.stage-side h2 {
  font-family: var(--font-serif);
  font-size: 38px; font-weight: 600;
  line-height: 1.1; margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.stage-side p {
  font-size: 15px; line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}
.stage-side p strong { color: #2CBCA4; }
.stage-list {
  list-style: none; margin-bottom: 32px;
}
.stage-list li {
  position: relative;
  padding-left: 28px; padding-bottom: 10px;
  font-size: 13.5px; color: rgba(255,255,255,0.7);
}
.stage-list li::before {
  content: '✓';
  position: absolute; left: 0; top: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(44,188,164,0.2);
  color: #2CBCA4;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
}
.stage-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(44,188,164,0.12);
  border: 1px solid rgba(44,188,164,0.3);
  border-radius: 100px;
  font-size: 12px; font-weight: 500;
  color: #2CBCA4;
}
.dot-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2CBCA4;
  box-shadow: 0 0 10px #2CBCA4;
  animation: pulse 1.5s infinite;
}


/* ============================================
   APP (MOBILE)
   ============================================ */
.app-page {
  display: none;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow: hidden;
}
.app-page.active { display: flex; }

.app-header {
  padding: 56px 20px 22px;
  flex-shrink: 0;
}
.app-header-gradient {
  background: linear-gradient(135deg, #0F3F37 0%, #1D7D6D 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.app-header-gradient::before {
  content: ''; position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(44,188,164,0.3), transparent 70%);
  border-radius: 50%;
}

.app-header-solid {
  background: #fff;
  color: var(--text);
  padding: 50px 18px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-2);
}

.app-user {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
  position: relative;
}
.app-hello {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.wave { display: inline-block; animation: wave 2s infinite; transform-origin: 70% 70%; }
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}
.app-code { font-size: 12px; color: rgba(255,255,255,0.7); }
.app-code strong { color: #2CBCA4; font-weight: 700; letter-spacing: 1px; }

.app-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2CBCA4, #C9A961);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 14px;
  border: 2px solid rgba(255,255,255,0.2);
}

.app-cta {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  position: relative;
  backdrop-filter: blur(10px);
}
.app-cta-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2CBCA4, #C9A961);
  display: grid; place-items: center;
  color: #fff; flex-shrink: 0;
}
.app-cta-icon svg { width: 18px; height: 18px; }
.app-cta-title { font-size: 13px; font-weight: 600; }
.app-cta-sub { font-size: 11px; color: rgba(255,255,255,0.65); margin-top: 2px; }

.app-title {
  font-family: var(--font-serif);
  font-size: 18px; font-weight: 600;
  color: var(--text);
}
.app-back {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 20px;
  display: grid; place-items: center;
}
.app-icon-btn {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-2);
  display: grid; place-items: center;
}
.app-icon-btn svg { width: 16px; height: 16px; }

.app-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #F6F8FA;
}
.app-body-pad { padding: 0 20px 20px; }

/* App stats */
.app-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  margin-top: -32px;
  position: relative;
}
.app-stat {
  background: #fff;
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(15,63,55,0.10);
  border: 1px solid rgba(255,255,255,0.5);
}
.app-stat-highlight {
  background: linear-gradient(135deg, #0F3F37 0%, #1D7D6D 100%);
  color: #fff;
  border-color: transparent;
}
.app-stat-icon {
  width: 32px; height: 32px;
  border-radius: 10px;
  margin: 0 auto 8px;
  display: grid; place-items: center;
}
.icon-1 { background: rgba(44,188,164,0.15); color: var(--teal); }
.icon-2 { background: rgba(201,169,97,0.18); color: var(--gold-dark); }
.icon-3 { background: rgba(255,255,255,0.15); color: #fff; }
.app-stat-highlight .icon-3 { background: rgba(255,255,255,0.2); }
.app-stat-icon svg { width: 16px; height: 16px; }
.app-stat-val {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.app-stat-lbl { font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.app-stat-highlight .app-stat-lbl { color: rgba(255,255,255,0.75); }

/* App cards */
.app-card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(20,23,50,0.04);
  border: 1px solid var(--border-2);
}
.app-split {
  display: flex; align-items: center;
  justify-content: space-around;
  padding: 16px 8px;
}
.split-lbl { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; text-align: center; }
.split-val {
  font-family: var(--font-serif);
  font-size: 22px; font-weight: 600;
  text-align: center;
}
.split-val.ok { color: var(--success); }
.split-val.warn { color: var(--warning); }
.split-divider { width: 1px; height: 36px; background: var(--border); }

.app-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.app-section-head h4 {
  font-family: var(--font-serif);
  font-size: 16px; font-weight: 600;
  color: var(--navy);
}
.app-link {
  font-size: 12px; font-weight: 600;
  color: var(--teal-dark);
  padding: 4px 8px;
}
.app-link:hover { color: var(--teal); }

.app-search {
  display: flex; align-items: center; gap: 8px;
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.app-search svg { width: 16px; height: 16px; color: var(--text-3); }
.app-search input { border: none; background: transparent; width: 100%; font-size: 13px; }

/* Referral list */
.referral-list { display: flex; flex-direction: column; gap: 8px; }
.referral-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  transition: all 0.15s;
}
.referral-item:hover { border-color: var(--teal-soft); }
.ref-info { flex: 1; min-width: 0; }
.ref-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.ref-svc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.ref-right { text-align: right; }
.ref-amt {
  font-family: var(--font-serif);
  font-size: 15px; font-weight: 600;
  color: var(--teal-dark);
  margin-bottom: 4px;
}

/* Balance card */
.app-balance {
  background: linear-gradient(135deg, #0F3F37 0%, #1D7D6D 100%);
  color: #fff;
  border: none;
  position: relative;
  overflow: hidden;
}
.app-balance::before {
  content: ''; position: absolute;
  top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(44,188,164,0.3), transparent 70%);
  border-radius: 50%;
}
.app-balance .bal-lbl { font-size: 12px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.5px; }
.app-balance .bal-val {
  font-family: var(--font-serif);
  font-size: 36px; font-weight: 700;
  margin: 4px 0 16px;
  letter-spacing: -0.02em;
}
.bal-row {
  display: flex; gap: 32px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 16px;
}
.bal-row > div { display: flex; flex-direction: column; gap: 2px; }
.bal-row span { font-size: 11px; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.5px; }
.bal-row strong { font-size: 15px; font-weight: 600; }
.bal-row strong.ok { color: #6EE7B7; }
.bal-row strong.warn { color: #FCD34D; }
.app-balance .btn-primary {
  background: rgba(255,255,255,0.95);
  color: var(--teal-deep);
  position: relative;
}
.app-balance .btn-primary:hover { background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.2); }

/* Profile */
.profile-card {
  background: #fff;
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  margin-bottom: 16px;
  border: 1px solid var(--border-2);
}
.profile-card .avatar { margin: 0 auto 14px; }
.profile-name {
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 600;
  color: var(--navy);
  margin-bottom: 4px;
}
.profile-code { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.profile-code strong { color: var(--teal-dark); font-weight: 700; letter-spacing: 1px; }
.profile-share { display: flex; justify-content: center; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border-2);
  margin-bottom: 16px;
  overflow: hidden;
}
.ps { padding: 16px; text-align: center; border-right: 1px solid var(--border-2); }
.ps:last-child { border-right: none; }
.ps strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 600;
  color: var(--navy);
}
.ps span { font-size: 11px; color: var(--text-3); }

.profile-list { background: #fff; border-radius: 14px; border: 1px solid var(--border-2); overflow: hidden; }
.profile-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.profile-item:last-child { border-bottom: none; }
.profile-item:hover { background: var(--bg); }
.pi-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--teal-dark);
  display: grid; place-items: center;
}
.pi-icon svg { width: 16px; height: 16px; }
.profile-item .chev { margin-left: auto; color: var(--text-4); font-size: 18px; }
.profile-item.danger { color: var(--danger); }
.profile-item.danger .pi-icon { background: var(--danger-soft); color: var(--danger); }

/* Tab bar */
.app-tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-2);
  padding: 8px 4px 20px;
  flex-shrink: 0;
  box-shadow: 0 -4px 16px rgba(15,63,55,0.04);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px;
  color: var(--text-3);
  font-size: 10.5px; font-weight: 500;
  position: relative;
  transition: color 0.2s;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--teal-dark); }
.tab.active::before {
  content: ''; position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 3px;
  background: var(--teal);
  border-radius: 0 0 3px 3px;
}
.tab-badge {
  position: absolute; top: 4px; right: 18%;
  background: var(--danger);
  color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 5px; border-radius: 100px;
  min-width: 16px; text-align: center;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.push-banner {
  margin: 16px;
  background: linear-gradient(135deg, #fff 0%, var(--teal-50) 100%);
  border: 1px solid var(--teal-soft);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(44,188,164,0.12);
  flex-shrink: 0;
}
.push-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.push-app { display: flex; align-items: center; gap: 10px; }
.push-logo { width: 28px; height: 28px; object-fit: contain; }
.push-title { font-size: 13px; font-weight: 600; color: var(--navy); }
.push-time { font-size: 11px; color: var(--text-3); }
.push-icon { font-size: 22px; }
.push-body {
  font-size: 13px; color: var(--text); line-height: 1.5;
  margin-bottom: 10px;
}
.push-body strong { color: var(--navy); }
.push-meta { font-size: 12px; color: var(--text-3); }
.code-chip {
  background: var(--teal-50);
  color: var(--teal-dark);
  font-weight: 700;
  padding: 1px 8px; border-radius: 6px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
  border: 1px solid var(--teal-soft);
}
.push-amt {
  display: inline-block;
  background: linear-gradient(135deg, #2CBCA4, #1D7D6D);
  color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px;
}

.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  position: relative;
}
.notif-item.notif-new { border-color: var(--teal-soft); background: linear-gradient(180deg, rgba(44,188,164,0.04) 0%, #fff 30%); }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.icon-new { background: rgba(44,188,164,0.15); color: var(--teal-dark); }
.icon-paid { background: rgba(16,185,129,0.12); color: var(--success); }
.icon-info { background: rgba(59,130,246,0.12); color: var(--info); }
.notif-icon svg { width: 18px; height: 18px; }
.notif-body { flex: 1; min-width: 0; }
.notif-tag {
  font-size: 10px; font-weight: 700;
  color: var(--teal-dark);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.notif-text {
  font-size: 13px; color: var(--text); line-height: 1.45;
  margin-bottom: 4px;
}
.notif-text strong { color: var(--navy); }
.notif-time { font-size: 11px; color: var(--text-3); }
.notif-dot {
  width: 8px; height: 8px;
  background: var(--teal);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(44,188,164,0.6);
}


/* ============================================
   FLOATING HOME BUTTON
   ============================================ */
.float-home {
  position: fixed; bottom: 24px; right: 24px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2CBCA4, #1D7D6D);
  color: #fff;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(44,188,164,0.4);
  z-index: 50;
  transition: all 0.3s;
}
body:not(.on-cover) .float-home { display: flex; }
.float-home:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 14px 40px rgba(44,188,164,0.55); }
.float-home svg { width: 22px; height: 22px; }


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .view-dashboard, .view-crm, .view-registro {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 50;
    transform: translateX(-100%);
    width: 260px;
    transition: transform 0.3s;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 14px 18px; }
  .page-content { padding: 20px 18px; }
  .topbar-search { width: 220px; }
  .grid-2-1 { grid-template-columns: 1fr; }
  .grid-form { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .cover-content { padding: 40px 20px 60px; }
  .cover-grid { grid-template-columns: 1fr; }
  .topbar-search { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .top-stats { display: none; }
  .top-card { padding: 14px; }
  .page-filters, .page-actions { width: 100%; }
  .phone-stage { padding: 20px; gap: 30px; }
  .phone-frame { transform: scale(0.9); }
  .stage-side { padding: 0 20px; max-width: 100%; }
  .stage-side h2 { font-size: 28px; }
  .modal-content { padding: 28px 20px; }
  .modal h3 { font-size: 20px; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .filter-search input { min-width: 0; }
  .table-foot { flex-direction: column; gap: 12px; }
}
