/* ==========================================================================
   RouteQR — Design System ( Lightning)
   Based on .com marketing & Lightning Design System spec
   ========================================================================== */

/* ------------------------------------------------------------------ */
/*   Font Declarations (self-host for production use)       */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: ' Sans';
  src: local(' Sans'), local('Sans-Regular');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: ' Sans';
  src: local(' Sans Bold'), local('Sans-Bold');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: ' Sans';
  src: local(' Sans Medium'), local('Sans-Medium');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: ' Mono';
  src: local(' Mono'), local('Mono-Regular');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: ' Mono';
  src: local(' Mono Medium'), local('Mono-Medium');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'ITC Avant Garde';
  src: local('ITC Avant Garde Gothic'), local('ITCAvantGardeGothic');
  font-weight: 400;
  font-style: normal;
}

/* ------------------------------------------------------------------ */
/*  CSS Custom Properties —  Lightning Tokens                */
/* ------------------------------------------------------------------ */
:root {
  /* Canvas & Backgrounds */
  --bg: #ffffff;
  --bg-cloud: #ebf6fe;
  --bg-soft: #F8FAFC;
  --bg-deep: #032d60;
  --bg-deeper: #001639;
  --bg-creative: #021f4b;

  /* Surface */
  --surface: #ffffff;
  --surface-tinted: #f3fbff;
  --surface-hover: #f3f3f3;

  /* Content */
  --content-background: #F8FAFC;

  /* Text */
  --text: #080707;
  --text-body: #181818;
  --text-strong: #080707;
  --text-muted: #3e3e3c;
  --text-faint: #555555;
  --text-secondary: #3e3e3c;
  --text-tertiary: #949494;
  --text-on-deep: #ffffff;
  --text-on-deep-muted: rgba(255,255,255,0.85);

  /* Brand / Action */
  --brand: #0176d3;
  --brand-hover: #005ca6;
  --brand-active: #0b5cab;
  --brand-cyan: #0d9dda;
  --brand-deep-blue: #0b5cab;
  --brand-navy: #032d60;

  /* Legacy aliases (backward compat) */
  --primary: #0176d3;
  --primary-hover: #005ca6;
  --secondary: #0176d3;
  --secondary-hover: #005ca6;
  --tertiary: #fe9339;

  /* Accent */
  --accent: #0d9dda;
  --accent-soft: #ebf6fe;
  --accent-strong: #3860be;

  /* Mascot & Gamification */
  --trailhead-orange: #ff9a3c;
  --astro-yellow: #fec934;
  --ohana-green: #04844b;

  /* Links */
  --link: #0176d3;
  --link-hover: #005ca6;
  --selected: rgba(1,118,211,0.10);

  /* Borders */
  --border: #dddbda;
  --border-strong: #c9c7c5;
  --border-subtle: #ecebea;

  /* Focus */
  --ring-focus: #1589ee;
  --focus-ring: 0 0 0 2px #1589ee;

  /* Shadows - Lightning ladder */
  --shadow-ambient: rgba(0,0,0,0.06) 0 1px 2px;
  --shadow-card: rgba(0,0,0,0.10) 0 2px 4px;
  --minimal-shadow-card: 0 2px 4px -1px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --shadow-elevated: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
  --shadow-drawer: rgba(0,0,0,0.20) 0 8px 24px;
  --shadow-modal: rgba(0,0,0,0.32) 0 16px 48px;
  --shadow-sm: rgba(0,0,0,0.06) 0 1px 2px;
  --shadow-md: rgba(0,0,0,0.10) 0 2px 4px;
  --shadow-lg: rgba(0,0,0,0.16) 0 4px 12px;

  /* Semantic */
  --success: #12b76a;
  --success-bg: #ecfdf3;
  --warning: #fe9339;
  --warning-bg: #feedca;
  --danger: #ba0517;
  --danger-bg: #feded8;
  --error: #ba0517;
  --error-bg: #feded8;
  --info: #0176d3;
  --info-bg: #aacbff;
  --on-brand: #ffffff;
  --on-cyan: #ffffff;

  /* Semantic color scale (Lightning DSL) */

  --color-success-50: #ecfdf3;
  --color-success-100: #d1fadf;
  --color-success-300: #6ce9a6;
  --color-success-500: #12b76a;
  --color-success-600: #039855;
  --color-success-700: #027a48;
  --color-success-800: #05603a;
  --color-error-50: #fef3f2;
  --color-error-100: #fee4e2;
  --color-error-300: #fda29b;
  --color-error-400: #f97066;
  --color-error-500: #f04438;
  --color-error-600: #d92d20;
  --color-error-700: #b42318;
  --color-error-800: #912018;
  --color-warning-50: #fffaeb;
  --color-warning-400: #fdb022;
  --color-warning-500: #f79009;
  --color-warning-600: #dc6803;
  --color-warning-700: #b54708;
  --color-active-50: #f0f9ff;
  --color-active-300: #7cd4fd;
  --color-active-400: #36bffa;
  --color-active-500: #0ba5ec;
  --color-active-600: #0086c9;

  /* Radius - Lightning DSL: 4/12/9999 */
  --radius-micro: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-xxl: 16px;
  --radius-pill: 9999px;

  /* Layout */
  --sidebar-bg: #ffffff;
  --sidebar-width: 220px;
  --topbar-height: 64px;

  /* Typography */
  --font-sans: ' Sans', Inter, Arial, Helvetica, sans-serif;
  --font-display: 'ITC Avant Garde', ' Sans', Inter, Arial, Helvetica, sans-serif;
  --font-mono: ' Mono', 'SF Mono', 'SFMono-Regular', Menlo, Consolas, 'Liberation Mono', monospace;

  /* Typography scale (reference) */
  --text-display-hero: 80px;
  --text-display-xl: 64px;
  --text-display-lg: 48px;
  --text-h1: 28px;
  --text-h2: 16px;
  --text-h3: 13px;
  --text-h4: 20px;
  --text-lead: 20px;
  --text-body-lg: 18px;
  --text-body: 16px;
  --text-body-sm: 14px;
  --text-label: 13px;
  --text-caption: 12px;
  --text-cta: 14px;

  /* Motion */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-emphasized: cubic-bezier(0.18, 0.89, 0.32, 1.28);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-standard: 250ms;
  --duration-slow: 400ms;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;
  --space-36: 144px;

  /* gaps */
  --gap-1: 4px;
  --gap-2: 8px;
  --gap-3: 12px;
  --gap-4: 16px;
  --gap-5: 20px;
  --gap-6: 24px;
  
}

