/* ===== Panel BcTech ===== */
:root {
  color-scheme: light;
  --bg: #f2f4f8; --card: #ffffff; --card-2: #f7f8fb; --text: #111827; --muted: #6b7280; --line: #e4e7ee;
  --accent: #2a78d6; --accent-soft: #e3eefb; --accent-text: #ffffff; --violet: #6250d6;
  --good: #0ca30c; --warn: #fab219; --crit: #d03b3b;
  --good-bg: #e7f6e7; --warn-bg: #fff6e0; --crit-bg: #fbe9e9;
  --code: #eef1f6; --shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-hover: 0 8px 24px rgba(16,24,40,.10); --radius: 12px;
  --hdr-a: #2a78d6; --hdr-b: #6250d6;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0e1117; --card: #171b23; --card-2: #1d222c; --text: #e8eaf0; --muted: #9aa3b2; --line: #2a303c;
    --accent: #3987e5; --accent-soft: #1b2a40; --accent-text: #ffffff; --violet: #9085e9;
    --good-bg: #13291a; --warn-bg: #2f2612; --crit-bg: #331a1a;
    --code: #232a35; --shadow: 0 1px 2px rgba(0,0,0,.3); --shadow-hover: 0 8px 24px rgba(0,0,0,.45);
    --hdr-a: #1b4f8f; --hdr-b: #3d3392;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1240px; margin: 0 auto; padding: 22px 16px 40px; animation: fadein .25s ease-out; }
main.wide { max-width: none; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
h1 { font-size: 24px; margin: 0; letter-spacing: -.01em; } h2 { font-size: 18px; margin: 28px 0 12px; } h3 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } .right { text-align: right; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ----- cabecera y pestañas ----- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px;
  background: linear-gradient(110deg, var(--hdr-a), var(--hdr-b)); color: #fff; }
.brand { color: #fff; font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; }
.brand span.sub { font-weight: 500; opacity: .8; }
.top .who { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.top .who a { color: #fff; opacity: .9; } .top .who a:hover { opacity: 1; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .95; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #9ef09e; animation: pulse 2s infinite; }
.live.off i { background: #ffb4b4; animation: none; }
.tabs { display: flex; gap: 4px; padding: 6px 14px; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto;
  position: sticky; top: 0; z-index: 5; box-shadow: var(--shadow); }
.tabs a { padding: 8px 14px; color: var(--muted); border-radius: 8px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, color .15s; }
.tabs a:hover { color: var(--text); background: var(--card-2); text-decoration: none; }
.tabs a.on { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.tabs a.icon { margin-left: auto; }
.tabs svg, .subtabs svg, .ico { width: 18px; height: 18px; flex: none; }
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -4px 0 20px; }
.subtabs a { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--card); font-size: 14px;
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .15s, background .15s, transform .15s; }
.subtabs a:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.subtabs a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }

/* ----- bloques ----- */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head.tight { margin-bottom: 12px; } .head.tight h3 { margin: 0; }
.head h1 a.muted { color: var(--muted); font-weight: 400; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.hover, .tile, .ccard, .svc { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.card.hover:hover, .ccard:hover, .svc:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; } .grid2 > .card { margin-bottom: 0; }
.top-gap { margin-top: 16px; }
.narrow { max-width: 780px; } .center { text-align: center; margin: 8vh auto; }
.row3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.empty { text-align: center; padding: 40px; color: var(--muted); }
.line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.line:last-of-type { border-bottom: 0; }

/* ----- fichas de datos (stat tiles) ----- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 12px; box-shadow: var(--shadow); position: relative; }
.tile:hover { box-shadow: var(--shadow-hover); }
.tile .k { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.tile .k .badge { width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.tile .k .badge svg { width: 16px; height: 16px; }
.tile .v { font-size: 30px; font-weight: 700; margin: 6px 0 8px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tile .v small { font-size: 15px; font-weight: 500; color: var(--muted); }
.tile .s { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.meter { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; margin-bottom: 8px; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--accent); width: 0; transition: width .8s cubic-bezier(.2,.8,.2,1), background .3s; }
.meter.warn i { background: var(--warn); } .meter.crit i { background: var(--crit); }
.spark { position: relative; height: 44px; margin: 4px 0 6px; }
.spark svg { width: 100%; height: 44px; display: block; overflow: visible; }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .ar { fill: var(--accent); opacity: .12; }
.spark .pt { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.spark .xh { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.spark .hit { fill: transparent; cursor: crosshair; }
.spark .tip { position: absolute; top: -30px; transform: translateX(-50%); background: var(--text); color: var(--card); font-size: 12px; padding: 3px 8px;
  border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .1s; font-variant-numeric: tabular-nums; }
.spark.hovering .tip, .spark.hovering .xh { opacity: 1; }

/* ----- estados (siempre con icono + texto) ----- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.good::before { animation: pulse 2.2s infinite; }
.pill.warn { background: var(--warn-bg); color: #9a6a00; } .pill.crit { background: var(--crit-bg); color: var(--crit); }
@media (prefers-color-scheme: dark) { .pill.warn { color: var(--warn); } }
.pill.off { background: var(--card-2); color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; background: var(--muted); vertical-align: middle; }
.dot.ok { background: var(--good); animation: pulse 2.2s infinite; } .dot.bad { background: var(--crit); }

/* ----- tarjetas de clientes y servicios ----- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ccard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.ccard .t { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.ccard .t .who { min-width: 0; flex: 1 1 140px; }
.ccard .t .pill { flex: 0 0 auto; white-space: nowrap; }
.ccard .cid { display: block; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.ccard .name { font-weight: 700; font-size: 16px; color: var(--text); overflow-wrap: anywhere; }
.ccard .dom { font-size: 13px; color: var(--muted); word-break: break-all; }
.ccard .links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.ccard .links a { font-size: 13px; padding: 4px 10px; border-radius: 7px; background: var(--card-2); border: 1px solid var(--line); color: var(--text); }
.ccard .links a:hover { border-color: var(--accent); text-decoration: none; }
.ccard.new { border-style: dashed; align-items: center; justify-content: center; color: var(--muted); min-height: 140px; }
.ccard.new:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.svc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.svc .t { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.svc .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.svc .ic svg { width: 22px; height: 22px; }
.svc .t h3 { margin: 0; } .svc .t .grow { flex: 1; min-width: 160px; }
.svc .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.svc .acts form { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--card-2); }
.seg button { border: 0; border-radius: 0; background: transparent; padding: 7px 14px; }
.seg button.on, .seg button.on[disabled] { background: var(--accent); color: var(--accent-text); font-weight: 600; opacity: 1; cursor: default; }
.seg form { display: contents; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.note.warn { color: inherit; background: var(--warn-bg); border: 1px solid var(--warn); border-radius: 8px; padding: 8px 12px; }

/* ----- tablas ----- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
tbody tr { transition: background .12s; } tbody tr:hover { background: var(--card-2); }
tr:last-child td { border-bottom: 0; }

/* ----- formularios y botones ----- */
label { display: block; margin-bottom: 12px; font-weight: 550; font-size: 14px; }
label small, form > small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; font-size: 12.5px; }
input:not([type=file]):not([type=hidden]):not([type=checkbox]):not([type=radio]), textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--text); font: inherit; transition: border-color .15s, box-shadow .15s; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=file] { display: block; margin-top: 6px; max-width: 100%; }
button, .button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, transform .1s, box-shadow .15s, background .15s; }
button:hover, .button:hover { border-color: var(--accent); text-decoration: none; }
button:active, .button:active { transform: scale(.97); }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.primary:hover { box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.dangerbtn { background: var(--crit); border-color: var(--crit); color: #fff; font-weight: 600; }
button.small { padding: 2px 8px; font-size: 12px; margin-left: 6px; }
.small-btn { padding: 4px 10px; font-size: 13px; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); } button.link.red, .red { color: var(--crit); }
button[disabled] { opacity: .55; cursor: not-allowed; }
button.loading::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; } .actions form { margin: 0; }
.fileactions { white-space: nowrap; } .fileactions > * { margin-left: 10px; } .fileactions form { display: inline; }

/* ----- avisos (toasts) y ventana de confirmación ----- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--good-bg); border: 1px solid var(--good); }
.flash.error { background: var(--crit-bg); border-color: var(--crit); } .flash.warn { background: var(--warn-bg); border-color: var(--warn); }
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 50; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; background: var(--card); color: var(--text); border: 1px solid var(--line); border-left: 4px solid var(--good);
  border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-hover); animation: toastin .3s cubic-bezier(.2,.8,.2,1); font-size: 14px; }
.toast.error { border-left-color: var(--crit); } .toast.warn { border-left-color: var(--warn); }
.toast b { font-size: 16px; line-height: 1.2; } .toast .x { margin-left: auto; background: none; border: 0; padding: 0 2px; color: var(--muted); font-size: 18px; line-height: 1; }
.toast.out { animation: toastout .25s ease-in forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastout { to { opacity: 0; transform: translateX(30px); } }
.modal { position: fixed; inset: 0; background: rgba(10,14,22,.55); display: none; place-items: center; z-index: 60; padding: 16px; backdrop-filter: blur(2px); }
.modal.open { display: grid; animation: fadein .15s; }
.modal .box { background: var(--card); border-radius: 14px; padding: 22px; width: min(440px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35); animation: toastin .2s; }
.modal h3 { margin-bottom: 8px; } .modal p { margin: 0 0 16px; color: var(--muted); }
.modal .btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ----- varios ----- */
.login { max-width: 380px; margin: 12vh auto 0; } .login h1 { text-align: center; margin-bottom: 18px; } .login h1 span { color: var(--accent); font-weight: 500; }
code { background: var(--code); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.help ol { padding-left: 20px; } .help li { margin-bottom: 8px; } .help p { margin: 0 0 8px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; } .kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 10px; } .danger { border-color: var(--crit); }
details.inline { display: inline-block; text-align: left; vertical-align: top; }
details.inline summary { list-style: none; display: inline; font-weight: 400; color: var(--accent); margin: 0; }
details.inline summary::-webkit-details-marker { display: none; }
details.inline[open] { display: block; margin-top: 8px; }
form.restore { white-space: normal; text-align: left; max-width: 460px; margin-left: auto; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
form.restore p { margin: 0 0 10px; font-size: 13px; }
.crumbs { margin-bottom: 14px; font-family: ui-monospace, monospace; }
.logs, .editor { font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.logs { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow: auto; max-height: 70vh; white-space: pre-wrap; word-break: break-all; }
.editor { min-height: 65vh; white-space: pre; tab-size: 4; margin-bottom: 12px; }
.terminal { height: calc(100vh - 300px); min-height: 360px; background: #0f1218; border-radius: var(--radius); padding: 8px; border: 1px solid var(--line); }
@media (max-width: 640px) { .top { padding: 10px 14px; } .tabs { padding: 6px 8px; } .tabs a { padding: 8px 10px; } .top .who .muted-w { display: none; } .fileactions { white-space: normal; } .tile .v { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

fieldset.opts { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 4px; margin: 0 0 14px; }
fieldset.opts legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
label.chk { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 10px; align-items: start; font-weight: 500; cursor: pointer; }
label.chk input[type=radio] { border-radius: 50%; }
label.chk input { grid-column: 1; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); cursor: pointer; }
label.chk small { grid-column: 2; display: block; margin-top: 2px; }

.linkrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.linkrow a { white-space: nowrap; font-weight: 600; }
.linkrow input { margin: 0 !important; font: 12.5px ui-monospace, monospace !important; }
.row-send { display: flex; gap: 8px; margin: 6px 0 4px; }
.row-send input { margin: 0 !important; }

select { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }

/* pestaña Copias: progreso en tiempo real */
.prog { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--card) 60%); }
.meter.big { height: 14px; border-radius: 7px; margin: 6px 0 8px; }
.meter.big i { border-radius: 7px; transition: width .6s ease; background: linear-gradient(90deg, var(--accent), var(--violet)); }
.prog-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.logs.mini { max-height: 220px; font-size: 12px; margin: 6px 0 0; background: var(--card-2); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
#ultimo { margin: 0 0 16px; }
.ok-t { color: var(--good); }
.prog-table td { vertical-align: top; }
.acts-cell { white-space: nowrap; } .acts-cell form { display: inline; } .acts-cell > * { margin-left: 4px; }
tr.edit-row td { background: var(--card-2); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.inline-form label { margin: 0; } .inline-form input:not([type=checkbox]), .inline-form select { width: auto; min-width: 70px; }
.inline-form label.chk { display: flex; align-items: center; gap: 6px; padding-bottom: 8px; }
tr.foco > td { background: var(--accent-soft); }
tr.sys-row td { border-top: 2px solid var(--line); }

/* portal de clientes */
.qr { background: #fff; display: inline-block; padding: 8px; border-radius: 10px; }
.qr svg { width: 200px; height: 200px; display: block; }

/* =====================================================================
   Tema bctech.es: el portal es una sección más de la web de BcTech.
   Mismos colores, tipografías (Inter + Space Grotesk), fondo animado y vidrio.
   ===================================================================== */
:root, :root:not([data-x]) {
  color-scheme: dark;
  --bg: #050f1c; --card: rgba(14, 34, 58, .55); --card-2: rgba(20, 46, 78, .7); --text: #eaf2ff; --muted: #9db0c8;
  --line: rgba(160, 200, 255, .14); --accent: #5aa2ff; --accent-soft: rgba(90, 162, 255, .14); --accent-text: #fff;
  --cyan: #38d6ff; --blue: #2a72c4; --navy: #0b3050;
  --good: #3ddc84; --warn: #ffc94d; --crit: #ff6b6b;
  --good-bg: rgba(61, 220, 132, .12); --warn-bg: rgba(255, 201, 77, .12); --crit-bg: rgba(255, 107, 107, .12);
  --code: rgba(160, 200, 255, .1); --shadow: 0 30px 80px -30px rgba(0, 10, 30, .9); --shadow-hover: 0 30px 80px -24px rgba(0, 10, 30, 1);
  --radius: 22px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body { background: var(--bg); color: var(--text); font: 400 15.5px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: 1180px; padding: 12px clamp(16px, 4vw, 40px) 48px; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.08rem; font-weight: 600; }
.grad { background: linear-gradient(100deg, var(--accent) 0%, var(--cyan) 55%, #a8e8ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* fondo animado, igual que bctech.es */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% -10%, #0c2a4a 0%, var(--bg) 60%); }
.orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.o1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: radial-gradient(circle, #1d5fae 0%, transparent 65%); animation: drift1 26s var(--ease) infinite alternate; }
.o2 { width: 38vmax; height: 38vmax; right: -12vmax; top: 8vh; background: radial-gradient(circle, #0f8fbf 0%, transparent 65%); opacity: .3; animation: drift2 32s var(--ease) infinite alternate; }
.bg .grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(70% 55% at 50% 30%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(70% 55% at 50% 30%, #000 0%, transparent 75%); opacity: .45; }
@keyframes drift1 { to { transform: translate(8vw, 6vh) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-6vw, 10vh) scale(.94); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* cabecera como la de bctech.es */
.top { position: sticky; top: 0; z-index: 20; background: linear-gradient(to bottom, rgba(5, 15, 28, .85), rgba(5, 15, 28, .55));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding: 16px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); color: var(--text); }
.brand { color: var(--text); gap: 10px; font: 700 1.2rem/1 var(--font-display); }
.brand-tile { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #fff; box-shadow: 0 6px 20px -6px rgba(42, 114, 196, .7); }
.brand-tile img { width: 26px; height: 26px; display: block; }
.brand .sub { font: 500 .95rem var(--font-body); color: var(--muted); opacity: 1; padding-left: 10px; border-left: 1px solid var(--line); }
.top .who { gap: 18px; font-size: .92rem; }
.top .who a, .top .who span { color: var(--muted); opacity: 1; }
.top .who a:hover { color: var(--text); text-decoration: none; }
.tabs { position: static; background: transparent; border: 0; box-shadow: none; max-width: 1180px; width: 100%; margin: 18px auto 6px;
  padding: 0 clamp(16px, 4vw, 40px); gap: 8px; }
.tabs a { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: rgba(255, 255, 255, .03); color: var(--muted); font-size: .92rem; }
.tabs a:hover { color: var(--text); border-color: rgba(90, 162, 255, .45); background: rgba(255, 255, 255, .05); }
.tabs a.on { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--blue)); box-shadow: 0 10px 26px -12px rgba(90, 162, 255, .9); }

/* tarjetas de vidrio con el filo de color de las de bctech.es */
.card { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, var(--accent), var(--cyan), transparent); opacity: .7; }
.big-num { font: 600 2.2rem/1.1 var(--font-display); margin: 4px 0; letter-spacing: -.02em; }

/* formularios y botones */
input:not([type=file]):not([type=hidden]):not([type=checkbox]):not([type=radio]), textarea, select {
  background: rgba(3, 12, 24, .55); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90, 162, 255, .18); }
button, .button { border-radius: 12px; padding: 10px 18px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text);
  font-weight: 600; transition: transform .2s var(--ease), border-color .2s, background .2s; }
button:hover, .button:hover { border-color: rgba(90, 162, 255, .45); transform: translateY(-1px); }
button.primary, .button.primary { background: linear-gradient(135deg, var(--accent), var(--blue)); border-color: transparent; color: #fff;
  box-shadow: 0 12px 30px -12px rgba(90, 162, 255, .9); }
button.link { color: var(--accent); background: none; border: 0; padding: 0; box-shadow: none; transform: none; }
button.link.red, .red { color: var(--crit); }
th { color: var(--muted); } th, td { border-bottom-color: var(--line); }
.flash { border-radius: 12px; background: var(--good-bg); border-color: rgba(61, 220, 132, .4); }
.flash.error { background: var(--crit-bg); border-color: rgba(255, 107, 107, .45); } .flash.warn { background: var(--warn-bg); border-color: rgba(255, 201, 77, .45); }
.toast, .modal .box { background: #0d2038; border-color: var(--line); color: var(--text); }
.modal .box { border: 1px solid var(--line); border-radius: 18px; }
.terminal { background: #050c16; border-radius: 16px; border-color: var(--line); }
.pill.warn { color: var(--warn); }
.note { color: var(--muted); }
fieldset.opts { border-color: var(--line); border-radius: 14px; }
code { background: var(--code); color: #cfe4ff; }

/* aviso de 2FA */
.aviso-2fa { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 18px; padding: 14px 18px; border-radius: 16px;
  border: 1px solid rgba(255, 201, 77, .45); background: linear-gradient(135deg, rgba(255, 201, 77, .14), rgba(255, 201, 77, .04)); }
.aviso-2fa .button { margin-left: auto; }

/* acceso */
.login { max-width: 420px; margin: 9vh auto 0; text-align: center; }
.login .brand-tile { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; }
.login .brand-tile img { width: 40px; height: 40px; }
.login h1 { margin-bottom: 4px; } .login p.lead { color: var(--muted); margin: 0 0 22px; }
.login .card { text-align: left; }
.login .card button.primary { width: 100%; justify-content: center; padding: 13px; }
.login .volver { display: inline-block; margin-top: 18px; color: var(--muted); font-size: .92rem; }

/* pie como el de bctech.es */
footer.foot { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; padding: 22px 16px 28px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
footer.foot a { color: var(--muted); } footer.foot a:hover { color: var(--text); text-decoration: none; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font: 600 1rem var(--font-display); }
.foot-brand .brand-tile { width: 26px; height: 26px; border-radius: 8px; } .foot-brand .brand-tile img { width: 18px; height: 18px; }
@media (max-width: 640px) { .brand .sub { display: none; } .top .who .usuario { display: none; } }
