/* ─────────────────────────────────────────────────────────────────────────
   Autofy — Dashboard Analytics CSS
   Palette: Orange #FF6600 | Cool-grey text | Soft whites
   ──────────────────────────────────────────────────────────────────────── */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --brand:        #FF6600;
  --brand-dark:   #CC5200;
  --brand-light:  #FFF0E6;
  --brand-glow:   rgba(255, 102, 0, 0.18);

  --bg:           #F5F7FA;
  --surface:      #FFFFFF;
  --surface-2:    #F9FAFB;

  --text:         #1A202C;
  --text-2:       #4A5568;
  --text-muted:   #9AA0AC;

  --border:       #E8ECF0;
  --border-dark:  #D1D9E0;

  --green:        #10B981;
  --green-light:  #ECFDF5;
  --blue:         #3B82F6;
  --blue-light:   #EFF6FF;
  --purple:       #8B5CF6;
  --purple-light: #F5F3FF;
  --red:          #EF4444;
  --red-light:    #FEF2F2;

  --sidebar-w:    240px;
  --sidebar-w-sm: 68px;
  --topbar-h:     64px;
  --radius-sm:    8px;
  --radius-md:    14px;
  --radius-lg:    20px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.09);

  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font-sans);

  --transition:   150ms cubic-bezier(.4,0,.2,1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition), transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.sidebar-logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 1.6rem;
  color: var(--brand);
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: #0F1D3E;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity var(--transition), width var(--transition);
}

.logo-dot { color: var(--brand); }

/* Nav list */
.nav-list {
  list-style: none;
  flex: 1;
  padding: 1rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
  overflow: hidden;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: .6rem 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-2);
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
}

.nav-item.active .nav-link {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.nav-icon {
  width: 18px;
  text-align: center;
  flex-shrink: 0;
  font-size: .95rem;
}

.nav-label {
  overflow: hidden;
  transition: opacity var(--transition);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 1rem .75rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex: 1;
  min-width: 0;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: opacity var(--transition);
}

.user-role {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-tenant {
  font-size: .72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.logout-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-light);
}

/* Collapsed sidebar */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-sm); }
body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .user-info { opacity: 0; pointer-events: none; width: 0; }
body.sidebar-collapsed .main-wrapper { margin-left: var(--sidebar-w-sm); }

/* ── Main wrapper ────────────────────────────────────────────────────────── */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

/* ── Topbar ──────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  gap: 1rem;
}

.topbar-left { display: flex; align-items: center; gap: .85rem; }

.sidebar-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--border); }

.page-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.page-date {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.topbar-right { display: flex; align-items: center; gap: .75rem; }

.refresh-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: .83rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.refresh-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.refresh-btn.spinning i { animation: spin .7s linear infinite; }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,.2);
  transition: background var(--transition);
}
.status-dot.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(239,68,68,.2); }
.status-dot.loading { background: var(--blue); box-shadow: 0 0 0 3px rgba(59,130,246,.2); animation: pulse 1.2s ease infinite; }

/* ── Loading overlay ─────────────────────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(245,247,250,.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 200;
  backdrop-filter: blur(4px);
  color: var(--text-2);
  font-size: .9rem;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.loading-overlay.hidden, .hidden { display: none !important; }

/* Error screen */
.error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 60vh;
  text-align: center;
  padding: 2rem;
}

.error-icon { font-size: 3rem; color: var(--red); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: .6rem 1.5rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* ── Dashboard content ───────────────────────────────────────────────────── */
.dashboard-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── KPI Grid ────────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  opacity: 0;
  transition: opacity var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.kpi-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}

.kpi-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  flex-shrink: 0;
}
.kpi-orange { background: var(--brand-light); color: var(--brand); }
.kpi-blue   { background: var(--blue-light);  color: var(--blue); }
.kpi-green  { background: var(--green-light); color: var(--green); }
.kpi-purple { background: var(--purple-light); color: var(--purple); }

.kpi-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.kpi-value--sm { font-size: 1.25rem; }

.kpi-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.kpi-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--green-light);
  color: var(--green);
}
.kpi-badge.negative { background: var(--red-light); color: var(--red); }
.kpi-badge.neutral  { background: var(--border);    color: var(--text-muted); }

.kpi-compare, .kpi-note {
  font-size: .75rem;
  color: var(--text-muted);
}

/* ── Charts Grid ─────────────────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1rem;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.chart-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.chart-subtitle {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text-2);
  white-space: nowrap;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-orange { background: var(--brand); }
.legend-green  { background: var(--green); }

.chart-canvas-wrap {
  position: relative;
  height: 220px;
}
.chart-canvas-wrap--bar { height: 240px; }

/* ── Bottom Grid ─────────────────────────────────────────────────────────── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}

/* Table card */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.table-badge {
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
}

.table-wrapper {
  overflow-x: auto;
}

.sales-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.sales-table th {
  background: var(--surface-2);
  padding: .65rem 1rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.sales-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}

