/* ===========================================================
   METALÚRGICA RIBERAS — Sistema de órdenes de trabajo
   Demo desarrollado por ArisCode
   =========================================================== */

:root {
    /* Superficies */
    --paper:   #EEF1F4;   /* área de trabajo */
    --panel:   #FFFFFF;
    --rail:    #1B2027;   /* barra lateral, acero oscuro */
    --rail-2:  #262D36;

    /* Texto */
    --ink:     #15181D;
    --steel:   #5C6673;
    --faint:   #8B949F;

    /* Acciones: azul esmalte de máquina */
    --machine:      #0F5C8C;
    --machine-hov:  #0C4C74;

    /* Estados de una orden (colores con significado, no decorativos) */
    --st-pend:  #6B7785;
    --st-proc:  #B36A00;
    --st-term:  #1B6E4A;
    --st-entr:  #4A5360;
    --st-late:  #A32B21;

    --line:    #D8DEE4;
    --line-2:  #E8ECEF;

    --radius:  4px;
    --rail-w:  236px;
    --ribbon-h: 38px;
    --shadow:  0 1px 2px rgba(21, 24, 29, 0.06), 0 6px 20px rgba(21, 24, 29, 0.07);
}

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

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.012em; }
p { margin: 0; }
button { font: inherit; }

