/* =====================================================================
   Nova SBE Crew Booking — design system
   ---------------------------------------------------------------------
   Aligned with the institutional identity used by AI@NovaSBE: black and
   white, Playfair Display for headings, Open Sans for the interface,
   sharp corners, and surfaces bounded by a hairline rather than a shadow.

   All color lives in the :root block. The one literal color outside it is
   the crew states, which have to match what the CrewStatus enum hands to
   FullCalendar.
   ===================================================================== */

:root {
    /* Brand */
    --nova-black: #000000;
    --nova-white: #FFFFFF;

    /* Surfaces and text */
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-muted: #F7F7F7;
    --surface-sunken: #F0F0F0;
    --border: #E0E0E0;
    --border-strong: #C9C9C9;
    --ink: #000000;
    --ink-soft: #333333;
    --ink-muted: #666666;
    --ink-faint: #999999;
    --ink-ghost: #BBBBBB;

    /* Semantic states */
    --ok: #2E7D32;
    --ok-bg: #E8F5E9;
    --ok-line: #C8E6C9;
    --warn: #E65100;
    --warn-bg: #FFF8E1;
    --warn-line: #FFE082;
    --danger: #C0392B;
    --danger-bg: #FEF2F2;
    --danger-line: #FECACA;
    --info: #1D4ED8;
    --info-bg: #EFF6FF;
    --info-line: #BFDBFE;

    /* Crew coverage states — mirror CrewStatus.java */
    --crew-full: #2E7D32;
    --crew-full-bg: #E8F5E9;
    --crew-partial: #F57F17;
    --crew-partial-bg: #FFF8E1;
    --crew-empty: #C0392B;
    --crew-empty-bg: #FEF2F2;
    --crew-none: #9CA3AF;
    --crew-none-bg: #F3F4F6;

    /* Shape — sharp corners, in the brand's image */
    --radius: 6px;
    --radius-sm: 5px;
    --radius-btn: 2px;
    --radius-pill: 999px;
    /* A single shadow, for the segmented bar's active tab: hierarchy in this
       brand is made of line and space, not depth. */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .1);

    /* Institutional typography */
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;

    --header-h: 60px;
    --page-max: 1280px;
}

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

html, body { height: 100%; }

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink-soft);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Headings are the brand's most recognizable stroke: serif, weight 700. */
h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
h4 { font-family: var(--font); font-size: .875rem; font-weight: 700; }

p { margin: 0 0 10px; }

/* ------------------------------------------------------------------- Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nova-white);
    border-bottom: 1px solid var(--border);
}

.header-container {
    max-width: var(--page-max);
    margin: 0 auto;
    height: var(--header-h);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo { display: flex; align-items: center; gap: .85rem; flex-shrink: 0; }
.logo:hover { text-decoration: none; }
.logo-img { height: 30px; width: auto; display: block; }

/* A hairline between the institutional logo and the application name. */
.logo-divider { width: 1px; height: 26px; background: var(--border); }

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.logo-text strong {
    font-family: var(--font-display);
    font-size: .95rem;
    font-weight: 700;
    color: var(--nova-black);
}
.logo-text span {
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .11em;
    color: var(--ink-faint);
}

.main-nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }

.nav-link {
    position: relative;
    padding: .5rem 0;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-muted);
    transition: color .2s ease;
}
.nav-link:hover { color: var(--nova-black); text-decoration: none; }

/* The growing underline — signature of the institutional navigation. */
.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--nova-black);
    transition: width .2s ease;
}
.nav-link:hover::after { width: 100%; }

.nav-link.active { color: var(--nova-black); }
.nav-link.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1rem; margin-left: 1.5rem; }

.bell {
    position: relative;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-btn);
    color: var(--ink-muted);
}
.bell:hover { background: var(--surface-muted); color: var(--nova-black); text-decoration: none; }

