:root {
  --bg: #080910;
  --bg-soft: #0b0d15;
  --sidebar: #0d0f18;
  --panel: #11131e;
  --panel-2: #151824;
  --panel-3: #1a1e2c;
  --border: #252a3a;
  --border-soft: #1d2230;
  --text: #f4f6fb;
  --muted: #8b93a7;
  --muted-2: #626a7e;
  --green: #3ecf8e;
  --green-soft: rgba(62, 207, 142, .12);
  --purple: #8b5cf6;
  --purple-soft: rgba(139, 92, 246, .13);
  --cyan: #38bdf8;
  --cyan-soft: rgba(56, 189, 248, .12);
  --amber: #f4b942;
  --amber-soft: rgba(244, 185, 66, .12);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, .12);
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-width: 246px;
  --topbar-height: 66px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); }
body {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 76% -10%, rgba(139, 92, 246, .11), transparent 31rem),
    radial-gradient(circle at 15% 95%, rgba(62, 207, 142, .055), transparent 35rem),
    linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
  background-size: auto, auto, 38px 38px, 38px 38px;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

::selection { background: rgba(62,207,142,.28); color: white; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0a0c13; }
::-webkit-scrollbar-thumb { background: #2a3041; border: 2px solid #0a0c13; border-radius: 999px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 40;
  border-right: 1px solid var(--border-soft);
  background: rgba(12, 14, 23, .94);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
}
.brand { height: var(--topbar-height); display: flex; align-items: center; gap: 11px; padding: 0 18px; border-bottom: 1px solid var(--border-soft); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; position: relative; overflow: hidden;
  background: linear-gradient(145deg, var(--purple), #4f46e5 47%, var(--green));
  box-shadow: 0 0 28px rgba(139, 92, 246, .25);
}
.brand-mark::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(255,255,255,.8); transform: rotate(30deg); border-radius: 4px; }
.brand-name { font-weight: 720; letter-spacing: -.02em; font-size: 14px; }
.brand-sub { color: var(--muted-2); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; }
.sidebar-nav { padding: 17px 11px; flex: 1; }
.nav-label { color: #50586c; text-transform: uppercase; letter-spacing: .11em; font-size: 9px; font-weight: 800; padding: 15px 10px 7px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: 8px; color: #9aa2b5; font-size: 13px; margin: 2px 0; transition: .16s ease; }
.nav-link:hover { color: #e7eaf1; background: rgba(255,255,255,.035); }
.nav-link.active { color: #f8fafc; background: linear-gradient(90deg, rgba(139,92,246,.13), rgba(62,207,142,.035)); box-shadow: inset 2px 0 0 var(--purple); }
.nav-icon { width: 18px; height: 18px; border: 1px solid #3b4256; border-radius: 5px; display: grid; place-items: center; font-size: 9px; font-family: var(--mono); color: #a7afc2; }
.sidebar-bottom { padding: 12px; border-top: 1px solid var(--border-soft); }
.user-box { padding: 10px; border: 1px solid var(--border-soft); background: rgba(255,255,255,.018); border-radius: 10px; }
.user-name { font-size: 12px; font-weight: 700; }
.user-role { font-size: 10px; color: var(--muted); margin-top: 3px; }
.logout-form { margin-top: 8px; }
.logout-btn { width: 100%; color: var(--muted); background: transparent; border: 0; text-align: left; padding: 5px 0; font-size: 11px; }
.logout-btn:hover { color: var(--red); }

.main { grid-column: 2; min-width: 0; }
.topbar { height: var(--topbar-height); position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; border-bottom: 1px solid var(--border-soft); background: rgba(8,9,16,.78); backdrop-filter: blur(18px); }
.topbar-path { font-family: var(--mono); color: var(--muted); font-size: 11px; }
.topbar-path strong { color: #d7dbe5; font-weight: 500; }
.topbar-status { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.network-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px rgba(62,207,142,.7); }
.page { max-width: 1500px; margin: 0 auto; padding: 30px 30px 52px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.eyebrow { color: var(--green); text-transform: uppercase; letter-spacing: .14em; font-size: 9px; font-weight: 800; margin-bottom: 8px; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.05; letter-spacing: -.045em; font-weight: 710; }
h2 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 13px; }
.page-subtitle { color: var(--muted); font-size: 13px; margin-top: 9px; max-width: 760px; line-height: 1.55; }

.btn { border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); color: #d9deea; min-height: 34px; padding: 7px 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 650; transition: .16s ease; }
.btn:hover { border-color: #3a4155; background: #191d2a; transform: translateY(-1px); }
.btn-primary { background: #f1f5f4; color: #07120e; border-color: #f1f5f4; }
.btn-primary:hover { background: white; border-color: white; }
.btn-green { background: var(--green); color: #03130c; border-color: var(--green); box-shadow: 0 0 22px rgba(62,207,142,.12); }
.btn-green:hover { background: #4ee4a0; border-color: #4ee4a0; }
.btn-purple { background: var(--purple-soft); border-color: rgba(139,92,246,.33); color: #cbb7ff; }
.btn-danger { background: var(--red-soft); border-color: rgba(251,113,133,.3); color: #ff9aaa; }
.btn-warning { background: var(--amber-soft); border-color: rgba(244,185,66,.28); color: #ffd579; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 29px; padding: 5px 9px; font-size: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.panel { background: linear-gradient(180deg, rgba(18,20,31,.96), rgba(14,16,25,.96)); border: 1px solid var(--border-soft); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0,0,0,.14); }
.panel-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); }
.panel-title { font-size: 12px; font-weight: 720; letter-spacing: -.01em; }
.panel-sub { color: var(--muted-2); font-size: 10px; margin-top: 3px; }
.panel-body { padding: 16px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.stat { min-height: 92px; padding: 15px 16px; border-radius: 11px; background: rgba(17,19,30,.82); border: 1px solid var(--border-soft); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -25px; bottom: -38px; width: 88px; height: 88px; border-radius: 50%; background: rgba(139,92,246,.05); }
.stat-label { color: var(--muted); font-size: 10px; }
.stat-value { font-family: var(--mono); font-size: 24px; margin-top: 9px; letter-spacing: -.04em; }
.stat-note { color: var(--muted-2); font-size: 9px; margin-top: 4px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.stack { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { color: #b3b9c7; font-size: 10px; font-weight: 650; }
.input, .select { width: 100%; min-height: 37px; background: #0d0f18; border: 1px solid #272c3b; border-radius: 8px; color: var(--text); outline: none; padding: 8px 10px; font-size: 12px; transition: .15s ease; }
.input:focus, .select:focus { border-color: rgba(62,207,142,.55); box-shadow: 0 0 0 3px rgba(62,207,142,.07); }
.select option { background: #11131e; }
.hint { color: var(--muted-2); font-size: 9px; line-height: 1.45; }
.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 190px; overflow: auto; border: 1px solid var(--border-soft); border-radius: 9px; background: #0c0e16; padding: 7px; gap: 3px; }
.check-item { display: flex; gap: 7px; align-items: center; padding: 6px 7px; border-radius: 6px; color: #abb3c3; font-family: var(--mono); font-size: 9px; }
.check-item:hover { background: rgba(255,255,255,.03); }
.check-item input { accent-color: var(--green); }

.environments { display: grid; gap: 9px; }
.env-card { position: relative; border: 1px solid var(--border-soft); background: linear-gradient(145deg, rgba(18,20,31,.92), rgba(13,15,23,.96)); border-radius: 12px; padding: 15px 16px; transition: .18s ease; overflow: hidden; }
.env-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: #363c4e; }
.env-card.running::before { background: var(--green); box-shadow: 0 0 16px rgba(62,207,142,.45); }
.env-card:hover { border-color: #32394b; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.env-main { display: grid; grid-template-columns: minmax(180px, 1.15fr) minmax(160px, .8fr) minmax(130px, .7fr) auto; gap: 16px; align-items: center; }
.env-name { font-size: 13px; font-weight: 720; display: flex; align-items: center; gap: 8px; }
.env-domain { color: var(--muted); font-size: 9px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env-meta-label { color: #555e72; font-size: 8px; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 5px; }
.env-meta-value { font-family: var(--mono); font-size: 10px; color: #b8bfce; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.env-actions { display: flex; gap: 6px; }

.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; min-height: 22px; padding: 3px 8px; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: var(--muted); }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill-green { color: var(--green); border-color: rgba(62,207,142,.25); background: var(--green-soft); }
.pill-red { color: var(--red); border-color: rgba(251,113,133,.26); background: var(--red-soft); }
.pill-amber { color: var(--amber); border-color: rgba(244,185,66,.28); background: var(--amber-soft); }
.pill-purple { color: #ad91ff; border-color: rgba(139,92,246,.3); background: var(--purple-soft); }
.pill-cyan { color: var(--cyan); border-color: rgba(56,189,248,.26); background: var(--cyan-soft); }
.pill-gray { color: #858da1; }

.notice { border: 1px solid var(--border-soft); border-radius: 10px; padding: 11px 13px; display: flex; gap: 10px; align-items: flex-start; font-size: 10px; line-height: 1.5; color: #aab2c2; }
.notice-green { background: var(--green-soft); border-color: rgba(62,207,142,.2); }
.notice-amber { background: var(--amber-soft); border-color: rgba(244,185,66,.22); }
.notice-red { background: var(--red-soft); border-color: rgba(251,113,133,.22); }
.notice-purple { background: var(--purple-soft); border-color: rgba(139,92,246,.22); }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; margin-top: 4px; }

.alerts { display: grid; gap: 8px; margin-bottom: 15px; }
.alert { border: 1px solid var(--border-soft); border-radius: 9px; padding: 10px 12px; font-size: 11px; }
.alert-success { color: #94f0c2; background: var(--green-soft); border-color: rgba(62,207,142,.2); }
.alert-danger { color: #ffa0ae; background: var(--red-soft); border-color: rgba(251,113,133,.22); }
.alert-warning { color: #ffd477; background: var(--amber-soft); border-color: rgba(244,185,66,.22); }
.alert-info { color: #a7dcf5; background: var(--cyan-soft); border-color: rgba(56,189,248,.2); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .65fr); gap: 16px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.metric { padding: 12px; border: 1px solid var(--border-soft); border-radius: 9px; background: rgba(8,10,17,.52); }
.metric-label { color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.metric-value { font-family: var(--mono); font-size: 15px; margin-top: 7px; color: #dfe4ee; overflow: hidden; text-overflow: ellipsis; }
.kv-list { display: grid; }
.kv { display: grid; grid-template-columns: 145px minmax(0,1fr); gap: 12px; min-height: 36px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.035); font-size: 10px; }
.kv:last-child { border-bottom: 0; }
.kv-key { color: var(--muted-2); }
.kv-value { color: #bec5d3; overflow-wrap: anywhere; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }
.text-purple { color: #ad91ff; }

.section-tabs { display: flex; gap: 3px; border: 1px solid var(--border-soft); background: #0b0d15; padding: 3px; border-radius: 9px; }
.section-tab { color: var(--muted); padding: 6px 9px; border-radius: 6px; font-size: 10px; }
.section-tab.active { color: white; background: var(--panel-3); }

.job-list { display: grid; }
.job-row { display: grid; grid-template-columns: 70px minmax(0,1fr) 76px; gap: 10px; padding: 10px 0; align-items: center; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 10px; }
.job-row:last-child { border-bottom: 0; }
.job-id { font-family: var(--mono); color: var(--muted-2); }
.job-action { font-family: var(--mono); color: #c1c7d4; }
.job-time { color: var(--muted-2); font-size: 8px; margin-top: 3px; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { text-align: left; color: #626b80; text-transform: uppercase; letter-spacing: .08em; font-size: 8px; font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.038); color: #b4bbca; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }

.terminal { background: #07080d; border: 1px solid #222737; border-radius: 10px; overflow: hidden; box-shadow: inset 0 1px 0 rgba(255,255,255,.02); }
.terminal-head { min-height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid #1d2230; color: #6f778b; font-size: 9px; }
.terminal-dots { display: flex; gap: 5px; }
.terminal-dots span { width: 7px; height: 7px; border-radius: 50%; background: #313748; }
.terminal pre { margin: 0; padding: 15px; min-height: 160px; max-height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.58 var(--mono); color: #aab3c4; }
.progress-track { width: 100%; height: 4px; border-radius: 999px; background: #1b1f2b; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--purple), var(--green)); transition: width .25s ease; box-shadow: 0 0 14px rgba(62,207,142,.28); }

.danger-zone { border-color: rgba(251,113,133,.2); }
.danger-zone .panel-head { border-color: rgba(251,113,133,.15); }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(420px,.8fr); }
.login-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; border-right: 1px solid var(--border-soft); overflow: hidden; }
.login-visual::before { content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%; top: -280px; left: -150px; background: radial-gradient(circle, rgba(139,92,246,.2), transparent 65%); }
.login-visual::after { content: ""; position: absolute; width: 550px; height: 550px; border-radius: 50%; bottom: -350px; right: -170px; background: radial-gradient(circle, rgba(62,207,142,.12), transparent 65%); }
.login-visual > * { position: relative; z-index: 1; }
.login-copy { max-width: 690px; }
.login-copy h1 { font-size: clamp(42px, 6vw, 78px); max-width: 760px; }
.login-copy p { color: var(--muted); max-width: 560px; line-height: 1.7; font-size: 13px; }
.code-ribbon { font: 10px/1.8 var(--mono); color: #5f687c; border-left: 1px solid #30364a; padding-left: 15px; }
.code-ribbon b { color: var(--green); font-weight: 500; }
.login-form-wrap { display: grid; place-items: center; padding: 32px; background: rgba(10,11,18,.72); }
.login-card { width: min(390px, 100%); }
.login-card .brand { border: 0; padding: 0; height: auto; margin-bottom: 34px; }
.login-title { font-size: 23px; letter-spacing: -.035em; margin-bottom: 7px; }
.login-text { color: var(--muted); font-size: 11px; margin-bottom: 24px; }

.empty { padding: 36px 18px; text-align: center; color: var(--muted-2); font-size: 11px; }
.inline-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.separator { height: 1px; background: var(--border-soft); margin: 14px 0; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.flex { display: flex; }
.space-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.w-full { width: 100%; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 210px; }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .env-main { grid-template-columns: 1.2fr .8fr .7fr; }
  .env-actions { grid-column: 1 / -1; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 780px) {
  :root { --sidebar-width: 0px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { grid-column: 1; }
  .topbar { padding: 0 16px; }
  .page { padding: 20px 14px 40px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .form-grid, .env-main { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-wrap { min-height: 100vh; }
  .kv { grid-template-columns: 110px 1fr; }
}
.danger-confirm { display: flex; align-items: center; gap: 8px; margin-top: 9px; color: #ffd3da; font-size: 9px; font-weight: 650; }
.danger-confirm input { accent-color: var(--red); }

/* --- Ayuda contextual y recorrido guiado --- */
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.tour-launch,
.help-dot {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(62,207,142,.30);
  color: #8de8bc;
  background: rgba(62,207,142,.075);
  font-family: var(--mono);
  font-weight: 800;
  user-select: none;
  transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}
.tour-launch { width: 27px; height: 27px; border-radius: 8px; font-size: 12px; }
.help-dot { width: 16px; height: 16px; border-radius: 50%; font-size: 9px; padding: 0; margin-left: 5px; vertical-align: 1px; cursor: help; }
.tour-launch:hover,
.help-dot:hover,
.help-dot:focus-visible { color: #d7ffea; border-color: rgba(62,207,142,.58); background: rgba(62,207,142,.14); box-shadow: 0 0 18px rgba(62,207,142,.12); outline: none; }

.help-popover {
  position: fixed;
  z-index: 1200;
  width: min(320px, calc(100vw - 24px));
  padding: 12px 13px;
  border: 1px solid #30384a;
  border-top-color: rgba(62,207,142,.55);
  border-radius: 9px;
  background: #10141c;
  box-shadow: 0 18px 55px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.018) inset;
  color: #c9d0dc;
}
.help-popover[hidden] { display: none; }
.help-popover-title { color: #f4f7fa; font-size: 11px; font-weight: 750; margin-bottom: 6px; }
.help-popover-text { color: #9ca6b7; font-size: 10px; line-height: 1.55; }

.tour-shield {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: transparent;
  cursor: default;
}
.tour-focus {
  position: fixed;
  z-index: 999;
  border: 1px solid rgba(62,207,142,.8);
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(3,5,10,.74), 0 0 0 4px rgba(62,207,142,.10), 0 0 30px rgba(62,207,142,.20);
  pointer-events: none;
  transition: left .20s ease, top .20s ease, width .20s ease, height .20s ease;
}
.tour-card {
  position: fixed;
  z-index: 1001;
  padding: 16px;
  border: 1px solid #303748;
  border-top-color: rgba(62,207,142,.65);
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(18,22,30,.99), rgba(10,13,19,.99));
  box-shadow: 0 28px 80px rgba(0,0,0,.58), 0 0 35px rgba(62,207,142,.06);
}
.tour-shield[hidden], .tour-focus[hidden], .tour-card[hidden] { display: none; }
.tour-kicker { color: var(--green); font: 800 8px/1.2 var(--mono); letter-spacing: .12em; display: flex; justify-content: space-between; gap: 15px; }
.tour-kicker span { color: #697286; }
.tour-title { color: #f7f9fb; font-size: 15px; font-weight: 760; letter-spacing: -.025em; margin-top: 9px; }
.tour-text { color: #9fa8b7; font-size: 11px; line-height: 1.6; margin-top: 8px; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid #222835; }
.tour-nav { display: flex; gap: 7px; }
.tour-skip { border: 0; background: transparent; color: #717a8d; font-size: 9px; padding: 6px 0; }
.tour-skip:hover { color: #c6ccd6; }
.tour-card .btn:disabled { opacity: .35; cursor: default; }
body.tour-active { overflow: hidden; }

@media (max-width: 780px) {
  .topbar-actions { gap: 9px; }
  .tour-card { max-width: calc(100vw - 24px); }
  .tour-focus { border-radius: 9px; }
}

/* ========================================================================== 
   v2.2 · legibilidad cómoda (~120–125%), modo claro y controles operativos
   ========================================================================== */
:root {
  --sidebar-width: 282px;
  --topbar-height: 76px;
}

.brand { gap: 13px; padding: 0 21px; }
.brand-mark { width: 35px; height: 35px; border-radius: 10px; }
.brand-mark::before { inset: 8px; }
.brand-name { font-size: 16px; }
.brand-sub { font-size: 11px; }
.sidebar-nav { padding: 20px 13px; }
.nav-label { font-size: 10px; padding: 17px 11px 8px; }
.nav-link { min-height: 44px; padding: 9px 11px; font-size: 14px; border-radius: 9px; gap: 11px; }
.nav-icon { width: 20px; height: 20px; font-size: 10px; }
.sidebar-bottom { padding: 14px; }
.user-box { padding: 12px; border-radius: 11px; }
.user-name { font-size: 13px; }
.user-role { font-size: 11px; }
.logout-btn { font-size: 12px; }

.topbar { padding: 0 32px; }
.topbar-path, .topbar-status { font-size: 12px; }
.network-dot { width: 8px; height: 8px; }
.page { max-width: 1540px; padding: 36px 36px 64px; }
.page-head { margin-bottom: 28px; }
.eyebrow { font-size: 10px; margin-bottom: 10px; }
h1 { font-size: clamp(31px, 3vw, 44px); }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.page-subtitle { font-size: 15px; margin-top: 11px; line-height: 1.6; }

.btn { min-height: 40px; padding: 8px 14px; border-radius: 9px; font-size: 12.5px; gap: 8px; }
.btn-sm { min-height: 34px; padding: 6px 10px; font-size: 11px; }
.panel { border-radius: 15px; }
.panel-head { min-height: 60px; padding: 15px 18px; }
.panel-title { font-size: 13.5px; }
.panel-sub { font-size: 11px; margin-top: 4px; }
.panel-body { padding: 18px; }

.stats { gap: 12px; margin-bottom: 22px; }
.stat { min-height: 112px; padding: 18px 20px; border-radius: 12px; }
.stat-label { font-size: 11.5px; }
.stat-value { font-size: 29px; margin-top: 10px; }
.stat-note { font-size: 10.5px; margin-top: 5px; }
.dashboard-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; }
.stack { gap: 16px; }
.form-grid { gap: 15px; }
.field { gap: 7px; }
label { font-size: 11.5px; }
.input, .select { min-height: 44px; border-radius: 9px; padding: 9px 12px; font-size: 13.5px; }
.hint { font-size: 10.5px; line-height: 1.5; }
.checkbox-grid { max-height: 230px; padding: 9px; gap: 4px; }
.check-item { padding: 7px 8px; font-size: 10.5px; }

.environments { gap: 11px; }
.env-card { border-radius: 13px; padding: 17px 18px; }
.env-main { grid-template-columns: minmax(210px, 1.15fr) minmax(180px, .8fr) minmax(160px, .7fr) auto; gap: 18px; }
.env-name { font-size: 15px; gap: 9px; }
.env-domain { font-size: 10.5px; margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.env-meta-label { font-size: 9px; margin-bottom: 6px; }
.env-meta-value { font-size: 11.5px; }
.env-actions { gap: 7px; }
.pill { min-height: 25px; padding: 4px 9px; font-size: 9px; }
.pill::before { width: 6px; height: 6px; }
.notice { border-radius: 11px; padding: 13px 15px; gap: 11px; font-size: 11.5px; }
.notice-dot { width: 8px; height: 8px; margin-top: 5px; }
.alert { padding: 12px 14px; font-size: 12px; }

.detail-grid { grid-template-columns: minmax(0, 1.42fr) minmax(340px, .68fr); gap: 18px; }
.metric-grid { gap: 11px; }
.metric { padding: 15px; border-radius: 10px; }
.metric-label { font-size: 9.5px; }
.metric-value { font-size: 17px; margin-top: 8px; }
.kv { grid-template-columns: 165px minmax(0,1fr); min-height: 42px; font-size: 11.5px; }
.section-tab { padding: 8px 11px; font-size: 11px; }
.job-row { grid-template-columns: 76px minmax(0,1fr) 88px; gap: 12px; padding: 12px 0; font-size: 11px; }
.job-time { font-size: 9.5px; }
table { font-size: 11.5px; }
th { font-size: 9px; padding: 12px 14px; }
td { padding: 12px 14px; }
.terminal-head { min-height: 43px; font-size: 10px; }
.terminal pre { padding: 17px; font-size: 11px; line-height: 1.62; }
.empty { padding: 40px 20px; font-size: 12px; }
.empty.compact { padding: 14px 4px; text-align: left; }
.inline-actions { gap: 8px; }

/* toolbar de entornos */
.env-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 15px;
}
.env-search {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #272c3b;
  border-radius: 10px;
  background: #0d0f18;
  padding: 0 11px;
  color: var(--muted);
}
.env-search:focus-within { border-color: rgba(62,207,142,.55); box-shadow: 0 0 0 3px rgba(62,207,142,.07); }
.env-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12.5px; }
.env-search input::placeholder { color: var(--muted-2); }
.env-search-icon { font-size: 18px; line-height: 1; }
kbd { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); border-radius: 6px; padding: 2px 6px; font: 10px/1.4 var(--mono); }
.env-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}
.filter-chip:hover { color: var(--text); border-color: var(--border); }
.filter-chip.active { color: #baf4d6; border-color: rgba(62,207,142,.30); background: rgba(62,207,142,.09); }
.auto-refresh.active { color: #baf4d6; border-color: rgba(62,207,142,.30); background: rgba(62,207,142,.08); }

/* controles compactos y copia */
.topbar-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 14px;
}
.topbar-icon:hover { color: var(--text); border-color: #3a4155; transform: translateY(-1px); }
.copy-value { display: flex; align-items: center; gap: 7px; min-width: 0; }
.copy-value > span { min-width: 0; overflow-wrap: anywhere; }
.copy-mini {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 12px;
  line-height: 1;
}
.copy-mini:hover { color: var(--green); background: var(--green-soft); }
.copy-mini.copied { color: var(--green); }

/* navegación por secciones y snapshots */
.detail-tabs { position: sticky; top: calc(var(--topbar-height) + 10px); z-index: 20; width: fit-content; margin: -8px 0 20px; backdrop-filter: blur(16px); }
#ejecucion, #git, #base-datos, #instantaneas, #operaciones { scroll-margin-top: calc(var(--topbar-height) + 74px); }
.snapshot-list { display: grid; }
.snapshot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.snapshot-row:last-child { border-bottom: 0; }
.snapshot-name { color: var(--text); font-size: 11px; }

/* confirmación visual para operaciones delicadas */
.confirm-backdrop { position: fixed; inset: 0; z-index: 1300; display: grid; place-items: center; padding: 20px; background: rgba(2,4,9,.72); backdrop-filter: blur(8px); }
.confirm-dialog { width: min(470px, 100%); border: 1px solid var(--border); border-top-color: rgba(244,185,66,.55); border-radius: 14px; background: var(--panel); box-shadow: 0 28px 90px rgba(0,0,0,.52); padding: 20px; }
.confirm-kicker { color: var(--amber); font: 800 9px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.confirm-title { font-size: 19px; font-weight: 760; margin-top: 9px; }
.confirm-text { color: var(--muted); font-size: 12px; line-height: 1.6; margin-top: 8px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* estado real del health check */
.topbar-status.offline { color: var(--red); }
.topbar-status.offline .network-dot { background: var(--red); box-shadow: 0 0 13px rgba(251,113,133,.65); }

/* MODO CLARO: deliberadamente técnico, no blanco plano */
html[data-theme="light"] {
  --bg: #f3f5f8;
  --bg-soft: #eef1f5;
  --sidebar: #f8f9fb;
  --panel: #ffffff;
  --panel-2: #f5f7fa;
  --panel-3: #edf1f6;
  --border: #d4dbe6;
  --border-soft: #e1e6ee;
  --text: #121722;
  --muted: #667085;
  --muted-2: #8993a4;
  --green: #138a5e;
  --green-soft: rgba(19,138,94,.10);
  --purple: #6f49d8;
  --purple-soft: rgba(111,73,216,.10);
  --cyan: #087ea4;
  --cyan-soft: rgba(8,126,164,.09);
  --amber: #a96b10;
  --amber-soft: rgba(169,107,16,.10);
  --red: #c2415a;
  --red-soft: rgba(194,65,90,.09);
  --shadow: 0 20px 55px rgba(30,41,59,.10);
}
html[data-theme="light"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 76% -10%, rgba(111,73,216,.08), transparent 31rem),
    radial-gradient(circle at 15% 95%, rgba(19,138,94,.055), transparent 35rem),
    linear-gradient(rgba(30,41,59,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,41,59,.025) 1px, transparent 1px);
}
html[data-theme="light"] ::selection { background: rgba(19,138,94,.18); color: #0b2419; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #eef1f5; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c7cfdb; border-color: #eef1f5; }
html[data-theme="light"] .sidebar { background: rgba(248,249,251,.96); }
html[data-theme="light"] .topbar { background: rgba(247,249,252,.88); }
html[data-theme="light"] .brand-name,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .panel-title,
html[data-theme="light"] .env-name,
html[data-theme="light"] .snapshot-name { color: #121722; }
html[data-theme="light"] .nav-link { color: #667085; }
html[data-theme="light"] .nav-link:hover { color: #1f2937; background: rgba(17,24,39,.035); }
html[data-theme="light"] .nav-link.active { color: #171c28; background: linear-gradient(90deg, rgba(111,73,216,.10), rgba(19,138,94,.035)); }
html[data-theme="light"] .nav-icon { border-color: #cdd5e0; color: #657086; }
html[data-theme="light"] .user-box { background: rgba(255,255,255,.72); }
html[data-theme="light"] .topbar-path strong { color: #273142; }
html[data-theme="light"] .panel { background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,251,253,.98)); box-shadow: 0 10px 30px rgba(31,41,55,.055); }
html[data-theme="light"] .stat { background: rgba(255,255,255,.90); }
html[data-theme="light"] .env-card { background: linear-gradient(145deg, #ffffff, #f8fafc); }
html[data-theme="light"] .env-card:hover { border-color: #c8d0dc; box-shadow: 0 12px 30px rgba(31,41,55,.08); }
html[data-theme="light"] label { color: #475467; }
html[data-theme="light"] .input,
html[data-theme="light"] .select,
html[data-theme="light"] .env-search { background: #ffffff; border-color: #d5dce7; color: #111827; }
html[data-theme="light"] .select option { background: #ffffff; color: #111827; }
html[data-theme="light"] .checkbox-grid { background: #f8fafc; }
html[data-theme="light"] .check-item { color: #4b5565; }
html[data-theme="light"] .check-item:hover { background: rgba(17,24,39,.035); }
html[data-theme="light"] .btn { background: #ffffff; color: #344054; border-color: #d3d9e3; }
html[data-theme="light"] .btn:hover { background: #f7f9fb; border-color: #bbc5d2; }
html[data-theme="light"] .btn-primary { background: #121722; color: #ffffff; border-color: #121722; }
html[data-theme="light"] .btn-primary:hover { background: #242b38; border-color: #242b38; }
html[data-theme="light"] .btn-green { background: var(--green); color: #ffffff; border-color: var(--green); }
html[data-theme="light"] .btn-purple { background: var(--purple-soft); color: #633bbd; border-color: rgba(111,73,216,.24); }
html[data-theme="light"] .btn-warning { background: var(--amber-soft); color: #8b580d; border-color: rgba(169,107,16,.24); }
html[data-theme="light"] .btn-danger { background: var(--red-soft); color: #a83249; border-color: rgba(194,65,90,.22); }
html[data-theme="light"] .metric { background: #fbfcfd; }
html[data-theme="light"] .metric-value,
html[data-theme="light"] .kv-value,
html[data-theme="light"] .job-action { color: #344054; }
html[data-theme="light"] .kv { border-bottom-color: rgba(17,24,39,.06); }
html[data-theme="light"] td { color: #475467; border-bottom-color: rgba(17,24,39,.06); }
html[data-theme="light"] th { color: #7a8495; }
html[data-theme="light"] .section-tabs { background: rgba(247,249,252,.92); }
html[data-theme="light"] .section-tab.active { color: #111827; background: #e9edf3; }
html[data-theme="light"] .filter-chip.active { color: #0f6f4b; }
html[data-theme="light"] kbd { background: #f2f4f7; }
html[data-theme="light"] .snapshot-row { border-bottom-color: rgba(17,24,39,.06); }
html[data-theme="light"] .help-popover { background: #ffffff; border-color: #d5dce7; border-top-color: rgba(19,138,94,.55); box-shadow: 0 18px 55px rgba(31,41,55,.16); }
html[data-theme="light"] .help-popover-title { color: #17202d; }
html[data-theme="light"] .help-popover-text { color: #667085; }
html[data-theme="light"] .tour-card { background: linear-gradient(150deg, #ffffff, #f7f9fb); border-color: #d7dde7; border-top-color: rgba(19,138,94,.65); box-shadow: 0 28px 80px rgba(31,41,55,.22); }
html[data-theme="light"] .tour-title { color: #17202d; }
html[data-theme="light"] .tour-text { color: #667085; }
html[data-theme="light"] .confirm-dialog { background: #ffffff; box-shadow: 0 28px 90px rgba(31,41,55,.24); }
html[data-theme="light"] .confirm-title { color: #17202d; }
html[data-theme="light"] .login-form-wrap { background: rgba(247,249,252,.78); }
/* La terminal conserva tema oscuro incluso en modo claro para legibilidad de logs. */

@media (max-width: 1250px) {
  :root { --sidebar-width: 245px; }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .env-toolbar { grid-template-columns: 1fr; }
  .env-main { grid-template-columns: 1.2fr .8fr .7fr; }
  .env-actions { grid-column: 1 / -1; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 780px) {
  :root { --sidebar-width: 0px; --topbar-height: 64px; }
  .topbar { padding: 0 15px; }
  .topbar-path { display: none; }
  .page { padding: 22px 14px 44px; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .form-grid, .env-main, .metric-grid { grid-template-columns: 1fr; }
  .detail-tabs { width: 100%; overflow-x: auto; top: calc(var(--topbar-height) + 6px); }
  .kv { grid-template-columns: 118px minmax(0,1fr); }
  .env-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 3px; }
  .filter-chip { white-space: nowrap; }
}
.table-toolbar { border-bottom: 1px solid var(--border-soft); }
.table-toolbar .env-search { max-width: 660px; }
.terminal-actions { display: flex; align-items: center; gap: 10px; }
.terminal-copy { border: 0; background: transparent; color: var(--muted); font: 10px/1 var(--sans); padding: 5px 7px; border-radius: 6px; }
.terminal-copy:hover { color: var(--green); background: var(--green-soft); }

.console-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .34fr); gap: 18px; align-items: start; }
.console-examples { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.console-editor { width: 100%; resize: vertical; min-height: 330px; background: #07080d; border: 1px solid #272c3b; border-radius: 10px; color: #c5cedd; outline: none; padding: 16px; font-size: 12px; line-height: 1.65; tab-size: 4; }
.console-editor:focus { border-color: rgba(139,92,246,.58); box-shadow: 0 0 0 3px rgba(139,92,246,.08); }
html[data-theme="light"] .console-editor { background: #f8fafc; border-color: #d3d9e3; color: #111827; }

@media (max-width: 980px) {
  .console-layout { grid-template-columns: 1fr; }
}
