/* =================================================================
   admin.css — Panel de administración (login + cotizaciones)
   ================================================================= */

body.admin-body {
  cursor: auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.admin-body #cur,
body.admin-body #cur-r {
  display: none;
}

.admin-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: var(--bg-overlay);
  border-bottom: 1px solid rgba(42, 31, 23, 0.12);
  backdrop-filter: blur(12px);
}
.admin-nav .n-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.admin-nav .n-logo .admin-tag {
  color: var(--rust);
  margin-left: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
}
.admin-nav .n-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-user {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.05em;
}
.admin-back {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}
.admin-back:hover {
  opacity: 1;
  color: var(--rust);
}
.admin-logout {
  background: none;
  border: 1px solid var(--rust);
  color: var(--rust);
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.admin-logout:hover {
  background: var(--rust);
  color: var(--paper);
}

/* MAIN */
.admin-main {
  flex: 1;
  position: relative;
  z-index: 2;
  padding: 60px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* LOGIN */
.login-box {
  max-width: 440px;
  margin: 60px auto;
  border: 1px solid rgba(42, 31, 23, 0.14);
  padding: 42px 38px;
  background: rgba(139, 90, 43, 0.035);
}
.login-box h1 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
}
.login-box h1 em {
  font-style: italic;
  color: var(--rust);
}
.login-box .login-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--rust);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.login-box p {
  font-family: var(--body);
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 30px;
  line-height: 1.7;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-row label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  font-weight: 600;
}
.form-row input,
.form-row select,
.form-row textarea {
  background: rgba(139, 90, 43, 0.06);
  border: 1px solid rgba(42, 31, 23, 0.18);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--rust);
  background: rgba(139, 90, 43, 0.05);
}
.form-row textarea {
  min-height: 90px;
  resize: vertical;
  font-family: var(--body);
}
.btn-submit {
  width: 100%;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.2s;
}
.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
  z-index: 0;
}
.btn-submit:hover::before {
  transform: scaleX(1);
}
.btn-submit span {
  position: relative;
  z-index: 1;
}
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.form-msg {
  margin-top: 14px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: none;
}
.form-msg.error {
  display: block;
  border-left: 3px solid #ff5f56;
  background: rgba(255, 95, 86, 0.08);
  color: #ff8a82;
}
.form-msg.success {
  display: block;
  border-left: 3px solid var(--avail);
  background: rgba(40, 167, 69, 0.08);
  color: var(--avail);
}

/* DASHBOARD MENU */
.dash-hdr {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 32px;
}
.dash-hdr h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
}
.dash-hdr h2 em {
  font-style: italic;
  color: var(--rust);
}
.dash-line {
  flex: 1;
  height: 1px;
  background: rgba(42, 31, 23, 0.14);
  margin-left: 10px;
}
.dash-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.dash-tile {
  border: 1px solid rgba(42, 31, 23, 0.14);
  padding: 32px 26px;
  background: rgba(139, 90, 43, 0.035);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.dash-tile:hover {
  background: rgba(139, 90, 43, 0.06);
  border-color: var(--rust);
  transform: translateY(-3px);
}
.dash-tile.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.dash-tile.disabled:hover {
  transform: none;
  border-color: rgba(42, 31, 23, 0.14);
  background: rgba(139, 90, 43, 0.035);
}
.dash-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--rust);
  margin-bottom: 16px;
  display: block;
}
.dash-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 8px;
}
.dash-desc {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.75;
}

/* COTIZACION FORM */
.cot-wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-top: 8px;
}
.cot-form-box,
.cot-preview-box {
  border: 1px solid rgba(42, 31, 23, 0.14);
  padding: 32px 28px;
  background: rgba(139, 90, 43, 0.035);
}
.cot-form-box h3,
.cot-preview-box h3 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
}
.cot-form-box h3 span,
.cot-preview-box h3 span {
  color: var(--rust);
  margin-right: 8px;
  font-family: var(--mono);
}

