/* Boostpanel® — estilos compartidos */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --border-strong: #cfd7e3;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #0066ff;
  --primary-hover: #0052cc;
  --primary-soft: #eaf2ff;
  --violet: #7a00ff;
  --success: #10b981;
  --success-soft: #e7f8f1;
  --warning: #f59e0b;
  --warning-soft: #fef5e6;
  --danger: #ef4444;
  --danger-soft: #fdecec;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .08);
  --sidebar: 248px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5;
       -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8;
        stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column;
           position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; }
.brand img { width: 30px; height: 30px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-name sup { font-size: 9px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
             padding: 18px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2);
         font-weight: 500; position: relative; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
                        background: var(--primary); }
.nav a .ext { margin-left: auto; width: 14px; height: 14px; color: var(--muted); }
.sidebar-foot { border-top: 1px solid var(--border); padding: 14px 20px; font-size: 12px; color: var(--muted); }
.sidebar-foot a { color: var(--muted); }
.sidebar-foot a:hover { color: var(--primary); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 64px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center;
          gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 10; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; margin-left: -6px; }
.domain-chip { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.status-dot.warn { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-soft); }
.status-dot.down { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.domain-chip a { color: var(--muted); display: flex; }
.domain-chip a:hover { color: var(--primary); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--violet));
          color: #fff; font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.user-meta { line-height: 1.2; text-align: right; }
.user-meta strong { display: block; font-size: 13px; }
.user-meta span { font-size: 12px; color: var(--muted); }

.content { padding: 28px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin-top: 4px; }
h2 { font-size: 15px; font-weight: 600; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px;
             border-bottom: 1px solid var(--border); }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 20px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat { padding: 18px 20px; }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
             background: var(--primary-soft); color: var(--primary); }
