/* ============================================================
   HOSTKOLPIX CORE — Panel administrativo (core.hostkolpix.com)
   Hoja de estilos del panel. Misma paleta de marca que el sitio
   público (azules Hostkolpix + acento mint).

   Estructura:
     01. Design tokens
     02. Reset y base
     03. Layout (sidebar + topbar + main)
     04. Sidebar
     05. Topbar
     06. Cards y grids
     07. KPIs / stats
     08. Tablas
     09. Badges, chips y estados
     10. Botones y formularios
     11. Gráficos (SVG generados por JS)
     12. Tickets (vista agente)
     13. Infraestructura (servidores)
     14. Integraciones
     15. Modales, drawer y toasts
     16. Login
     17. Responsive
   ============================================================ */

/* ------------------------------------------------------------
   01. DESIGN TOKENS
   ------------------------------------------------------------ */
:root {
  /* Marca Hostkolpix */
  --primary-700: #003D99;
  --primary-600: #0052CC;
  --primary-500: #2670E0;
  --primary-100: #DBEAFE;
  --primary-50:  #EFF5FF;
  --sky-500:     #0EA5E9;
  --mint-600:    #0BC98F;
  --mint-500:    #0FDFA0;
  --mint-100:    #D9FBEF;

  /* Neutros */
  --ink-900: #0B1026;
  --ink-700: #262D52;
  --ink-500: #4A5170;
  --ink-300: #9AA1C0;
  --surface: #F0F2F9;      /* fondo general del panel */
  --line:    #E6E8F4;
  --white:   #FFFFFF;

  /* Semánticos */
  --success: #0BC98F;
  --success-bg: #D9FBEF;
  --warning: #F5A524;
  --warning-bg: #FDF1DC;
  --danger:  #E5484D;
  --danger-bg: #FDE7E8;
  --info:    #0EA5E9;
  --info-bg: #DFF4FD;

  /* Degradados */
  --grad-brand: linear-gradient(135deg, var(--primary-600) 0%, var(--sky-500) 100%);
  --grad-deep:  linear-gradient(150deg, #003D99 0%, #0052CC 55%, #0EA5E9 130%);
  --grad-mint:  linear-gradient(135deg, #0BC98F 0%, #0FDFA0 100%);

  /* Tipografías */
  --font-display: "Sora", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;

  /* Forma */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sidebar-w: 248px;
  --topbar-h: 76px;

  /* Sombras */
  --shadow-sm: 0 2px 10px rgba(11, 16, 38, .05);
  --shadow-md: 0 12px 34px rgba(11, 16, 38, .08);
  --shadow-lg: 0 30px 70px rgba(11, 16, 38, .16);
  --shadow-brand: 0 12px 30px rgba(0, 82, 204, .28);
}

/* ------------------------------------------------------------
   02. RESET Y BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--ink-700);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, svg, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: var(--primary-600); text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--ink-900);
  text-wrap: balance;
}

:focus-visible {
  outline: 3px solid rgba(38, 112, 224, .45);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--primary-100); }

/* Scrollbars discretos */
* { scrollbar-width: thin; scrollbar-color: var(--ink-300) transparent; }

/* ------------------------------------------------------------
   03. LAYOUT GENERAL
   ------------------------------------------------------------ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.app__main {
  min-width: 0;
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.data-query-status {
  position: fixed;
  top: 18px;
  left: calc(var(--sidebar-w) + 24px);
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 6px 16px 6px 6px;
  border: 1px solid rgba(38, 112, 224, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink-700);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .01em;
  box-shadow: 0 14px 38px rgba(11, 16, 38, .14), inset 0 1px 0 rgba(255, 255, 255, .85);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  animation: dataQueryIn .2s ease both;
}

.data-query-status__orb {
  position: relative;
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-600);
  overflow: hidden;
}

.data-query-status__orb::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(from 0deg, transparent 0 42%, var(--primary-500) 62%, var(--mint-500) 100%);
  animation: dataQuerySpin .9s linear infinite;
}

.data-query-status__orb::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: var(--primary-50);
}

.data-query-status__orb i { position: relative; z-index: 1; font-size: .78rem; }

.view-head .data-query-status {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-top: 12px;
}

.transfer-lock-card { position: relative; overflow: hidden; }

.transfer-lock-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 6px;
  background: rgba(240, 242, 249, .82);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.transfer-lock-loading__pill,
.transfer-domain-loading__pill,
.dns-records-loading__pill {
  position: static;
  z-index: auto;
  max-width: 100%;
}

.transfer-domain-loading,
.dns-records-loading {
  min-height: 72px;
  display: grid;
  place-items: center;
}

@keyframes dataQueryIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
}

@keyframes dataQuerySpin { to { transform: rotate(1turn); } }

.view { display: none; animation: viewIn .28s ease both; }
.view.is-active { display: block; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Cabecera de cada vista */
.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.view-head h1 { font-size: 1.7rem; font-weight: 700; }

.view-head p { color: var(--ink-500); margin-top: 4px; max-width: 56ch; }

.view-head__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; position: relative; }

/* Popover de la barra de acciones: los menús se anclan a la barra (a la derecha),
   como en el Core, no a cada icono — por eso .hk-pop no es contexto de posición. */
.hk-pop { position: static; }

/* Columna izquierda de tickets: botón "Nuevo ticket" sobre la lista. */
.ticket-col { display: flex; flex-direction: column; gap: 12px; }

/* Buscador de dominios (estilo hostkolpix.com). */
.dom-hero { margin-bottom: 22px; }
.dom-hero__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  box-shadow: var(--shadow-sm);
}
.dom-hero__bar > i { color: var(--ink-300); font-size: 1.05rem; }
.dom-hero__bar input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 1rem; }
.dom-hero__clear {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--ink-300);
  font-size: 1.08rem;
  transition: color .15s ease;
}
.dom-hero__clear:hover { color: var(--danger); }
.dom-hero__bar .btn { border-radius: 999px; padding: 12px 28px; white-space: nowrap; }
.domain-results { margin: 18px 0 22px; }

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

.domain-results__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 1.15rem;
  background: var(--grad-mint);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 201, 143, .28);
}

.domain-results__icon--warn {
  background: linear-gradient(135deg, #F5A524 0%, #F8BC55 100%);
  box-shadow: 0 8px 18px rgba(245, 165, 36, .28);
}

.domain-results__head h2 {
  font-family: var(--font-display);
  font-size: calc(1.22rem + 3px);
  color: var(--ink-900);
  margin: 0;
  overflow-wrap: anywhere;
}

.domain-results__head h2 span { color: var(--mint-600); }

.domain-results__head h2 .domain-results__status {
  color: var(--ink-900);
  font-weight: 400;
}

.domain-results__head p {
  margin: 3px 0 0;
  color: var(--ink-500);
  font-size: .86rem;
}

.domain-results__more {
  margin: 40px 0 6px;
  font-size: calc(1.22rem + 3px);
  color: var(--ink-500);
}

.domain-results__more strong {
  color: var(--ink-900);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.domain-featured {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.domain-option {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "identity pricing"
    "cycle action";
  align-items: center;
  gap: 14px 18px;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.domain-option--featured:hover {
  transform: translateY(-2px);
  border-color: var(--primary-200);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}

.domain-option.is-added {
  background: var(--mint-100);
  border-color: rgba(11, 201, 143, .45);
}

.domain-option-list {
  display: flex;
  flex-direction: column;
}

.domain-option--row {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 14px 6px;
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(180px, .8fr) minmax(160px, .7fr) auto;
  align-items: center;
  column-gap: 18px;
  grid-template-areas: "identity cycle pricing action";
}

.domain-option--row:hover { background: var(--primary-50); }
.domain-option--row.is-added { background: var(--mint-100); border-radius: var(--radius-sm); border-top-color: transparent; }

.domain-option__identity { grid-area: identity; min-width: 0; }
.domain-option__cycle { grid-area: cycle; }
.domain-option__pricing { grid-area: pricing; text-align: right; }
.domain-option__add { grid-area: action; justify-self: end; }

.domain-option__avail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #067A57;
}

.domain-option__avail i { font-size: .78rem; color: var(--mint-600); }

.domain-option h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink-900);
  overflow-wrap: anywhere;
  margin: 0;
}

.domain-option__tld { color: var(--mint-600); }

.domain-option--row h3 { font-size: .98rem; margin: 0; }
.domain-option--row .domain-option__avail { font-size: .64rem; }

.domain-option__first {
  margin: 0 0 2px;
  color: var(--ink-500);
  font-size: .76rem;
  font-weight: 400;
}

.domain-option__price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.domain-option--row .domain-option__price { font-size: 1.05rem; }

.domain-option__after {
  margin: 3px 0 0;
  color: var(--ink-500);
  font-size: .78rem;
}

.domain-option__cycle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--ink-500);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.domain-option__cycle select {
  appearance: none;
  -webkit-appearance: none;
  width: 140px;
  max-width: 100%;
  padding: 7px 28px 7px 14px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236B7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  outline: none;
  box-shadow: none;
  transition: border-color .15s ease;
}