.extras-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.extra-row {
  display: grid;
  grid-template-columns: 1fr 130px 38px;
  gap: 8px;
  align-items: center;
}
.extra-row input {
  background: rgba(139, 90, 43, 0.06);
  border: 1px solid rgba(42, 31, 23, 0.18);
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
}
.extra-row input:focus {
  border-color: var(--rust);
}
.extra-rm {
  background: rgba(255, 95, 86, 0.08);
  border: 1px solid rgba(255, 95, 86, 0.3);
  color: #ff8a82;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  height: 100%;
  transition: background 0.2s;
}
.extra-rm:hover {
  background: rgba(255, 95, 86, 0.18);
}
.extra-add {
  background: rgba(139, 90, 43, 0.1);
  border: 1px dashed var(--rust);
  color: var(--rust);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
  text-transform: uppercase;
}
.extra-add:hover {
  background: rgba(139, 90, 43, 0.2);
}

.cot-totals {
  margin-top: 24px;
  padding: 18px 0;
  border-top: 1px solid rgba(42, 31, 23, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cot-totals .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 13px;
}
.cot-totals .row .lbl {
  opacity: 0.7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cot-totals .row .val {
  font-weight: 700;
  color: var(--ink);
}
.cot-totals .row.total {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 900;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(42, 31, 23, 0.12);
}
.cot-totals .row.total .val {
  color: var(--rust);
}
.iva-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  margin-top: 16px;
  cursor: pointer;
}
.iva-toggle input {
  accent-color: var(--rust);
  width: 16px;
  height: 16px;
}

.cot-actions {
  margin-top: 26px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-pdf {
  flex: 1;
  min-width: 220px;
  padding: 14px 22px;
  background: var(--rust);
  color: var(--paper);
  border: 1.5px solid var(--rust);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-pdf::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s;
}
.btn-pdf:hover::before {
  transform: scaleX(1);
}
.btn-pdf span {
  position: relative;
  z-index: 1;
}
.btn-reset {
  padding: 14px 18px;
  background: none;
  color: var(--ink);
  border: 1.5px solid rgba(42, 31, 23, 0.22);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-reset:hover {
  border-color: var(--rust);
  color: var(--rust);
}

/* PREVIEW */
.cot-preview-content {
  font-family: var(--body);
  font-size: 13px;
  line-height: 1.75;
  opacity: 0.9;
}
.cot-preview-content .preview-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed rgba(42, 31, 23, 0.1);
}
.cot-preview-content .preview-section:last-child {
  border-bottom: none;
}
.cot-preview-content .lbl-sm {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 4px;
  display: block;
}
.cot-preview-content .val-bg {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
}
.preview-items {
  list-style: none;
  margin-top: 10px;
}
.preview-items li {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dotted rgba(42, 31, 23, 0.08);
}
.preview-items li:last-child {
  border-bottom: none;
}
.preview-items .it-name {
  flex: 1;
  padding-right: 14px;
}
.preview-items .it-price {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--rust);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .admin-nav,
  .admin-main {
    padding: 18px 20px;
  }
  .admin-main {
    padding: 30px 20px;
  }
  .cot-wrap {
    grid-template-columns: 1fr;
  }
  .extra-row {
    grid-template-columns: 1fr 110px 38px;
  }
}

/* ============================================================
   Historial + Clientes (vistas adicionales)
   ============================================================ */
.back-link {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--rust);
  text-decoration: none;
  transition: color 0.2s;
}
.back-link:hover {
  color: var(--amber);
}