/* ------------------------------------------------------------------ */
/*  Gradient Utility ( hero band gradient)                   */
/* ------------------------------------------------------------------ */
.sf-gradient-hero {
  background: linear-gradient(135deg, #032d60 0%, #0b5cab 50%, #0d9dda 100%);
}

/* ------------------------------------------------------------------ */
/*  Reset & Base                                                       */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  line-height: 1.43;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links — : underline on hover only */
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--link-hover); }

/* Headings —  Sans, 700 weight */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--text-strong);
}
h1 {
  font-size: var(--text-h1);
  line-height: 1.20;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}
h2 {
  font-size: var(--text-h2);
  line-height: 1.22;
  letter-spacing: -0.005em;
  margin-bottom: var(--space-4);
}
h3 {
  font-size: var(--text-h3);
  line-height: 1.30;
  letter-spacing: 0;
  margin-bottom: var(--space-3);
}

h3.heading-4 {
  font-size: var(--text-body-sm);
  line-height: 1.35;
  letter-spacing: 0;
  margin-bottom: 0;
}

h4 {
  font-size: var(--text-h4);
  line-height: 1.35;
  letter-spacing: 0;
  margin-bottom: var(--space-2);
}

/* gaps */
.gap-1 { gap: var(--gap-1); }
.gap-2 { gap: var(--gap-2); }
.gap-3 { gap: var(--gap-3); }
.gap-4 { gap: var(--gap-4); }