/* Dropdown de ciclo a medida (mismo del carrito): el % de descuento se
   muestra como badge verde. Un <select> nativo no permite un badge de color. */
.hk-cycle { position: relative; display: inline-block; }
.domain-option .hk-cycle { grid-area: cycle; justify-self: start; }
.hk-cycle__btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--white); font-weight: 500; font-size: .8rem; color: var(--ink-700); cursor: pointer; transition: border-color .15s; }
.hk-cycle__btn:hover { border-color: var(--primary-500); }
.hk-cycle__btn[disabled] { cursor: default; opacity: .75; }
.hk-cycle__label { white-space: nowrap; }
.hk-cycle__badge { background: var(--mint-100); color: #067A57; font-weight: 800; font-size: .68rem; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.hk-cycle__caret { margin-left: auto; color: var(--primary-600); font-size: .72rem; }
.hk-cycle__menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 100%;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.hk-cycle__opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px;
  font-size: .8rem; font-weight: 500; color: var(--ink-700); background: transparent; text-align: left; cursor: pointer; white-space: nowrap; border: 0; }
.hk-cycle__opt:hover, .hk-cycle__opt.is-active { background: var(--primary-50); }

.domain-option__cycle select:focus,
.domain-option__cycle select:focus-visible {
  border-color: var(--primary-500);
  outline: none;
  box-shadow: none;
}

.domain-option__add {
  min-width: 122px;
  background: var(--primary-600);
  color: #fff;
  border: 1px solid var(--primary-600);
  border-radius: 999px;
  box-shadow: none;
}

.domain-option__add:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
  box-shadow: none;
}

.domain-option__add.is-added,
.domain-option__add.is-added:hover {
  background: var(--white);
  border-color: rgba(11, 201, 143, .5);
  color: #067A57;
  box-shadow: none;
}

.domain-results__sticky {
  position: sticky;
  bottom: 14px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 10px 10px 16px;
  background: var(--warning-bg);
  border: 1px solid rgba(245, 165, 36, .45);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.domain-results__sticky p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-700);
  font-weight: 600;
  font-size: .9rem;
}

.domain-results__sticky-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--mint-100);
  color: #067A57;
  font-size: .85rem;
}

.domain-results__sticky strong { color: var(--ink-900); }
.domain-results__sticky .btn { border-radius: 999px; }

@media (max-width: 620px) {
  .dom-hero__bar { flex-wrap: wrap; border-radius: var(--radius-md); }
  .dom-hero__bar .btn { width: 100%; }
  .domain-featured { grid-template-columns: 1fr; }
  .domain-option--row {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    padding: 16px;
    margin-top: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity pricing"
      "cycle action";
    gap: 12px 14px;
  }
  .domain-option--row:hover { background: var(--surface); }
  .domain-results__sticky { border-radius: var(--radius-md); }
  .domain-results__sticky .btn { width: 100%; }
}

/* ------------------------------------------------------------
   04. SIDEBAR
   ------------------------------------------------------------ */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 8px;
  z-index: 40;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 18px;
}

.sidebar__brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink-900);
  line-height: 1.1;
}

/* Etiqueta de versión BETA (borde rojo) al lado de "MI CUENTA". */
.brand-beta {
  display: inline-block;
  margin-left: 4px;
  vertical-align: 1px;
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: 6px;
  padding: 1px 5px;
  line-height: 1.2;
}

.sidebar__brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--primary-600);
}

.sidebar__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-300);
  padding: 14px 12px 6px;
}

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

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-500);
  font-weight: 500;
  font-size: .92rem;
  position: relative;
  transition: background .15s ease, color .15s ease;
  text-align: left;
}

.side-link i {
  width: 20px;
  text-align: center;
  font-size: .95rem;
  color: var(--ink-300);
  transition: color .15s ease;
}

.side-link:hover { background: var(--primary-50); color: var(--primary-700); }
.side-link:hover i { color: var(--primary-600); }

.side-link.is-active {
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 600;
}

.side-link.is-active i { color: var(--primary-600); }

.side-link.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--grad-brand);
}

.side-link__count {
  margin-left: auto;
  background: var(--primary-600);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.side-link__count--warn { background: var(--warning); }
.side-link__count--danger { background: var(--danger); }

.sidebar__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }

/* Tarjeta de estado del sistema en el pie del sidebar */
.sidebar__status {
  margin: 12px 4px 8px;
  background:
    radial-gradient(circle 55px at calc(100% + 21px) 21px, rgba(255, 255, 255, .08) 99%, transparent 100%),
    var(--grad-deep);
  border-radius: var(--radius-md);
  padding: 16px;
  color: #fff;
  position: relative;
  overflow: visible;
}

.sidebar__status-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: .85rem;
}

.sidebar__status-title .dot { background: var(--mint-500); box-shadow: 0 0 0 4px rgba(15, 223, 160, .25); }
.sidebar__status.is-due .sidebar__status-title .dot {
  background: var(--danger);
  animation: sidebarDuePulse 1.8s ease infinite;
}

@keyframes sidebarDuePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .48); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.sidebar__status p { font-size: .75rem; color: rgba(255, 255, 255, .75); margin-top: 6px; }

.sidebar__status-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: .76rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .86);
}

.sidebar__status-title,
.sidebar__status-bottom { position: relative; z-index: 1; }

.sidebar__expiry-summary {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.3;
}

.sidebar__status-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__status-date {
  color: rgba(255, 255, 255, .72);
  font-size: .7rem;
  font-weight: 500;
}

.sidebar__expiry-info.hk-info {
  margin-left: 0;
  color: rgba(255, 255, 255, .88);
  flex: none;
}

.sidebar__expiry-info.hk-info:hover,
.sidebar__expiry-info.hk-info:focus { color: #fff; }

.sidebar__expiry-info:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: 3px;
  border-radius: 999px;
}

.sidebar__expiry-info[hidden] { display: none; }

.sidebar__expiry-info .hk-info__tip {
  top: auto;
  bottom: calc(100% + 9px);
  left: -10px;
  width: 220px;
  max-width: min(220px, calc(100vw - 40px));
  white-space: normal;
}

.sidebar__expiry-info .hk-info__tip::after {
  top: 100%;
  bottom: auto;
  left: 12px;
  border-bottom-color: transparent;
  border-top-color: rgba(11, 16, 38, .5);
}

.sidebar__status-action {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  flex: none;
}

.sidebar__status-action:hover { background: rgba(255, 255, 255, .24); }

/* ------------------------------------------------------------
   05. TOPBAR
   ------------------------------------------------------------ */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--topbar-h);
  padding: 8px 0;
}

.topbar__search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  box-shadow: var(--shadow-sm);
}

.topbar__search i { color: var(--ink-300); }

.topbar__search input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: .92rem;
}

.topbar__search input::placeholder { color: var(--ink-300); }

.topbar__search kbd {
  font-family: var(--font-body);
  font-size: .7rem;
  color: var(--ink-300);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
}

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-500);
  display: grid;
  place-items: center;
  position: relative;
  transition: color .15s, border-color .15s;
}

.icon-btn:hover { color: var(--primary-600); border-color: var(--primary-500); }

.icon-btn .ping {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--white);
}

.icon-btn .cart-count,
.icon-btn .notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--success);
  color: #fff;
  border: 2px solid var(--white);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
}
.icon-btn .notif-count { background: var(--danger); }

.topbar__admin {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 16px 5px 5px;
  box-shadow: var(--shadow-sm);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  flex: none;
}