.hist-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-btn {
  background: none;
  border: 1px solid rgba(42, 31, 23, 0.18);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  opacity: 0.7;
  transition: background 0.2s, color 0.2s, border-color 0.2s, opacity 0.2s;
}
.filter-btn:hover {
  opacity: 1;
  border-color: var(--rust);
}
.filter-btn.active {
  background: var(--rust);
  color: var(--paper);
  border-color: var(--rust);
  opacity: 1;
}
.search-input {
  flex: 1;
  min-width: 240px;
  max-width: 360px;
  background: rgba(139, 90, 43, 0.06);
  border: 1px solid rgba(42, 31, 23, 0.18);
  color: var(--ink);
  font-family: var(--body);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-input:focus {
  border-color: var(--rust);
  background: rgba(139, 90, 43, 0.05);
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  font-family: var(--body);
  font-size: 14px;
  opacity: 0.55;
  border: 1px dashed rgba(42, 31, 23, 0.14);
}

.hist-list,
.cli-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hist-card,
.cli-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(42, 31, 23, 0.12);
  padding: 22px 24px;
  background: rgba(139, 90, 43, 0.035);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.hist-card:hover,
.cli-card:hover {
  border-color: var(--rust);
  background: rgba(139, 90, 43, 0.05);
  transform: translateY(-1px);
}
.hist-info,
.cli-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.hist-folio {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hist-proyecto,
.cli-nombre {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.25;
}
.hist-cliente,
.cli-meta {
  font-family: var(--body);
  font-size: 13px;
  opacity: 0.75;
}
.hist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
}
.hist-actions,
.cli-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  min-width: 180px;
}
.hist-total {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 900;
  color: var(--rust);
  margin-bottom: 4px;
}
.estado-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
}
.estado-badge.activo {
  background: rgba(40, 167, 69, 0.18);
  color: var(--avail);
  border: 1px solid var(--avail);
}
.estado-badge.terminado {
  background: rgba(139, 90, 43, 0.18);
  color: var(--rust);
  border: 1px solid var(--rust);
}
.estado-badge.cancelado {
  background: rgba(255, 95, 86, 0.15);
  color: #ff8a82;
  border: 1px solid rgba(255, 95, 86, 0.5);
}
.mantenimiento-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: rgba(201, 163, 126, 0.18);
  color: var(--amber);
  border: 1px solid var(--amber);
}

.row-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.row-btn {
  background: rgba(139, 90, 43, 0.06);
  border: 1px solid rgba(42, 31, 23, 0.18);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 11px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  text-decoration: none;
  white-space: nowrap;
}
.row-btn:hover {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
}
.row-btn.danger {
  color: #ff8a82;
  border-color: rgba(255, 95, 86, 0.4);
}
.row-btn.danger:hover {
  background: rgba(255, 95, 86, 0.85);
  color: var(--paper);
  border-color: rgba(255, 95, 86, 0.85);
}
.row-btn.success {
  color: var(--avail);
  border-color: rgba(40, 167, 69, 0.5);
}
.row-btn.success:hover {
  background: var(--avail);
  color: var(--paper);
  border-color: var(--avail);
}

/* Form de cliente: grid y sub-header */
.cli-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-sub-hdr {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rust);
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(42, 31, 23, 0.1);
  font-weight: 700;
}

.btn-add-client {
  flex: 0 0 auto !important;
  min-width: 180px;
}

/* Historial del cliente */
.cli-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cli-history-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(42, 31, 23, 0.1);
  padding: 14px 18px;
  background: rgba(139, 90, 43, 0.03);
  font-family: var(--body);
  font-size: 13px;
}
.cli-history-item .proj {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
}
.cli-history-item .price {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--rust);
}

@media (max-width: 700px) {
  .hist-card,
  .cli-card {
    grid-template-columns: 1fr;
  }
  .hist-actions,
  .cli-actions {
    align-items: flex-start;
    width: 100%;
  }
  .row-btns {
    justify-content: flex-start;
    width: 100%;
  }
  .cli-grid {
    grid-template-columns: 1fr;
  }
  .hist-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-input {
    max-width: 100%;
  }
}

/* ============================================================
   Fix: estilos consistentes para <option> y autocompletar
   ============================================================ */
.form-row select,
.extra-row select,
.cot-form-box select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--rust) 50%),
    linear-gradient(135deg, var(--rust) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
  cursor: pointer;
}
.form-row select option,
.extra-row select option,
.cot-form-box select option,
input + datalist option {
  background: #14141a;
  color: var(--ink);
  padding: 8px 12px;
  font-family: var(--body);
  font-size: 13px;
}
.form-row select option:checked,
.cot-form-box select option:checked {
  background: var(--rust);
  color: var(--paper);
}
.form-row select:focus option:hover,
.cot-form-box select:focus option:hover {
  background: rgba(139, 90, 43, 0.4);
}

/* Autofill chrome / safari override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0px 1000px rgba(20, 20, 26, 0.95) inset;
  caret-color: var(--ink);
  transition: background-color 5000s ease-in-out 0s;
}

/* Datalist (autocomplete) — los dropdowns nativos usan estilos del OS,
   pero las opciones dentro respetan colorscheme */
