/* ============================================================
   DistriControl — Design System & Global Styles
   Distribeauté | Colombia · Panamá · Costa Rica
   ============================================================ */

/* ── Google Fonts ya cargadas desde index.html ── */

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  --primary:            #4e0078;
  --primary-container:  #6a1b9a;
  --primary-fixed:      #f4d9ff;
  --primary-fixed-dim:  #e4b5ff;
  --on-primary:         #ffffff;
  --on-primary-container: #da9cff;

  --secondary:          #5e5e5e;
  --secondary-container:#e3e2e2;
  --on-secondary:       #ffffff;

  --surface:            #fcf9f8;
  --surface-dim:        #dcd9d9;
  --surface-bright:     #fcf9f8;
  --surface-container-lowest: #ffffff;
  --surface-container-low:    #f6f3f2;
  --surface-container:        #f0edec;
  --surface-container-high:   #ebe7e7;
  --surface-container-highest:#e5e2e1;

  --on-surface:         #1c1b1b;
  --on-surface-variant: #4d4351;
  --outline:            #7f7383;
  --outline-variant:    #d0c2d3;

  --error:              #ba1a1a;
  --error-container:    #ffdad6;
  --on-error-container: #93000a;

  --background:         #fcf9f8;
  --inverse-surface:    #313030;

  /* Sidebar */
  --sidebar-width:      256px;
  --header-height:      64px;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;

  /* Typography */
  --font-body: 'Inter', sans-serif;
  --radius-sm:   2px;
  --radius:      4px;
  --radius-md:   6px;
  --radius-lg:   8px;
  --radius-xl:   12px;
  --radius-2xl:  16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.15);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font-body);
  background: var(--background);
  color: var(--on-surface);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }
img { max-width: 100%; }

/* ── Material Icons ─────────────────────────────────────── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--outline-variant); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--outline); }

/* ── Animations ─────────────────────────────────────────── */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── App Shell ──────────────────────────────────────────── */
#app {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--outline-variant);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 16px 20px;
  border-bottom: 1px solid var(--outline-variant);
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  object-fit: contain; flex-shrink: 0;
}
.sidebar-app-name {
  font-size: 16px; font-weight: 700; color: var(--primary);
  line-height: 1.2;
}
.sidebar-company {
  font-size: 10px; font-weight: 500; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.08em;
}

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

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius-lg);
  color: var(--secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--secondary-container);
  color: var(--on-surface);
}
.nav-item--active {
  background: rgba(244, 217, 255, 0.35);
  color: var(--primary);
  font-weight: 700;
}
.nav-active-bar {
  position: absolute;
  right: 0; top: 8px; bottom: 8px;
  width: 3px;
  background: var(--primary);
  border-radius: 3px 0 0 3px;
}
.nav-icon { font-size: 22px; flex-shrink: 0; }
.nav-label { flex: 1; white-space: nowrap; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--outline-variant);
  margin-top: auto;
}
.user-avatar {
  width: 38px; height: 38px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; overflow: hidden; }
.user-name {
  font-size: 14px; font-weight: 600; color: var(--on-surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role {
  font-size: 11px; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.logout-btn {
  background: none; border: none; cursor: pointer;
  color: var(--outline); padding: 6px; border-radius: var(--radius-md);
  display: flex; align-items: center; transition: all 0.15s;
}
.logout-btn:hover { background: var(--error-container); color: var(--error); }

/* ── Header ─────────────────────────────────────────────── */
.top-header {
  position: fixed; top: 0; left: var(--sidebar-width); right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--outline-variant);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  z-index: 90;
  backdrop-filter: blur(8px);
}

.header-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  flex: 1; max-width: 400px;
  transition: border-color 0.15s;
}
.header-search:focus-within { border-color: var(--primary); }
.search-icon { font-size: 18px; color: var(--outline); flex-shrink: 0; }
.search-input {
  border: none; background: transparent;
  font-size: 14px; color: var(--on-surface);
  outline: none; width: 100%;
}
.search-input::placeholder { color: var(--outline); }

.country-filter {
  display: flex; gap: 4px;
  background: var(--surface-container-low);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline-variant);
}
.country-btn {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: none; background: transparent;
  font-size: 13px; font-weight: 500;
  color: var(--on-surface-variant);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.country-btn:hover { color: var(--primary); background: var(--surface-container); }
.country-btn--active {
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.header-actions {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto;
}
.icon-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: none; background: transparent;
  color: var(--on-surface-variant);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--surface-container-high); color: var(--primary); }