.avatar--sm { width: 30px; height: 30px; font-size: .68rem; }

.avatar--mint { background: var(--grad-mint); color: var(--ink-900); }
.avatar--ink  { background: var(--ink-700); }
.avatar--sky  { background: var(--sky-500); }

.topbar__admin-name { font-weight: 600; font-size: .86rem; color: var(--ink-900); line-height: 1.2; text-align: left; }
.topbar__admin-name small { display: block; font-weight: 500; font-size: .72rem; color: var(--ink-500); }

.topbar__admin-caret { color: var(--ink-300); font-size: .72rem; margin-left: 2px; transition: transform .2s ease; }
.admin-menu.is-open .topbar__admin-caret { transform: rotate(180deg); }

/* Menú desplegable del administrador */
.admin-menu { position: relative; }

.menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 260px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 8px;
  z-index: 60;
  animation: menuIn .16s ease;
}

/* Notificaciones: panel dropdown ancho con scroll, alineado a la derecha de la
   barra de acciones, igual que en el Core. */
.menu--notif { width: 320px; max-width: calc(100vw - 24px); max-height: 460px; overflow-y: auto; }

/* Carrito: mismo estilo y ancho que las notificaciones (sin el panel lateral
   fijo ni sus márgenes). */
.menu--cart {
  width: 320px;
  max-width: calc(100vw - 24px);
  max-height: 460px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.menu--cart .menu__head { position: sticky; top: 0; background: var(--white); z-index: 1; }

.menu--cart [data-cart-remove] {
  color: var(--ink-300);
}

.menu--cart [data-cart-remove]:hover {
  color: var(--danger);
  background: transparent;
}

@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } }

.menu__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.menu__head-id { display: flex; flex-direction: column; min-width: 0; }
.menu__head-id strong { font-weight: 600; font-size: .9rem; color: var(--ink-900); }
.menu__head-id small {
  font-size: .75rem;
  color: var(--ink-500);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--ink-700);
  text-align: left;
  transition: background .14s ease, color .14s ease;
}

.menu__item i { width: 18px; text-align: center; color: var(--ink-300); transition: color .14s ease; }

.menu__item:hover { background: var(--primary-50); color: var(--primary-700); }
.menu__item:hover i { color: var(--primary-600); }

.menu__item--danger:hover { background: var(--danger-bg); color: #B3261E; }
.menu__item--danger:hover i { color: var(--danger); }

.menu__sep { height: 1px; background: var(--line); margin: 6px 4px; }

.btn--cart-checkout {
  width: 100%;
  margin-top: 8px;
}

/* ------------------------------------------------------------
   06. CARDS Y GRIDS
   ------------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card__head h2 { font-size: 1.05rem; font-weight: 700; }
.card__head .link-more { font-size: .82rem; font-weight: 600; }

.grid { display: grid; gap: 20px; }
.grid--kpis { grid-template-columns: repeat(4, 1fr); }
.grid--main { grid-template-columns: 1.9fr 1fr; align-items: start; }
.grid--halves { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.grid--thirds { grid-template-columns: repeat(3, 1fr); }
.grid--servers { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--plans { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 20px; }

.services-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.service-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.service-column__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0;
}

.service-column__items {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.service-column__items > .card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.service-column .server-card__head > div,
.service-column .integration__row > span {
  min-width: 0;
}

.service-column .server-card__ip,
.service-column .integration__row .val {
  overflow-wrap: anywhere;
}

.service-empty p {
  margin: 0;
  color: var(--ink-300);
}

/* Servicio suspendido por soporte: tarjeta en gris + mensaje encima. */
.service-suspended { position: relative; }
.service-suspended > *:not(.service-suspended__overlay) {
  filter: grayscale(1);
  opacity: .5;
  pointer-events: none;
  user-select: none;
}
.service-suspended__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(240, 242, 249, .55);
  border-radius: inherit;
}
.service-suspended__msg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--danger-bg);
  color: #B3261E;
  font-weight: 700;
  font-size: .9rem;
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------
   07. KPIs / STATS
   ------------------------------------------------------------ */
.kpi {
  position: relative;
  overflow: hidden;
}

.kpi__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }

.kpi__label { font-size: .85rem; font-weight: 600; color: var(--ink-500); }

.kpi__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  background: var(--primary-50);
  color: var(--primary-600);
  flex: none;
  text-decoration: none;
  transition: transform .14s ease, filter .14s ease;
}

/* El ícono es un enlace a su sección. */
a.kpi__icon:hover { transform: translateY(-1px); filter: brightness(1.08); }

.kpi__value {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.4rem + 1vw, 2.3rem);
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 10px;
  line-height: 1.1;
}

.kpi__trend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-500);
}

.kpi__trend .chip-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--success-bg);
  color: #067A57;
}