code, .mono, .text-mono {
  font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ */
/*  Typography Utilities ( scale)                           */
/* ------------------------------------------------------------------ */
.text-display-hero {
  font-family: var(--font-display);
  font-size: var(--text-display-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.text-display-xl {
  font-family: var(--font-display);
  font-size: var(--text-display-xl);
  line-height: 1.10;
  letter-spacing: -0.018em;
  font-weight: 400;
}
.text-display-lg {
  font-size: var(--text-display-lg);
  line-height: 1.16;
  letter-spacing: -0.012em;
  font-weight: 700;
}
.text-h1 {
  font-size: var(--text-h1);
  line-height: 1.20;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.text-h2 {
  font-size: var(--text-h2);
  line-height: 1.22;
  letter-spacing: -0.005em;
  font-weight: 700;
}
.text-h3 {
  font-size: var(--text-h3);
  line-height: 1.30;
  letter-spacing: 0;
  font-weight: 700;
}
.text-h4 {
  font-size: var(--text-h4);
  line-height: 1.35;
  letter-spacing: 0;
  font-weight: 700;
}
.text-eyebrow {
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1.30;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.text-lead {
  font-size: var(--text-lead);
  line-height: 1.50;
  font-weight: 400;
}
.text-body-lg {
  font-size: var(--text-body-lg);
  line-height: 1.55;
  font-weight: 400;
}
.text-body {
  font-size: var(--text-body);
  line-height: 1.5;
  font-weight: 400;
}
.text-body-sm {
  font-size: var(--text-body-sm);
  line-height: 1.43;
  font-weight: 400;
}
.text-label {
  font-size: var(--text-label);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}
.text-caption {
  font-size: var(--text-caption);
  line-height: 1.4;
  font-weight: 400;
}
.text-cta {
  font-family: var(--font-sans);
  font-size: var(--text-cta);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: 0.005em;
}
.text-kpi {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-danger {
  color: var(--danger);
}

/* ------------------------------------------------------------------ */
/*  LAYOUT                                                             */
/* ------------------------------------------------------------------ */
.layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* --- Topbar ( Lightning: 64px, white, bottom-border) --- */
.topbar {
  display: flex;
  align-items: center;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-5);
  gap: var(--space-3);
  flex-shrink: 0;
  z-index: 100;
}
.topbar-brand {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  margin-right: var(--space-2);
}

.topbar-brand img {
  height: 24px;
  width: auto;
}

.topbar-brand a {
  color: inherit;
  text-decoration: none;
}
.topbar-brand a:hover {
  color: var(--brand);
  text-decoration: none;
}
.topbar-brand-badge {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  background: var(--brand);
  color: #fff;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.topbar-search {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 320px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  height: 32px;
}
.topbar-search:hover {
  border-color: var(--text-faint);
}
.topbar-search:focus-within {
  border-color: var(--ring-focus);
  box-shadow: var(--focus-ring);
}
.topbar-search input {
  border: none;
  background: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  color: var(--text);
  width: 100%;
}
.topbar-search input::placeholder {
  color: var(--text-faint);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.topbar-user-name {
  font-size: var(--text-label);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.topbar-logout {
  color: var(--text-faint);
  display: flex;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast) var(--ease-standard),
              background var(--duration-fast) var(--ease-standard);
}
.topbar-logout:hover {
  color: var(--danger);
  background: var(--danger-bg);
  text-decoration: none;
}

/* --- Layout Body --- */
.layout-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* --- Sidebar (Lightning vertical nav adaptation) --- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  transition: width var(--duration-standard) var(--ease-standard);
}
.sidebar-nav {
  padding: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;

  color: var(--text-strong);
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
  position: relative;
}
.sidebar-link:hover {
  background: var(--accent-soft);
  color: var(--brand);
  text-decoration: none;
}
.sidebar-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
}
.sidebar-link:hover svg {
  color: var(--brand);
}
.sidebar-footer {
  padding: var(--space-3) var(--space-4);
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: var(--space-2);
  min-height: 44px;
}
.sidebar-version {
  font-family: var(--font-mono);
}
.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast) var(--ease-standard),
              background var(--duration-fast) var(--ease-standard);
}
.sidebar-toggle:hover {
  color: var(--brand);
  background: var(--accent-soft);
}
.sidebar-toggle-icon {
  transition: transform var(--duration-standard) var(--ease-standard);
}

/* Active link */
.sidebar-link.active {
  background: var(--selected);
  color: var(--brand);
  font-weight: 700;
}
.sidebar-link.active svg {
  color: var(--brand);
}

/* Badge on sidebar link (alert count) */
.sidebar-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}

/* Collapsed state */
.sidebar.collapsed {
  width: 56px;
}
.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
  gap: 0;
}
.sidebar.collapsed .sidebar-link span {
  display: none;
}
.sidebar.collapsed .sidebar-link svg {
  width: 20px;
  height: 20px;
}
.sidebar.collapsed .sidebar-footer {
  justify-content: center;
  padding: var(--space-3) 4px;
}
.sidebar.collapsed .sidebar-version {
  display: none;
}
.sidebar.collapsed .sidebar-toggle-icon {
  transform: rotate(180deg);
}
.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: var(--space-2) 0;
}
.sidebar.collapsed .sidebar-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  font-size: 8px;
  border-radius: 8px;
}
.sidebar.collapsed .sidebar-link.active::before {
  left: auto;
  right: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
}