.bell-count {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.user-chip { display: flex; align-items: center; gap: .6rem; }

.avatar {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--nova-black);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { font-size: .8rem; font-weight: 600; color: var(--nova-black); }
.user-meta span {
    font-size: .62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-faint);
}

/* ---------------------------------------------------------------- Structure */

.page {
    flex: 1;
    width: 100%;
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}
.page-narrow { max-width: 1040px; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--border);
}

.page-head h1 { margin-bottom: .15rem; }
.page-head .subtitle { font-size: .82rem; color: var(--ink-faint); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.spacer { flex: 1; }

/* Segmented bar for sub-navigation (catalog, price lists, administration). */
.segmented {
    display: inline-flex;
    gap: .25rem;
    padding: .25rem;
    background: var(--surface-muted);
    border-radius: var(--radius);
}
.segmented a {
    padding: .4rem 1rem;
    border-radius: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-muted);
    transition: background .15s, color .15s;
}
.segmented a:hover { background: var(--surface-sunken); color: var(--nova-black); text-decoration: none; }
.segmented a.active { background: var(--nova-white); color: var(--nova-black); box-shadow: var(--shadow-sm); }

/* -------------------------------------------------------------------- Cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 { font-size: 1rem; }
.card-head .subtitle { font-size: .72rem; color: var(--ink-ghost); }

.card-body { padding: 1.25rem 1.5rem; }
.card-body.tight { padding: .85rem 1.5rem; }
.card-foot { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-muted); }

/* Stat card: a small uppercase label above a serif number. */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.stat .label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-faint);
    margin-bottom: .5rem;
}
.stat .value {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--nova-black);
    line-height: 1;
    margin-bottom: .4rem;
}
.stat .hint { font-size: .75rem; color: var(--ink-ghost); }

/* ------------------------------------------------------------------ Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    height: 36px;
    padding: 0 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-btn);
    background: var(--nova-white);
    color: var(--nova-black);
    font-family: var(--font);
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { border-color: var(--nova-black); background: var(--nova-white); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--nova-black); outline-offset: 2px; }

.btn-primary { background: var(--nova-black); border-color: var(--nova-black); color: var(--nova-white); }
.btn-primary:hover { background: #333; border-color: #333; color: var(--nova-white); }

/* The outlined button is the filled one's natural pair: it inverts on hover. */
.btn-accent { background: transparent; border-color: var(--nova-black); color: var(--nova-black); }
.btn-accent:hover { background: var(--nova-black); color: var(--nova-white); }

.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #256428; border-color: #256428; color: #fff; }

.btn-danger { background: var(--nova-white); border-color: var(--danger-line); color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-muted); }
.btn-ghost:hover { background: var(--surface-muted); border-color: transparent; color: var(--nova-black); }

.btn-sm { height: 28px; padding: 0 .7rem; font-size: .72rem; }
.btn-lg { height: 44px; padding: 0 1.5rem; font-size: .875rem; border-width: 2px; }
.btn-icon { width: 32px; padding: 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-btn) 0 0 var(--radius-btn); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-btn) var(--radius-btn) 0; }
.btn-group .btn.active { background: var(--nova-black); border-color: var(--nova-black); color: var(--nova-white); }

/* -------------------------------------------------------------------- Forms */

.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .95rem; }

.field > label, .label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--ink-muted);
}
.field > label .req, .required { color: var(--danger); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="search"], select, textarea {
    width: 100%;
    min-height: 36px;
    padding: .45rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--nova-white);
    color: var(--nova-black);
    font-family: var(--font);
    font-size: .82rem;
    transition: border-color .15s;
}

textarea { min-height: 74px; resize: vertical; line-height: 1.55; }

/* The file picker is a browser widget with its own idea of a button; only the box around it is
   ours, so it sits at the same height as the fields it stands next to. */
input[type="file"] {
    width: 100%;
    min-height: 36px;
    padding: .35rem .5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--nova-white);
    color: var(--ink-soft);
    font-family: var(--font);
    font-size: .78rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--nova-black);
}

