:root {
  --orange-50:  #fff7ed;
  --orange-100: #ffedd5;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;
  --ink-900: #1c1917;
  --ink-700: #44403c;
  --ink-500: #78716c;
  --ink-200: #e7e5e4;
  --bg: #fffaf5;
  --white: #ffffff;
  --error: #b91c1c;
  --success: #15803d;
  --shadow: 0 20px 50px -20px rgba(234, 88, 12, .35), 0 6px 18px -10px rgba(0,0,0,.15);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--orange-100), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, #ffe0c2, transparent 55%),
    var(--bg);
}

.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--orange-400), var(--orange-600));
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  box-shadow: 0 8px 20px -8px var(--orange-500);
  position: relative;
}

.logo::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 6px;
  background: var(--white);
  opacity: .85;
}

h1 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 22px 0;
  color: var(--ink-500);
  font-size: 14px;
}

form { display: flex; flex-direction: column; gap: 6px; }

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  margin-top: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ink-200);
  border-radius: 12px;
  font-size: 15px;
  background: #fffdfb;
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}

input:focus {
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .15);
}

.btn {
  margin-top: 22px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform .05s, box-shadow .15s, filter .15s;
  box-shadow: 0 10px 24px -10px var(--orange-500);
}

.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--orange-700);
  border: 1.5px solid var(--orange-300);
  box-shadow: none;
}

.btn-outline:hover {
  background: var(--orange-50);
}

.alt {
  text-align: center;
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-500);
}

.alt a {
  color: var(--orange-600);
  text-decoration: none;
  font-weight: 600;
}
.alt a:hover { text-decoration: underline; }

.flash {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flash li {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid transparent;
}

.flash-error {
  background: #fef2f2;
  color: var(--error);
  border-color: #fecaca;
}

.flash-success {
  background: #f0fdf4;
  color: var(--success);
  border-color: #bbf7d0;
}

.flash-warning {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.err {
  color: var(--error);
  font-size: 12px;
  margin-top: 2px;
}

.info {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.info > div {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--orange-50);
  border: 1px solid var(--orange-100);
  border-radius: 12px;
  font-size: 14px;
}

.info span { color: var(--ink-500); }
.info strong { color: var(--ink-900); }

.foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-500);
}

.modules {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.module {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: var(--white);
  border: 1.5px solid var(--ink-200);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink-900);
  transition: border-color .15s, transform .1s, box-shadow .15s, background .15s;
}

.module:hover {
  border-color: var(--orange-400);
  background: var(--orange-50);
  box-shadow: 0 10px 24px -16px var(--orange-500);
  transform: translateY(-1px);
}

.module-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-icon svg {
  width: 22px;
  height: 22px;
}

.module-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.module-text strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.module-text span {
  font-size: 13px;
  color: var(--ink-500);
}

.logout-form {
  margin-top: 8px;
}

.module-placeholder {
  padding: 24px;
  background: var(--orange-50);
  border: 1px dashed var(--orange-300);
  border-radius: 12px;
  color: var(--ink-700);
  font-size: 14px;
  text-align: center;
  margin-bottom: 22px;
}

.module-placeholder strong { color: var(--orange-700); }

.card.wide    { max-width: 1000px; }
.card.compact { padding: 22px 28px; }
.card.compact .brand { margin-bottom: 10px; }

.subtitle.compact { margin-bottom: 14px; font-size: 13px; }

.brand { position: relative; }
.today-badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange-700);
  background: var(--orange-50);
  border: 1px solid var(--orange-100);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
}

.form-grid .field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid .full { grid-column: 1 / -1; }

.form-grid label {
  margin-top: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  letter-spacing: 0.01em;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid var(--ink-200);
  border-radius: 10px;
  font-size: 14px;
  background: #fffdfb;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
  font-family: inherit;
  color: var(--ink-900);
}

.form-grid input:focus,
.form-grid select:focus {
  border-color: var(--orange-500);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, .15);
}

.form-grid input[readonly] {
  background: var(--orange-50);
  border-color: var(--orange-100);
  color: var(--ink-700);
  cursor: not-allowed;
}

.form-grid select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--orange-600) 50%),
    linear-gradient(135deg, var(--orange-600) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  align-items: stretch;
  justify-content: flex-end;
}

.actions .btn {
  margin-top: 0;
  padding: 12px 22px;
  font-size: 15px;
  width: auto;
  min-width: 140px;
}

.actions .btn-outline { flex: 0 0 auto; min-width: 120px; }
.actions .btn-save    { flex: 1; min-width: 200px; }