/* --- Main Content (white bg per  canvas) --- */
.content {
  flex: 1;
  padding: var(--space-6);
  background: var(--bg);
  background-color: var(--content-background); /* El fondo gris muy claro base */
  position: relative; /* Necesario para posicionar los orbes */
  overflow: auto; /* Importante para que los orbes no creen barras de desplazamiento */
  z-index: 0; /* Crea un nuevo contexto de apilamiento */

}

/* ------------------------------------------------------------------ */
/*  CARDS (Lightning: 12px radius, #dddbda border, card shadow)       */
/* ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-5) var(--space-6);
  box-shadow: var( --minimal-shadow-card);
  transition: box-shadow var(--duration-standard) var(--ease-standard);
}

.no-margin-bottom {
  margin-bottom: 0;
}

.no-margin-top {
  margin-top: 0;
}

.no-padding-bottom {
  padding-bottom: 0;
}

.no-padding-top {
  padding-top: 0;
}

.margin-bottom {
  margin-bottom: var(--space-6);
}

.margin-top {
  margin-top: var(--space-6);
}
.form-tip{
  font-size: var(--text-caption);
  margin: var(--space-1) 0;
}

table .tools .btn{
      color: var(--text);
}

.card:hover {
  box-shadow: var(--shadow-elevated);
}
.card-header {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-3);
}

/* Card — Cloud variant (tinted, no border) */
.card-cloud {
  background: var(--bg-cloud);
  border: none;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
}