.kpi__trend .chip-trend--down { background: var(--danger-bg); color: #B3261E; }

/* KPI destacado — degradado de marca (como la primera tarjeta de la referencia) */
.kpi--featured { background: var(--grad-deep); border: none; box-shadow: var(--shadow-brand); }
.kpi--featured::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.kpi--featured .kpi__label { color: rgba(255, 255, 255, .8); }
.kpi--featured .kpi__value { color: #fff; }
.kpi--featured .kpi__icon { background: rgba(255, 255, 255, .16); color: #fff; }
.kpi--featured .kpi__trend { color: rgba(255, 255, 255, .75); }

/* KPI a todo color con la paleta del dashboard (verde, amarillo, rojo) */
.kpi--mint   { background: var(--grad-mint); }
.kpi--amber  { background: linear-gradient(150deg, #F5A524 0%, #F8BC55 120%); }
.kpi--danger { background: linear-gradient(150deg, #E5484D 0%, #EF6E72 130%); }
.kpi--mint, .kpi--amber, .kpi--danger { border: none; box-shadow: var(--shadow-md); }
.kpi--mint::after, .kpi--amber::after, .kpi--danger::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

/* Texto claro consistente en las tarjetas de color del dashboard */
.kpi--mint .kpi__label, .kpi--amber .kpi__label { color: rgba(255, 255, 255, .85); }
.kpi--mint .kpi__value, .kpi--amber .kpi__value { color: #fff; }
.kpi--mint .kpi__trend, .kpi--amber .kpi__trend { color: rgba(255, 255, 255, .8); }
.kpi--mint .kpi__icon,  .kpi--amber .kpi__icon  { background: rgba(255, 255, 255, .18); color: #fff; }

/* Chips homogéneos en las 4 tarjetas de color del dashboard: píldoras del
   sistema (menta / roja) con leve transparencia sobre la tarjeta. */
.kpi--featured .kpi__trend .chip-trend,
.kpi--mint .kpi__trend .chip-trend,
.kpi--amber .kpi__trend .chip-trend,
.kpi--danger .kpi__trend .chip-trend {
  background: rgba(217, 251, 239, .85); /* --success-bg */
  color: #067A57;
}

.kpi--featured .kpi__trend .chip-trend--down,
.kpi--mint .kpi__trend .chip-trend--down,
.kpi--amber .kpi__trend .chip-trend--down,
.kpi--danger .kpi__trend .chip-trend--down {
  background: rgba(253, 231, 232, .85); /* --danger-bg */
  color: #B3261E;
}

/* Rojo es oscuro → texto blanco (como el azul destacado) */
.kpi--danger .kpi__label { color: rgba(255, 255, 255, .85); }
.kpi--danger .kpi__value { color: #fff; }
.kpi--danger .kpi__trend { color: rgba(255, 255, 255, .8); }
.kpi--danger .kpi__icon  { background: rgba(255, 255, 255, .18); color: #fff; }

/* ------------------------------------------------------------
   08. TABLAS
   ------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  min-width: 640px;
}

/* Tablas del dashboard (Mis servicios / Mis Dominios): mismas columnas
   para que queden alineadas verticalmente entre las dos tarjetas. */
.table--dash { table-layout: fixed; min-width: 0; }
.table--dash th:nth-child(1), .table--dash td:nth-child(1) { width: 46%; }
.table--dash th:nth-child(2), .table--dash td:nth-child(2) { width: 26%; }
.table--dash th:nth-child(3), .table--dash td:nth-child(3) { width: 28%; }

/* Historial de Compras (dashboard): 4 columnas. Servicios es angosta (los
   servicios van uno bajo otro) y Paga antes/Estado quedan pegadas a ella. */
.table--purchases th:nth-child(1), .table--purchases td:nth-child(1) { width: 30%; }
.table--purchases th:nth-child(2), .table--purchases td:nth-child(2) { width: 26%; }
.table--purchases th:nth-child(3), .table--purchases td:nth-child(3) { width: 24%; }
.table--purchases th:nth-child(4), .table--purchases td:nth-child(4) { width: 20%; }

/* Dashboard compacto: KPIs + los 4 cuadros entran en una sola pantalla. */
[data-view="dashboard"] .stack { gap: 14px; }
[data-view="dashboard"] .grid { gap: 14px; }
[data-view="dashboard"] .card { padding: 16px 18px; }
/* Las tarjetas pueden encogerse a su columna (evita el scroll horizontal). */
[data-view="dashboard"] .grid--halves > .card { min-width: 0; }
[data-view="dashboard"] .card__head { margin-bottom: 10px; }
[data-view="dashboard"] .kpi__label { font-size: 1.02rem; }
[data-view="dashboard"] .kpi__value { font-size: clamp(2.2rem, 1.7rem + 1.4vw, 3rem); margin-top: 8px; }
[data-view="dashboard"] .kpi__icon { width: 50px; height: 50px; font-size: 1.3rem; }
[data-view="dashboard"] .table--dash th { padding-top: 7px; padding-bottom: 7px; }
[data-view="dashboard"] .table--dash td { padding-top: 9px; padding-bottom: 9px; }
[data-view="dashboard"] .feed li { padding: 9px 0; }
/* Columna izquierda (Mis servicios / Mis Dominios) un poco más ancha que la
   derecha (Historial / tickets). Solo en escritorio, donde hay 2 columnas. */
@media (min-width: 901px) {
  [data-view="dashboard"] .grid--halves { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}

.table th {
  text-align: left;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-300);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  color: var(--ink-700);
}

.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: var(--primary-50); }
.table tbody tr:last-child td { border-bottom: none; }

.table .cell-strong { font-weight: 600; color: var(--ink-900); }
.table .cell-sub { display: block; font-size: .76rem; color: var(--ink-500); font-weight: 400; }
.table .cell-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.cell-user { display: flex; align-items: center; gap: 10px; }

/* Filtros encima de tablas */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.filters .field { margin: 0; }

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 230px;
}

.filter-search i { color: var(--ink-300); font-size: .85rem; }
.filter-search input { border: none; outline: none; background: transparent; flex: 1; font-size: .86rem; }

.seg {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.seg button {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-500);
}

.seg button.is-active { background: var(--white); color: var(--primary-700); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------
   09. BADGES, CHIPS Y ESTADOS
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge .dot { width: 7px; height: 7px; }

.badge--success { background: var(--success-bg); color: #067A57; }
.badge--warning { background: var(--warning-bg); color: #9A6108; }
.badge--danger  { background: var(--danger-bg);  color: #B3261E; }
.badge--info    { background: var(--info-bg);    color: #0369A1; }
.badge--neutral { background: var(--surface);    color: var(--ink-500); }
.badge--brand   { background: var(--primary-100); color: var(--primary-700); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.dot--pulse { animation: pulse 1.8s ease infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11, 201, 143, .45); }
  50%      { box-shadow: 0 0 0 6px rgba(11, 201, 143, 0); }
}

/* ------------------------------------------------------------
   10. BOTONES Y FORMULARIOS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .88rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}

.btn i { color: currentColor; }

.btn:active { transform: scale(.97); }

.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { box-shadow: 0 16px 36px rgba(0, 82, 204, .38); transform: translateY(-1px); }
.btn--no-shadow,
.btn--no-shadow:hover { box-shadow: none; }

.btn--ghost {
  background: var(--white);
  color: var(--ink-700);
  border: 1px solid var(--line);
}

.btn--ghost:hover { border-color: var(--primary-500); color: var(--primary-600); }

.btn--danger { background: var(--danger-bg); color: #B3261E; }
.btn--danger:hover { background: #FBD5D7; }

/* Verde suave (mismo tratamiento que --danger pero en éxito). */
.btn--success { background: var(--success-bg); color: #067A57; }
.btn--success:hover { background: #C6F5E4; }

/* Botón contorneado azul (borde, fondo blanco); comparte el radio de píldora de .btn */
.btn--blue-outline {
  background: var(--white);
  color: var(--primary-600);
  border: 1.5px solid var(--primary-500);
}
.btn--blue-outline:hover { background: var(--primary-50); border-color: var(--primary-600); color: var(--primary-700); }

.btn--sm { padding: 7px 14px; font-size: .8rem; }

.btn--block { width: 100%; }

.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }

/* Selector con forma de píldora (mismas curvas que los botones) */
.select-pill {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%234A5170' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat right 14px center / 10px;
  padding: 7px 34px 7px 16px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-700);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}

.select-pill:hover { border-color: var(--primary-500); color: var(--primary-600); }

/* Botón de acción en fila de tabla */
.row-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-300);
  border: 1px solid transparent;
  transition: all .15s ease;
}

.row-btn:hover { color: var(--primary-600); background: var(--primary-50); }
.row-btn--danger { color: var(--danger); }
.row-btn--danger:hover { color: var(--danger); background: var(--danger-bg); }
/* X de cerrar del modal: sin fondo, solo la X se pone roja en hover. */
.row-btn--close:hover { color: var(--danger); background: transparent; }
/* Renovar dominio: gris → verde en hover, sin fondo alrededor. */
.row-btn--renew:hover { color: var(--success); background: transparent; }
/* Transferir dominio: gris → rojo en hover, sin fondo alrededor. */
.row-btn--transfer:hover { color: var(--danger); background: transparent; }
/* Iconos de acción de la fila de dominios, más juntos. */
.domain-actions { display: inline-flex; align-items: center; gap: 2px; }
/* Nombre + tiempo del plan bajo el título de "Asignar dominio". */
.assign-plan { font-weight: 800; font-size: 1rem; color: var(--ink-900); }
/* Acciones del Historial de Compras: Pagar (azul) · Registrar (verde) · PDF (amarillo) */
.row-btn--brand { color: var(--primary-600); }
.row-btn--brand:hover { color: var(--primary-600); background: transparent; }
.row-btn--success { color: var(--success); }
.row-btn--success:hover { color: var(--success); background: transparent; }
.row-btn--warning { color: var(--warning); }
.row-btn--warning:hover { color: var(--warning); background: transparent; }
.row-btn--refund { color: var(--primary-600); }
.row-btn--refund:hover { color: var(--primary-700); background: var(--primary-50); }
/* Descarga de "Mis Pedidos": conserva su color base; hover en amarillo sin fondo. */
.row-btn--pdf:hover { color: var(--warning); background: transparent; }

.billing-actions {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 4px;
  vertical-align: middle;
}

.billing-actions .row-btn {
  width: 22px;
}

.billing-actions .row-btn--danger {
  color: var(--ink-300);
  font-size: 1.12rem;
}

.billing-actions .row-btn--danger:hover {
  color: var(--danger);
  background: transparent;
}

/* Campos */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

.field label { font-size: .8rem; font-weight: 600; color: var(--ink-700); }
.field label .field-label-optional { font-weight: 400; }

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: var(--white);
  font-size: .9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.55;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236B7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* Al enfocar: solo la línea azul del borde, sin sombra alrededor. */
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary-500);
}

.field .hint { font-size: .74rem; color: var(--ink-500); }

.file-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.file-picker:focus-within { border-color: var(--primary-500); }

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.file-picker__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-700);
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.file-picker__button:hover { color: var(--primary-600); background: var(--primary-50); }
.file-picker__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-700); font-size: .9rem; }

.field--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field--full { grid-column: 1 / -1; }

/* Tarjeta guardada seleccionable en el pago (ícono · últimos 4 · titular) */
.saved-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: .88rem;
  color: var(--ink-700);
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.saved-card i { font-size: 1.3rem; color: var(--primary-600); flex: none; }

.saved-card strong { color: var(--ink-900); letter-spacing: .03em; flex: none; }

.saved-card span {
  color: var(--ink-500);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-card:hover { border-color: var(--primary-500); }

.saved-card.is-active {
  border-color: var(--primary-500);
}

.plan-price-field input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.plan-price-field input[type="number"]::-webkit-inner-spin-button,
.plan-price-field input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Ocultar las flechitas (spinners) de todos los campos numéricos. */
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Campo de fecha con calendario propio (mismo patrón que el panel Core). */
.field input.license-date-input { min-height: 52px; font-size: 1rem; letter-spacing: 0; }
.date-field { position: relative; }
.date-field .license-date-input { padding-right: 46px; }
.date-field__cal {
  position: absolute; top: 0; right: 0; height: 100%; width: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  color: var(--ink-500); font-size: 1rem; transition: color .15s ease;
}
.date-field__cal:hover { color: var(--primary-500); }
.date-field__cal:focus-visible { outline: none; color: var(--primary-500); }

.cal-pop {
  position: fixed; z-index: 1000;
  width: 300px; max-width: calc(100vw - 24px);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 14px; animation: modalIn .16s ease;
}
.cal-pop__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-pop__title { font-family: var(--font-display); font-weight: 700; font-size: .98rem; color: var(--ink-900); }
.cal-pop__nav {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--white); color: var(--ink-700); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
  transition: background .14s ease, border-color .14s ease;
}
.cal-pop__nav:hover { background: var(--surface); border-color: var(--primary-500); color: var(--primary-600); }
.cal-pop__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-pop__dow span {
  text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  color: var(--ink-300); padding: 4px 0; letter-spacing: .02em;
}
.cal-pop__day {
  aspect-ratio: 1 / 1; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink-700); font-size: .9rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s ease, color .12s ease;
}
.cal-pop__day:hover { background: var(--primary-50); color: var(--primary-600); }
.cal-pop__day.is-today { box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; }
.cal-pop__day.is-selected { background: var(--primary-500); color: #fff; font-weight: 700; }
.cal-pop__day.is-selected:hover { background: var(--primary-600); color: #fff; }
.cal-pop__day.is-disabled { color: var(--ink-300); opacity: .45; cursor: not-allowed; }

/* Interruptor (toggle) */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: none; }

.switch input { opacity: 0; width: 0; height: 0; }

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--ink-300);
  transition: background .2s ease;
  cursor: pointer;
}

.switch .track::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
  box-shadow: var(--shadow-sm);
}

.switch input:checked + .track { background: var(--mint-600); }
.switch input:checked + .track::before { transform: translateX(19px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(38, 112, 224, .45); outline-offset: 2px; }

/* ------------------------------------------------------------
   11. GRÁFICOS (SVG generados por JS)
   ------------------------------------------------------------ */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; }

/* Tarjeta que estira su gráfico para igualar la altura de la fila */
.grid--stretch { align-items: stretch; }

.card--fill { display: flex; flex-direction: column; }
.card--fill .chart { flex: 1; min-height: 250px; }
.card--fill .chart svg { height: 100%; }

.chart .bar { fill: var(--primary-100); transition: fill .2s ease; cursor: pointer; }
.chart .bar:hover, .chart .bar.is-hot { fill: var(--primary-600); }
.chart .bar-label { font: 600 11px var(--font-body); fill: var(--ink-300); }
.chart .bar-value { font: 700 11px var(--font-body); fill: var(--ink-900); }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 5; }
.chart .spark { fill: none; stroke: var(--mint-600); stroke-width: 2.5; stroke-linecap: round; }
.chart .spark-fill { fill: url(#sparkGrad); opacity: .35; }

.donut-legend { display: flex; flex-direction: column; gap: 12px; }

.donut-legend li { display: flex; align-items: center; gap: 10px; font-size: .84rem; }

.donut-legend .val { margin-left: auto; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums; }

/* Lista de actividad / alertas */
.feed { display: flex; flex-direction: column; }

.feed li {
  display: flex;
  gap: 13px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}

.feed li:last-child { border-bottom: none; }

.feed__icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: .85rem;
  flex: none;
}

.feed__icon--success { background: var(--success-bg); color: #067A57; }
.feed__icon--warning { background: var(--warning-bg); color: #9A6108; }
.feed__icon--danger  { background: var(--danger-bg);  color: #B3261E; }
.feed__icon--info    { background: var(--info-bg);    color: #0369A1; }
.feed__icon--brand   { background: var(--primary-50); color: var(--primary-600); }

.feed__body { flex: 1; min-width: 0; }
.feed__body p { font-size: .86rem; color: var(--ink-700); }
.feed__body p strong { color: var(--ink-900); }
.feed__body time { font-size: .74rem; color: var(--ink-300); }

/* ------------------------------------------------------------
   12. TICKETS (vista agente)
   ------------------------------------------------------------ */
.tickets-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 20px;
  align-items: start;
}

.ticket-list { display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; padding-right: 4px; }

.ticket-item {
  text-align: left;
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.ticket-item:hover { border-color: var(--primary-500); }

.ticket-item.is-active {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, .12);
}

.ticket-item__top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.ticket-item__id { font-size: .72rem; font-weight: 700; color: var(--ink-300); }
.ticket-item__subject { font-weight: 600; color: var(--ink-900); font-size: .9rem; }
.ticket-item__user {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-size: .76rem;
  color: var(--ink-500);
}
.ticket-item__user i { color: var(--ink-300); font-size: .72rem; }
.ticket-item__user small { display: block; color: var(--ink-300); line-height: 1.35; }
.ticket-item__meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.ticket-item__meta time { font-size: .72rem; color: var(--ink-300); margin-left: auto; }

.ticket-thread { display: flex; flex-direction: column; min-height: 540px; }

.ticket-thread__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.ticket-thread__head h3 { font-size: 1.05rem; }
.ticket-thread__head .meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ticket-thread__user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: .82rem;
  color: var(--ink-500);
}
.ticket-thread__user i { color: var(--ink-300); }
.ticket-thread__user strong { color: var(--ink-900); }
.ticket-thread__user small { display: block; color: var(--ink-300); margin-top: 1px; }

.ticket-thread__msgs { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 18px 0; overflow-y: auto; max-height: 400px; }

.msg { display: flex; gap: 12px; max-width: 85%; }

.msg__bubble {
  background: var(--surface);
  border-radius: 4px 16px 16px 16px;
  padding: 12px 16px;
  font-size: .87rem;
}

.msg__bubble .who { font-size: .72rem; font-weight: 700; color: var(--ink-500); display: block; margin-bottom: 4px; }

.msg--agent { align-self: flex-end; flex-direction: row-reverse; }

.msg--agent .msg__bubble {
  background: var(--primary-50);
  border-radius: 16px 4px 16px 16px;
}

.ticket-reply { border-top: 1px solid var(--line); padding-top: 16px; }

.ticket-reply textarea { min-height: 88px; resize: vertical; }

.ticket-reply__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }

/* Controles interactivos dentro de un mensaje del ticket (transferencia). */
.msg--wide { max-width: 100%; width: 100%; }
.msg--wide .msg__bubble { flex: 1; }
.msg-epp { margin-top: 12px; }
.msg-epp__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 5px 5px 16px;
  box-shadow: var(--shadow-sm);
}
.msg-epp__bar > i { color: var(--ink-300); font-size: .95rem; flex: none; }
.msg-epp__bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-size: .9rem;
  padding: 9px 4px;
  color: var(--ink-900);
}
.msg-epp__bar input:focus { outline: none; }
.msg-epp__bar input:disabled { opacity: .6; }
.msg-epp__bar .btn { flex: none; }
.msg-decide { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }

.msg-refund-bank {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.msg-refund-bank .field { margin: 0; }
.msg-refund-bank .btn { grid-column: 1 / -1; justify-self: end; }

@media (max-width: 620px) {
  .msg-refund-bank { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   13. INFRAESTRUCTURA (servidores DirectAdmin)
   ------------------------------------------------------------ */
.server-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.server-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--primary-50);
  color: var(--primary-600);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.server-card__icon--down { background: var(--danger-bg); color: var(--danger); }

.server-card__name { font-weight: 700; color: var(--ink-900); font-family: var(--font-display); font-size: .98rem; }
.server-card__ip { font-size: .76rem; color: var(--ink-500); }

.server-card__badge { margin-left: auto; }

/* X para descartar/cancelar un pedido en verificación: gris, roja al pasar
   el cursor, sin fondo ni efecto exterior. */
.svc-x { width: 30px; height: 30px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--ink-300); font-size: .95rem; cursor: pointer; transition: color .15s; }
.svc-x:hover { color: var(--danger); background: transparent; }

.meter { margin-top: 12px; }

.meter__top {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-500);
  margin-bottom: 6px;
}

.meter__top .val { color: var(--ink-900); font-variant-numeric: tabular-nums; }

.meter__track {
  height: 8px;
  border-radius: 999px;
  background: var(--surface);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--grad-brand);
  transition: width .6s ease;
}

.meter--ok .meter__fill { background: var(--grad-mint); }
.meter--warn .meter__fill { background: linear-gradient(90deg, #F5A524, #F7C948); }
.meter--danger .meter__fill { background: linear-gradient(90deg, #E5484D, #F97066); }

.server-card__foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: .78rem;
  color: var(--ink-500);
}

/* ------------------------------------------------------------
   14. INTEGRACIONES
   ------------------------------------------------------------ */
.integration { display: flex; flex-direction: column; }

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

.integration__logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  color: #fff;
  flex: none;
}

.integration__logo--da    { background: var(--grad-deep); }
.integration__logo--op    { background: var(--grad-mint); color: var(--ink-900); }
.integration__logo--epayco{ background: linear-gradient(135deg, #F5A524, #F7C948); color: var(--ink-900); }
.integration__logo--smtp  { background: var(--ink-700); }
.integration__logo--windows { background: var(--grad-deep); }

.integration__name { font-weight: 700; color: var(--ink-900); font-family: var(--font-display); }
.integration__desc { font-size: .8rem; color: var(--ink-500); }

.integration__rows { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 16px; }

.integration__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: .83rem;
  color: var(--ink-500);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.integration__row .val { font-weight: 600; color: var(--ink-900); font-variant-numeric: tabular-nums; text-align: right; }
/* Icono de copiar: gris, hover azul, sin borde ni fondo. */
.copy-btn { border: 0; background: transparent; padding: 0; margin: 0; color: var(--ink-300); cursor: pointer; font-size: .9rem; line-height: 1; vertical-align: middle; transition: color .15s; }
.copy-btn:hover, .copy-btn:focus-visible { color: var(--primary-600); background: transparent; outline: none; }
.integration__row .val .copy-btn { margin-right: 8px; }

/* Precio de transferencia de dominio: tarjeta destacada con gradiente de marca. */
.transfer-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  background: var(--grad-brand);
  color: var(--white);
  box-shadow: var(--shadow-brand);
}
.transfer-price__label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}
.transfer-price__label i { opacity: .8; }
.transfer-price__amount {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.transfer-price__amount small {
  font-size: .58em;
  font-weight: 600;
  opacity: .8;
  margin-left: 5px;
}
/* Nameservers: etiqueta + casilla del valor + copiar, uno por línea. */
.ns-list { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 10px; }
.ns-row { display: flex; align-items: center; gap: 8px; }

/* DNS Hostkolpix: nameservers + IP (solo lectura) */
.dns-hk-list { display: flex; flex-direction: column; gap: 8px; }
.dns-hk-ns { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 12px; background: var(--surface); border-radius: var(--radius-sm); }
.dns-hk-ns__label { flex: none; font-weight: 700; color: var(--ink-700); font-size: .78rem; min-width: 96px; }
.dns-hk-ns__value { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--ink-900); word-break: break-all; }
.dns-hk-ns__ip { flex: none; font-size: .74rem; font-weight: 700; color: var(--primary-600); background: var(--primary-50); padding: 2px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }

/* DNS Externo: nameserver + su IP (glue) en dos columnas */
.dns-ns-row { display: grid; grid-template-columns: 1fr 200px; gap: 12px; }
.dns-ns-row .field { margin-bottom: 12px; }
@media (max-width: 560px) { .dns-ns-row { grid-template-columns: 1fr; gap: 0; } }

/* Gestor de registros DNS del dominio aparcado */
.dns-recs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.dns-rec { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface); border-radius: var(--radius-sm); font-size: .84rem; }
.dns-rec__type { flex: none; font-weight: 800; font-size: .72rem; color: var(--primary-600); background: var(--primary-50); padding: 2px 8px; border-radius: 999px; }
.dns-rec__name { flex: none; font-weight: 600; color: var(--ink-900); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dns-rec__value { flex: 1; min-width: 0; color: var(--ink-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.dns-rec__ttl { flex: none; color: var(--ink-300); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.dns-add { border-top: 1px solid var(--line); padding-top: 14px; }
.dns-add__grid { display: grid; grid-template-columns: 100px 1fr 1.5fr 92px 100px; gap: 10px; }
.dns-add__grid .field { margin-bottom: 10px; }
@media (max-width: 640px) { .dns-add__grid { grid-template-columns: 1fr; } }
.ns-label { font-weight: 700; color: var(--ink-700); font-size: .8rem; flex: none; }
.ns-value { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; color: var(--ink-900); }

.integration__row code {
  font-size: .76rem;
  background: var(--primary-50);
  color: var(--primary-700);
  padding: 2px 8px;
  border-radius: 6px;
  word-break: break-all;
}

.integration__foot { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: flex-end; }

/* Fila de total destacada (tienda): fondo y valor en verde para plan y licencia. */
.integration__row--total { background: var(--primary-50); }

.upgrade-plan-lines { display: grid; gap: 8px; margin-top: 4px; }
.upgrade-plan-lines > div {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 42px; padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.upgrade-plan-lines i { color: var(--success); }
.upgrade-plan-price { margin: 16px 0 0; font-size: 1.1rem; font-weight: 800; color: var(--ink-900); }
.upgrade-plan-price span { font-size: .82rem; font-weight: 600; color: var(--ink-500); }
.modal__panel.modal__panel--upgrade { width: min(780px, 100%); }
.upgrade-checkout-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; background: var(--white); }
.upgrade-checkout-card__head { display: flex; align-items: flex-start; gap: 14px; }
.upgrade-checkout-card__icon {
  width: 48px; height: 48px; border-radius: 14px; background: var(--primary-50); color: var(--primary-600);
  display: grid; place-items: center; font-size: 1.15rem; flex: none;
}
.upgrade-checkout-card__title { flex: 1; min-width: 0; }
.upgrade-checkout-card__perf { color: var(--ink-500); font-size: .82rem; line-height: 1.4; margin: 8px 0 0; max-width: 340px; }
.upgrade-checkout-card__price { display: flex; flex-direction: column; align-items: flex-end; gap: 0; text-align: right; min-width: 185px; }
.upgrade-checkout-card__price .upgrade-pill--period { margin-top: 12px; }
.upgrade-checkout-card__total { color: var(--ink-500); font-size: .82rem; margin: 0; line-height: 1.15; }
.upgrade-checkout-card__total b { color: var(--ink-900); font-weight: 700; }
.upgrade-checkout-card__price p { margin: 0; color: var(--ink-500); font-size: .88rem; line-height: 1.15; }
.upgrade-checkout-card__price strong { color: var(--success); font-family: var(--font-display); font-size: 1.32rem; }
.upgrade-pill { position: relative; display: inline-flex; max-width: 100%; }
.upgrade-pill select {
  appearance: none; -webkit-appearance: none; width: 100%; min-height: 42px; padding: 9px 38px 9px 16px;
  border: 1px solid var(--line); border-radius: 999px; background-color: var(--white); color: var(--ink-900);
  font-weight: 700; cursor: pointer; box-shadow: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%230052CC' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.upgrade-pill select:focus { outline: none; border-color: var(--primary-500); }
.upgrade-pill--plan { width: min(260px, 100%); }
.upgrade-pill--plan select { font-family: var(--font-display); font-size: 1rem; }
.upgrade-pill--period { width: 150px; }
.upgrade-checkout-card__included span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-700); font-size: .86rem; }
.upgrade-checkout-card__included i { color: var(--success); flex: none; }
.upgrade-checkout-card__included { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.upgrade-checkout-card__included > p { margin: 0 0 10px; color: var(--ink-900); font-weight: 700; }
.upgrade-checkout-card__included > div { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.upgrade-checkout-card__included strong { color: var(--ink-900); }
.integration__row--total > span:first-child { font-weight: 700; color: var(--ink-900); }
.integration__row--total .val { color: var(--primary-700); font-weight: 800; }
/* Total con precio "antes" tachado al lado del precio a pagar. */
/* Selector y acciones inferiores de las tarjetas de hosting. */
.store-plan-card .integration__rows { margin-bottom: 0; }
.store-period-field { margin: auto 0 0; padding-top: 10px; }
.store-period-field select { border-radius: 999px; }
.store-plan-actions { margin-top: 0; padding-top: 6px; flex-wrap: nowrap; gap: 12px; align-items: flex-start; justify-content: flex-start; }
.store-plan-actions .btn { flex: none; margin-top: 5px; margin-left: auto; font-size: calc(.8rem + 3px); }
.store-plan-actions .store-save[hidden] + .btn { margin-right: auto; }

/* Comprar Servicios — licencia: "Cantidad | Total" en una fila; debajo, la
   píldora integrada (número + toggle Mensual/Anual adentro, como la barra de
   búsqueda) con el total al lado. */
.store-license-field { margin: 6px 0 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
/* Cada columna: etiqueta arriba, alineada con el inicio de su píldora. */
.store-license-col { display: flex; flex-direction: column; gap: 6px; }
.store-license-col > label { margin: 0; font-weight: 700; color: var(--ink-900); }
/* Total: misma línea/altura que la píldora de cantidad, sin fondo. */
.store-license-total { display: inline-flex; align-items: center; font-weight: 800; font-size: .92rem;
  color: var(--primary-700); font-variant-numeric: tabular-nums; white-space: nowrap;
  border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 16px; }
.store-license-buy { display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.store-license-buy > input[type="number"] { flex: none; width: 40px; border: 0; outline: none; background: transparent;
  text-align: center; font-weight: 700; font-size: .95rem; color: var(--ink-900); -moz-appearance: textfield; }
.store-license-buy > input[type="number"]::-webkit-outer-spin-button,
.store-license-buy > input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seg-toggle { display: inline-flex; background: var(--surface); border-radius: 999px; padding: 2px; }
.seg-toggle button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px;
  font-size: .8rem; font-weight: 700; color: var(--ink-500); cursor: pointer; transition: all .15s ease; }
/* Activo en AZUL (marca), no blanco. */
.seg-toggle button.is-active { background: var(--primary-600); color: #fff; }
.seg-toggle button:disabled { opacity: .45; cursor: not-allowed; }
/* Botón Contratar de licencias: centrado y del mismo tamaño que el de planes. */
.store-license-actions { justify-content: center; }
.store-license-actions .btn { font-size: calc(.8rem + 3px); }
.store-save {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 6px 12px;
  border: .5px solid var(--success);
  border-radius: 999px;
  background: transparent;
  color: #067A57;
  font-weight: 400;
  font-size: calc(.8rem - 2px);
  line-height: 1.2;
  white-space: nowrap;
}
.store-save::before {
  content: '';
  position: absolute;
  top: -4.5px;
  left: 20px;
  width: 8px;
  height: 8px;
  border-top: .5px solid var(--success);
  border-left: .5px solid var(--success);
  background: var(--white);
  transform: rotate(45deg);
}
/* Badge de descuento del plan (arriba a la derecha de la tarjeta). */
.store-off { margin-left: auto; align-self: flex-start; flex: none; white-space: nowrap;
  background: var(--success-bg); color: #067A57; font-weight: 800; font-size: .72rem; padding: 3px 10px; border-radius: 999px; }

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

/* Icono "i" con tooltip de vidrio (lo que incluye el plan/licencia). */
.hk-info { position: relative; display: inline-flex; align-items: center; margin-left: 6px; color: var(--ink-300); cursor: help; outline: none; vertical-align: middle; }
.hk-info:hover, .hk-info:focus { color: var(--primary-600); }
.hk-info > i { font-size: .85rem; }
.hk-info__tip { position: absolute; left: -6px; top: calc(100% + 9px); width: max-content; max-width: 260px;
  background: linear-gradient(160deg, rgba(30, 38, 74, .5), rgba(11, 16, 38, .42));
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, .22);
  color: var(--white); text-align: left; font-size: .78rem; font-weight: 500; line-height: 1.5;
  padding: 11px 13px; border-radius: 14px;
  box-shadow: 0 16px 38px rgba(11, 16, 38, .28), inset 0 1px 0 rgba(255, 255, 255, .2);
  opacity: 0; visibility: hidden; transform: translateY(-5px); pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease; z-index: 40; }
.hk-info__tip::after { content: ''; position: absolute; bottom: 100%; left: 12px; border: 5px solid transparent; border-bottom-color: rgba(30, 38, 74, .5); }
.hk-info:hover .hk-info__tip, .hk-info:focus .hk-info__tip { opacity: 1; visibility: visible; transform: translateY(0); }
.hk-info__title { display: block; font-weight: 800; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: rgba(255, 255, 255, .72); margin-bottom: 6px; }
.hk-info__item { display: flex; align-items: baseline; gap: 7px; }
.hk-info__item + .hk-info__item { margin-top: 5px; }
.hk-info__item i { color: var(--success); font-size: .72rem; flex: none; }

.integration__connect {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-700);
}

.integration__connect .switch {
  width: 38px;
  height: 22px;
}

.integration__connect .switch .track::before {
  width: 16px;
  height: 16px;
}

/* Aviso de seguridad reutilizable */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: .84rem;
  color: var(--ink-700);
}

.notice i { color: var(--primary-600); margin-top: 2px; }
.notice strong { color: var(--ink-900); }

.notice--warn { background: var(--warning-bg); border-color: #F8DFB5; }
.notice--warn i { color: #9A6108; }

/* Requisitos interactivos de la nueva contraseña. */
.password-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 16px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.password-rules li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #B3261E;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color .16s ease;
}
.password-rules li i {
  width: 13px;
  color: inherit;
  text-align: center;
  transform: scale(1);
  transition: transform .16s ease;
}
.password-rules li.is-valid { color: #067A57; }
.password-rules li.is-valid i { transform: scale(1.08); }
.password-match {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  color: #B3261E;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.3;
  transition: color .16s ease;
}
.password-match i {
  width: 13px;
  color: inherit;
  text-align: center;
  transform: scale(1);
  transition: transform .16s ease;
}
.password-match.is-valid { color: #067A57; }
.password-match.is-valid i { transform: scale(1.08); }

/* Estado y controles de verificación en dos pasos. */
.twofa-panel {
  display: block;
}
.twofa-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 14px;
  border: 1px solid;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1.4;
  white-space: nowrap;
}
.twofa-state--enabled { background: var(--success-bg); border-color: #A8E8D3; color: #067A57; }
.twofa-state--disabled { background: var(--danger-bg); border-color: #F4C5C8; color: #B3261E; }
.twofa-panel__description { color: var(--ink-500); margin: 0 0 14px; }
.twofa-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.twofa-state__method { font-weight: 600; opacity: .85; }

/* Selector de método 2FA (app / correo) */
.twofa-methods { display: grid; gap: 12px; }
.twofa-method {
  display: block;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.twofa-method:hover { border-color: var(--primary-500); }
.twofa-method__body { display: flex; align-items: center; gap: 14px; }
.twofa-method__icon {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 1.1rem;
}
.twofa-method__text { display: flex; flex-direction: column; gap: 2px; }
.twofa-method__text strong { color: var(--ink-900); font-size: .95rem; }
.twofa-method__text small { color: var(--ink-500); font-size: .8rem; line-height: 1.35; }
.twofa-method input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.twofa-method:has(input:checked) {
  border-color: var(--primary-600);
  background: var(--primary-50);
  box-shadow: var(--shadow-sm);
}
.twofa-method:has(input:checked) .twofa-method__icon { background: var(--grad-brand); color: var(--white); }

/* Código QR de enrolamiento */
.twofa-qr {
  display: flex;
  justify-content: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.twofa-qr svg { width: 220px; height: 220px; max-width: 100%; }
.twofa-fallback { margin-top: 14px; }
.twofa-fallback summary {
  cursor: pointer;
  color: var(--primary-600);
  font-size: .85rem;
  font-weight: 600;
  list-style: none;
}
.twofa-fallback summary::-webkit-details-marker { display: none; }
.twofa-secret {
  display: block;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  letter-spacing: 2px;
  word-break: break-all;
  font-size: .9rem;
}

@media (max-width: 620px) {
  .password-rules { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   15. MODALES, DRAWER Y TOASTS
   ------------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 16, 38, .55);
  backdrop-filter: blur(4px);
  z-index: 90;
  animation: fadeIn .18s ease;
}

@keyframes fadeIn { from { opacity: 0; } }

.modal__panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: min(620px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s ease;
  transition: width .35s cubic-bezier(.22, .8, .36, 1);
}

/* Variante ancha (p. ej. "Aparcar Dominio"): el panel se expande con suavidad
   para leer los registros DNS completos en una sola línea. */
.modal__panel--wide { width: min(880px, 100%); }

/* Confirmación (Aceptar/Cancelar, sin X): panel angosto. */
.modal__panel--sm { width: min(420px, 100%); }
.confirm-msg { margin: 0 0 18px; color: var(--ink-700); font-size: .95rem; line-height: 1.55; }
.confirm-msg strong { color: var(--ink-900); }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
}

.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal__head h3 { font-size: 1.15rem; }
.modal__panel--upgrade .modal__head h3 { font-size: 1.32rem; }
.modal__subtitle { margin-top: 2px; color: var(--ink-300); font-size: .82rem; font-weight: 700; }

.modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* Drawer lateral (detalle de cliente) */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11, 16, 38, .55);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 92vw);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  overflow-y: auto;
  animation: drawerIn .25s ease;
}

@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }

.client-access { margin-top: 18px; }

.client-detail__identity {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.client-detail__id {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-300);
}

.client-detail__name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-900);
}

.client-detail__email {
  font-size: .84rem;
  color: var(--ink-500);
  overflow-wrap: anywhere;
}

.client-access__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.client-access__form {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.client-access__form[hidden] { display: none; }

.client-access__form .field:last-of-type { margin-bottom: 0; }

.client-access__form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Toasts */
.toasts {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 120;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 13px 18px;
  font-size: .86rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn .25s ease;
  max-width: 380px;
}

@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } }

.toast i { color: var(--mint-500); }
.toast--error i { color: #F97066; }

/* ------------------------------------------------------------
   16. LOGIN
   ------------------------------------------------------------ */
.login-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--surface);
}

.login-hero {
  background: var(--grad-deep);
  color: #fff;
  padding: clamp(32px, 5vw, 64px) clamp(32px, 5vw, 64px) 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-hero::before,
.login-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}

.login-hero::before { width: 380px; height: 380px; right: -120px; top: -120px; }
.login-hero::after  { width: 260px; height: 260px; left: -80px; bottom: -80px; }

.login-hero__brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }

.login-hero__center { margin: auto 0; position: relative; z-index: 1; }

.login-hero__center h1 { color: #fff; font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); max-width: 15ch; }

.login-hero__center p { color: rgba(255, 255, 255, .75); margin-top: 14px; max-width: 42ch; }

.login-hero__feats { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }

.login-hero__feats li { display: flex; gap: 12px; align-items: center; font-size: .9rem; color: rgba(255, 255, 255, .85); }

.login-hero__feats i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  display: grid;
  place-items: center;
  font-size: .8rem;
  color: var(--mint-500);
}

.login-hero__foot { font-size: .76rem; color: rgba(255, 255, 255, .5); position: relative; z-index: 1; margin: 0; }

.login-side { display: grid; place-items: center; padding: 32px 20px; }

.login-card { width: min(420px, 100%); }

.login-card__box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(26px, 4vw, 38px);
}

.login-card h2 { font-size: 1.4rem; margin-bottom: 6px; }
.login-card > .login-card__box > p { color: var(--ink-500); font-size: .9rem; margin-bottom: 22px; }

.login-card__foot { text-align: center; margin-top: 18px; font-size: .78rem; color: var(--ink-300); }

.pass-wrap { position: relative; }

.pass-wrap input { padding-right: 46px; }

.pass-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--ink-300);
  border-radius: 8px;
}

