/* UPSRJ Cloud Lab — estilo de consola cloud (inspirado en el lenguaje visual de consolas de nube, sin marcas registradas) */
:root {
  --nav-bg: #0f1b2a;
  --nav-bg-2: #192534;
  --nav-fg: #ffffff;
  --nav-muted: #b6bec9;
  --page: #f2f3f3;
  --panel: #ffffff;
  --border: #c6c6cd;
  --divider: #e9ebed;
  --text: #000716;
  --text-2: #414d5c;
  --muted: #5f6b7a;
  --link: #0972d3;
  --link-hover: #033160;
  --primary: #ff9900;
  --primary-hover: #ec7211;
  --primary-text: #000716;
  --focus: #0972d3;
  --success: #037f0c;
  --success-bg: #f2fcf3;
  --error: #d91515;
  --error-bg: #fff7f7;
  --info: #0972d3;
  --info-bg: #f2f8fd;
  --warn: #8d6605;
  --warn-bg: #fffce9;
  --pending: #0972d3;
  --stopped: #5f6b7a;
  --tour: #ff9900;
  --radius: 16px;
  --radius-sm: 8px;
  --shadow: 0 1px 1px rgba(0, 7, 22, .08), 0 0 1px rgba(0, 7, 22, .25);
  --font: "Amazon Ember", "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: Monaco, Menlo, Consolas, "Courier Prime", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--page); color: var(--text); font: 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
code { font-family: var(--mono); font-size: 12.5px; background: #f4f4f4; border: 1px solid var(--divider); padding: 0 4px; border-radius: 4px; }
pre { font-family: var(--mono); font-size: 12.5px; line-height: 18px; background: #fafafa; border: 1px solid var(--divider); border-radius: var(--radius-sm); padding: 12px 14px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word; }
h1 { font-size: 24px; line-height: 30px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 18px; line-height: 22px; font-weight: 700; margin: 0; }
h3 { font-size: 16px; font-weight: 700; margin: 0; }
small, .muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- barra superior ---------- */
.topnav { position: sticky; top: 0; z-index: 50; height: 44px; background: var(--nav-bg); color: var(--nav-fg); display: flex; align-items: center; gap: 12px; padding: 0 16px; font-size: 14px; }
.brand { color: #fff; font-weight: 400; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { color: #fff; text-decoration: none; }
.brand .logo { width: 26px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #ff9900, #e7157b); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.brand b { font-weight: 700; }
.tn-btn { white-space: nowrap; background: transparent; border: 0; color: var(--nav-fg); font: inherit; font-weight: 700; padding: 6px 10px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.tn-btn:hover, .tn-btn[aria-expanded="true"] { background: var(--nav-bg-2); }
.tn-search { position: relative; flex: 0 1 520px; }
.tn-search input { width: 100%; height: 30px; border-radius: 8px; border: 1px solid #5f6b7a; background: #0f1b2a; color: #fff; padding: 0 12px 0 32px; font: inherit; }
.tn-search input::placeholder { color: var(--nav-muted); }
.tn-search::before { content: ""; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23b6bec9' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m10.5 10.5 4 4'/%3E%3C/svg%3E") no-repeat; }
.tn-search input:focus { outline: 2px solid var(--focus); background: #fff; color: var(--text); }
.search-results { position: absolute; top: 36px; left: 0; right: 0; background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 4px 20px rgba(0,7,22,.3); overflow: hidden; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; color: var(--text); }
.search-results a:hover, .search-results a.active { background: var(--info-bg); text-decoration: none; }
.spacer { flex: 1; }
.tn-link { color: var(--nav-fg); padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.tn-link:hover { background: var(--nav-bg-2); color: #fff; text-decoration: none; }
.tn-select { background: transparent; color: #fff; border: 0; font: inherit; font-weight: 700; cursor: pointer; padding: 6px; border-radius: 6px; }
.tn-select:hover { background: var(--nav-bg-2); }
.tn-select option { color: var(--text); }
.acct { position: relative; }
.acct-menu { position: absolute; right: 0; top: 36px; width: 300px; background: #fff; color: var(--text); border-radius: 12px; box-shadow: 0 4px 20px rgba(0,7,22,.3); padding: 14px; }
.acct-menu dl { margin: 0 0 10px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 13px; }
.acct-menu dt { color: var(--muted); }
.acct-menu dd { margin: 0; font-weight: 700; }

.svc-icon { width: 28px; height: 28px; border-radius: 6px; display: inline-grid; place-items: center; color: #fff; font-size: 10.5px; font-weight: 800; flex: none; letter-spacing: -.02em; }
.svc-panel { position: fixed; top: 44px; left: 0; right: 0; z-index: 49; background: #fff; box-shadow: 0 8px 24px rgba(0,7,22,.25); padding: 20px 24px 24px; max-height: calc(100vh - 44px); overflow: auto; }
.svc-panel h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 28px; }
.svc-item { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; color: var(--text); }
.svc-item:hover { background: var(--info-bg); text-decoration: none; color: var(--text); }
.svc-item small { display: block; font-size: 12px; line-height: 15px; }

/* ---------- barras de modo ---------- */
.modebar { position: sticky; top: 44px; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 8px 20px; font-size: 13.5px; }
.modebar.guided { background: #1d3557; color: #fff; }
.modebar.practice { background: #e9ebed; color: var(--text-2); }
.modebar.exam { background: #fff3e0; color: var(--text); border-bottom: 2px solid var(--primary); }
.modebar .pill { background: rgba(255,255,255,.15); padding: 2px 10px; border-radius: 99px; font-weight: 700; }
.modebar.exam .pill { background: var(--primary); color: #000; }
.modebar.practice .pill { background: var(--text-2); color: #fff; }
.modebar button, .modebar .mb-link { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 99px; padding: 3px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.timer { font-family: var(--mono); font-size: 18px; font-weight: 700; padding: 2px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.timer.low { color: #fff; background: var(--error); border-color: var(--error); animation: pulse 1s infinite; }
.progress { height: 6px; background: rgba(255,255,255,.2); border-radius: 99px; width: 160px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); }

/* ---------- layout ---------- */
.shell { display: flex; min-height: calc(100vh - 44px); }
.sidenav { width: 260px; flex: none; background: #fff; border-right: 1px solid var(--divider); padding: 18px 0; position: sticky; top: 44px; align-self: flex-start; height: calc(100vh - 44px); overflow: auto; }
.sidenav .sn-title { padding: 0 24px 14px; font-size: 18px; font-weight: 700; border-bottom: 1px solid var(--divider); margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.sidenav a { display: block; padding: 6px 24px; color: var(--text-2); }
.sidenav a.on { color: var(--link); font-weight: 700; }
.sidenav a:hover { color: var(--link); }
.sidenav .sn-sec { padding: 14px 24px 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.content { flex: 1; min-width: 0; padding: 16px 32px 64px; max-width: 1500px; }
.crumbs { font-size: 14px; margin: 4px 0 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--link); }
.crumbs span.sep { color: var(--muted); display: inline-flex; align-items: center; }
.crumbs span.sep .ico { width: 12px; height: 12px; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin: 6px 0 18px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 240px; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 900px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 4px 20px; min-height: 32px; font: inherit; font-weight: 700; cursor: pointer; border: 2px solid var(--link); color: var(--link); background: #fff; white-space: nowrap; letter-spacing: .01em; }
.btn:hover { background: var(--info-bg); color: var(--link-hover); border-color: var(--link-hover); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-text); }
.btn-danger { border-color: var(--error); color: var(--error); }
.btn-danger:hover { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.btn-danger.btn-primary { background: var(--error); color: #fff; }
.btn-link { border-color: transparent; background: transparent; }
.btn-link:hover { background: transparent; border-color: transparent; text-decoration: underline; }
.btn-sm { padding: 1px 14px; min-height: 26px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-icon { padding: 4px 10px; }

/* ---------- contenedores ---------- */
.box { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.box-head { padding: 14px 20px 10px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.box-head .grow { flex: 1; min-width: 200px; }
.box-head .desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.box-head .count { color: var(--muted); font-weight: 400; }
.box-body { padding: 4px 20px 20px; }
.box-body.flush { padding: 0; }
.opt { font-weight: 400; font-style: italic; color: var(--muted); font-size: 14px; }

.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; }
.kv.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv .k { color: var(--muted); font-size: 13.5px; margin-bottom: 2px; }
.kv .v { word-break: break-word; }
.kv > div + div { }

/* ---------- tablas ---------- */
.tbl-tools { display: flex; gap: 10px; padding: 0 20px 10px; align-items: center; }
.filter { position: relative; flex: 0 1 420px; }
.filter input { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px 0 32px; font: inherit; }
.filter::before { content: ""; position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%235f6b7a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m10.5 10.5 4 4'/%3E%3C/svg%3E") no-repeat; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 700; color: var(--text-2); padding: 8px 20px; border-bottom: 1px solid var(--border); background: #fff; font-size: 14px; white-space: nowrap; }
.tbl td { padding: 9px 20px; border-bottom: 1px solid var(--divider); vertical-align: top; word-break: break-word; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: #f8f8f8; }
.tbl td.sel { width: 36px; padding-right: 0; }
.empty { text-align: center; padding: 28px 20px 32px; color: var(--muted); }
.empty b { display: block; color: var(--text); margin-bottom: 4px; }
code.logline { background: transparent; border: 0; padding: 0; white-space: pre-wrap; }

/* ---------- estados ---------- */
.st { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; white-space: nowrap; }
.st i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; position: relative; }
.st-success { color: var(--success); }
.st-success i { background: var(--success); }
.st-success i::after { content: ""; position: absolute; left: 4.5px; top: 2px; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.st-error { color: var(--error); }
.st-error i { background: var(--error); }
.st-error i::after { content: "×"; color: #fff; position: absolute; inset: 0; font-size: 13px; line-height: 13px; text-align: center; font-weight: 700; }
.st-pending { color: var(--pending); }
.st-pending i { border: 2px solid var(--pending); border-right-color: transparent; animation: spin .9s linear infinite; }
.st-stopped { color: var(--stopped); }
.st-stopped i { border: 2px solid var(--stopped); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .6; } }
.badge { display: inline-block; padding: 1px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid #b2e3b5; }
.badge-error { background: var(--error-bg); color: var(--error); border: 1px solid #ffbfbf; }
.badge-info { background: var(--info-bg); color: var(--info); border: 1px solid #b5d6f4; }
.badge-stopped { background: #f4f4f4; color: var(--stopped); border: 1px solid var(--divider); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #f2d27c; }

/* ---------- flash ---------- */
.flash { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; color: #fff; font-weight: 400; }
.flash.success { background: var(--success); }
.flash.error { background: var(--error); }
.flash.info { background: var(--info); }
.flash.warning { background: #f2a218; color: var(--text); }
.flash .x { margin-left: auto; background: none; border: 0; color: inherit; font-size: 18px; cursor: pointer; }
.callout { border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid; }
.callout > .ico:first-child { float: left; margin: 2px 10px 0 0; }
.callout.info > .ico:first-child { color: var(--info); }
.callout.warn > .ico:first-child { color: var(--warn); }
.callout.info { background: var(--info-bg); border-color: #b5d6f4; }
.callout.error { background: var(--error-bg); border-color: #ffbfbf; color: var(--error); }
.callout.warn { background: var(--warn-bg); border-color: #f2d27c; }

/* ---------- formularios ---------- */
.form-wrap { display: flex; gap: 32px; align-items: flex-start; }
.wiz-steps { width: 230px; flex: none; position: sticky; top: 110px; }
.wiz-steps ol { list-style: none; padding: 0; margin: 0; }
.wiz-steps li { padding: 4px 0 14px 0; color: var(--muted); font-size: 13.5px; border-bottom: 1px solid var(--divider); margin-bottom: 12px; }
.wiz-steps li small { display: block; font-size: 12px; }
.wiz-steps li.on { color: var(--text); font-weight: 700; }
.wiz-steps li.done { color: var(--link); }
.wiz-steps li.err { color: var(--error); }
.form-main { flex: 1; min-width: 0; max-width: 980px; }
.fld { margin-bottom: 18px; }
.fld > label, .fld .lbl { display: block; font-weight: 700; margin-bottom: 2px; }
.fld .help { color: var(--muted); font-size: 13.5px; margin-bottom: 6px; }
.fld .constraint { color: var(--muted); font-size: 12.5px; margin-top: 4px; line-height: 16px; }
.name-assist:empty { display: none; }
.name-assist { margin-top: 8px; font-size: 13px; line-height: 18px; }
.name-assist .na-rules { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.name-assist .na-rules li { display: flex; gap: 6px; align-items: center; }
.name-assist .na-rules li.ok { color: var(--success); }
.name-assist .na-rules li.bad { color: var(--error); }
.name-assist .na-ok { color: var(--success); font-weight: 700; display: flex; gap: 6px; align-items: center; }
.name-assist .na-sugg { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.name-assist .chip { font: inherit; font-size: 12.5px; border: 1px solid var(--border); background: var(--panel);
  color: var(--link); border-radius: 14px; padding: 2px 10px; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.name-assist .chip:hover { background: var(--info-bg); border-color: var(--link); }
.fld .err { color: var(--error); font-size: 13px; margin-top: 4px; display: flex; gap: 6px; }
.fld .err::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23d91515' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='7'/%3E%3Cpath d='m10.5 5.5-5 5m0-5 5 5'/%3E%3C/svg%3E") no-repeat; }
.fld.has-err input, .fld.has-err select, .fld.has-err textarea { border-color: var(--error); border-left-width: 4px; }
.inp, .fld input[type=text], .fld input[type=number], .fld input[type=email], .fld input[type=password], .fld select, .fld textarea {
  width: 100%; max-width: 640px; min-height: 32px; border: 1px solid #8c8c94; border-radius: 8px; padding: 5px 12px; font: inherit; background: #fff; color: var(--text); }
.fld textarea.code { font-family: var(--mono); font-size: 13px; line-height: 19px; max-width: none; background: #fbfbfb; tab-size: 4; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--focus); }
.fld input[readonly] { background: #f4f4f4; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; max-width: 980px; }
.tile { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; cursor: pointer; background: #fff; }
.tile:hover { border-color: var(--link); }
.tile.on { border-color: var(--link); background: var(--info-bg); box-shadow: inset 0 0 0 1px var(--link); }
.tile.dis { opacity: .5; cursor: not-allowed; }
.tile input { margin-top: 3px; accent-color: var(--link); }
.tile b { display: block; font-weight: 700; }
.tile small { display: block; font-size: 12.5px; line-height: 16px; }
.chk { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer; font-weight: 700; }
.chk input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--link); }
.mchk { border: 1px solid var(--divider); border-radius: 12px; max-height: 320px; overflow: auto; max-width: 980px; }
.mchk label { display: flex; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--divider); cursor: pointer; align-items: flex-start; }
.mchk label:last-child { border-bottom: 0; }
.mchk label:hover { background: #f8f8f8; }
.mchk label.on { background: var(--info-bg); }
.mchk input { margin-top: 3px; accent-color: var(--link); width: 16px; height: 16px; }
.mchk small { display: block; }
.mchk-filter { margin-bottom: 6px; }
.kvrows { max-width: 980px; }
.kvrow { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; margin-bottom: 8px; }
.kvhead { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.kvhead span:last-child, .kvrow .btn { width: 90px; justify-content: center; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; margin: 8px 0 40px; align-items: center; }
.submitting .form-foot .btn-primary::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #000; border-right-color: transparent; animation: spin .8s linear infinite; }
.static-val { padding: 5px 12px; background: #f4f4f4; border-radius: 8px; display: inline-block; min-width: 200px; color: var(--text-2); }

/* ---------- pestañas ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 8px 0 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 8px 16px 10px; font: inherit; font-weight: 700; color: var(--text-2); cursor: pointer; border-bottom: 4px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--link); }
.tabs button.on { color: var(--link); border-bottom-color: var(--link); }

/* ---------- consola home ---------- */
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
.home-grid .box { margin: 0; }
.svc-list a { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--divider); color: var(--text); }
.svc-list a:last-child { border: 0; }
.svc-list a:hover { text-decoration: none; color: var(--link); }
.svc-list .n { white-space: nowrap; margin-left: auto; color: var(--muted); font-size: 13px; }
.welcome { background: linear-gradient(120deg, #0f1b2a 0%, #1d3557 60%, #3b1f5a 100%); color: #fff; }
.welcome a { color: #ffb84d; }

/* ---------- tour guiado ---------- */
.tour-ring { position: absolute; z-index: 9990; pointer-events: none; border-radius: 10px; box-shadow: 0 0 0 4px var(--tour), 0 0 0 9999px rgba(0, 7, 22, .38); transition: all .25s ease; }
.tour-ring::after { content: ""; position: absolute; inset: -4px; border-radius: 12px; border: 4px solid var(--tour); animation: ring 1.4s ease-out infinite; }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }
.tour-card { position: fixed; z-index: 9995; width: 380px; max-width: calc(100vw - 24px); background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0, 7, 22, .35); padding: 16px 18px 14px; font-size: 14px; line-height: 21px; border-top: 5px solid var(--tour); transition: top .25s ease, left .25s ease; }
.tour-card.docked { left: 20px; bottom: 20px; }
.tour-card.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 44vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 12px 14px 10px; }
.tour-card .tc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tour-card .tc-top .bar { flex: 1; height: 4px; background: var(--divider); border-radius: 99px; overflow: hidden; }
.tour-card .tc-top .bar i { display: block; height: 100%; background: var(--tour); }
.tour-card h4 { margin: 0 0 6px; font-size: 16px; }
.tour-card .tc-body code { font-size: 12.5px; background: #fff3e0; border-color: #ffd699; user-select: all; }
.tour-card .tc-foot { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
.tour-card .tc-foot .grow { flex: 1; }
.tour-card .tc-warn { margin-top: 10px; padding: 8px 10px; background: var(--warn-bg); border: 1px solid #f2d27c; border-radius: 8px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.tour-card .tc-warn > .ico { flex: none; margin-top: 1px; color: var(--warn); }
.tour-card .tc-warn.ok { background: var(--success-bg); border-color: #b2e3b5; }
.tour-card .tc-warn.ok > .ico { color: var(--success); }
.tour-card ul.checks { list-style: none; padding: 0; margin: 10px 0 0; }
.tour-card ul.checks li { padding: 4px 0 4px 26px; position: relative; font-size: 13.5px; }
.tour-card ul.checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); }
.tour-card ul.checks li.ok::before { border-color: var(--success); background: var(--success); }
.tour-card ul.checks li.ok::after { content: ""; position: absolute; left: 6px; top: 9px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tour-card .hints { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.tour-card .q-row { display: flex; gap: 8px; margin-top: 10px; }
.tour-card .q-row input { flex: 1; border: 1px solid #8c8c94; border-radius: 8px; padding: 4px 10px; font: inherit; }
.tour-card .q-msg { font-size: 13px; margin-top: 6px; }
.tour-card .spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--pending); border-right-color: transparent; border-radius: 50%; animation: spin .9s linear infinite; vertical-align: -2px; margin-right: 6px; }
.tour-min { position: fixed; left: 20px; bottom: 20px; z-index: 9995; }
.tour-done-backdrop { position: fixed; inset: 0; background: rgba(0,7,22,.55); z-index: 9998; display: grid; place-items: center; padding: 20px; }
.tour-done { background: #fff; border-radius: 20px; max-width: 560px; width: 100%; padding: 28px 30px; box-shadow: 0 20px 60px rgba(0,0,0,.4); text-align: center; }
.tour-done .big { color: var(--success); }
.tour-done .big .ico { width: 48px; height: 48px; stroke-width: 1.5; }
.tour-done ul { text-align: left; }

/* ---------- examen ---------- */
.drawer { position: fixed; top: 92px; right: 0; bottom: 0; border-top-left-radius: 16px; width: 440px; max-width: 100vw; background: #fff; z-index: 9996; box-shadow: -8px 0 30px rgba(0,7,22,.25); padding: 20px 22px; overflow: auto; transform: translateX(105%); transition: transform .25s ease; }
.drawer.open { transform: none; }
.drawer ol { padding-left: 20px; }
.drawer ol li { margin-bottom: 10px; }
.drawer .q { margin: 12px 0; }
.drawer .q input { width: 100%; margin-top: 6px; border: 1px solid #8c8c94; border-radius: 8px; padding: 6px 10px; font: inherit; }

/* ---------- utilidades ---------- */
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.right { margin-left: auto; }
.nowrap { white-space: nowrap; }

@media (max-width: 1000px) {
  .sidenav { display: none; }
  .content { padding: 14px 16px 60px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .wiz-steps { display: none; }
  .tn-search { display: none; }
}
@media (max-width: 640px) {
  .kv, .kv.cols-2 { grid-template-columns: 1fr; }
  .tn-link span, .brand b + span { display: none; }
}

/* ---------- academia ---------- */
.acad { max-width: 1240px; margin: 0 auto; padding: 24px 24px 80px; }
.hero { background: var(--panel); color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: center; margin-bottom: 20px; }
.hero h1 { font-size: 24px; line-height: 30px; font-weight: 700; }
.hero p { color: var(--text-2, var(--muted)); margin: 8px 0 0; max-width: 680px; }
.hero .meter { border-left: 1px solid var(--divider); padding: 4px 0 4px 24px; }
.hero .meter .bar { height: 4px; border-radius: 2px; background: var(--divider); overflow: hidden; margin: 10px 0 8px; }
.hero .meter .bar i { display: block; height: 100%; background: var(--link); }
.hero .meter b.big { font-size: 28px; font-weight: 700; }
.hero .meter small { color: var(--muted); }
.sec-title { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 12px; }
.sec-title h2 { font-size: 20px; font-weight: 700; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.mod { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.mod .top { display: flex; gap: 12px; align-items: flex-start; }
.mod .top > .ico { width: 36px; height: 36px; border-radius: 6px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.mod h3 { font-size: 16px; line-height: 20px; font-weight: 700; margin-bottom: 2px; }
.mod p { margin: 0; color: var(--text-2, var(--text)); font-size: 14px; flex: 1; }
.mod .meta { display: flex; gap: 6px 16px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.mod .foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--divider); padding-top: 12px; }
/* indicador de estado (como en la consola): icono + texto, sin fondo */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; white-space: nowrap; }
.chip.new { color: var(--stopped); }
.chip.learning, .chip.active { color: var(--info); }
.chip.ready { color: var(--info); }
.chip.passed, .chip.completed { color: var(--success); }
.chip.failed, .chip.abandoned { color: var(--error); }
.mod.locked { opacity: .65; }
.challenge { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.challenge h2 { font-size: 18px; font-weight: 700; }
.pathline { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pathline span { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 4px; background: #f4f4f4; color: var(--muted); }
.pathline span.ok { background: var(--success); color: #fff; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.score-ring { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: conic-gradient(var(--sc) calc(var(--p) * 1%), #e9ebed 0); }
.score-ring > div { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 32px; font-weight: 800; }
.objlist { list-style: none; padding: 0; margin: 0; }
.objlist li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--divider); align-items: flex-start; }
.objlist li:last-child { border: 0; }
.objlist li > span:first-child { flex: none; display: inline-flex; margin-top: 1px; }
.objlist li.ok > span:first-child, .objlist li.ok > .ico { color: var(--success); }
.objlist li.bad > span:first-child { color: var(--error); }
.objlist .pts { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .side { background: var(--nav-bg); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.auth .side h1 { font-size: 36px; line-height: 42px; }
.auth .side p { color: #d5dbe3; font-size: 16px; line-height: 24px; max-width: 520px; }
.auth .side ul { padding-left: 18px; color: #d5dbe3; line-height: 26px; }
.auth .main { display: grid; place-items: center; padding: 32px; background: #fff; }
.auth form, .auth .auth-card { width: 100%; max-width: 420px; }
.auth .auth-card form { max-width: none; }
.callout.success { background: var(--success-bg); border-color: #9fd9a6; color: var(--success); }
.auth .fld input { max-width: none; }
.cert { background: #fff; max-width: 1000px; margin: 0 auto; border-radius: 6px; padding: 56px 64px; position: relative; box-shadow: 0 10px 40px rgba(0,7,22,.15); border: 14px solid #0f1b2a; outline: 3px solid #ff9900; outline-offset: -26px; text-align: center; }
.cert h1 { font-size: 40px; letter-spacing: .02em; margin: 10px 0; }
.cert .who { font-size: 34px; font-weight: 800; margin: 18px 0 6px; color: #1d3557; }
.cert table { margin: 20px auto 0; border-collapse: collapse; font-size: 13px; }
.cert td { padding: 3px 12px; border-bottom: 1px solid var(--divider); text-align: left; }
@media (max-width: 900px) { .hero, .challenge, .two-col, .auth { grid-template-columns: 1fr; } .auth .side { padding: 32px 24px; } .cert { padding: 32px 20px; } }
@media print { .no-print { display: none !important; } body { background: #fff; } .cert { box-shadow: none; } }

/* ---- iconos de línea (estilo consola) ---- */
.ico { flex: none; display: inline-block; vertical-align: -3px; }
.ico-label { display: inline-flex; gap: 6px; align-items: center; }
.ico-label.ok { color: var(--success); }
.tn-btn .ico-caret-down-filled, .tn-btn .ico { margin-left: 2px; }
.flash > .ico { margin-top: 2px; }
.flash .x { display: inline-flex; padding: 2px; }
.flash .x .ico { width: 14px; height: 14px; }
.lnk .lnk-ico { margin-right: 6px; color: var(--muted); }
.chip .ico { width: 14px; height: 14px; }
.pathline span { display: inline-flex; gap: 4px; align-items: center; }
.pathline .ico { width: 12px; height: 12px; }
.btn .ico-lock-private { width: 14px; height: 14px; }
.tour-done .objlist li { padding: 6px 0; }
.tour-done .objlist li .ico { color: var(--success); margin-top: 1px; }
.hero .meter .ico-label { color: var(--success); }

/* ---- Athena ---- */
.tabs a.tab-link { padding: 8px 16px 10px; font-weight: 700; color: var(--text-2); border-bottom: 4px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs a.tab-link:hover { color: var(--link); }
.tabs a.tab-link.on { color: var(--link); border-bottom-color: var(--link); }
.athena-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }
.athena-tables details { border-bottom: 1px solid var(--divider); padding: 6px 0; }
.athena-tables summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.athena-tables ul { list-style: none; margin: 6px 0 0; padding: 0 0 0 14px; font-size: 13px; }
.athena-tables li { display: flex; justify-content: space-between; gap: 8px; padding: 1px 0; }
.box-head h2 .st { font-size: 14px; font-weight: 400; margin-left: 8px; }
@media (max-width: 900px) { .athena-grid { grid-template-columns: 1fr; } }

/* panel docente */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.teacher-tbl th[scope="row"] { font-weight: 400; text-align: left; min-width: 220px; }
.teacher-tbl .num { text-align: center; white-space: nowrap; }
.teacher-tbl tfoot th, .teacher-tbl tfoot td { border-top: 2px solid var(--divider); font-size: 13px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.profile-grid input { width: 100%; }