/* ------------------------------------------------------------------ */
/*  STATS / KPI GRID (Lightning KPI cards)                            */
/* ------------------------------------------------------------------ */
.stats-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: var(--space-6);
}
.stat-card {
  background: var(--surface);

  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  box-shadow: var( --minimal-shadow-card);
  transition: all var(--duration-standard) var(--ease-standard);
}
.stat-card:hover {
  box-shadow: var(--shadow-elevated);
}
.stat-card h3 {
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1.4;
}
.stat-number {
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.0;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat-sublabel{
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

/* Stat card with icon (horizontal layout) — add .stat-card-row alongside .stat-card */
.stat-card-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
}
.stat-card-row h3 {


      font-family: var(--font-sans);
    font-size: var(--text-label);
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: var(--space-1);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1.4;
  
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--duration-standard) var(--ease-standard);
}
.stat-icon-active { background: linear-gradient(135deg, rgba(1,118,211,0.1), rgba(13,157,218,0.05)); color: var(--brand); }
.stat-icon-completed { background: linear-gradient(135deg, rgba(22,163,74,0.1), rgba(34,197,94,0.05)); color: var(--success); }
.stat-icon-conductors { background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(251,191,36,0.05)); color: var(--warning); }
.stat-icon-clients { background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(196,181,253,0.05)); color: #7a3b9a; }
.stat-icon-month { background: linear-gradient(135deg, rgba(236,72,153,0.1), rgba(244,114,182,0.05)); color: #be185d; }
.stat-icon-docs { background: linear-gradient(135deg, rgba(1,118,211,0.1), rgba(13,157,218,0.05)); color: var(--brand); }
.stat-icon-downloads { background: linear-gradient(135deg, rgba(1,118,211,0.1), rgba(13,157,218,0.05)); color: var(--brand); }
.stat-icon-draft { background: linear-gradient(135deg, rgba(100,116,139,0.1), rgba(148,163,184,0.05)); color: #475569; }
.stat-icon-alert { background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(248,113,113,0.05)); color: #dc2626; }

/* ------------------------------------------------------------------ */
/*  DASHBOARD WIDGETS                                                  */
/* ------------------------------------------------------------------ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.dashboard-chart {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var( --minimal-shadow-card);
  transition: all var(--duration-standard) var(--ease-standard);
}
.dashboard-chart:hover {
  box-shadow: var(--shadow-elevated);
}
.dashboard-chart h2 {
  font-family: var(--font-sans);  
  font-weight: 700;
  margin-bottom: var(--space-3);
  letter-spacing: 0;
}
.chart-wrap {
  position: relative;
  height: 260px;
}
.chart-wrap canvas {
  display: block;
  width: 100%;
  height: 260px;
}

.dashboard-table {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  box-shadow: var( --minimal-shadow-card);
  transition: all var(--duration-standard) var(--ease-standard);
}
.dashboard-table:hover {
  box-shadow: var(--shadow-elevated);
}
.dashboard-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
}
.dashboard-table-header h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  margin-bottom: 0;
  letter-spacing: 0;
}

/* Alerts widget */
.alertas-widget {
  margin-bottom: var(--space-6);

}
.alertas-widget h2 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-2);
  letter-spacing: 0;
}
.alertas-list {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0 0;
}
.alerta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.alerta-item:last-child {
  border-bottom: none;
}
.alerta-mensaje {
  flex: 1;
}
.alerta-fecha {
  color: var(--text-tertiary);
  font-size: 12px;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/*  BADGES (Lightning: 4px radius, uppercase label style)              */
/* ------------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 12px;
  padding: 3px 6px;
  border-radius: var(--radius-xl);
  letter-spacing: 0.025em;
  font-weight: 500;
  line-height: 1.4;
  text-transform: capitalize;
}
.badge-activo,
.badge-activa { background: var(--color-active-50); color: var(--color-active-500); }
.badge-completado,
.badge-completada { background: var(--color-success-50); color: var(--color-success-500); }
.badge-borrador { background: var(--bg-soft); color: var(--text-muted); }
.badge-suspendida { background: var(--warning-bg); color: var(--warning); }
.badge-vencimiento_url { background: var(--warning-bg); color: var(--warning); }
.badge-retencion_proxima { background: #fce7f3; color: #be185d; }
.badge-servicio_sin_completar { background: var(--danger-bg); color: var(--danger); }
.badge-documentos_pendientes { background: #e8d5f5; color: #7a3b9a; }
.badge-pendiente { background: var(--warning-bg); color: var(--warning); }
.badge-inactivo { background: var(--bg-soft); color: var(--text-muted); }
.badge-info { background: var(--info-bg); color: var(--brand-navy); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--danger-bg); color: var(--danger); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

/* ------------------------------------------------------------------ */
/*  BUTTONS — : pill radius, cta font, clear hierarchy       */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: var(--text-cta);
  line-height: 1.0;
  letter-spacing: 0.005em;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard),
              transform 100ms var(--ease-standard);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button.btn-inline {
  border: none;
  background: none;
  font-family: inherit;
  line-height: inherit;
  color: inherit;
  font-size: 12px;
  padding: 4px 12px;
}



/* Sizes */
.btn-xs {
  font-size: 12px;
  padding: 4px 12px;
  height: 28px;
  gap: 4px;
}
.btn-sm {
  font-size: var(--text-label);
  padding: 6px 16px;
  height: 32px;
}
.btn-md {
  font-size: var(--text-cta);
  padding: 10px 24px;
  height: 40px;
}
.btn-lg {
  font-size: 16px;
  padding: 14px 32px;
  height: 48px;
}

.btn svg.fill-current {
  fill: var(--text-faint);
}

.btn svg.fill-secondary {
  fill: var(--brand);
}

.btn:hover svg.fill-secondary {
  fill: var(--brand-hover);
}


/* Variants (sizing inherited from .btn-xs/.btn-sm/.btn-md/.btn-lg) */
.btn-primary {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}
.btn-primary:hover {
  background: #ffffff;
  color: var(--brand);
}
.btn-primary:active {
  background: var(--accent-soft);
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}
.btn-secondary:hover {
  background: #ffffff;
  color: var(--brand-hover);
  border-color: var(--brand-hover);
}
.btn-secondary:active {
  background: var(--selected);
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: none;
  padding-left: 8px;
  padding-right: 8px;
}
.btn-ghost:hover {
  background: var(--accent-soft);
  color: var(--brand-hover);
}
.btn-ghost::after {
  content: '\203A';
  margin-left: 1ch;
  transition: margin-left var(--duration-fast) var(--ease-standard);
}
.btn-ghost:hover::after {
  margin-left: 2ch;
}

