/* Connectra Cloud — identidad corporativa B2B (sitio/brochure):
   azul institucional #1b56fd, navy #0a1628, Hanken Grotesk. Tema claro, sobrio,
   tarjetas blancas con sombra sutil. Sin elementos "consumer/neon". */
:root {
  --blue: #1b56fd;
  --blue-hover: #1448d6;
  --blue-soft: #eaf0ff;
  --ink: #0a1628;        /* titulos / navy */
  --text: #2b3a52;       /* cuerpo */
  --muted: #6b7a93;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel2: #f0f3f9;
  --border: #e3e8f1;
  --ok: #1f9d57;
  --warn: #b9822a;
  --crit: #d23f3f;
  --shadow: 0 1px 2px rgba(16,30,60,.06), 0 4px 14px rgba(16,30,60,.05);
  --shadow-lg: 0 8px 30px rgba(16,30,60,.10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 14.5px/1.55 "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Login / registro */
.login-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #eef2fb 0%, #f5f7fb 60%); z-index: 100; padding: 20px;
}
.login-screen[hidden], #app[hidden] { display: none; }
.login-box {
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  padding: 38px 34px; width: 392px; max-width: 100%; box-shadow: var(--shadow-lg); text-align: left;
}
.brand-logo { display: flex; align-items: center; justify-content: center; gap: 11px; margin-bottom: 8px; }
.brand-logo img { height: 38px; display: block; }
.brand-logo .name { font-size: 22px; font-weight: 800; letter-spacing: -.4px; color: var(--ink); }
.brand-logo .name b { color: var(--blue); font-weight: 800; }
.login-box .sub { color: var(--muted); font-size: 13px; text-align: center; display: block; margin-bottom: 22px; }
.login-box h2 { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
label { display: block; text-align: left; color: var(--ink); font-size: 12.5px; font-weight: 600; margin: 14px 0 5px; }
input, select {
  width: 100%; background: #fff; border: 1px solid var(--border);
  border-radius: 9px; color: var(--ink); padding: 10px 12px; font-size: 14px; font-family: inherit;
}
input::placeholder { color: #aab4c5; }
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.lg-error { color: var(--crit); font-size: 12.5px; margin-top: 12px; min-height: 16px; }
.muted-link { color: var(--blue); font-size: 13px; cursor: pointer; margin-top: 16px; display: inline-block; font-weight: 600; }
.muted-link:hover { text-decoration: underline; }

/* Header */
header {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  padding: 0 28px; height: 60px; background: var(--panel); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; display: block; }
.brand .name { font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: var(--ink); }
.brand .name small { font-weight: 600; color: var(--muted); font-size: 11px; margin-left: 2px; letter-spacing: .3px; text-transform: uppercase; }
nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
nav button {
  background: none; border: none; color: var(--muted); position: relative;
  padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 14px; font-family: inherit; font-weight: 600;
}
nav button:hover { color: var(--ink); background: var(--panel2); }
nav button.active { color: var(--blue); }
nav button.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--blue); border-radius: 2px; }
.header-right { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; }
.whoami { color: var(--ink); font-weight: 600; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -7px; right: -9px; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px; padding: 1px 6px; }

main { padding: 28px; max-width: 1200px; margin: 0 auto; }
.view[hidden] { display: none; }
h2 { font-size: 22px; margin: 2px 0 4px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.lead { color: var(--muted); margin-bottom: 22px; font-size: 14.5px; max-width: 640px; }
.section-cat { color: var(--ink); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Cards de catalogo */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.svc-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.svc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #d3dcec; }
.ico {
  width: 42px; height: 42px; border-radius: 11px; background: var(--blue-soft);
  display: grid; place-items: center; color: var(--blue); margin-bottom: 2px;
}
.ico svg { width: 22px; height: 22px; }
.svc-card h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.svc-card .desc { color: var(--muted); font-size: 13.5px; flex: 1; line-height: 1.5; }
.svc-card .plans { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.plan-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px;
}
.plan-row .pn { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.plan-row .pd { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.price { font-weight: 800; font-size: 14.5px; white-space: nowrap; color: var(--ink); }
.price small { font-weight: 500; color: var(--muted); font-size: 11px; }

.bundle-card {
  background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--blue);
  border-radius: 14px; padding: 20px; box-shadow: var(--shadow); position: relative;
}
.bundle-card .tag-rec { position: absolute; top: 16px; right: 16px; background: var(--blue-soft); color: var(--blue); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 20px; }
.bundle-card h3 { font-size: 17px; font-weight: 800; color: var(--ink); }
.bundle-card .desc { color: var(--text); font-size: 13.5px; margin: 8px 0 14px; line-height: 1.5; }

/* Botones */
.btn {
  background: var(--blue); color: #fff; border: none; padding: 9px 16px;
  border-radius: 9px; cursor: pointer; font-weight: 700; font-size: 13px; font-family: inherit;
  transition: background .15s;
}
.btn:hover { background: var(--blue-hover); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--border); font-weight: 600; }
.btn-ghost:hover { background: var(--panel2); border-color: #d3dcec; }
.btn-danger { background: var(--crit); }
.btn-danger:hover { background: #b93636; }
.btn:disabled { opacity: .5; cursor: default; }

/* Estados */
.badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.badge-mock { background: #fff5e6; color: var(--warn); border: 1px solid #f0dcb8; }
.st { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: capitalize; }
.st-active { background: #e7f6ee; color: var(--ok); }
.st-provisioning, .st-pending { background: #fdf3e3; color: var(--warn); }
.st-suspended, .st-failed { background: #fbe9e9; color: var(--crit); }
.st-terminated { background: #eef1f6; color: var(--muted); }

/* Tablas */
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 11px 14px; font-size: 13.5px; }
th { background: var(--panel2); color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
td { color: var(--text); }
tr { border-top: 1px solid var(--border); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kcard { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.kcard .k { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kcard .v { font-size: 26px; font-weight: 800; margin-top: 4px; color: var(--ink); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(10,22,40,.45); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 20px; backdrop-filter: blur(2px); }
.modal[hidden] { display: none; }
.modal-box { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: 500px; max-width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h3 { font-size: 18px; font-weight: 700; color: var(--ink); }
.x { cursor: pointer; color: var(--muted); font-size: 22px; background: none; border: none; line-height: 1; }
.x:hover { color: var(--ink); }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.cart-line { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.cart-total { display: flex; justify-content: space-between; font-weight: 800; font-size: 17px; margin-top: 14px; color: var(--ink); }
.dns-rec { display: grid; grid-template-columns: 70px 1fr 2fr 60px 30px; gap: 8px; align-items: center; font-size: 12.5px; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text); }
.panel { background: var(--panel2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.empty { color: var(--muted); text-align: center; padding: 48px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); border: 1px solid var(--ink); color: #fff; padding: 12px 20px; border-radius: 10px; z-index: 5000; font-size: 13.5px; box-shadow: var(--shadow-lg); }
.toast[hidden] { display: none; }
.pill { display: inline-block; background: var(--panel2); border: 1px solid var(--border); border-radius: 20px; padding: 4px 11px; font-size: 12px; margin: 0 6px 6px 0; color: var(--text); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 12px; font-size: 13.5px; margin-top: 10px; }
.kv .k { color: var(--muted); }
.kv > div:not(.k) { color: var(--ink); font-weight: 500; }

@media (max-width: 980px) {
  nav { order: 3; width: 100%; flex: 0 0 100%; padding-bottom: 6px; }
  header { height: auto; padding: 10px 18px; }
}
@media (max-width: 600px) { .dns-rec { grid-template-columns: 1fr 1fr; } main { padding: 20px 16px; } }
