/* ============================================================
   Panel de Dominios — tema claro 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #edf3ff;
  --teal: #0d9488;
  --teal-soft: #e6f7f5;
  --green: #16a34a;
  --green-soft: #eafaf0;
  --red: #dc2626;
  --red-soft: #fdeeee;
  --amber: #d97706;
  --amber-soft: #fdf3e2;
  --violet: #7c3aed;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border: #e6eaf1;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 6px 18px rgba(16, 24, 40, .05);
  --shadow-lg: 0 10px 34px rgba(16, 24, 40, .10);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-pill: 999px;
  --sidebar-w: 264px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- Animaciones ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.anim-in { animation: fadeInUp .45s var(--ease) both; }
.anim-in.d1 { animation-delay: .05s; }
.anim-in.d2 { animation-delay: .12s; }
.anim-in.d3 { animation-delay: .19s; }
.anim-in.d4 { animation-delay: .26s; }
.anim-in.d5 { animation-delay: .33s; }

/* ============================================================
   Layout
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .3s var(--ease);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
}

.brand-logo {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .30);
  flex: none;
}
.brand-logo svg { width: 24px; height: 24px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-sub { font-size: 11.5px; color: var(--text-faint); font-weight: 600; }

.sidebar-nav { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }

.nav-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.nav-item svg { width: 20px; height: 20px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.nav-item.active svg { color: var(--primary); }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }

.ns-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
}
.ns-card .ns-title { font-size: 11px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.ns-card .ns-line { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, 'SF Mono', Menlo, monospace; }

.backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
  z-index: 35;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.backdrop.show { opacity: 1; pointer-events: auto; }

/* ---------- Main ---------- */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  place-items: center;
}
.burger svg { width: 22px; height: 22px; }
.topbar-title { font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
  flex: none;
}
.user-chip .u-name { font-weight: 700; font-size: 13.5px; line-height: 1.1; }
.user-chip .u-rol { font-size: 11px; color: var(--text-faint); font-weight: 600; }

.content { padding: 26px; display: flex; flex-direction: column; gap: 22px; }

/* ============================================================
   Componentes
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.card-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Stat cards ---------- */
.stat { display: flex; align-items: center; gap: 15px; }
.stat-icon {
  width: 50px; height: 50px; border-radius: 14px;
  display: grid; place-items: center; flex: none;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.blue   { background: var(--primary-soft); color: var(--primary); }
.stat-icon.green  { background: var(--green-soft);  color: var(--green); }
.stat-icon.teal   { background: var(--teal-soft);   color: var(--teal); }
.stat-icon.violet { background: #f1eafe; color: var(--violet); }
.stat-icon.amber  { background: var(--amber-soft);  color: var(--amber); }
.stat-value { font-size: 25px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 700; font-size: 14px;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .28); }
.btn-primary:hover { background: var(--primary-strong); box-shadow: 0 8px 20px rgba(37, 99, 235, .34); }

.btn-success { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(22, 163, 74, .25); }
.btn-success:hover { background: #15803d; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }

.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-muted); }

.input, .select, .textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.textarea { resize: vertical; min-height: 90px; }

.input-group { display: flex; gap: 10px; }
.input-group .input { flex: 1; }

/* ---------- Tabla ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; min-width: 560px; }
table.data th {
  text-align: left; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint);
  padding: 13px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .15s var(--ease); }
table.data tbody tr:hover { background: var(--surface-2); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-green  { background: var(--green-soft);  color: #15803d; }
.badge-red    { background: var(--red-soft);    color: #b91c1c; }
.badge-amber  { background: var(--amber-soft);  color: #b45309; }
.badge-blue   { background: var(--primary-soft); color: var(--primary); }
.badge-teal   { background: var(--teal-soft);   color: #0f766e; }
.badge-gray   { background: #eef1f6; color: var(--text-muted); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 17px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: 14px;
  animation: toastIn .35s var(--ease) both;
  max-width: 360px;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--primary); }

/* ---------- Spinner / skeleton ---------- */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(37, 99, 235, .2);
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #eef1f6 25%, #e2e8f0 37%, #eef1f6 63%);
  background-size: 400px 100%;
  animation: shimmer 1.3s infinite linear;
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); animation: pulse 1.1s infinite; }