.btn-link {
  background: transparent;
  color: var(--link);
  border: none;
  padding: 4px 0;
  border-radius: 0;
  text-decoration: none;
}
.btn-link:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.btn-link:focus-visible {
  box-shadow: none;
  text-decoration: underline;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--danger);
}
.btn-danger:hover {
  background: #ffffff;
  color: var(--danger);
}
.btn-danger:active {
  background: var(--danger-bg);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border: 1px solid var(--success);
}
.btn-success:hover {
  background: #ffffff;
  color: var(--success);
}

/* Button on dark/navy background */
.btn-on-deep {
  background: #fff;
  color: var(--brand);
  border: none;
}
.btn-on-deep:hover {
  background: var(--accent-soft);
}

/* logo preview */
.logo-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-36);
  height: var(--space-36);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.logo-preview-original {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ------------------------------------------------------------------ */
/*  TABLES (Lightning data table style)                                */
/* ------------------------------------------------------------------ */
.table-container {

  overflow: hidden;
 
}
.table-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.table-toolbar h3 {
  margin-bottom: 0;
  font-size: 16px;
  letter-spacing: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.43;
}
thead th {
  background: var(--bg);
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.025em;
  text-align: left;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: var(--bg-soft);
}
tbody tr.selected {
  background: var(--selected);
}

/* Forms */

.search-form{
  margin-bottom: var(--space-6);
}
.results-count {
  font-size: var(--text-label);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

form.form-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

form.editor input[type="text"],
form.editor input[type="email"],
form.editor input[type="password"],
form.editor select,
form.editor textarea {
  width: 100%;
}

/* ------------------------------------------------------------------ */
/*  FORMS (Lightning: 4px radius, #c9c7c5 border, #1589ee focus)      */
/* ------------------------------------------------------------------ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  max-width: 720px;
  box-shadow: var( --minimal-shadow-card);
}
.form-group {
  margin-bottom: var(--space-4);
}

.form-group-columns {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-template-columns: repeat(auto-fit, minmax(200px, auto));
  justify-content: start;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
  line-height: 1.4;
}
.form-input,
.form-select,
.form-textarea {
  padding: 10px 12px;
  height: 40px;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.form-textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
  line-height: 1.5;
}

.full-input {
  width: 100%;
}

.full-textarea {
  width: 100%;
  min-height: 4em;
}
.form-select {
  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='%23555555' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--text-faint);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--ring-focus);
  box-shadow: 0 0 0 2px rgba(21, 137, 238, 0.20);
}
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger);
  background: var(--danger-bg);
  box-shadow: none;
}
.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(186, 5, 23, 0.20);
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  line-height: 1.4;
}
.form-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* Checkbox */
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* ------------------------------------------------------------------ */
/*  CHIPS / PILLS ( Lightning chips)                         */
/* ------------------------------------------------------------------ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.chip-success { background: var(--success-bg); color: var(--success); }
.chip-warning { background: var(--warning-bg); color: var(--warning); }
.chip-error { background: var(--danger-bg); color: var(--danger); }
.chip-info { background: var(--info-bg); color: var(--brand-navy); }
.chip-neutral { background: var(--bg-soft); color: var(--text-muted); border: 1px solid var(--border); }

/* ------------------------------------------------------------------ */
/*  FLASH MESSAGES (Lightning toast-style)                             */
/* ------------------------------------------------------------------ */
.flash {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  margin-bottom: var(--space-4);
  border: 1px solid transparent;
  line-height: 1.4;
}
.flash-success {
  background: var(--success-bg);
  color: #036e3a;
  border-color: #9ed99c;
}
.flash-error {
  background: var(--danger-bg);
  color: #7a0f00;
  border-color: #f5c6cb;
}
.flash-warning {
  background: var(--warning-bg);
  color: #a86500;
  border-color: #fad998;
}
.flash-info {
  background: var(--info-bg);
  color: #004a8f;
  border-color: #7ab5ff;
}

/* ------------------------------------------------------------------ */
/*  PAGINATION                                                         */
/* ------------------------------------------------------------------ */
.pagination {
  display: flex;
  gap: 4px;
  margin-top: var(--space-4);
  justify-content: center;
}
.pagination .btn {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
}

/* ------------------------------------------------------------------ */
/*  ACTIONS BAR                                                        */
/* ------------------------------------------------------------------ */
.actions-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.actions-bar h1 {
  margin-bottom: 0;
  margin-right: auto;
}

/* ------------------------------------------------------------------ */
/*  UTILITIES                                                          */
/* ------------------------------------------------------------------ */
.mb-sm { margin-bottom: var(--space-2); }
.mb-md { margin-bottom: var(--space-3); }
.mb-lg { margin-bottom: var(--space-4); }
.mt-lg { margin-top: var(--space-4); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-mono { font-family: var(--font-mono); font-size: var(--text-caption); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-sm { gap: var(--space-2); }
.gap-md { gap: var(--space-3); }
.mb { margin-bottom: var(--space-4); }
.success {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  margin-bottom: var(--space-4);
  border: 1px solid #9ed99c;
  background: var(--success-bg);
  color: #036e3a;
}
.error {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  margin-bottom: var(--space-4);
  border: 1px solid #f5c6cb;
  background: var(--danger-bg);
  color: #7a0f00;
}
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

/* ------------------------------------------------------------------ */
/*  EMPTY STATE                                                        */
/* ------------------------------------------------------------------ */
.empty-state {
  text-align: center;
  padding: 48px var(--space-4);
  color: var(--text-muted);
}
.empty-state svg {
  margin-bottom: var(--space-3);
  color: var(--text-faint);
}
.empty-state p {
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/*  LOGIN BOX ( Lightnining login card)                      */
/* ------------------------------------------------------------------ */

.body-login {
  background: var(--bg);
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  min-width: 100vw;
  flex-direction: row;

}

.login-title {
      color: var(--text-strong);
}

.login-float{
      position: absolute;
      top: 0;
      right: 0;
      text-align: center;
      z-index: 1;
}

.login-float img{
      max-width: 250px;
}

.login-left {
  flex: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  flex-direction: column;
    color: var(--brand-navy);
    position: relative;
} 

.login-right {
  flex: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
      background-color: var(--content-background);
}

.login-logo {
  max-width: 280px;
  margin-bottom: var(--space-4);
}

.login-box {
  max-width: 400px;
}

.login-box input{
  width: 100%;
}

.login-box h1 {
 

  margin-bottom: var(--space-6);
  
}
.login-box .form-group {
  margin-bottom: var(--space-4);
}
.login-box .btn-primary {
  width: 100%;
  height: 44px;
  font-size: 15px;
  margin-top: var(--space-2);
}

/* ------------------------------------------------------------------ */
/*  DETAIL LIST                                                        */
/* ------------------------------------------------------------------ */
.dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-2) var(--space-4);
  font-size: 14px;
}
.dt {
  color: var(--text-muted);
  font-weight: 700;
  white-space: nowrap;
  font-size: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.dd {
  color: var(--text);
}

/* ------------------------------------------------------------------ */
/*  BACKWARD COMPATIBILITY — ensure legacy patterns still work         */
/*  Note: sizing comes from .btn-xs/.btn-sm/.btn-md/.btn-lg           */
/* ------------------------------------------------------------------ */
.btn-primary,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: 700;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  letter-spacing: 0.005em;
  line-height: 1.0;
}
.btn-primary:hover {
  background: #ffffff;
  color: var(--brand);
  text-decoration: none;
}
.btn-small {
  font-size: var(--text-label);
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}
.btn-small:hover {
  background: #ffffff;
  color: var(--brand);
  text-decoration: none;
}
.btn-small.danger,
.btn-danger {
  background: var(--danger);
  color: #fff;
  border: 1px solid var(--danger);
}
.btn-small.danger:hover,
.btn-danger:hover {
  background: #ffffff;
  color: var(--danger);
  text-decoration: none;
}
.btn-secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
  font-family: var(--font-sans);
  font-weight: 700;
  border-radius: var(--radius-pill);
}
.btn-secondary:hover {
  background: #ffffff;
  color: var(--brand-hover);
  border-color: var(--brand-hover);
  text-decoration: none;
}

/* DROPZONE */

.dropzone{

    display:flex;
    justify-content:center;
    align-items:center;

    min-height:220px;

    border:2px dashed var(--border);
    border-radius: var(--radius-lg);

    cursor:pointer;

    transition:.25s;

    background: var(--content-background);
    padding: var(--space-4) var(--space-8);
}

.dropzone:hover{

    border-color: var(--secondary);
  

}

.dropzone.dragover{

    border-color: var(--secondary);
    background: var(--content-background-dragover);
    transform:scale(1.01);

}

.dropzone-content{

    text-align:center;
    display:flex;
    flex-direction:column;
    gap:10px;

    

}

.dropzone-content svg{

    margin:auto;
    color: var(--primary);

}

.dropzone-content strong{

   
    font-size:16px;

}

.dropzone-content small{

    color: var(--text-muted);

}

/* ------------------------------------------------------------------ */
/* RESPONSIVE GRID                                                     */
/* ------------------------------------------------------------------ */


@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }

  .login-left {
      flex: 0.3;
  }
  .login-right {
      flex: 0.7;
          padding: var(--space-2) var(--space-4) var(--space-8) var(--space-4);
  }
    
  .login-description {
    text-align: center;
  }

  .body-login {
    flex-direction: column;
  }

}

