/* ====== Mely Packaging — Sistema de diseño (estilo Apple + acento de marca) ====== */
:root {
    --orange:        #FD6B00;
    --orange-bright: #FF8C33;
    --orange-soft:   #FFF3EA;
    --stone:         #7F7770;
    --stone-light:   #E8E5E1;
    --ink:           #1D1D1F;
    --ink-2:         #6E6E73;
    --paper:         #F5F5F7;
    --card:          #FFFFFF;
    --hairline:      #E3E3E6;
    --success:       #34A853;
    --warning:       #F59E0B;
    --critical:      #E0352B;
    --shadow:        0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.04);
    --shadow-hover:  0 2px 6px rgba(0,0,0,.07), 0 14px 34px rgba(0,0,0,.06);
    --radius:        18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, "Raleway", sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: clip;   /* nunca scroll horizontal de la página (clip NO rompe position:sticky) */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---- Topbar (barra clara estilo Apple) ---- */
header.topbar {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; gap: 22px;
    padding: 0 28px; height: 60px;
    background: rgba(255,255,255,.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hairline);
}
.topbar .logo { height: 30px; width: auto; display: block; flex-shrink: 0; }
header.topbar nav { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
header.topbar nav::-webkit-scrollbar { display: none; }
header.topbar nav a {
    color: var(--ink-2); text-decoration: none; font-size: 13.5px; font-weight: 500;
    padding: 7px 11px; border-radius: 9px; white-space: nowrap; transition: background .15s, color .15s;
}
header.topbar nav a:hover { color: var(--ink); background: rgba(0,0,0,.04); }
header.topbar nav a.active { color: var(--ink); background: rgba(0,0,0,.06); font-weight: 600; }

/* ---- Menú desplegable "Más ▾" (dirección/planeación) ---- */
.nav-more { position: relative; display: flex; align-items: center; }
.nav-more-trigger {
    font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
    background: none; border: none; cursor: pointer; white-space: nowrap;
    padding: 7px 11px; border-radius: 9px; transition: background .15s, color .15s;
}
.nav-more-trigger:hover, .nav-more-trigger.active { color: var(--ink); background: rgba(0,0,0,.04); }
.nav-more-menu {
    display: none; position: absolute; top: calc(100% + 5px); left: 0;
    flex-direction: column; min-width: 200px; padding: 6px; z-index: 200;
    background: var(--card); border: 1px solid var(--hairline); border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.15);
}
.nav-more:hover .nav-more-menu,
.nav-more:focus-within .nav-more-menu,
.nav-more.open .nav-more-menu { display: flex; }
.nav-more-menu a { padding: 9px 12px; border-radius: 8px; }

/* ---- Insights clickeables (dashboard) ---- */
.ins-one:hover { background: rgba(0,0,0,.06) !important; }
.ins-row:hover { background: rgba(0,0,0,.04); }
.ins-one.no-link, .ins-row.no-link { cursor: default; }
.ins-one.no-link:hover { background: rgba(0,0,0,.03) !important; }
.ins-row.no-link:hover { background: transparent; }

/* ---- Resaltado al llegar por enlace (#metric-… / #rock-…) ---- */
.metric-row { scroll-margin-top: 84px; }
.rock-card  { scroll-margin-top: 84px; }
.issue-item { scroll-margin-top: 84px; }
@keyframes flashTarget { 0%, 55% { background: var(--orange-soft); } 100% { background: transparent; } }
tr.metric-row:target td { animation: flashTarget 2.6s ease; }
.rock-card:target { animation: flashTarget 2.6s ease; box-shadow: 0 0 0 2px var(--orange); }
.issue-item:target { animation: flashTarget 2.6s ease; box-shadow: 0 0 0 2px var(--orange); }

