/* ==========================================================================
   JupyterHub hub-base — structural stylesheet
   --------------------------------------------------------------------------
   Tenant-neutral. Every colour, font and shadow here is a var(--token);
   nothing in this file names a tenant, a brand or a literal colour.

   A tenant supplies the palette in its own theme-<tenant>.css, which must
   define the full token contract documented in BRANDING.md and is loaded
   AFTER this file by templates/page.html.

   Do not add a literal colour to this file. If a rule needs one, add a token
   to the contract instead — otherwise the file stops being reusable.
   ========================================================================== */
/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--display);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* `.hidden` es la ÚNICA clase que alterna el JavaScript de JupyterHub (home.js
   la pone y la quita para enseñar u ocultar Stop/Start/Delete de cada servidor
   con nombre). La define su hoja como `.hidden{display:none}`, pero nuestro
   `.btn{display:inline-flex}` tiene la misma especificidad y carga después, así
   que ganaba: los tres botones salían a la vez en cada fila, sin importar si el
   servidor estaba arrancado.

   El `!important` está justificado y no es pereza: esto es una utilidad cuyo
   único trabajo es vencer a la regla del componente —igual que `.d-none` de
   Bootstrap, que también lo lleva—. Sin él haría falta recordar que ninguna
   regla posterior puede tocar `display` en algo que pueda llevar `.hidden`. */
.hidden {
    display: none !important;
}

/* JupyterHub's stylesheet paints an opaque body background over the vignette */
body {
    background-color: transparent !important;
    min-height: 100vh;
}

/* faint atmospheric vignette — cyan aloft, emerald at the surface */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        var(--vignette);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p {
    color: var(--muted);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--accent-hover);
}

code, pre, kbd, samp {
    font-family: var(--data-family);
    color: var(--accent);
}

hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
    opacity: 1;
}

::selection {
    background: var(--accent);
    color: var(--on-accent);
}

/* Keyboard focus is visible everywhere. Bootstrap's default blue ring is
   replaced by the accent so it reads as part of the system. */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 3px var(--accent-ring);
}

/* scrollbars inside dark panels */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 6px;
    border: 3px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--faint); background-clip: content-box; }

/* Micro-etiqueta que nombra una superficie (`.eyebrow`, cabeceras de widget,
   etiquetas de estadística). Su TIPO es identidad, no estructura: un tema la pone
   en mono y versalitas, otro la quiere condensada o en caja normal. Por eso
   la familia y la caja salen de tokens; el ritmo (tamaño, tracking) se queda
   aquí, y un tema puede afinarlo porque se carga después.
   ========================================================================== */

/* ==========================================================================
   3. Shared atoms
   ========================================================================== */

.eyebrow {
    font-family: var(--label-family);
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: var(--label-transform);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.eyebrow-center {
    justify-content: center;
}

/* El eyebrow normalmente va en `--accent`, que es el color de "esto es lo
   siguiente que puedes hacer". En una página de fallo eso es mentir sobre el
   estado, así que ahí cambia de familia. */
.eyebrow-danger {
    color: var(--danger);
}

.mono {
    font-family: var(--data-family);
}

.section-label {
    font-family: var(--label-family);
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--faint);
    text-transform: uppercase;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line-strong) 30%, var(--line-strong) 70%, transparent);
}

/* every surface panel in the hub is the same object */
.panel-surface {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
}

/* ==========================================================================
   4. Navbar
   ========================================================================== */

.navbar {
    background-color: var(--panel) !important;
    backdrop-filter: var(--panel-blur);
    -webkit-backdrop-filter: var(--panel-blur);
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1.5rem;
}

.navbar-brand img,
.navbar-brand .jpy-logo {
    max-height: 38px;
    width: auto;
    display: block;
    transition: filter 0.3s var(--ease);
}

.navbar-brand a:hover img {
    filter: var(--logo-hover-filter);
}