.pass-toggle:hover { color: var(--primary-600); }

.login-error {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--danger-bg);
  color: #B3261E;
  font-size: .83rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 16px;
}

/* Mensaje de éxito (verde) — recuperación de contraseña. */
.login-ok {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--success-bg);
  color: #0B7A5B;
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  margin-bottom: 16px;
}

/* Enlace de texto (¿Olvidaste tu contraseña?). */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: var(--primary-600);
}
.link-btn:hover { text-decoration: underline; }

/* Casillas del código de verificación (6 dígitos). */
.otp-label { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-700); margin-bottom: 8px; }
.otp { display: flex; gap: 8px; justify-content: space-between; }
/* Variante compacta (2FA del portal): casillas más pequeñas, juntas y
   alineadas a la izquierda; el espacio sobrante queda a la derecha. */
.otp--compact { justify-content: flex-start; gap: 6px; }
.otp--compact .otp__box { width: 44px; max-width: 44px; }
.otp__box {
  width: 100%;
  max-width: 52px;
  aspect-ratio: 4 / 5;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.otp__box:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(38, 112, 224, .15);
}

/* Paso 2 del login: chip con el correo ya verificado */
.login-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mint-100);
  border: 1px solid #BDEEDD;
  border-radius: 999px;
  padding: 9px 16px;
  margin-bottom: 18px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-700);
  overflow: hidden;
}