/* ------------------------------------------------------------------ */
/*  RESPONSIVE PANEL (móvil / tablet)                                  */
/* ------------------------------------------------------------------ */

/* Botón hamburguesa: oculto en escritorio */
.topbar-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard);
}
.topbar-menu-toggle:hover {
  background: var(--accent-soft);
  color: var(--brand);
}

/* Backdrop para el drawer móvil (oculto por defecto) */
.sidebar-backdrop {
  display: none;
}

/* Tablet */
@media (max-width: 1024px) {
  .content {
    padding: var(--space-4);
  }
  .topbar {
    padding: 0 var(--space-3);
  }
}

/* Móvil / tablet portrait: drawer lateral + scroll de tablas */
@media (max-width: 900px) {
  .topbar-menu-toggle {
    display: inline-flex;
  }
  .sidebar-toggle {
    display: none;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 260px;
    max-width: 85vw;
    z-index: 300;
    transform: translateX(-100%);
    transition: transform var(--duration-standard) var(--ease-standard),
                box-shadow var(--duration-standard) var(--ease-standard);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 48px rgba(15, 23, 42, 0.3);
  }
  /* El colapso de escritorio se fuerza a expandido en móvil */
  .sidebar.collapsed {
    width: 260px;
  }
  .sidebar.collapsed .sidebar-link {
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }
  .sidebar.collapsed .sidebar-link span {
    display: inline;
  }
  .sidebar.collapsed .sidebar-link svg {
    width: 18px;
    height: 18px;
  }
  .sidebar.collapsed .sidebar-footer {
    justify-content: flex-start;
    padding: var(--space-3) var(--space-4);
  }
  .sidebar.collapsed .sidebar-version {
    display: inline;
  }
  .sidebar.collapsed .sidebar-header {
    justify-content: flex-start;
    padding: var(--space-2);
  }
  .sidebar.collapsed .sidebar-badge {
    position: static;
    min-width: 20px;
    height: 20px;
    font-size: 10px;
    border-radius: 10px;
    margin-left: auto;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 290;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-fast) var(--ease-standard),
                visibility var(--duration-fast) var(--ease-standard);
  }
  .sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
  }
  .content {
    padding: var(--space-3);
  }
  .topbar {
    padding: 0 var(--space-3);
    gap: var(--space-2);
  }
  .topbar-brand img {
    height: 20px;
  }
  .card {
    padding: var(--space-4);
  }
  /* Tablas anchas → scroll horizontal dentro del contenedor */
  .card,
  .dashboard-table,
  .table-container {
    overflow-x: auto;
  }
  .card table,
  .dashboard-table table,
  .table-container table {
    width: max-content;
    min-width: 100%;
  }
  .btn-md {
    min-height: 44px;
  }
  .actions-bar {
    gap: var(--space-3);
  }
  .actions-bar h1 {
    font-size: 20px;
  }
  .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    align-items: center;
  }
  .search-form input[type="text"] {
    flex: 1 1 100%;
  }
}

/* Teléfono */
@media (max-width: 480px) {
  .topbar-user-name {
    display: none;
  }
  .stat-number {
    font-size: 30px;
  }
  .chart-wrap {
    height: 220px;
  }
  .dashboard-chart {
    padding: var(--space-3);
  }
  .login-left,
  .login-right {
    flex: 1 1 100%;
    padding: var(--space-5) var(--space-4);
  }
  .login-left {
    min-height: 240px;
  }
  .login-float {
    display: none;
  }
  .login-logo {
    max-width: 160px;
  }
}