.navbar .nav-link {
    color: var(--muted) !important;
    font-family: var(--label-family);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.5rem 0.9rem;
    position: relative;
    transition: color 0.2s var(--ease);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus-visible {
    color: var(--text) !important;
}

.navbar-toggler {
    border-color: var(--line-strong);
    padding: 0.35rem 0.55rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%239aa8bf' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#login_widget {
    color: var(--muted) !important;
    font-family: var(--label-family);
    font-size: 12px;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* the signed-in username is data, so it is set in mono and given the
   accent — it is the one piece of per-user truth in the chrome */
#login_widget > .me-1 {
    color: var(--text);
}

.dropdown-menu {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px var(--shadow-drop);
    padding: 6px;
}

.dropdown-item {
    color: var(--muted);
    font-family: var(--label-family);
    font-size: 12.5px;
    border-radius: 2px;
    padding: 8px 12px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--accent-wash);
    color: var(--accent);
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
    font-family: var(--label-family);
    font-size: 13px;
    letter-spacing: 0.06em;
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--text);
    border-radius: 2px;
    padding: 11px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.25s var(--ease);
}

.btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-wash);
}

.btn-lg {
    padding: 14px 26px;
    font-size: 14px;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

/* Primary CTA. btn-jupyter and btn-success are folded in here: the templates
   use all three for the same "launch / start" action, and a Bootstrap-green
   button has no place in this palette. */
.btn-primary,
.btn-jupyter,
.btn-success {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 0 0 1px var(--accent), 0 8px 30px -8px var(--accent-glow);
}

.btn-primary:hover,
.btn-jupyter:hover,
.btn-success:hover,
.btn-primary:focus,
.btn-jupyter:focus,
.btn-success:focus {
    background: var(--accent);
    color: var(--on-accent);
    border-color: var(--accent);
    /* Aclarar al pasar por encima solo lee como "más énfasis" sobre fondo
       oscuro. En un tema claro hay que oscurecer, o el botón parece apagarse
       justo al apuntarlo. Lo decide el tema. */
    filter: var(--hover-filter);
    box-shadow: 0 0 0 1px var(--accent), 0 10px 40px -6px var(--accent-glow);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger-line-strong);
    box-shadow: none;
}

.btn-danger:hover,
.btn-danger:focus {
    background: var(--danger-wash);
    color: var(--danger);
    border-color: var(--danger);
}

.btn-outline-contrast,
.btn-outline-secondary,
.btn-secondary {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--muted);
    box-shadow: none;
}

.btn-outline-contrast:hover,
.btn-outline-secondary:hover,
.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-wash);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.4;
    box-shadow: none;
    filter: none;
}

/* ==========================================================================
   6. Forms
   ========================================================================== */

.form-control,
.form-select,
.new-server-name,
.new-server-input,
input[type="text"],
input[type="search"] {
    background-color: var(--bg-1);
    border: 1px solid var(--line-strong);
    color: var(--text);
    font-family: var(--label-family);
    font-size: 13px;
    padding: 10px 13px;
    border-radius: 2px;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-control::placeholder,
.new-server-name::placeholder {
    color: var(--faint);
}

.form-control:focus,
.form-select:focus,
.new-server-name:focus,
.new-server-input:focus {
    background-color: var(--bg-1);
    outline: none;
    border-color: var(--accent);
    color: var(--text);
}

.form-label,
label {
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
}

.input-group-text {
    background-color: var(--bg-2);
    border-color: var(--line-strong);
    color: var(--muted);
    font-family: var(--label-family);
    font-size: 12px;
}

.form-check-input {
    background-color: var(--bg-1);
    border-color: var(--line-strong);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* ==========================================================================
   7. Login
   ========================================================================== */

#login-main {
    min-height: 76vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    padding: 52px 48px 40px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px var(--shadow-panel);
    position: relative;
    overflow: hidden;
}

.login-box img {
    max-width: 168px;
    margin-bottom: 10px;
}

.login-box .eyebrow {
    margin: 18px 0 26px;
}

.login-box .btn-jupyter {
    width: 100%;
    padding: 15px;
    font-size: 13px;
}

.powered-by-text {
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--faint);
    margin: 26px 0 0;
}

.powered-by-text a {
    color: var(--muted);
    border-bottom: 1px solid var(--line-strong);
}

.powered-by-text a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Funder + consortium band (login page)

   Sits OUTSIDE the login box on purpose: the box has one job, which is the
   sign-in button, and the attribution must not compete with it. Logos go on
   white tiles. Brand
   marks are heterogeneous and several partners' guidelines forbid recolouring,
   so inverting them to a flat white is not an option here.
   -------------------------------------------------------------------------- */