.stat-icon.ok { background: var(--success-soft); color: var(--success); }
.stat-icon.warn { background: var(--warning-soft); color: var(--warning); }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.stat-value small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.stat-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bar { height: 6px; border-radius: 99px; background: #edf1f6; overflow: hidden; margin-top: 10px; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 8px 0 12px; }
.section-title h2 { font-size: 16px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 18px; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile:hover { border-color: #b9cff5; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.tile-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary);
             display: flex; align-items: center; justify-content: center; flex: none; }
.tile-title { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tile-title svg { width: 13px; height: 13px; color: var(--muted); }
.tile-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }

.kv { width: 100%; border-collapse: collapse; }
.kv th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 10px 0; width: 38%; vertical-align: middle; }
.kv td { padding: 10px 0; }
.kv tr + tr th, .kv tr + tr td { border-top: 1px solid var(--border); }
.kv-sub { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 18px 0 2px; }
.kv-sub:first-child { margin-top: 0; }
.copy { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; background: var(--surface-2);
        border: 1px solid var(--border); border-radius: 7px; padding: 4px 6px 4px 10px; color: var(--text); }
.copy button { background: none; border: 0; color: var(--muted); cursor: pointer; display: flex; padding: 3px; border-radius: 5px; }
.copy button:hover { color: var(--primary); background: var(--primary-soft); }
.copy button svg { width: 14px; height: 14px; }
.copy.done button { color: var(--success); }

.help { background: linear-gradient(140deg, #0a1a3d 0%, #0b2d7a 55%, #3b0fa8 100%); color: #fff; border: 0; position: relative; overflow: hidden; }
.help::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
               background: radial-gradient(circle, rgba(0, 160, 255, .35), transparent 70%); }
.help .card-body { position: relative; z-index: 1; }
.help h2 { font-size: 17px; margin-bottom: 6px; }
.help p { color: rgba(255, 255, 255, .78); font-size: 13px; margin-bottom: 18px; }
.help .btn { width: 100%; justify-content: center; }
.help .btn + .btn { margin-top: 8px; }

.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: 14px; border-radius: 8px;
       padding: 9px 16px; border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-white { background: #fff; color: #0b2d7a; }
.btn-white:hover { background: #eef3ff; }
.btn-outline-white { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-white:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-danger-ghost { background: none; color: var(--danger); border-color: transparent; }
.btn-danger-ghost:hover { background: var(--danger-soft); }

/* Tabla */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
            background: var(--surface-2); padding: 10px 20px; border-bottom: 1px solid var(--border); }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 12px; }
.who-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: flex;
            align-items: center; justify-content: center; font-weight: 600; font-size: 13px; text-transform: uppercase; }
.who strong { display: block; font-weight: 600; }
.who span { font-size: 12px; color: var(--muted); }
.badge { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 99px;
         background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.on { background: var(--success-soft); color: #047857; border-color: #c3ecd9; }
.badge.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.badge.warn { background: #fff7e6; color: #b45309; border-color: #fde3b0; }

/* Formularios */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 6px; }
.input { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
         border-radius: 8px; padding: 9px 12px; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 102, 255, .15); }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-addon { display: flex; align-items: center; padding: 0 12px; background: var(--surface-2); border: 1px solid var(--border-strong);
               border-left: 0; border-radius: 0 8px 8px 0; color: var(--muted); font-size: 13px; white-space: nowrap; }
.input-addon.btn-addon { cursor: pointer; color: var(--primary); font-weight: 600; background: var(--surface); }
.input-addon.btn-addon:hover { background: var(--primary-soft); }
.input-group-prefix .input { border-radius: 0 8px 8px 0; }
.input-group-prefix .input-addon { order: -1; border-left: 1px solid var(--border-strong); border-right: 0; border-radius: 8px 0 0 8px; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 20px; border: 1px solid; }
.alert svg { margin-top: 1px; }
.alert-success { background: var(--success-soft); border-color: #c3ecd9; color: #065f46; }
.alert-error { background: var(--danger-soft); border-color: #f8cccc; color: #991b1b; }
.alert-info { background: var(--primary-soft); border-color: #cfe0ff; color: #0b3b8f; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
              display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; color: var(--muted); }
.empty strong { display: block; color: var(--text); margin-bottom: 4px; }

.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.two-col > *, .split > * { min-width: 0; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-side { background: linear-gradient(150deg, #071233 0%, #0a2a78 50%, #3a0ca3 100%); color: #fff; padding: 48px; display: flex;
             flex-direction: column; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; bottom: -180px; border-radius: 50%;
                     background: radial-gradient(circle, rgba(0, 160, 255, .45), transparent 65%); }
.auth-side::after { content: ""; position: absolute; width: 380px; height: 380px; left: -120px; top: -140px; border-radius: 50%;
                    background: radial-gradient(circle, rgba(122, 0, 255, .35), transparent 65%); }
.auth-side > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.auth-brand img { width: 34px; height: 34px; }
.auth-brand sup { font-size: 9px; opacity: .7; }
.auth-pitch { margin-top: auto; max-width: 440px; }
.auth-pitch h2 { font-size: 32px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; margin-bottom: 14px; }
.auth-pitch p { color: rgba(255, 255, 255, .75); font-size: 15px; }
.auth-points { list-style: none; margin-top: 28px; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 10px; align-items: center; color: rgba(255, 255, 255, .9); }
.auth-points svg { color: #7cc4ff; }
.auth-legal { margin-top: 40px; font-size: 12px; color: rgba(255, 255, 255, .55); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 26px; margin-bottom: 6px; }
.auth-form .page-sub { margin-bottom: 28px; }
.auth-form .btn-primary { width: 100%; justify-content: center; padding: 11px; margin-top: 4px; }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 42px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted);
               cursor: pointer; padding: 6px; display: flex; border-radius: 6px; }
.pass-toggle:hover { color: var(--text); }
.auth-foot { margin-top: 24px; font-size: 13px; color: var(--muted); text-align: center; }
.auth-mobile-brand { display: none; }

/* ---------- Responsive ---------- */
.backdrop { display: none; }
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .split, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 30; transform: translateX(-100%);
             transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 20; }
  .menu-btn { display: flex; }
  .topbar { padding: 0 16px; }
  .user-meta { display: none; }
  .content { padding: 20px 16px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin-bottom: 32px; }
  .auth-mobile-brand img { width: 32px; height: 32px; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat-top { margin-bottom: 8px; }
  .stat-icon { display: none; }
  .stat-value { font-size: 18px; }
  h1 { font-size: 21px; }
  .table td, .table th { padding-left: 14px; padding-right: 14px; }
  .kv th { width: auto; display: block; padding-bottom: 2px; }
  .kv td { display: block; padding-top: 0; border-top: 0 !important; }
  .copy { max-width: 100%; overflow-wrap: anywhere; }
  .table .lbl { display: none; }
  .table .btn-sm { padding: 7px; }
  .who strong { overflow-wrap: anywhere; }
  .who-icon { display: none; }
}

/* ---------- Piezas del panel real ---------- */
svg.i-sm { width: 15px; height: 15px; }
.domain-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sidebar-foot { display: grid; gap: 10px; }
.sidebar-help { display: flex; align-items: center; gap: 8px; color: var(--text-2) !important; font-weight: 600; font-size: 13px; }
.sidebar-help:hover { color: var(--primary) !important; }
.stat-value.ok { color: #047857; }
.stat-value.warn { color: #b45309; }
.stat-value.down { color: var(--danger); }
.bar > span.warn { background: var(--warning); }
.bar > span.down { background: var(--danger); }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.stack { display: grid; gap: 16px; }
.w-full { width: 100%; justify-content: center; }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.5; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: 4px 0 16px; }
.inline-form { display: inline; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
             font-size: 13px; color: var(--muted); }

/* Pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 12px; overflow-x: auto; }
.tab { background: none; border: 0; font: inherit; font-weight: 600; color: var(--muted); padding: 12px 10px; cursor: pointer; display: flex;
       align-items: center; gap: 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel[hidden] { display: none; }

/* Guías paso a paso */
.steps { list-style: none; counter-reset: step; display: grid; gap: 18px; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; }
.steps > li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
                      font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.steps strong { display: block; margin-bottom: 2px; }
.steps p { color: var(--text-2); font-size: 13px; }
.steps .kv { margin-top: 8px; }
.app-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.kbd { font-family: var(--mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
           font-size: 13px; color: var(--text-2); }
.callout svg { color: var(--primary); margin-top: 1px; }

/* Explorador de archivos */
.path { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13px; }
.path a { color: var(--text-2); font-weight: 500; }
.path a:hover { color: var(--primary); }
.path svg { width: 14px; height: 14px; color: var(--muted); }
.file-name { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text); }
.file-name svg { color: var(--muted); }
.file-name.dir svg { color: var(--primary); }
a.file-name:hover { color: var(--primary); }
.num, .table th.num { text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* DNS */
.type-pill { display: inline-block; min-width: 52px; text-align: center; font-family: var(--mono); font-size: 12px; font-weight: 600;
             padding: 3px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); }
.mono-wrap { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }

@media (max-width: 560px) {
  .hide-sm { display: none; }
  .table .hide-sm { display: none; }
  .num.hide-sm { display: none; }
  .steps > li { grid-template-columns: 26px 1fr; gap: 10px; }
  .steps > li::before { width: 26px; height: 26px; }
}