.table-wrap {
  margin-top: 14px;
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-700);
  background: var(--orange-50);
  border-bottom: 1px solid var(--orange-100);
  position: sticky;
  top: 0;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-200);
  color: var(--ink-700);
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #fffaf5; }

.data-table .empty {
  text-align: center;
  color: var(--ink-500);
  padding: 22px;
  font-style: italic;
}

.inline-link {
  display: inline-block;
  font-size: 12px;
  color: var(--orange-600);
  text-decoration: none;
  font-weight: 600;
  margin-top: 2px;
}
.inline-link:hover { text-decoration: underline; color: var(--orange-700); }

.module.module-admin {
  border-style: dashed;
  border-color: var(--orange-300);
}

.badge-admin, .badge-user {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-admin {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: var(--white);
}

.badge-user {
  background: var(--ink-200);
  color: var(--ink-700);
}

.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) {
  .form-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .form-grid.cols-4 { grid-template-columns: 1fr; }
}

.col-actions {
  width: 130px;
  text-align: center;
  white-space: nowrap;
  position: sticky;
  right: 0;
  background: var(--white);
  box-shadow: -6px 0 8px -8px rgba(0,0,0,.15);
  z-index: 1;
}

.data-table thead th.col-actions { background: var(--orange-50); }

.col-actions form {
  margin: 0;
  padding: 0;
  display: inline-block;
}

.row-tools {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

a.btn-icon { text-decoration: none; }

.btn-icon-edit:hover {
  background: var(--orange-50);
  border-color: var(--orange-300);
  color: var(--orange-700);
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--ink-200);
  color: var(--ink-500);
  padding: 5px 7px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-icon svg { width: 14px; height: 14px; }

.btn-icon-danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.muted-tag {
  font-size: 11px;
  color: var(--ink-500);
  font-style: italic;
}

.muted-cell { color: var(--ink-500); font-size: 13px; }

.badge-on {
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 12px;
  background: var(--orange-50);
  border: 1px solid var(--orange-100);
  border-radius: 10px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-700);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.checkbox:hover { background: rgba(255,255,255,.6); }
.checkbox input[type="checkbox"] { accent-color: var(--orange-500); }

.check-row { flex-direction: row; align-items: center; }
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-700);
  cursor: pointer;
  font-weight: 600;
  padding: 8px 0;
}
.check-label input[type="checkbox"] { accent-color: var(--orange-500); width: 18px; height: 18px; }