.consortium {
    max-width: 720px;
    margin: 52px auto 0;
    padding: 0 20px 64px;
    text-align: center;
}

.consortium-label {
    font-family: var(--label-family);
    font-size: 10px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--faint);
    margin: 0 0 16px;
}

.consortium-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.consortium-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--logo-plate);
    border: 1px solid var(--logo-plate-line);
    border-radius: 6px;
    padding: 12px 20px;
    min-width: 118px;
    height: 62px;
    box-shadow: 0 14px 34px -22px var(--shadow-tile);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.consortium-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px -20px var(--shadow-tile-hover);
}

.consortium-tile img {
    max-width: 100%;
    max-height: 36px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* partners with no supplied mark render as a wordmark */
.consortium-word {
    font-family: var(--display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: var(--on-logo-plate);
}

/* ESA is the funder, not one partner among several — it gets its own line
   above the divider and a larger tile. */
.consortium-funder .consortium-tile {
    height: 76px;
    min-width: 150px;
    padding: 14px 26px;
}

.consortium-funder .consortium-tile img {
    max-height: 46px;
}

.consortium-contract {
    font-family: var(--label-family);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--faint);
    margin: 14px 0 0;
}

.consortium-divider {
    height: 1px;
    max-width: 420px;
    margin: 34px auto;
    background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

@media (max-width: 560px) {
    .consortium { margin-top: 36px; padding-bottom: 44px; }
    .consortium-row { gap: 9px; }
    .consortium-tile { min-width: 96px; height: 54px; padding: 10px 14px; }
    .consortium-tile img { max-height: 28px; }
    .consortium-funder .consortium-tile { height: 66px; min-width: 128px; }
    .consortium-funder .consortium-tile img { max-height: 38px; }
}

/* ==========================================================================
   8. Page headers
   ========================================================================== */

.dashboard-container {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
    max-width: var(--maxw);
}

.dashboard-header h1 {
    margin: 0 0 8px;
}

.dashboard-header p,
.lead {
    color: var(--muted);
    font-size: 1rem;
    margin: 0;
}

/* ==========================================================================
   9. Spawn — environment cards
   ========================================================================== */

/* Flex rather than grid: with `auto-fill` the empty tracks stayed in the
   layout, so a single environment sat pinned to the left edge. Flex wrapping
   also centres a partial last row, which a fixed grid cannot do. */
.profile-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 22px;
    padding: 8px 0 64px;
    max-width: 1080px;
    margin: 0 auto;
}

.profile-card {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 32px 28px 28px;
    text-align: center;
    transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    /* grow into the row, but never wider than a comfortable reading measure */
    flex: 1 1 290px;
    max-width: 340px;
}

.profile-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 14px 36px -14px var(--accent-glow);
}

.profile-card img.profile-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    margin-bottom: 22px;
    filter: var(--card-logo-filter);
}

/* Selector de variante dentro de la tarjeta de entorno (profile_options).
   Va pegado al botón de arranque porque es parte de la misma decisión. */
.profile-option {
    display: block;
    margin-bottom: 12px;
    text-align: left;
}

.profile-option-label {
    display: block;
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: var(--label-transform);
    color: var(--muted);
    margin-bottom: 5px;
}

.profile-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.profile-card p {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 26px;
    color: var(--muted);
    flex-grow: 1;
}

.profile-card .btn {
    width: 100%;
}

/* ==========================================================================
   10. Workspace allocation widget
   ========================================================================== */

.workspace-widget {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    margin-bottom: 40px;
    overflow: hidden;
}

.workspace-widget .widget-header {
    background-color: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 13px 22px;
}

.workspace-widget .widget-header h5 {
    margin: 0;
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 500;
}

.workspace-widget .widget-body {
    padding: 26px 22px 22px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    color: var(--accent);
    background-color: var(--accent-wash);
    border: 1px solid var(--accent-line);
    border-radius: var(--radius);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.stat-label {
    font-family: var(--label-family);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faint);
    margin-bottom: 3px;
}

/* the allocation numbers are the point of this widget — mono, tabular,
   and the largest type on the screen after the page title */
.stat-value {
    font-family: var(--data-family);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.volumes-section {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.volume-toggle-btn {
    background: transparent;
    border: 1px solid var(--line-strong);
    color: var(--muted);
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 9px 18px;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s var(--ease);
}

.volume-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-wash);
}