/* ---- Lápiz para editar/eliminar una métrica (siempre visible, sutil) ---- */
.metric-edit-btn {
    border: none; background: none; cursor: pointer; line-height: 1;
    font-size: 12px; padding: 1px 5px; margin-left: 5px; border-radius: 6px;
    opacity: .4; transition: opacity .15s, background .15s;
}
.metric-edit-btn:hover { opacity: 1; background: var(--stone-light); }
tr.metric-row:hover .metric-edit-btn { opacity: .75; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.team-select {
    background: #fff; color: var(--ink); border: 1px solid var(--hairline); border-radius: 980px;
    padding: 6px 14px; font-size: 13px; font-weight: 500; cursor: pointer;
    font-family: inherit; box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.team-select:focus { outline: none; border-color: var(--orange); }
.nav-admin { color: var(--ink-2); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 9px; transition: background .15s, color .15s; }
.nav-admin:hover { color: var(--ink); background: rgba(0,0,0,.04); }
.nav-admin.active { color: var(--ink); background: rgba(0,0,0,.06); }
.nav-user { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--hairline); }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #ff944d, var(--orange)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.nav-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.nav-logout { color: var(--ink-2); font-size: 12px; font-weight: 600; text-decoration: none; padding: 5px 11px; border: 1px solid var(--hairline); border-radius: 980px; transition: all .15s; white-space: nowrap; }
.nav-logout:hover { border-color: var(--orange); color: var(--orange); }

/* ---- Layout ---- */
main { max-width: 1080px; margin: 0 auto; padding: 38px 28px; }

h1 { font-size: 34px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.6px; line-height: 1.1; }
h2 { font-size: 19px; font-weight: 600; margin: 0 0 14px; letter-spacing: -.3px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.subtitle { color: var(--ink-2); margin: 0 0 24px; font-size: 15px; }

.card { background: var(--card); border: none; border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card-link { color: var(--orange); font-size: 13px; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 12px; }
.card-link:hover { text-decoration: underline; }

/* ---- Tabla ---- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); font-size: 14px; }
th { color: var(--ink-2); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }

/* ---- Forms ---- */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]), select, textarea {
    padding: 10px 14px; border: 1.5px solid var(--hairline); border-radius: 12px;
    font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(253,107,0,.12); }

.btn {
    background: var(--orange); color: #fff; border: none; border-radius: 980px;
    padding: 9px 18px; font-size: 13px; font-family: inherit;
    font-weight: 600; letter-spacing: .2px; cursor: pointer;
    transition: background .15s, transform .1s;
}
.btn:hover { background: var(--orange-bright); }
.btn:active { transform: scale(.98); }
.btn-sm { padding: 6px 13px; font-size: 12px; }
.btn-danger { background: transparent; color: var(--critical); border: 1px solid var(--hairline); font-weight: 600; }
.btn-danger:hover { background: #fef2f2; border-color: var(--critical); }
.btn-icon-del { background: none; border: none; color: var(--ink-2); font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.btn-icon-del:hover { background: #fef2f2; color: var(--critical); }

.row-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row-form label { display: flex; flex-direction: column; font-size: 11px; font-weight: 600; color: var(--ink-2); gap: 5px; letter-spacing: .2px; text-transform: uppercase; }

/* ---- Badges ---- */
.badge { padding: 4px 11px; border-radius: 980px; font-size: 12px; font-weight: 600; letter-spacing: .1px; }
.badge.on-track  { background: rgba(52,168,83,.12);  color: var(--success); }
.badge.off-track { background: rgba(224,53,43,.10);   color: var(--critical); }
.badge.done      { background: var(--orange-soft);    color: var(--orange); }
.badge.canceled  { background: rgba(0,0,0,.05);       color: var(--ink-2); }

/* ---- Progress bar ---- */
.progress { background: #ededf0; border-radius: 980px; height: 8px; overflow: hidden; width: 120px; }
.progress > span { display: block; height: 100%; background: var(--orange); border-radius: 980px; transition: width .4s; }

/* ---- Scorecard / utilidades ---- */
.cell-input { width: 68px; text-align: center; font-family: 'JetBrains Mono', monospace; }
/* Encabezado de grupo (categoría) en el Scorecard */
.group-row td {
    background: var(--paper);
    font-weight: 700; font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
    color: var(--ink-2);
    padding-top: 16px; padding-bottom: 8px;
    border-bottom: 2px solid var(--hairline);
}
/* Scorecard: la semana actual (W más reciente) se muestra primero, a la izquierda */
.sc-table th.week-now, .sc-table td.week-now { background: var(--orange-soft); }
.metric-name { font-weight: 600; }
.muted { color: var(--ink-2); font-size: 13px; }
.empty { color: var(--ink-2); padding: 28px; text-align: center; font-style: italic; margin: 0; }

/* ---- Claim hero ---- */
.claim {
    font-size: 16px; font-weight: 600; color: var(--orange);
    border-left: 4px solid var(--orange); padding: 10px 16px; background: var(--orange-soft);
    border-radius: 0 10px 10px 0; margin-bottom: 24px;
}

/* ---- Add form collapsible ---- */
.add-form-details { border-radius: var(--radius); }
.add-summary {
    font-size: 14px; font-weight: 700; letter-spacing: .2px;
    cursor: pointer; color: var(--orange); list-style: none; padding: 2px 0;
}
.add-summary::-webkit-details-marker { display: none; }

/* ---- Formulario ordenado (grid de 12 columnas, etiqueta arriba, botón abajo) ---- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px 20px;
    align-items: start;
    margin-top: 18px;
}
.form-grid label {
    display: flex; flex-direction: column;
    font-size: 11px; font-weight: 700; color: var(--ink-2);
    gap: 7px; letter-spacing: .4px; text-transform: uppercase;
    grid-column: span 4;            /* ancho por defecto si no se indica */
    min-width: 0;
}
/* anchos por campo (de 12 columnas) */
.form-grid .col-2  { grid-column: span 2; }
.form-grid .col-3  { grid-column: span 3; }
.form-grid .col-4  { grid-column: span 4; }
.form-grid .col-5  { grid-column: span 5; }
.form-grid .col-6  { grid-column: span 6; }
.form-grid .col-8  { grid-column: span 8; }
.form-grid .col-12 { grid-column: span 12; }
.form-grid input,
.form-grid select { width: 100%; box-sizing: border-box; }
.form-grid .form-actions {
    grid-column: 1 / -1;
    display: flex; justify-content: flex-end; align-items: center;
    gap: 12px;
    border-top: 1px solid var(--hairline);
    padding-top: 18px; margin-top: 2px;
}
.form-grid .form-actions .btn { min-width: 150px; justify-content: center; }
/* en pantallas angostas, cada campo ocupa todo el ancho */
@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .form-grid label,
    .form-grid [class*="col-"] { grid-column: 1 / -1; }
}

/* ================================================================
   INICIO (Dashboard) — estilo nuevo
   ================================================================ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); font-size: 15px; margin: 6px 0 0; }
.quarter-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--orange-soft); color: var(--orange); font-size: 13px; font-weight: 600; padding: 8px 15px; border-radius: 980px; white-space: nowrap; }
.quarter-chip .live { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(253,107,0,.18); }
.quarter-chip.muted-chip { background: rgba(0,0,0,.05); color: var(--ink-2); }
.quarter-chip.muted-chip .live { background: var(--ink-2); box-shadow: 0 0 0 3px rgba(0,0,0,.07); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.kpi .label { font-size: 13px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 9px; }
.kpi .num { font-size: 42px; font-weight: 700; letter-spacing: -1.2px; margin-top: 12px; line-height: 1; }
.kpi .foot { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.ico { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ico svg { width: 16px; height: 16px; }
.ico.g { background: rgba(52,168,83,.12);  color: var(--success); }
.ico.a { background: rgba(245,158,11,.16);  color: var(--warning); }
.ico.r { background: rgba(224,53,43,.12);   color: var(--critical); }
.ico.o { background: var(--orange-soft);    color: var(--orange); }
.pos { color: var(--success); } .neg { color: var(--critical); } .warn { color: var(--warning); }

.dash-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
.kpi-grid > *, .dash-cols > * { min-width: 0; }   /* permiten encoger; sin desborde horizontal */
@media (max-width: 820px){ .dash-cols, .kpi-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .dash-cols, .kpi-grid { grid-template-columns: 1fr; } }

.drow { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.drow:first-of-type { border-top: none; }
.drow .info { flex: 1; min-width: 0; }
.drow .title { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drow .owner { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.dbar { width: 90px; height: 6px; border-radius: 980px; background: #ededf0; overflow: hidden; flex-shrink: 0; }
.dbar > span { display: block; height: 100%; border-radius: 980px; }
.dpct { width: 40px; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.dtag { font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 980px; flex-shrink: 0; min-width: 78px; text-align: center; }
.dtag.on-track  { background: rgba(52,168,83,.12); color: var(--success); }
.dtag.off-track { background: rgba(224,53,43,.10); color: var(--critical); }
.dtag.done      { background: rgba(0,0,0,.05);     color: var(--ink-2); }
.dtag.canceled  { background: rgba(0,0,0,.05);     color: var(--ink-2); }

.dstack { display: flex; flex-direction: column; gap: 18px; }
.dmini { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hairline); font-size: 14px; }
.dmini:first-of-type { border-top: none; }
.dmini .t { flex: 1; }
.dmini .t.done { color: var(--ink-2); text-decoration: line-through; }
.ddue { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ddue.over { color: var(--critical); font-weight: 600; }

.donut { width: 96px; height: 96px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.donut .hole { width: 70px; height: 70px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut .hole b { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.donut .hole small { font-size: 10px; color: var(--ink-2); }
.legend { font-size: 14px; }
.legend div { display: flex; align-items: center; gap: 8px; margin: 5px 0; color: var(--ink-2); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

/* ================================================================
   ROCKS — card layout
   ================================================================ */
.rock-card { background: var(--card); border: none; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.rock-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.rock-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.rock-title { font-weight: 600; font-size: 15px; line-height: 1.4; }
.rock-meta  { color: var(--ink-2); font-size: 13px; margin-top: 3px; }
.rock-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: 12px; }
.rock-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); margin-bottom: 12px; }

.auto-chip { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; background: #e8f0fe; color: #3949ab; padding: 2px 7px; border-radius: 20px; }
.manual-chip { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; background: var(--orange-soft); color: var(--orange); padding: 2px 7px; border-radius: 20px; }

.ms-pill { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; background: #ededf0; color: var(--ink-2); padding: 2px 8px; border-radius: 20px; }
.ms-pill.ms-complete { background: rgba(52,168,83,.12); color: var(--success); }

.milestones-section { margin-top: 2px; }
.ms-summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; padding: 4px 0; user-select: none; }
.ms-summary::-webkit-details-marker { display: none; }
.ms-summary::before { content: '▶'; font-size: 9px; transition: transform .2s; }
details[open] .ms-summary::before { transform: rotate(90deg); }
.ms-list { padding: 8px 0 4px 20px; display: flex; flex-direction: column; gap: 4px; }
.ms-item { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--hairline); font-size: 14px; }
.ms-item:last-of-type { border-bottom: none; }
.ms-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--hairline); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; transition: background .15s, border-color .15s; }
.ms-check:hover { border-color: var(--orange); }
.ms-check-done { background: var(--success); border-color: var(--success); }
.ms-text-done { text-decoration: line-through; color: var(--ink-2); }
.ms-add-form { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.ms-input { flex: 1; font-size: 13px; padding: 6px 10px; border: 1px dashed var(--hairline); border-radius: 9px; background: #fff; color: var(--ink); }
.ms-input:focus { outline: none; border-color: var(--orange); border-style: solid; }

/* ================================================================
   TO-DOS
   ================================================================ */
.tab-row { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--hairline); }
.tab-link { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 9px 9px 0 0; transition: color .15s, background .15s; }
.tab-link:hover { color: var(--ink); background: rgba(0,0,0,.03); }
.tab-active { color: var(--orange) !important; border-bottom: 2px solid var(--orange); margin-bottom: -1px; }

.todo-list { display: flex; flex-direction: column; }
.todo-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--hairline); transition: background .1s; }
.todo-item:last-child { border-bottom: none; }
.todo-done { opacity: .55; }
.todo-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hairline); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; transition: all .15s; }
.todo-check:hover { border-color: var(--orange); }
.todo-check-done { background: var(--success); border-color: var(--success); }
.todo-title { flex: 1; font-size: 14px; font-weight: 500; }
.todo-done .todo-title { text-decoration: line-through; font-weight: 400; }

.owner-chip { font-size: 11px; font-weight: 600; background: #ededf0; color: var(--ink-2); padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.due-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; font-family: 'JetBrains Mono', monospace; white-space: nowrap; flex-shrink: 0; }

/* ================================================================
   MI SEMANA — stat cards
   ================================================================ */
.stat-card { background: var(--card); border: none; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.stat-num   { font-family: 'JetBrains Mono', monospace; font-size: 34px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.stat-sub   { color: var(--ink-2); font-size: 12px; }

/* ================================================================
   ISSUES
   ================================================================ */
.issue-item { display: flex; align-items: center; gap: 16px; padding: 14px 22px; border-bottom: 1px solid var(--hairline); transition: background .1s; }
.issue-item:last-child { border-bottom: none; }
.issue-item:hover { background: #fafafa; }
.issue-high { border-left: 3px solid var(--orange); }
.issue-type-chip { font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 7px; border-radius: 20px; }
.issue-type-short { background: #e8f0fe; color: #3949ab; }
.issue-type-long  { background: #f3e8ff; color: #7b3fb5; }
.issue-priority-chip { font-size: 10px; font-weight: 700; letter-spacing: .3px; background: var(--orange-soft); color: var(--orange); padding: 2px 7px; border-radius: 20px; }

.ids-track { display: flex; align-items: center; gap: 0; }
.ids-step { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--hairline); min-width: 56px; }
.ids-step-done { color: var(--ink-2); }
.ids-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hairline); transition: background .2s; }
.ids-step-done .ids-dot { background: var(--orange); }
.ids-line { width: 24px; height: 2px; background: var(--hairline); margin-bottom: 14px; transition: background .2s; }
.ids-line-done { background: var(--orange); }

.due-overdue  { background: rgba(224,53,43,.10); color: var(--critical); }
.due-today    { background: var(--orange-soft);  color: var(--orange); }
.due-upcoming { background: #ededf0;             color: var(--ink-2); }
.due-done     { background: rgba(52,168,83,.12); color: var(--success); }

/* ---- Mensajes flash ---- */
.flash { padding: 11px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.flash-error   { background: rgba(224,53,43,.10); color: var(--critical); }
.flash-success { background: rgba(52,168,83,.12); color: var(--success); }

/* ---- Reportes ---- */
.report-row { display: flex; gap: 16px; padding: 16px 0; border-top: 1px solid var(--hairline); }
.report-row:first-of-type { border-top: none; }
.report-status { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 980px; white-space: nowrap; height: fit-content; }
.report-status.open     { background: rgba(224,53,43,.10); color: var(--critical); }
.report-status.reviewed { background: var(--orange-soft);  color: var(--orange); }
.report-status.fixed    { background: rgba(52,168,83,.12); color: var(--success); }

/* ---- Footer ---- */
footer.app-footer { text-align: center; padding: 28px 16px; color: var(--ink-2); font-size: 12px; letter-spacing: .2px; }

/* ---- Botones de calificación de la reunión L10 (1-10) ---- */
.rate-btn {
    width: 44px; height: 44px; border-radius: 12px;
    border: 1.5px solid var(--hairline); background: var(--card);
    font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer;
    font-family: inherit; transition: all .12s;
}
.rate-btn:hover { border-color: var(--orange); color: var(--orange); }
.rate-btn-on { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ---- Menú hamburguesa (móvil) ---- */
.nav-toggle {
    display: none;
    background: none; border: none; color: var(--ink);
    font-size: 22px; cursor: pointer; padding: 4px 8px; line-height: 1;
}
.nav-mobile-only { display: none; }   /* en desktop estos enlaces viven en topbar-right */

/* ================================================================
   RESPONSIVE — Nav colapsa a hamburguesa cuando hay poco espacio
   (<=1000px). Con el menú "Más ▾", el nav principal es ligero, así
   que solo colapsa en pantallas realmente angostas. Dentro del cajón
   el menú "Más" se aplana y muestra todos los enlaces.
   ================================================================ */
@media (max-width: 1000px) {
    .nav-toggle { display: block; }
    header.topbar nav {
        position: fixed; top: 60px; left: 0; right: 0;
        flex-direction: column; gap: 2px;
        background: var(--card); border-bottom: 1px solid var(--hairline);
        box-shadow: 0 10px 24px rgba(0,0,0,.12);
        padding: 10px 14px; max-height: calc(100vh - 60px); overflow-y: auto;
        display: none; z-index: 150;
    }
    body.nav-open header.topbar nav { display: flex; }
    header.topbar nav a { padding: 12px 10px; font-size: 15px; border-radius: 10px; }
    .nav-mobile-only { display: block; }
    .topbar-right > .nav-admin { display: none; }
    /* Aplanar "Más ▾": dentro del cajón se ven todos los enlaces */
    .nav-more { display: contents; }
    .nav-more-trigger { display: none; }
    .nav-more-menu {
        display: flex; position: static; min-width: 0; padding: 0;
        background: none; border: none; box-shadow: none;
    }
    .nav-more-menu a { padding: 12px 10px; font-size: 15px; border-radius: 10px; }
}

/* ================================================================
   RESPONSIVE — Teléfonos (<=768px)
   ================================================================ */
@media (max-width: 768px) {
    header.topbar { padding: 0 14px; gap: 10px; height: 56px; }
    .nav-toggle { display: block; }

    header.topbar nav {
        position: fixed; top: 56px; left: 0; right: 0;
        flex-direction: column; gap: 2px;
        background: var(--card); border-bottom: 1px solid var(--hairline);
        box-shadow: 0 10px 24px rgba(0,0,0,.12);
        padding: 10px 14px; max-height: calc(100vh - 56px); overflow-y: auto;
        display: none; z-index: 150;
    }
    body.nav-open header.topbar nav { display: flex; }
    header.topbar nav a { padding: 12px 10px; font-size: 15px; border-radius: 10px; }
    .nav-mobile-only { display: block; }

    .topbar-right { gap: 8px; }
    .topbar-right > .nav-admin { display: none; }
    .nav-name { display: none; }
    .nav-user { padding-left: 8px; gap: 8px; }
    .team-select { max-width: 150px; }

    main { padding: 22px 14px; }
    .card { padding: 16px; }
    h1 { font-size: 26px; }
    h2 { font-size: 18px; }

    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"],
    .kpi-grid, .dash-cols { grid-template-columns: 1fr !important; }

    .form-grid { grid-template-columns: 1fr; }
    .form-grid [class*="col-"] { grid-column: 1 / -1; }
    .row-form { flex-direction: column; align-items: stretch; }
    .row-form label, .row-form input, .row-form select { width: 100% !important; }
    input:not([type=checkbox]):not([type=radio]), select, textarea { max-width: 100%; }

    .btn, .btn-sm, select, input:not([type=checkbox]):not([type=radio]) { min-height: 42px; }
    .btn-icon-del { padding: 8px 12px; }
    .todo-check, .ms-check { width: 30px; height: 30px; }

    #fb-seg-list { display: none !important; }
    #meeting-bar-float { padding: 8px 12px !important; gap: 10px !important; }
    #report-fab { bottom: 74px; }
}