.cat-positivo, .cat-reintentable, .cat-negativo {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cat-positivo     { background: #dcfce7; color: #15803d; }
.cat-reintentable { background: #fef3c7; color: #b45309; }
.cat-negativo     { background: #fee2e2; color: #b91c1c; }

.estado {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.estado-pendiente   { background: #fef3c7; color: #92400e; }
.estado-seguimiento { background: #ffedd5; color: #c2410c; }
.estado-confirmado  { background: #dcfce7; color: #166534; }
.estado-negativo    { background: #fee2e2; color: #991b1b; }

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--orange-50);
  border: 1px solid var(--orange-100);
  border-radius: 12px;
}

.filter-field { display: flex; flex-direction: column; gap: 3px; }
.filter-field.grow { flex: 1; }
.filter-field label { font-size: 11px; font-weight: 700; color: var(--orange-700); text-transform: uppercase; letter-spacing: 0.05em; }
.filter-field input, .filter-field select {
  padding: 8px 10px;
  border: 1.5px solid var(--ink-200);
  border-radius: 9px;
  background: white;
  font-size: 13px;
  font-family: inherit;
}
.filter-field.action { display: flex; flex-direction: column; justify-content: flex-end; }
.filter-field.action .btn { margin: 0; padding: 8px 16px; font-size: 13px; }

@media (max-width: 720px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-field.grow { grid-column: 1 / -1; }
  .filter-field.action { grid-column: 1 / -1; }
}

.phone-link {
  color: var(--orange-700);
  font-weight: 600;
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.phone-link:hover { text-decoration: underline; }

.phone-big {
  display: inline-block;
  font-size: 22px;
  font-weight: 800;
  color: var(--orange-700);
  text-decoration: none;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding: 6px 12px;
  background: var(--orange-50);
  border: 1px dashed var(--orange-300);
  border-radius: 10px;
}
.phone-big:hover { background: var(--orange-100); }

.origen-tag {
  display: inline-block;
  padding: 3px 10px;
  background: var(--orange-100);
  color: var(--orange-700);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.origen-tag:hover { max-width: none; }

.origen-tag-big {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: white;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.captura-info {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--ink-200);
  gap: 12px;
}
.info-row:last-of-type { border-bottom: none; }
.info-label { font-size: 11px; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--ink-200);
}
.info-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.info-grid .info-full { grid-column: 1 / -1; }

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--ink-200);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fffdfb;
  color: var(--ink-900);
  outline: none;
  resize: vertical;
  min-height: 70px;
}
textarea:focus { border-color: var(--orange-500); box-shadow: 0 0 0 3px rgba(249,115,22,.15); }

.export-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: #16a34a;
  color: white;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border: 0;
  margin: 0;
  width: auto;
  transition: background .15s, transform .05s;
  box-shadow: 0 8px 18px -10px rgba(22, 163, 74, .55);
}

.btn-export:hover  { background: #15803d; }
.btn-export:active { transform: translateY(1px); }
.btn-export svg    { width: 16px; height: 16px; }

.btn-export-all {
  background: #1f2937;
  box-shadow: 0 8px 18px -10px rgba(31, 41, 55, .55);
}
.btn-export-all:hover { background: #111827; }

.btn-icon-call {
  background: var(--orange-500);
  border-color: var(--orange-500);
  color: white;
}
.btn-icon-call:hover {
  background: var(--orange-600);
  border-color: var(--orange-600);
  color: white;
}

.section-title {
  margin: 22px 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-700);
  font-weight: 700;
}

.text-center { text-align: center; }

.dup-table td > div { font-size: 13px; }
.dup-table td small.hint { display: block; margin-top: 2px; }

.btn-promote {
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  margin: 0;
  width: auto;
  letter-spacing: 0.02em;
}
.btn-promote:hover { filter: brightness(1.06); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat {
  background: var(--white);
  border: 1.5px solid var(--ink-200);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); font-weight: 700; }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; color: var(--ink-900); }
.stat-sub { font-size: 11px; color: var(--ink-500); margin-top: 2px; }

.stat-ok   { border-color: #bbf7d0; background: #f0fdf4; }
.stat-ok .stat-value { color: #166534; }
.stat-warn { border-color: #fde68a; background: #fffbeb; }
.stat-warn .stat-value { color: #b45309; }
.stat-bad  { border-color: #fecaca; background: #fef2f2; }
.stat-bad .stat-value { color: #b91c1c; }

#map {
  height: 480px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--ink-200);
  margin-bottom: 14px;
  z-index: 0;
}

.map-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-700);
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 4px;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.legend-confirmado { background: #16a34a; }
.legend-pendiente  { background: #f59e0b; }
.legend-negativo   { background: #dc2626; }

.map-pin {
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.map-pin-ok        { background: #16a34a; }
.map-pin-pendiente { background: #f59e0b; }
.map-pin-bad       { background: #dc2626; }

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 14px 16px;
}

.chart-card.chart-narrow { grid-column: span 1; }
.chart-card.chart-full { grid-column: 1 / -1; }

.chart-title {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-700);
  font-weight: 700;
}

.chart-box {
  position: relative;
  height: 260px;
}

@media (max-width: 720px) {
  .charts-row { grid-template-columns: 1fr; }
  .chart-card.chart-narrow { grid-column: 1 / -1; }
}

.layer-toggles {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}

.layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  color: var(--ink-700);
  padding: 4px 8px;
  border-radius: 8px;
  transition: background .12s;
}

.layer-toggle:hover { background: var(--orange-50); }
.layer-toggle input[type="checkbox"] { accent-color: var(--orange-500); }

.layer-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1.5px solid white;
  box-shadow: 0 0 0 1px rgba(0,0,0,.2);
}

.capas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.capa-card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 12px;
  padding: 14px 16px;
}

.capa-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.capa-info {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
}

.capa-info > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.upload-form input[type="file"] {
  font-size: 12px;
  padding: 6px;
  border: 1.5px dashed var(--ink-200);
  border-radius: 8px;
  background: #fffdfb;
  cursor: pointer;
}

.upload-form .btn {
  margin: 0;
  padding: 8px 14px;
  font-size: 13px;
  width: auto;
}

.capa-summary {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-500);
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.capa-files {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--ink-200);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fffaf5;
}

.capa-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--ink-200);
}

.capa-file:last-child { border-bottom: 0; }
.capa-file:hover { background: var(--orange-50); }

.capa-file-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.capa-file-info strong {
  font-size: 12.5px;
  color: var(--ink-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capa-file-info small {
  font-size: 10.5px;
  color: var(--ink-500);
}

.capa-file form { margin: 0; padding: 0; }
.capa-file .btn-icon {
  padding: 3px 4px;
  border-radius: 6px;
}

@media (max-height: 760px) {
  .container { padding: 12px; }
  .card.compact { padding: 18px 24px; }
  .form-grid { gap: 8px 12px; }
  .form-grid input, .form-grid select { padding: 8px 10px; }
}

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

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