/* mount paths are filesystem truth — always mono, never wrapped mid-path */
.volume-badge {
    background-color: var(--bg-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--data-family);
    font-size: 11.5px;
    padding: 7px 12px;
    border-radius: 2px;
    margin: 5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s var(--ease);
}

.volume-badge:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* ==========================================================================
   11. Home — servers
   ========================================================================== */

.server-card {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.server-card .card-body {
    padding: 30px 26px;
}

.server-card .card-body h3 {
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 500;
}

.server-name {
    font-size: 1.05rem;
    color: var(--text);
}

.named-servers-card {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    overflow: hidden;
}

.named-servers-header {
    background-color: var(--bg-1);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px;
}

.named-servers-header h2 {
    margin: 0;
    font-size: 1.05rem;
}

/* ==========================================================================
   12. Tables
   ========================================================================== */

.table,
.custom-table {
    color: var(--text);
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table thead th,
.custom-table thead th {
    border-bottom: 1px solid var(--line-strong);
    color: var(--faint);
    font-family: var(--label-family);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.18em;
    padding: 13px 24px;
    background: transparent;
    white-space: nowrap;
}

.table td,
.custom-table td {
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    padding: 15px 24px;
    font-size: 0.9rem;
    color: var(--muted);
}

.table tbody tr:last-child td,
.custom-table tbody tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr {
    transition: background-color 0.2s var(--ease);
}

.custom-table tbody tr:hover {
    background-color: var(--row-hover);
}

/* server names and URLs are identifiers — mono */
.custom-table tbody td:first-child {
    font-family: var(--data-family);
    font-size: 0.85rem;
    color: var(--text);
}

.server-link {
    font-family: var(--data-family);
    font-size: 0.8rem;
    color: var(--accent);
    word-break: break-all;
}

.server-link:hover {
    border-bottom: 1px solid var(--accent);
}

.new-server-row {
    background-color: var(--bg-2);
}

.new-server-row td {
    padding: 18px 24px;
}

.custom-table .btn {
    margin-left: 6px;
}

/* ISO timestamps read as data, never as prose */
.home-server-row td:nth-child(3) {
    font-family: var(--data-family);
    font-size: 0.78rem;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   13. Status indicators
   ========================================================================== */

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: var(--label-family);
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.status-running {
    color: var(--ok);
    background-color: var(--ok-wash);
    border: 1px solid var(--ok-line);
}

.status-stopped {
    color: var(--faint);
    background-color: var(--neutral-wash);
    border: 1px solid var(--line-strong);
}

.status-pending {
    color: var(--warn);
    background-color: var(--warn-wash);
    border: 1px solid var(--warn-line);
}


/* ==========================================================================
   14. Spawn pending — page shell
   --------------------------------------------------------------------------
   The panel, the feed strip, the tip and the event log all live in the base
   spawn_pending.html, so they are styled here. The decorative graphic above
   them is tenant-supplied (spawn_visual_template) and brings its own CSS.
   ========================================================================== */

/* the data the environment already has mounted, in the platform's own terms */
.spawn-feeds {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-top: 16px;
    font-family: var(--label-family);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faint);
}

.spawn-feeds span { display: inline-flex; align-items: center; gap: 7px; }

.spawn-feeds span::before {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
    animation: spawn-feed 4.6s ease-in-out infinite;
}

.spawn-feeds span:nth-child(2)::before { animation-delay: 0.5s; }
.spawn-feeds span:nth-child(3)::before { animation-delay: 1.0s; }
.spawn-feeds span:nth-child(4)::before { animation-delay: 1.5s; }

@keyframes spawn-feed {
    0%, 70%, 100% { opacity: 0.28; }
    12%           { opacity: 1; box-shadow: 0 0 7px var(--accent-glow); }
}

.spawn-panel {
    max-width: 560px;
    margin: 0 auto;
}

.spawn-panel .card-body {
    padding: 48px 36px 36px;
}

/* live provisioning message */
#progress-message {
    font-family: var(--data-family);
    font-size: 0.82rem;
    color: var(--muted);
    min-height: 24px;
    letter-spacing: 0.02em;
}

/* the tip strip is an aside, not an alert — it must not read as a warning */
.spawn-tip {
    background-color: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 16px;
    color: var(--muted);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.spawn-tip svg {
    color: var(--faint);
    flex-shrink: 0;
}

details.event-log-details {
    text-align: left;
    margin-top: 26px;
}

details.event-log-details > summary {
    cursor: pointer;
    font-family: var(--label-family);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 0;
    transition: color 0.2s var(--ease);
}

details.event-log-details > summary::-webkit-details-marker {
    display: none;
}

details.event-log-details > summary:hover {
    color: var(--accent);
}

details.event-log-details > summary svg {
    transition: transform 0.2s var(--ease);
}

details.event-log-details[open] > summary svg {
    transform: rotate(90deg);
}

#event-log {
    background-color: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    max-height: 280px;
    overflow-y: auto;
    font-family: var(--data-family);
    font-size: 11.5px;
    line-height: 1.7;
    color: var(--muted);
    padding: 14px 16px;
}

.log-time {
    color: var(--faint);
}

.log-error {
    color: var(--danger);
}

/* Bootstrap's spinner, kept themed for any surface we have not replaced */
.spinner-border {
    color: var(--accent) !important;
    border-right-color: transparent !important;
}

/* --- compartir servidor (diálogo de home.html) --------------------------- */

/* Lo primero que se lee, antes del campo: compartir da acceso al servidor
   entero, no a un documento. Que se vea como aviso y no como texto de ayuda. */
.share-warning {
    font-size: 0.86rem;
    color: var(--warn);
    background: var(--warn-wash);
    border: 1px solid var(--warn-line-strong);
    border-radius: var(--radius);
    padding: 12px 15px;
    margin-bottom: 16px;
}

.share-target {
    font-family: var(--data-family);
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 14px;
}

.share-add {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.share-add .form-control {
    flex: 1;
}

.share-list {
    margin-top: 4px;
}

.share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}

.share-empty {
    font-size: 0.86rem;
    margin: 0;
}

/* Matiz sobre el alcance de revocar. Tono secundario a propósito: no es un
   aviso de peligro como `.share-warning`, es una precisión que evita creer en
   una expulsión inmediata. */
.share-note {
    margin: 16px 0 0;
    padding-top: 13px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--muted);
}