.mono {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

:focus-visible {
    outline: 2px solid var(--machine);
    outline-offset: 2px;
}

/* ===========================================================
   CINTA DE DEMO
   =========================================================== */
.demo-ribbon {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 90;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    height: var(--ribbon-h);
    padding: 0 14px;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;

    background: #15181D;
    color: #D6DCE3;
    font-size: 12.5px;
}

.demo-ribbon strong { color: #fff; font-weight: 600; }

.only-narrow { display: none; }

.demo-ribbon a {
    color: #79B9E4;
    text-decoration: none;
    border-bottom: 1px solid rgba(121, 185, 228, 0.35);
}

.demo-ribbon a:hover { color: #fff; border-bottom-color: #fff; }

.ribbon-sep { color: #4A525C; }

/* ===========================================================
   LOGIN
   =========================================================== */
.login-screen {
    min-height: 100vh;
    padding: calc(var(--ribbon-h) + 32px) 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, #F3F5F7 0%, #E3E8ED 100%);
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.login-head {
    padding: 28px 30px 22px;
    border-bottom: 1px solid var(--line-2);
}

.login-mark {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
}

.login-mark .glyph {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    background: var(--ink);
    color: #fff;
    border-radius: 3px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.03em;
}

.login-mark .name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.login-mark .sub { font-size: 12.5px; color: var(--steel); }

.login-head h1 { font-size: 19px; margin-bottom: 4px; }
.login-head p { font-size: 13.5px; color: var(--steel); }

.login-body { padding: 24px 30px 28px; }

.field { margin-bottom: 15px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--ink);
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 9px 11px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: #FBFCFD;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--machine);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(15, 92, 140, 0.13);
}

.field textarea { resize: vertical; min-height: 74px; }

.login-alt {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line-2);
}

.login-alt p { font-size: 12.5px; color: var(--steel); margin-bottom: 10px; }

.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ===========================================================
   BOTONES
   =========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius);

    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    white-space: nowrap;

    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.btn-primary { background: var(--machine); color: #fff; }
.btn-primary:hover { background: var(--machine-hov); }

.btn-ghost {
    background: var(--panel);
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { background: #F5F7F9; border-color: #C3CBD3; }

.btn-quiet {
    background: transparent;
    color: var(--steel);
    border-color: transparent;
    padding: 6px 9px;
}
.btn-quiet:hover { background: #E4E9ED; color: var(--ink); }

.btn-danger { background: #fff; color: var(--st-late); border-color: #E3BCB8; }
.btn-danger:hover { background: #FBF0EF; }

.btn-block { width: 100%; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* ===========================================================
   ESTRUCTURA DE LA APP
   =========================================================== */
.app { display: none; }
.app.visible { display: block; }

.rail {
    position: fixed;
    top: var(--ribbon-h); left: 0; bottom: 0;
    width: var(--rail-w);
    z-index: 60;

    display: flex;
    flex-direction: column;
    background: var(--rail);
    color: #C3CBD4;
}

.rail-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.rail-head .glyph {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: #fff;
    color: var(--ink);
    border-radius: 3px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -0.03em;
}

.rail-head .name { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; }
.rail-head .sub { font-size: 11.5px; color: #78828E; }

.rail-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.rail-nav button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 11px;
    margin-bottom: 2px;

    background: none;
    border: none;
    border-radius: var(--radius);
    color: #AEB8C3;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.rail-nav button:hover { background: var(--rail-2); color: #fff; }

.rail-nav button.active {
    background: var(--machine);
    color: #fff;
    font-weight: 500;
}

.rail-nav button svg { flex-shrink: 0; opacity: 0.85; }
.rail-nav button .count {
    margin-left: auto;
    font-size: 11.5px;
    padding: 1px 6px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.12);
}
.rail-nav button.active .count { background: rgba(255, 255, 255, 0.22); }

.rail-foot {
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11.5px;
    color: #78828E;
}

.rail-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.avatar {
    width: 30px; height: 30px;
    flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--rail-2);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.rail-user .who { color: #E4E9ED; font-size: 13px; line-height: 1.25; }
.rail-user .role { font-size: 11.5px; color: #78828E; }

.rail-foot a { color: #79B9E4; text-decoration: none; }
.rail-foot a:hover { text-decoration: underline; }

/* --- Contenido --- */
.main {
    margin-left: var(--rail-w);
    padding-top: var(--ribbon-h);
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: var(--ribbon-h);
    z-index: 50;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 0 26px;
    height: 58px;

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.topbar h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { flex: 1; }

.rail-toggle { display: none; }

.view { padding: 26px; max-width: 1360px; }
.view[hidden] { display: none; }

/* ===========================================================
   RESUMEN DEL DÍA
   =========================================================== */
.today {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 26px;

    padding: 0 0 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.today h2 { font-size: 22px; }
.today .date { font-size: 13.5px; color: var(--steel); }

.today-figs {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    width: 100%;
    margin-top: 12px;
}

.fig { display: flex; align-items: baseline; gap: 7px; }
.fig b { font-size: 23px; font-weight: 600; line-height: 1; }
.fig span { font-size: 13px; color: var(--steel); }
.fig.warn b { color: var(--st-late); }
.fig.warn span { color: var(--st-late); }

/* ===========================================================
   TABLERO (kanban)
   =========================================================== */
.board {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 14px;
    align-items: start;
}

.col {
    background: #E4E9ED;
    border: 1px solid var(--line);
    border-radius: 6px;
    min-height: 140px;
    transition: background 0.15s, border-color 0.15s;
}

.col.drop-target {
    background: #DCE9F2;
    border-color: var(--machine);
}

.col-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 13px 10px;
    border-bottom: 1px solid var(--line);
}

.col-head .dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.col-head h3 { font-size: 13.5px; font-weight: 600; }
.col-head .n { margin-left: auto; font-size: 12.5px; color: var(--steel); }

.col-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; }

.board-key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: 16px;
    font-size: 12.5px;
    color: var(--steel);
}

.board-key span { display: inline-flex; align-items: center; gap: 5px; }
.board-key i { width: 3px; height: 13px; border-radius: 1px; display: inline-block; }

.col-empty {
    padding: 18px 12px;
    text-align: center;
    font-size: 12.5px;
    color: var(--faint);
    border: 1px dashed #C7CFD7;
    border-radius: var(--radius);
}

.ot {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--st-pend);
    border-radius: var(--radius);
    padding: 11px 12px;
    cursor: grab;
    box-shadow: 0 1px 1px rgba(21, 24, 29, 0.04);
}

.ot:hover { border-color: #BCC5CE; }
.ot:active { cursor: grabbing; }
.ot.dragging { opacity: 0.4; }

.ot.pri-alta  { border-left-color: var(--st-late); }
.ot.pri-media { border-left-color: var(--st-proc); }
.ot.pri-baja  { border-left-color: #A9B2BC; }

.ot-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.ot-id { font-size: 11.5px; color: var(--steel); }
.ot h4 { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin-bottom: 6px; }
.ot .cli { font-size: 12.5px; color: var(--steel); margin-bottom: 9px; }

.ot-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line-2);
    font-size: 11.5px;
    color: var(--steel);
}

.ot-foot .avatar { width: 22px; height: 22px; font-size: 10px; background: #E4E9ED; color: var(--steel); }
.ot-foot .due { margin-left: auto; }
.ot-foot .due.late { color: var(--st-late); font-weight: 600; }

/* ===========================================================
   ETIQUETAS DE ESTADO
   =========================================================== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.tag-pendiente  { color: var(--st-pend); background: #EDEFF2; }
.tag-en_proceso { color: var(--st-proc); background: #FBF0DF; }
.tag-terminada  { color: var(--st-term); background: #E3F1EA; }
.tag-entregada  { color: var(--st-entr); background: #E9ECEF; }
.tag-atrasada   { color: var(--st-late); background: #FAEAE8; }

.pri { font-size: 11.5px; color: var(--steel); }
.pri-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }

/* ===========================================================
   BARRA DE FILTROS
   =========================================================== */
.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
}

.filters input[type="search"], .filters select {
    padding: 7px 10px;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.filters input[type="search"] { min-width: 268px; }

.filters input:focus, .filters select:focus {
    outline: none;
    border-color: var(--machine);
    box-shadow: 0 0 0 3px rgba(15, 92, 140, 0.13);
}

.filters .spacer { flex: 1; }

.seg {
    display: inline-flex;
    background: #E0E5EA;
    border-radius: var(--radius);
    padding: 2px;
}

.seg button {
    padding: 5px 13px;
    border: none;
    background: none;
    border-radius: 3px;
    font-size: 13px;
    color: var(--steel);
    cursor: pointer;
}

.seg button.active { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* ===========================================================
   TABLAS
   =========================================================== */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--steel);
    background: #F6F8F9;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--line-2);
    font-size: 13.5px;
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: #F6F9FB; }

td .t-main { font-weight: 500; }
td .t-sub { font-size: 12.5px; color: var(--steel); }

.num { text-align: right; }
.actions-col { text-align: right; white-space: nowrap; }

.empty-state {
    padding: 46px 20px;
    text-align: center;
}

.empty-state h3 { font-size: 15px; margin-bottom: 5px; }
.empty-state p { font-size: 13.5px; color: var(--steel); margin-bottom: 14px; }

/* ===========================================================
   PANEL LATERAL DE DETALLE
   =========================================================== */
.drawer-veil {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(21, 24, 29, 0.42);
    display: none;
}

.drawer-veil.open { display: block; }

.drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 101;
    width: min(500px, 100%);

    background: var(--panel);
    box-shadow: -8px 0 32px rgba(21, 24, 29, 0.18);

    display: flex;
    flex-direction: column;

    transform: translateX(100%);
    transition: transform 0.22s ease;
}

.drawer.open { transform: translateX(0); }

@media (prefers-reduced-motion: reduce) {
    .drawer { transition: none; }
}

.drawer-head {
    padding: 18px 22px 15px;
    border-bottom: 1px solid var(--line);
}

.drawer-head .row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.drawer-head h2 { font-size: 17px; line-height: 1.3; }
.drawer-head .cli { font-size: 13.5px; color: var(--steel); margin-top: 3px; }

.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 26px; }

.drawer-foot {
    padding: 13px 22px;
    border-top: 1px solid var(--line);
    background: #F6F8F9;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.block { margin-bottom: 24px; }
.block:last-child { margin-bottom: 0; }

.block > h3 {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--steel);
    margin-bottom: 9px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-2);
}

.pairs { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font-size: 13.5px; }
.pairs dt { color: var(--steel); }
.pairs dd { margin: 0; }

.mat-list { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }

.mat-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line-2);
}

.mat-list li:last-child { border-bottom: none; }
.mat-list .qty { color: var(--steel); white-space: nowrap; }

.timeline { list-style: none; margin: 0; padding: 0; }

.timeline li {
    position: relative;
    padding: 0 0 16px 20px;
    border-left: 1px solid var(--line);
    font-size: 13.5px;
}

.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline li::before {
    content: '';
    position: absolute;
    left: -4.5px; top: 6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--line);
    border: 2px solid var(--panel);
}

.timeline li:first-child::before { background: var(--machine); }
.timeline .meta { font-size: 12px; color: var(--faint); margin-top: 2px; }

.note-add { display: flex; gap: 8px; margin-top: 12px; }
.note-add input {
    flex: 1;
    padding: 7px 10px;
    font: inherit;
    font-size: 13.5px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.note-add input:focus { outline: none; border-color: var(--machine); box-shadow: 0 0 0 3px rgba(15, 92, 140, 0.13); }

/* ===========================================================
   MODAL
   =========================================================== */
.modal-veil {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(21, 24, 29, 0.42);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 18px 30px;
    overflow-y: auto;
}

.modal-veil.open { display: flex; }

.modal {
    width: 100%;
    max-width: 520px;
    background: var(--panel);
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(21, 24, 29, 0.3);
}

.modal-head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
}

.modal-head h2 { font-size: 16px; }
.modal-body { padding: 20px 22px; }

.modal-foot {
    padding: 13px 22px;
    border-top: 1px solid var(--line);
    background: #F6F8F9;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* ===========================================================
   REPORTES
   =========================================================== */
.report-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 18px;
    align-items: start;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px 20px 20px;
}

.card > h3 { font-size: 14px; margin-bottom: 3px; }
.card > .hint { font-size: 12.5px; color: var(--steel); margin-bottom: 18px; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; }

.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }

.bar {
    width: 100%;
    max-width: 44px;
    background: var(--machine);
    border-radius: 2px 2px 0 0;
    min-height: 3px;
    position: relative;
}

.bar-col .v { font-size: 12px; font-weight: 600; }
.bar-col .k { font-size: 11.5px; color: var(--steel); }

.rank { list-style: none; margin: 0; padding: 0; }

.rank li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: 13.5px;
}

.rank li:last-child { border-bottom: none; }
.rank .name { flex: 1; }
.rank .val { font-weight: 600; }

/* ===========================================================
   AVISOS
   =========================================================== */
.toast-dock {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
}

.toast {
    background: var(--ink);
    color: #fff;
    font-size: 13.5px;
    padding: 10px 16px;
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(21, 24, 29, 0.28);
    animation: toastIn 0.18s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .toast { animation: none; }
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 1100px) {
    .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .rail {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }

    .rail.open { transform: translateX(0); }

    .main { margin-left: 0; }

    .rail-toggle { display: inline-flex; }

    .rail-veil {
        position: fixed;
        inset: var(--ribbon-h) 0 0 0;
        z-index: 55;
        background: rgba(21, 24, 29, 0.42);
        display: none;
    }

    .rail-veil.open { display: block; }

    .view { padding: 18px 16px 30px; }
    .topbar { padding: 0 16px; }

    .board { grid-template-columns: 1fr; }

    .filters input[type="search"] { min-width: 0; flex: 1 1 100%; }

    .grid-2 { grid-template-columns: 1fr; }

    /* Tablas: se convierten en fichas apiladas */
    .stack thead { display: none; }
    .stack tbody tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
    .stack tbody td { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; border: none; }
    .stack tbody td::before {
        content: attr(data-th);
        font-size: 12.5px;
        color: var(--steel);
        flex-shrink: 0;
    }
    .stack tbody td.actions-col { justify-content: flex-end; padding-top: 9px; }
    .stack tbody td.actions-col::before { content: none; }
    .stack .num { text-align: left; }
}

@media (max-width: 520px) {
    :root { --ribbon-h: 34px; }
    .only-wide { display: none; }
    .only-narrow { display: inline; }
    .demo-ribbon { font-size: 11px; gap: 9px; padding: 0 10px; }
    .topbar { height: 52px; gap: 10px; }
    .topbar h1 { font-size: 15px; }
    .today h2 { font-size: 19px; }
    .drawer { width: 100%; }
}