.login-user i { color: var(--mint-600); flex: none; }
.login-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------
   17. RESPONSIVE
   ------------------------------------------------------------ */
.nav-burger { display: none; }

/* Portal clientes: el menú de usuario vive en el encabezado del dashboard,
   así que en escritorio el topbar (solo burger) no ocupa espacio. */
@media (min-width: 901px) {
  .topbar { display: none; }
}

@media (max-width: 1200px) {
  .grid--kpis { grid-template-columns: repeat(2, 1fr); }
  .grid--main, .grid--halves { grid-template-columns: 1fr; }
  .tickets-layout { grid-template-columns: 1fr; }
  .grid--thirds { grid-template-columns: 1fr 1fr; }
  .domain-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domain-option--row { grid-template-columns: minmax(220px, 1fr) minmax(170px, .7fr) minmax(150px, .6fr) auto; }
  .services-columns { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .data-query-status { top: 14px; left: 64px; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(300px, 84vw);
    max-height: 100dvh;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }

  .sidebar__brand { padding: 4px 10px 12px; }
  .sidebar__label { padding: 10px 12px 4px; }
  .side-link { padding: 9px 12px; font-size: .9rem; }
  .sidebar__status { margin: 10px 4px 8px; padding: 14px; }

  .sidebar.is-open { transform: none; }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 38, .45);
    z-index: 35;
    animation: fadeIn .2s ease;
  }

  .nav-burger {
    display: grid;
  }

  .topbar__admin-name { display: none; }
  .topbar__admin { padding: 5px; }

  .login-body { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}