/* ==========================================================================
   15. Alerts, announcement, errors
   ========================================================================== */

.alert {
    background-color: var(--warn-wash);
    border: 1px solid var(--warn-line-strong);
    color: var(--warn);
    border-radius: var(--radius);
    font-size: 0.88rem;
    padding: 13px 18px;
}

.alert-danger,
.ajax-error {
    background-color: var(--danger-wash);
    border-color: var(--danger-line);
    color: var(--danger);
}

/* `.ajax-error` (page.html, dentro del modal de error) NO lleva la clase
   `.alert`, así que de la regla de arriba solo recibía color y color de borde:
   sin `border-style` no dibujaba borde ninguno, y sin padding ni radio salía
   como texto teñido pegado al borde del modal. Se le da la misma caja. */
div.ajax-error {
    border: 1px solid var(--danger-line);
    border-radius: var(--radius);
    padding: 13px 18px;
    font-size: 0.88rem;
    /* JupyterHub lo centra; es un motivo técnico y a veces largo. */
    text-align: left;
}

.alert-info {
    background-color: var(--accent-wash);
    border-color: var(--accent-ring);
    color: var(--accent);
}

.alert-success {
    background-color: var(--ok-wash);
    border-color: var(--ok-line);
    color: var(--ok);
}

.announcement {
    font-family: var(--label-family);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    max-width: var(--maxw);
    margin: 0 auto 1.5rem;
}

/* `div.error` y no `.error`, y no es cosmética: la hoja de JupyterHub trae
   `div.error{margin:2em}`, `div.error>h1{font-size:300%}` y
   `div.error>p{font-size:200%}`. Cargar base.css DESPUÉS no basta —el orden
   solo decide cuando la especificidad empata—, así que con `.error` (0,1,0)
   perdíamos: la página salía pegada al borde izquierdo y con el titular al
   300%. Igualando el elemento empatamos, y ahí sí manda el orden.
   `./specificity-check.py` vigila que no vuelva a pasar. */
div.error {
    max-width: 620px;
    margin: 12vh auto 0;
    text-align: center;
    padding: 0 24px;
}