:root {
  color-scheme: dark;
}

/* ============================================================
   KPI Dashboard + alertas de mantenimiento
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.kpi-card {
  border: 1px solid rgba(42, 31, 23, 0.14);
  background: rgba(139, 90, 43, 0.035);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.kpi-card:hover {
  border-color: var(--rust);
  background: rgba(139, 90, 43, 0.05);
  transform: translateY(-2px);
}
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--rust);
}
.kpi-lbl {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--rust);
  font-weight: 700;
  text-transform: uppercase;
}
.kpi-val {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink);
}
.kpi-sub {
  font-family: var(--body);
  font-size: 12px;
  opacity: 0.7;
  line-height: 1.5;
}
.kpi-sub span {
  color: var(--rust);
  font-weight: 700;
}
/* Tarjeta de alerta destacada (vencimientos) */
.kpi-card.alert {
  border-color: #ff8a82;
  background: rgba(255, 95, 86, 0.06);
  animation: alertPulse 2.4s ease-in-out infinite;
}
.kpi-card.alert::before {
  background: #ff5f56;
}
.kpi-card.alert .alert-lbl {
  color: #ff8a82;
}
.kpi-card.alert .alert-val {
  color: #ff8a82;
}
@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 95, 86, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 95, 86, 0.08); }
}

.alerts-hdr {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #ff8a82;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 700;
}
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}
.alert-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid rgba(255, 95, 86, 0.3);
  background: rgba(255, 95, 86, 0.04);
  font-family: var(--body);
  font-size: 13px;
}
.alert-item .a-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
}
.alert-item .a-days {
  font-family: var(--mono);
  font-size: 11px;
  color: #ff8a82;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid rgba(255, 95, 86, 0.4);
  border-radius: 2px;
}
.alert-item .a-date {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
}
.alert-item.expired .a-days {
  color: var(--paper);
  background: #ff5f56;
  border-color: #ff5f56;
}

@media (max-width: 700px) {
  .alert-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ============================================================
   TOAST de notificación "Renovación hoy" al login
   ============================================================ */
.toast-renewal {
  position: fixed;
  top: 90px;
  right: 30px;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: rgba(15, 15, 20, 0.97);
  border: 1px solid #ff5f56;
  border-left: 5px solid #ff5f56;
  padding: 20px 22px;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(255, 95, 86, 0.25), 0 6px 16px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  animation: toastIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--body);
}
.toast-renewal.toast-out {
  animation: toastOut 0.3s ease-in forwards;
}
@keyframes toastIn {
  from { transform: translateX(20px) scale(0.98); opacity: 0; }
  to   { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toastOut {
  to { transform: translateX(20px); opacity: 0; }
}
.toast-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.toast-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: #ff8a82;
  font-weight: 700;
  text-transform: uppercase;
}
.toast-close {
  background: none;
  border: none;
  color: #ff8a82;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s, transform 0.2s;
}
.toast-close:hover {
  color: var(--ink);
  transform: rotate(90deg);
}
.toast-msg {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 12px;
}
.toast-msg strong {
  color: #ff8a82;
}
.toast-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.toast-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 95, 86, 0.08);
  border: 1px solid rgba(255, 95, 86, 0.25);
  font-size: 13px;
}
.toast-list .t-name {
  font-family: var(--sans);
  font-weight: 700;
  flex: 1;
}
.toast-list .toast-wa {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--avail);
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid var(--avail);
  padding: 6px 10px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.toast-list .toast-wa:hover {
  background: var(--avail);
  color: var(--paper);
}
.toast-list .toast-no-phone {
  font-family: var(--mono);
  font-size: 10.5px;
  opacity: 0.6;
}

@media (max-width: 600px) {
  .toast-renewal {
    top: 70px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* Botón "Recordatorio" en alert-item del dashboard */
.alert-item .a-wa {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--avail);
  background: rgba(40, 167, 69, 0.1);
  border: 1px solid var(--avail);
  padding: 5px 9px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  margin-left: 8px;
}
.alert-item .a-wa:hover {
  background: var(--avail);
  color: var(--paper);
}