input[readonly], input[disabled], select[disabled] { background: var(--surface-muted); color: var(--ink-muted); }

.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .72rem; }
.help { color: var(--ink-ghost); font-size: .72rem; }

.check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 400;
    color: var(--ink-soft);
    text-transform: none;
    letter-spacing: 0;
}
.check input { width: 15px; height: 15px; min-height: 0; margin: 0; accent-color: var(--nova-black); }

.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: .65rem;
    align-items: end;
}

/* ---------------------------------------------------------------- Tabelas */

.table-wrap { overflow-x: auto; }

table.data { width: 100%; border-collapse: collapse; font-size: .83rem; }

table.data th {
    text-align: left;
    padding: 0 .9rem .6rem;
    border-bottom: 2px solid var(--border);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-faint);
    white-space: nowrap;
}

table.data td {
    padding: .65rem .9rem;
    border-bottom: 1px solid var(--border);
    color: var(--ink-soft);
    vertical-align: middle;
}
table.data tbody tr:hover { background: var(--surface-muted); }

/* Whole-row navigation: the cursor announces it before the click. */
table.data tbody tr.row-link { cursor: pointer; }

/* A billing sheet row with changes not yet saved. */
table.data tbody tr.row-dirty { background: var(--warn-bg); }
table.data tbody tr.row-dirty td:first-child { box-shadow: inset 3px 0 0 var(--crew-partial); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.mono { font-family: var(--font-mono); font-size: .75rem; }
table.data td strong { color: var(--nova-black); font-weight: 600; }
table.data input, table.data select { min-height: 30px; font-size: .75rem; }

/* -------------------------------------------------------- The billing sheet's grid

   Fifteen columns of fields. A table that always fits the window narrows every column until the
   inputs in them cannot show the number they hold — so this one is laid out from the widths on its
   headers and allowed to overflow, and .table-wrap scrolls it.

   min-width must stay at or above the sum of those header widths (2218px as they stand). Above is
   harmless — the surplus is shared out and every column gets a little wider. Below is the bug
   coming back, because a fixed layout with too little room shrinks the columns again. */
table.data.table-billing {
    table-layout: fixed;
    min-width: 2220px;
}

/* Tighter than the reading tables: here the space belongs to the fields, not to the margins. */
table.data.table-billing th,
table.data.table-billing td {
    padding-left: .5rem;
    padding-right: .5rem;
}
table.data.table-billing input { padding: .35rem .45rem; }

/* Rows save themselves on the way out, so each one says where it stands. Reserved width, so the
   message appearing does not shift the buttons beside it. */
.save-state {
    display: inline-block;
    min-width: 56px;
    margin-right: .3rem;
    font-size: .68rem;
    font-weight: 700;
    text-align: right;
    vertical-align: middle;
    color: var(--ink-faint);
}
.save-state.is-ok { color: var(--ok); }
.save-state.is-error { color: var(--danger); }

/* The table lives inside a card: the header sits flush with the body. */
.card-body > .table-wrap > table.data th:first-child,
.card-body > .table-wrap > table.data td:first-child { padding-left: 0; }
.card-body > .table-wrap > table.data th:last-child,
.card-body > .table-wrap > table.data td:last-child { padding-right: 0; }

.empty { padding: 3rem 1.25rem; text-align: center; color: var(--ink-ghost); font-size: .82rem; }

/* ---------------------------------------------------------------- Etiquetas */

.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .55rem;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}

.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-muted { background: var(--surface-muted); color: var(--ink-muted); border-color: var(--border); }
.badge-navy { background: var(--nova-black); color: var(--nova-white); border-color: var(--nova-black); }

.dot { width: 8px; height: 8px; border-radius: var(--radius-pill); display: inline-block; }