div.error h1 {
    font-family: var(--label-family);
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    color: var(--text);
    margin-bottom: 18px;
}

div.error p {
    color: var(--muted);
    /* explícito para ganar a `div.error>p{font-size:200%}` */
    font-size: 1rem;
}

/* La caja del motivo (KubeSpawner escribe aquí el evento de Kubernetes que
   explica el fallo). Alineada a la izquierda dentro de una página centrada:
   es texto técnico y a veces largo, y centrado se lee mal. */
div.error .alert {
    margin: 22px auto 0;
    max-width: 520px;
    text-align: left;
}

.error-actions {
    margin-top: 28px;
}

#noscript {
    text-align: center;
    padding: 40px;
    color: var(--warn);
    font-family: var(--label-family);
}

/* ==========================================================================
   16. Tokens page
   ========================================================================== */

.token-row td {
    font-size: 0.85rem;
}

.token-scope,
.scope-col {
    font-family: var(--data-family);
    font-size: 11px;
    color: var(--muted);
}

.token-scope {
    background-color: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 3px 8px;
    margin: 2px;
    display: inline-block;
}

.time-col {
    font-family: var(--data-family);
    font-size: 0.78rem;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.note-col {
    color: var(--muted);
}

.revoke-token-btn {
    white-space: nowrap;
}

/* ==========================================================================
   17. Cards, modals, footer
   ========================================================================== */

.card {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--text);
}

.modal-content {
    background-color: var(--panel-solid);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px var(--shadow-modal);
}

.modal-header,
.modal-footer {
    border-color: var(--line);
}

.modal-title {
    font-size: 1.1rem;
}

.btn-close {
    /* El aspa de Bootstrap es un SVG negro. Sobre panel oscuro hay que
       invertirla; sobre panel claro, NO —invertida sería blanca sobre blanco e
       invisible. La estructura no puede saberlo: lo decide el tema. */
    filter: var(--close-filter);
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

.version_footer {
    background-color: transparent !important;
    border-top: 1px solid var(--line);
    color: var(--faint) !important;
    font-family: var(--data-family);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    margin-top: 3rem;
}

.badge {
    font-family: var(--label-family);
    font-weight: 500;
    letter-spacing: 0.08em;
    border-radius: 2px;
}

.text-muted {
    color: var(--muted) !important;
}

.progress {
    background-color: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: 2px;
    height: 5px;
}

.progress-bar {
    background-color: var(--accent);
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 980px) {
    .navbar {
        padding: 0.7rem 1rem;
    }

    .navbar .nav-link {
        padding: 0.6rem 0;
    }

    .navbar .nav-link::after {
        left: 0;
        right: 0;
    }

    #login_widget {
        padding: 0.6rem 0;
    }
}

@media (max-width: 820px) {
    html, body {
        font-size: 16px;
    }

    .dashboard-container {
        padding-top: 1.75rem;
    }

    .profile-grid {
        gap: 18px;
    }

    .profile-card {
        flex-basis: 100%;
        max-width: 420px;
    }

    .login-box {
        padding: 40px 28px 32px;
    }

    .table thead th,
    .custom-table thead th,
    .table td,
    .custom-table td {
        padding: 12px 16px;
    }

    /* the named-server table is the only wide surface — let it scroll
       inside its own card rather than pushing the page sideways */
    .named-servers-card {
        overflow-x: auto;
    }

    .custom-table {
        min-width: 620px;
    }
}

@media (max-width: 560px) {
    .btn {
        padding: 10px 16px;
    }

    .btn-lg {
        padding: 13px 20px;
    }

    .server-card .card-body,
    .spawn-panel .card-body {
        padding: 28px 20px;
    }

    .profile-card {
        padding: 26px 22px 22px;
    }

    .workspace-widget .widget-body {
        padding: 20px 16px 16px;
    }

    .stat-item {
        gap: 12px;
    }

    .eyebrow {
        font-size: 11px;
        letter-spacing: 0.24em;
    }

    .error {
        margin-top: 8vh;
    }
}

/* ==========================================================================
   19. Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .spawn-feeds span::before { animation: none; opacity: 0.6; }

    .profile-card:hover {
        transform: none;
    }
}

/* the default-server action pair */
.server-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