.sales-table tr:last-child td { border-bottom: 0; }
.sales-table tbody tr { transition: background var(--transition); }
.sales-table tbody tr:hover { background: var(--surface-2); }

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem !important;
}

.sale-id-badge {
  font-family: monospace;
  font-size: .78rem;
  background: var(--border);
  padding: .15rem .45rem;
  border-radius: 4px;
  color: var(--text);
}

.method-chip {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .18rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.method-efectivo  { background: var(--green-light); color: var(--green); }
.method-nequi,
.method-transferencia { background: var(--blue-light); color: var(--blue); }
.method-tarjeta   { background: var(--purple-light); color: var(--purple); }
.method-other     { background: var(--border); color: var(--text-2); }

/* ── Low-stock widget ────────────────────────────────────────────────────── */
.stock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.stock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.stock-title-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.stock-warn-icon { color: var(--brand); font-size: .9rem; }

.stock-badge {
  background: var(--red-light);
  color: var(--red);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 999px;
}
.stock-badge.ok { background: var(--green-light); color: var(--green); }

.stock-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  max-height: 280px;
}

.stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  animation: fadeIn .3s ease;
}
.stock-item:last-child { border-bottom: 0; }

.stock-name {
  color: var(--text);
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stock-qty {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  padding: .15rem .4rem;
  border-radius: 6px;
  min-width: 36px;
  text-align: center;
}
.stock-qty.critical { background: var(--red-light);   color: var(--red); }
.stock-qty.warning  { background: var(--brand-light); color: var(--brand); }

.stock-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .83rem;
}

.stock-note {
  font-size: .72rem;
  color: var(--text-muted);
  padding: .6rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kpi-card { animation: fadeIn .35s ease both; }
.kpi-card:nth-child(1) { animation-delay: .05s; }
.kpi-card:nth-child(2) { animation-delay: .10s; }
.kpi-card:nth-child(3) { animation-delay: .15s; }
.kpi-card:nth-child(4) { animation-delay: .20s; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .charts-grid { grid-template-columns: 1fr; }
  .bottom-grid  { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 240px; }
  body.mobile-nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrapper { margin-left: 0 !important; }
  .kpi-grid { grid-template-columns: 1fr; }
  .dashboard-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* ══════════════════════════════════════════════════════════════════
   SUPERADMIN PANEL
══════════════════════════════════════════════════════════════════ */
.sa-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: fadeIn .3s ease;
}

/* Tenant selector bar */
.sa-tenant-bar {
  background: linear-gradient(135deg, #0F1D3E 0%, #1a3266 100%);
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sa-tenant-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.sa-tenant-info {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.sa-icon {
  font-size: 1.2rem;
  color: var(--brand);
}

.sa-label {
  font-size: .72rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .15rem;
}

.sa-tenant-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.sa-tenant-controls {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}

.sa-tenant-input {
  width: 130px;
  padding: .55rem .85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: .88rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.sa-tenant-input::placeholder { color: rgba(255,255,255,.35); }
.sa-tenant-input:focus { border-color: var(--brand); background: rgba(255,255,255,.12); }

.sa-load-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.sa-load-btn:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* Cards grid */
.sa-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 1.5rem;
}

.sa-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeIn .35s ease both;
}

.sa-card-header {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
}

.sa-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.sa-icon-orange { color: var(--brand); }
.sa-icon-blue   { color: var(--blue); }

.sa-card-title {
  font-family: var(--font-display);
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
}

.sa-card-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

/* Invite form */
.sa-invite-form { display: flex; flex-direction: column; gap: .75rem; }

.sa-field-row { display: flex; flex-direction: column; gap: .75rem; }

.sa-field-row--2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}

.sa-field { display: flex; flex-direction: column; gap: .3rem; }

.sa-field-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
}

.sa-input {
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.sa-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.sa-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.sa-submit-btn:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-1px); }
.sa-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

.sa-status {
  font-size: .82rem;
  min-height: 1.2rem;
}
.sa-success { color: #087443; }
.sa-error   { color: var(--red); }

.sa-invite-result {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem;
}

.sa-invite-link {
  font-size: .78rem;
  color: var(--blue);
  word-break: break-all;
  text-decoration: underline;
}

/* Info card */
.sa-info-list { display: flex; flex-direction: column; gap: 0; }

.sa-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .84rem;
}
.sa-info-item:last-child { border-bottom: 0; }

.sa-info-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text-2);
}
.sa-info-label i { color: var(--text-muted); font-size: .8rem; }

.sa-info-val { font-weight: 700; color: var(--text); font-family: var(--font-display); }
.sa-val-orange { color: var(--brand); }
.sa-val-green  { color: var(--green); }

.sa-hint {
  font-size: .8rem;
  color: var(--text-muted);
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  line-height: 1.5;
}
.sa-hint i { color: var(--brand); margin-right: .3rem; }

/* ── SA Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sa-cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .sa-tenant-bar-inner { flex-direction: column; align-items: flex-start; }
  .sa-cards-grid { padding: 1rem; }
  .sa-field-row--2 { grid-template-columns: 1fr; }
}