/* ---------- Resultado de búsqueda ---------- */
.result-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 11px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.result-row:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.result-domain { font-weight: 700; font-size: 15px; min-width: 200px; word-break: break-all; }
.result-price { text-align: right; }
.result-price .rp-big { font-weight: 800; font-size: 15px; }
.result-price .rp-sub { font-size: 12px; color: var(--text-faint); }
.result-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.result-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
}
.chip svg { width: 14px; height: 14px; }
.chip.ok   { background: var(--green-soft); color: #15803d; border-color: transparent; }
.chip.bad  { background: var(--red-soft);   color: #b91c1c; border-color: transparent; }
.chip.warn { background: var(--amber-soft); color: #b45309; border-color: transparent; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
  background:
    radial-gradient(1200px 600px at 15% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(1000px 500px at 110% 110%, #ccfbf1 0%, transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 410px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  animation: fadeInUp .5s var(--ease) both;
}
.login-logo {
  width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  display: grid; place-items: center; color: #fff;
  margin: 0 auto 18px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, .30);
}
.login-logo svg { width: 30px; height: 30px; }
.login-title { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { text-align: center; color: var(--text-muted); font-size: 14px; margin: 6px 0 26px; }

/* ---------- Utilidades ---------- */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 14px; } .mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 14px; } .mb-3 { margin-bottom: 20px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-1 { gap: 8px; } .gap-2 { gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }

.empty {
  text-align: center; padding: 40px 20px; color: var(--text-faint);
}
.empty svg { width: 46px; height: 46px; margin-bottom: 10px; color: var(--text-faint); }
.empty p { font-weight: 600; }

/* ---------- Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card {
  width: 100%; max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px;
  transform: translateY(10px) scale(.98);
  transition: transform .25s var(--ease);
}
.modal.open .modal-card { transform: none; }
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.01em; }
.modal-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }

/* ---------- Campo de contraseña con ojito ---------- */
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 46px; }
.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: none; background: transparent; color: var(--text-faint);
  display: grid; place-items: center; border-radius: 8px; cursor: pointer;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.pass-toggle:hover { color: var(--text); background: var(--surface-2); }
.pass-toggle svg { width: 19px; height: 19px; }
.match-ok { color: #15803d; font-weight: 700; }
.match-bad { color: #b91c1c; font-weight: 700; }

/* ---------- Botón canasta ---------- */
.cart-btn {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid; place-items: center;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.cart-btn:hover { background: var(--surface-2); }
.cart-btn svg { width: 21px; height: 21px; }
.cart-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(22, 163, 74, .4);
}

/* ============================================================
   Landing (página pública, estilo tienda de dominios)
   ============================================================ */
.landing { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }

.landing-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.landing-top .brand { display: flex; align-items: center; gap: 10px; }
.landing-top .brand .name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.landing-top .actions { display: flex; gap: 10px; }

.hero {
  text-align: center;
  padding: 72px 20px 54px;
  background:
    radial-gradient(900px 420px at 50% -20%, #dbeafe 0%, transparent 60%),
    radial-gradient(720px 400px at 92% 8%, #ccfbf1 0%, transparent 55%);
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.hero p { color: var(--text-muted); font-size: 17px; margin: 14px auto 28px; max-width: 560px; }
.hero-search { max-width: 660px; margin: 0 auto; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; padding: 8px 20px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; text-align: center; transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.feature .ficon { width: 54px; height: 54px; border-radius: 15px; margin: 0 auto 14px; display: grid; place-items: center; }
.feature .ficon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.pricing { max-width: 1100px; margin: 0 auto; padding: 30px 20px 64px; }
.pricing h2 { text-align: center; font-weight: 800; font-size: 25px; letter-spacing: -.02em; margin-bottom: 6px; }
.pricing .sub { text-align: center; color: var(--text-muted); margin-bottom: 26px; }
.pricing table.data td .tld { font-weight: 800; color: var(--primary); }

.landing-footer { text-align: center; padding: 24px; color: var(--text-faint); font-size: 13px; border-top: 1px solid var(--border); }

@media (max-width: 768px) {
  .features { grid-template-columns: 1fr 1fr; }
  .hero { padding: 42px 16px 38px; }
  .landing-top { padding: 13px 16px; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; }
  .burger { display: grid; }
  .content { padding: 18px 14px; gap: 16px; }
  .topbar { padding: 12px 14px; }
  .topbar-title { font-size: 16px; }
  .user-chip .u-rol, .user-chip .u-name { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .result-row { flex-wrap: wrap; }
  .result-domain { min-width: 100%; }
  .result-actions { margin-left: 0; width: 100%; }
  .result-actions .btn { flex: 1; }
}