/* Crew states — the values track CrewStatus.java */
.crew-full { background: var(--crew-full-bg); color: var(--crew-full); border-color: var(--ok-line); }
.crew-partial { background: var(--crew-partial-bg); color: #8A6D3B; border-color: var(--warn-line); }
.crew-empty { background: var(--crew-empty-bg); color: var(--crew-empty); border-color: var(--danger-line); }
.crew-none { background: var(--crew-none-bg); color: var(--ink-muted); border-color: var(--border); }

.crew-bar { border-left: 3px solid transparent; }
.crew-bar.crew-full { border-left-color: var(--crew-full); }
.crew-bar.crew-partial { border-left-color: var(--crew-partial); }
.crew-bar.crew-empty { border-left-color: var(--crew-empty); }
.crew-bar.crew-none { border-left-color: var(--crew-none); }

.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .75rem; color: var(--ink-muted); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }

/* ---------------------------------------------------------------- Avisos */

.alert {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-left-width: 3px;
    border-radius: var(--radius-btn);
    font-size: .82rem;
}

.alert-success { background: var(--ok-bg); border-color: var(--ok-line); border-left-color: var(--ok); color: #1B5E20; }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-line); border-left-color: #F9A825; color: #8A6D3B; }
.alert-error { background: var(--danger-bg); border-color: var(--danger-line); border-left-color: var(--danger); color: #991B1B; }
.alert-info { background: var(--info-bg); border-color: var(--info-line); border-left-color: var(--info); color: #1E40AF; }

/* ----------------------------------------------------------------- Calendar */

#calendar { --fc-border-color: var(--border); --fc-page-bg-color: var(--surface); }

.fc { font-family: var(--font); font-size: .8rem; }
.fc .fc-toolbar-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--nova-black); }

.fc .fc-button {
    background: var(--nova-white);
    border-color: var(--border-strong);
    border-radius: var(--radius-btn);
    color: var(--nova-black);
    font-family: var(--font);
    font-size: .75rem;
    font-weight: 600;
    text-transform: none;
    box-shadow: none;
    padding: .35rem .8rem;
}
.fc .fc-button:hover { background: var(--nova-white); border-color: var(--nova-black); }
.fc .fc-button:focus { box-shadow: none; }
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: var(--nova-black);
    border-color: var(--nova-black);
    color: var(--nova-white);
}

.fc .fc-col-header-cell-cushion {
    padding: .55rem .25rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-faint);
}
.fc .fc-col-header-cell-cushion:hover { text-decoration: none; }
.fc .fc-daygrid-day-number { padding: .35rem .5rem; font-size: .75rem; color: var(--ink-muted); }
.fc .fc-daygrid-day-number:hover { text-decoration: none; }
.fc .fc-day-today { background: var(--surface-muted) !important; }
.fc .fc-day-today .fc-daygrid-day-number { font-weight: 700; color: var(--nova-black); }
.fc .fc-daygrid-event { border-radius: var(--radius-btn); border-width: 0 0 0 3px; padding: 2px 5px; margin: 1px 2px; }
.fc-event { cursor: pointer; }
.fc-event-main { font-size: .75rem; }