@media (max-width: 620px) {
  .app__main { padding: 12px 14px 28px; }
  .grid--kpis, .grid--thirds { grid-template-columns: 1fr; }
  .domain-featured { grid-template-columns: 1fr; }
  .domain-option--row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar__search { display: none; }
  .view-head h1 { font-size: 1.4rem; }
  .upgrade-checkout-card__head { flex-wrap: wrap; }
  .upgrade-checkout-card__price { width: 100%; align-items: flex-start; text-align: left; padding-left: 62px; }
}

/* Accesibilidad: respeta la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .data-query-status__orb::before { animation: none !important; }
}

/* Credenciales de DirectAdmin publicadas en un ticket (expiran a las 24 h). */
.msg-creds {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
}
.msg-creds__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  font-size: .85rem;
}
.msg-creds__row > span:first-child { color: var(--ink-500); font-weight: 600; }
.msg-creds__val { color: var(--ink-900); word-break: break-all; }
.msg-creds__val--muted { color: var(--ink-500); font-style: italic; }
.msg-creds__field { display: flex; align-items: center; gap: 6px; min-width: 0; }
.msg-creds__field input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: .85rem;
  color: var(--ink-900);
  background: var(--white);
}

/* Código de autorización de dominio dentro de un ticket. */
.msg-claim {
  margin-top: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  max-width: 380px;
}
.msg-claim__hint { margin: 0 0 10px; color: var(--ink-500); font-size: .85rem; line-height: 1.4; }