/* ── Main Content ───────────────────────────────────────── */
#app-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 24px;
  min-height: calc(100vh - var(--header-height));
  animation: fadeIn 0.2s ease;
}

/* ── Page Header ────────────────────────────────────────── */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 24px;
}
.page-title {
  font-size: 28px; font-weight: 600; color: var(--primary);
  letter-spacing: -0.02em; line-height: 1.2;
}
.page-subtitle {
  font-size: 14px; color: var(--secondary); margin-top: 4px;
}
.page-actions { display: flex; gap: 12px; align-items: center; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--primary); color: var(--on-primary);
  border: none; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary); border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-secondary:hover { background: rgba(78, 0, 120, 0.05); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: transparent; color: var(--secondary);
  border: none; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.btn-ghost:hover { background: var(--surface-container-high); color: var(--on-surface); }

.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--error); color: white;
  border: none; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--outline-variant); border-radius: var(--radius-md);
  background: transparent; color: var(--on-surface-variant);
  cursor: pointer; transition: all 0.15s;
}
.btn-icon:hover { background: var(--surface-container-high); color: var(--primary); border-color: var(--primary); }

.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-spinner { display: inline-flex; align-items: center; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--outline-variant);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface-container-low);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.card-title { font-size: 16px; font-weight: 600; color: var(--on-surface); }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--outline-variant);
  background: var(--surface-container-low);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* KPI Cards */