.cal-event { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.cal-event .cal-title { font-size: .72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event .cal-meta { font-size: .62rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event .cal-ratio { font-family: var(--font-mono); font-size: .62rem; font-weight: 700; }

/* ----------------------------------------------------------- Authentication */

.login-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* The institutional panel is solid black — the same contrast as the brand footer. */
.login-aside {
    background: var(--nova-black);
    color: var(--nova-white);
    padding: 3.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-aside .logo-img { height: 42px; }
.login-aside h1 { color: var(--nova-white); font-size: 2.25rem; line-height: 1.2; max-width: 16ch; margin-top: 3rem; }
.login-aside p { color: rgba(255, 255, 255, .75); max-width: 46ch; font-size: .875rem; margin-top: 1rem; }
.login-aside ul { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .7rem; }
.login-aside li {
    display: flex;
    gap: .65rem;
    align-items: flex-start;
    font-size: .82rem;
    color: rgba(255, 255, 255, .8);
}
.login-aside li::before {
    content: "";
    width: 5px;
    height: 5px;
    margin-top: .55rem;
    flex: none;
    background: rgba(255, 255, 255, .55);
}
.login-aside .login-foot {
    font-size: .72rem;
    color: rgba(255, 255, 255, .45);
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.login-main { display: grid; place-items: center; padding: 2.5rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 1.5rem; margin-bottom: .35rem; }
.login-card .subtitle { font-size: .82rem; color: var(--ink-faint); margin-bottom: 1.75rem; }

.divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1.5rem 0;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-ghost);
}
.divider::before, .divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }

.btn-sso { width: 100%; }

@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-aside { display: none; }
}

/* ------------------------------------------------------------------- Footer */

.site-footer {
    background: var(--nova-black);
    color: var(--nova-white);
    padding: 1.75rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: var(--page-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: .78rem;
    color: rgba(255, 255, 255, .7);
}
.footer-container .footer-logo-img { height: 34px; width: auto; display: block; }
.footer-container a { color: var(--nova-white); border-bottom: 1px solid rgba(255, 255, 255, .3); }
.footer-container a:hover { border-bottom-color: var(--nova-white); text-decoration: none; }

/* ---------------------------------------------------------------- Diversos */

.chip-list { display: flex; flex-wrap: wrap; gap: .35rem; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .25rem .2rem .6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    background: var(--surface-muted);
    color: var(--ink-soft);
    font-size: .72rem;
    font-weight: 600;
}
.chip form { display: flex; }
.chip button {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: none;
    background: transparent;
    color: inherit;
    font-size: 13px;
    line-height: 1;
    opacity: .5;
    cursor: pointer;
}
.chip button:hover { background: var(--surface-sunken); opacity: 1; }

.section-title {
    margin-bottom: .9rem;
    padding-bottom: .45rem;
    border-bottom: 1px solid var(--border);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--ink-faint);
}

.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: .75rem; padding: .85rem 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-item.unread { margin: 0 -1.5rem; padding: .85rem 1.5rem; background: var(--surface-muted); }
.timeline-body { flex: 1; min-width: 0; }
.timeline-body h4 { font-size: .82rem; font-weight: 700; color: var(--nova-black); margin-bottom: .15rem; }
.timeline-body p { font-size: .78rem; color: var(--ink-muted); margin: 0; }
.timeline-detail {
    display: grid;
    gap: 2px;
    margin-top: .4rem;
    font-family: var(--font-mono);
    font-size: .7rem;
    color: var(--ink-muted);
}
.timeline-meta { margin-top: .35rem; font-size: .7rem; color: var(--ink-ghost); }

.crew-slot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--border);
}
.crew-slot:last-child { border-bottom: none; }
.crew-slot .slot-name { width: 170px; flex: none; font-size: .82rem; font-weight: 700; color: var(--nova-black); }
.crew-slot .slot-assign { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.crew-slot .slot-assign select { min-width: 210px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: .4rem; padding: 1rem; }

.mono { font-family: var(--font-mono); font-size: .75rem; }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.small { font-size: .75rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

details.inline-form { margin-top: .65rem; }
details.inline-form > summary {
    cursor: pointer;
    list-style: none;
    font-size: .75rem;
    font-weight: 600;
    color: var(--nova-black);
}
details.inline-form > summary::-webkit-details-marker { display: none; }
details.inline-form > summary::before { content: "+ "; font-weight: 700; }
details.inline-form[open] > summary::before { content: "− "; }
details.inline-form > div {
    margin-top: .65rem;
    padding: 1rem;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

@media (max-width: 900px) {
    .header-container { gap: 1rem; padding: 0 1rem; }
    .main-nav { display: none; }
    .page { padding: 1.25rem 1rem 2rem; }
    .user-meta { display: none; }
    .logo-divider, .logo-text { display: none; }
}