.kpi-card {
  background: var(--surface-container-lowest);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-label {
  font-size: 11px; font-weight: 500; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.kpi-value {
  font-size: 28px; font-weight: 700; color: var(--on-surface);
  margin-top: 6px; line-height: 1;
}
.kpi-icon {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.kpi-trend {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; margin-top: 12px;
}

/* ── Grids ──────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.content-grid {
  display: grid;
  gap: 20px;
}
.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.col-4 { grid-template-columns: repeat(4, 1fr); }
.col-2-1 { grid-template-columns: 2fr 1fr; }
.col-1-2 { grid-template-columns: 1fr 2fr; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--outline-variant);
  box-shadow: var(--shadow-sm);
}
.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}
.data-table thead th {
  background: var(--surface-container-high);
  color: var(--secondary);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--outline-variant);
  position: sticky; top: 0; z-index: 10;
  white-space: nowrap;
}
.data-table thead th:first-child {
  position: sticky; left: 0; z-index: 20;
}
.data-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(208, 194, 211, 0.3);
  color: var(--on-surface);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) { background: #F8F9FA; }
.data-table tbody tr:hover { background: rgba(78, 0, 120, 0.04); }
.data-table tbody tr.clickable { cursor: pointer; }
.data-table tbody tr.clickable:hover td { background: rgba(78, 0, 120, 0.06); }

/* Sticky first column */
.data-table td:first-child,
.data-table th:first-child {
  position: sticky; left: 0;
  background: inherit; z-index: 5;
  border-right: 1px solid var(--outline-variant);
}
.data-table tbody tr:nth-child(even) td:first-child { background: #F8F9FA; }
.data-table tbody tr:hover td:first-child { background: rgba(78, 0, 120, 0.04); }

.col-id { font-weight: 700; color: var(--primary); font-size: 13px; }
.col-secondary { color: var(--secondary); font-size: 13px; }

/* ── Status Badges ──────────────────────────────────────── */
.status-badge, .action-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.status-green  { background: #e8f5e9; color: #1b5e20; }
.status-blue   { background: #e3f2fd; color: #0d47a1; }
.status-amber  { background: #fff3e0; color: #e65100; }
.status-red    { background: var(--error-container); color: var(--on-error-container); }
.status-purple { background: var(--primary-fixed); color: var(--primary); }
.status-unknown{ background: var(--surface-container); color: var(--outline); }

.badge-green  { background: #e8f5e9; color: #1b5e20; }
.badge-blue   { background: #e3f2fd; color: #0d47a1; }
.badge-red    { background: var(--error-container); color: var(--on-error-container); }
.badge-purple { background: var(--primary-fixed); color: var(--primary); }
.badge-amber  { background: #fff3e0; color: #e65100; }
.badge-teal   { background: #e0f2f1; color: #00695c; }
.badge-indigo { background: #e8eaf6; color: #283593; }
.badge-gray   { background: var(--surface-container); color: var(--secondary); }

/* Country badge */
.country-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600;
}

/* ── Forms ──────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px; font-weight: 500; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  font-size: 14px; color: var(--on-surface);
  background: var(--surface-container-lowest);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(78, 0, 120, 0.1);
}
.form-input::placeholder { color: var(--outline); }
.form-textarea { resize: vertical; min-height: 80px; }

.input-wrap {
  position: relative;
  display: flex; align-items: center;
}
.input-icon {
  position: absolute; left: 12px;
  font-size: 18px; color: var(--outline);
  pointer-events: none;
}
.input-wrap .form-input { padding-left: 40px; }
.input-action-btn {
  position: absolute; right: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--outline); padding: 4px; border-radius: 4px;
  display: flex; align-items: center;
  transition: color 0.15s;
}
.input-action-btn:hover { color: var(--primary); }

.field-error {
  font-size: 12px; color: var(--error);
  min-height: 16px;
}

/* Form grid */
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-divider {
  border: none; border-top: 1px solid var(--outline-variant);
  margin: 8px 0;
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-container-low);
  border-top: 1px solid var(--outline-variant);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  font-size: 13px; color: var(--secondary);
}
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
  background: transparent; color: var(--secondary);
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all 0.15s;
}
.page-btn:hover { background: var(--surface-container-high); color: var(--primary); }
.page-btn--active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── Filters Bar ────────────────────────────────────────── */
.filters-bar {
  display: flex; gap: 12px; align-items: flex-end;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-xl);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 160px; flex: 1; }
.filter-label {
  font-size: 11px; font-weight: 600; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Bar Chart (CSS puro) ───────────────────────────────── */
.bar-chart {
  display: flex; align-items: flex-end; gap: 12px;
  height: 200px; padding: 8px 0;
}
.bar-group {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; height: 100%; position: relative;
}
.bar {
  width: 100%; border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--primary);
  transition: filter 0.2s;
  position: relative;
  margin-top: auto;
}
.bar:hover { filter: brightness(1.15); }
.bar-tooltip {
  position: absolute; top: -32px; left: 50%;
  transform: translateX(-50%);
  background: var(--inverse-surface); color: white;
  font-size: 11px; font-weight: 600; padding: 4px 8px;
  border-radius: 4px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.bar-group:hover .bar-tooltip { opacity: 1; }
.bar-label {
  font-size: 10px; font-weight: 600; color: var(--secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-top: 6px; text-align: center;
}

/* ── Progress Bar ───────────────────────────────────────── */
.progress-bar-wrap {
  width: 100%; height: 8px; background: var(--surface-container);
  border-radius: var(--radius-full); overflow: hidden;
}
.progress-bar {
  height: 100%; background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}
.progress-bar--green { background: #2e7d32; }
.progress-bar--amber { background: #ed6c02; }
.progress-bar--red   { background: var(--error); }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--outline-variant);
  gap: 4px;
  background: var(--surface);
  padding: 0 4px;
}
.tab-btn {
  position: relative;
  padding: 14px 20px;
  background: none; border: none;
  font-size: 14px; font-weight: 600;
  color: var(--secondary);
  cursor: pointer; transition: color 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn--active { color: var(--primary); }
.tab-btn--active::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary);
  border-radius: 2px 2px 0 0;
}
.tab-content { display: none; }
.tab-content--active { display: block; }

/* ── Login Page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  width: 100%;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #2d0048 0%, #4e0078 40%, #6a1b9a 70%, #843ab4 100%);
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.login-bg-shape {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.login-bg-shape--1 { width: 600px; height: 600px; top: -200px; right: -200px; }
.login-bg-shape--2 { width: 400px; height: 400px; bottom: -100px; left: -100px; }
.login-bg-shape--3 { width: 200px; height: 200px; top: 40%; right: 30%; }

.login-card {
  background: white; border-radius: var(--radius-2xl);
  padding: 10px 40px 10px 40px; width: 100%; max-width: 440px;
  box-shadow: var(--shadow-xl);
  position: relative; z-index: 10;
  animation: fadeIn 0.4s ease;
}
.login-logo-wrap {
  display: flex; justify-content: center;
  margin-bottom: 28px;
}
.login-logo { max-width: 200px; height: 50px; object-fit: contain; }
.login-title {
  font-size: 24px; font-weight: 700; color: var(--primary);
  text-align: center; margin-bottom: 8px;
}
.login-subtitle {
  font-size: 14px; color: var(--secondary);
  text-align: center; margin-bottom: 28px; line-height: 1.6;
}
.login-footer {
  margin-top: 28px; text-align: center;
}
.login-countries {
  display: flex; justify-content: center; gap: 12px;
  font-size: 22px; margin-bottom: 8px;
}
.login-footer p {
  font-size: 11px; color: var(--outline);
}

/* ── Empty State ────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; text-align: center;
  color: var(--secondary);
}
.empty-state .empty-icon {
  font-size: 56px; color: var(--outline-variant);
  margin-bottom: 16px;
}
.empty-state h3 { font-size: 18px; color: var(--on-surface); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 360px; line-height: 1.6; }

/* ── Loading Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-container) 25%, var(--surface-container-high) 50%, var(--surface-container) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Upload Zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--outline-variant);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface-container-lowest);
}
.upload-zone:hover, .upload-zone--drag-over {
  border-color: var(--primary);
  background: rgba(78, 0, 120, 0.03);
}
.upload-zone .upload-icon {
  font-size: 48px; color: var(--outline-variant);
  margin-bottom: 12px; display: block;
}

/* ── Signature Pad Wrapper ──────────────────────────────── */
.signature-container {
  border: 2px dashed var(--outline-variant);
  border-radius: var(--radius-xl);
  padding: 4px;
  transition: border-color 0.15s;
}
.signature-container:focus-within { border-color: var(--primary); }

/* ── Alert Boxes ────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-lg);
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; line-height: 1.5;
}
.alert-info    { background: var(--primary-fixed); color: var(--primary); border-left: 4px solid var(--primary); }
.alert-success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #2e7d32; }
.alert-warning { background: #fff3e0; color: #e65100; border-left: 4px solid #ed6c02; }
.alert-error   { background: var(--error-container); color: var(--on-error-container); border-left: 4px solid var(--error); }

/* ── Misc ───────────────────────────────────────────────── */
.text-primary  { color: var(--primary); }
.text-secondary{ color: var(--secondary); }
.text-error    { color: var(--error); }
.text-success  { color: #2e7d32; }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono     { font-family: 'Courier New', monospace; }
.truncate      { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.flex          { display: flex; }
.items-center  { align-items: center; }
.gap-2         { gap: 8px; }
.gap-3         { gap: 12px; }
.gap-4         { gap: 16px; }
.mt-4          { margin-top: 16px; }
.mb-4          { margin-bottom: 16px; }
.w-full        { width: 100%; }

/* Avatar pequeño en tabla */
.mini-avatar {
  width: 26px; height: 26px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}

/* FAB */
.fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: var(--primary); color: white;
  border: none; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-lg);
  transition: all 0.2s; z-index: 50;
}
.fab:hover { transform: scale(1.05); box-shadow: var(--shadow-xl); }
.fab:active { transform: scale(0.95); }
.fab .material-symbols-outlined { font-size: 28px; }

/* Section heading */
.section-title {
  font-size: 16px; font-weight: 600; color: var(--on-surface);
  margin-bottom: 12px;
}

/* Divider */
.divider {
  border: none; border-top: 1px solid var(--outline-variant);
  margin: 16px 0;
}
