/* ============================================================
   Carga Laboral — Sistema visual
   Moderno · datos vivos · rojo / morado / blanco / negro
   ============================================================ */

:root {
  /* Marca */
  --rojo:        #E11D2A;
  --rojo-700:    #B81522;
  --morado:      #7C3AED;
  --morado-700:  #5B21B6;
  --tinta:       #14121A;   /* casi negro, tono violáceo */
  --tinta-2:     #2A2733;

  /* Acento dominante (cambia con Tweaks) */
  --accent:      var(--rojo);
  --accent-2:    var(--morado);
  --accent-soft: #FCE7E9;

  /* Neutros */
  --bg:          #F4F2F7;
  --panel:       #FFFFFF;
  --line:        #E7E3EF;
  --line-2:      #EFECF5;
  --muted:       #6B6577;
  --muted-2:     #9A93A8;
  --weekend:     #F6F4FA;
  --holiday-bg:  #FFF1F2;

  /* Semánticos de evento */
  --ev-vac:  #0EA5E9;
  --ev-lic:  #F59E0B;
  --ev-cap:  #10B981;

  /* Estados KPI */
  --ok:   #16A34A;
  --warn: #F59E0B;
  --bad:  #E11D2A;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20,18,26,.05), 0 8px 24px -12px rgba(20,18,26,.18);
  --shadow-lg: 0 24px 60px -28px rgba(20,18,26,.45);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--tinta);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.tnum { font-variant-numeric: tabular-nums; }
button { font-family: inherit; cursor: pointer; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d9d4e4; border-radius: 20px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #c4bdd6; background-clip: content-box; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: 300px 1fr; height: 100vh; overflow: hidden; }

/* ---------- Sidebar ---------- */
.sidebar { background: var(--tinta); color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--rojo), var(--morado));
  display: grid; place-items: center; box-shadow: 0 6px 18px -6px rgba(124,58,237,.7);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-title { font-family: var(--font-head); font-weight: 700; font-size: 16px; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 2px; letter-spacing: .02em; }

.side-scroll { flex: 1; overflow-y: auto; padding: 8px 10px 20px; }
.side-section-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.4); padding: 14px 12px 8px; font-weight: 600; }

.allbtn {
  width: 100%; text-align: left; background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.09);
  padding: 11px 13px; border-radius: 10px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px;
  transition: background .15s;
}
.allbtn:hover { background: rgba(255,255,255,.12); }
.allbtn.active { background: linear-gradient(135deg, var(--rojo), var(--morado)); border-color: transparent; box-shadow: 0 8px 20px -8px rgba(124,58,237,.8); }

.team { margin-top: 6px; border-radius: 10px; }
.team-head {
  width: 100%; text-align: left; background: transparent; color: #fff; border: none; padding: 9px 12px; border-radius: 9px;
  display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; transition: background .12s;
}
.team-head:hover { background: rgba(255,255,255,.06); }
.team-head.active { background: rgba(255,255,255,.10); }
.team-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.team-head .chev { margin-left: auto; opacity: .5; transition: transform .18s; }
.team-head.open .chev { transform: rotate(90deg); }
.team-meta { margin-left: auto; font-size: 10.5px; color: rgba(255,255,255,.4); font-weight: 500; }

.res-list { overflow: hidden; padding-left: 8px; }
.res {
  width: 100%; text-align: left; background: transparent; color: rgba(255,255,255,.82); border: none;
  padding: 7px 10px 7px 12px; border-radius: 8px; display: flex; align-items: center; gap: 9px; font-size: 12.5px;
  transition: background .12s, color .12s; border-left: 2px solid rgba(255,255,255,.08); margin: 1px 0 1px 6px;
}
.res:hover { background: rgba(255,255,255,.06); color: #fff; }
.res.active { background: rgba(255,255,255,.10); color: #fff; border-left-color: var(--rojo); }
.avatar { width: 25px; height: 25px; border-radius: 7px; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; font-family: var(--font-head); }
.res-name { line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-role { font-size: 10px; color: rgba(255,255,255,.45); margin-left: auto; flex: none; }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 18px; padding: 16px 26px; background: var(--panel); border-bottom: 1px solid var(--line); }
.crumb { display: flex; flex-direction: column; min-width: 0; max-width: 300px; }
.crumb h1 { font-family: var(--font-head); font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb .sub { font-size: 12px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 11px; margin-left: 8px; }
.tab { border: none; background: transparent; padding: 8px 15px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 7px; transition: all .14s; }
.tab:hover { color: var(--tinta); }
.tab.active { background: var(--panel); color: var(--accent); box-shadow: var(--shadow); }
.tab svg { width: 15px; height: 15px; }

.spacer { flex: 1; }
.year-pill { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 13px; font-weight: 700; font-family: var(--font-head); font-size: 14px; }
.year-pill svg { width: 15px; height: 15px; color: var(--accent); }
.year-select { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px 5px; }
.year-select .navbtn { width: 26px; height: 26px; padding: 0; border: none; background: transparent; color: var(--muted); }
.year-select .navbtn:not(:disabled):hover { background: var(--panel); color: var(--accent); }
.year-select .navbtn:disabled { opacity: .25; cursor: not-allowed; }
.year-select .ys-val { display: inline-flex; align-items: center; gap: 6px; min-width: 62px; justify-content: center; font-weight: 700; font-family: var(--font-head); font-size: 14px; color: var(--tinta); font-variant-numeric: tabular-nums; }
.year-select .ys-val svg { color: var(--accent); }

.content { flex: 1; overflow-y: auto; padding: 24px 26px 60px; }

/* ---------- Botones ---------- */
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--tinta); border-radius: 10px; padding: 9px 14px; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; transition: all .14s; }
.btn:hover { border-color: var(--muted-2); }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-color: transparent; box-shadow: 0 10px 22px -10px rgba(124,58,237,.6); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-icon { padding: 9px; }

/* ---------- Calendario ---------- */
.cal-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.cal-month { font-family: var(--font-head); font-size: 18px; font-weight: 700; letter-spacing: -.01em; min-width: 180px; }
.cal-nav { display: flex; gap: 6px; }
.navbtn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); display: grid; place-items: center; color: var(--tinta); transition: all .14s; }
.navbtn:hover { background: var(--bg); border-color: var(--muted-2); }
.navbtn svg { width: 16px; height: 16px; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow { padding: 10px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
.dow.we { color: var(--muted-2); }
.cell { min-height: 116px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 6px 7px 8px; position: relative; display: flex; flex-direction: column; gap: 3px; }
.cell:nth-child(7n) { border-right: none; }
.cell.weekend { background: var(--weekend); }
.cell.holiday { background: var(--holiday-bg); }
.cell.outside { background: #FBFAFD; }
.cell.outside .daynum { color: var(--muted-2); opacity: .5; }
.daynum { font-family: var(--font-head); font-weight: 600; font-size: 13px; color: var(--tinta); display: flex; align-items: center; gap: 6px; }
.cell.today .daynum { color: #fff; background: var(--accent); width: 24px; height: 24px; border-radius: 7px; justify-content: center; }
.holiday-tag { font-size: 9.5px; color: var(--rojo-700); font-weight: 600; line-height: 1.15; margin-top: 1px; }
.load-pip { margin-left: auto; font-size: 9px; font-weight: 700; padding: 1px 6px; border-radius: 20px; }
.load-pip.over { background: var(--rojo); color: #fff; }

.ev-bar { font-size: 10.5px; font-weight: 600; color: #fff; padding: 3px 7px; border-radius: 6px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: transform .1s; display: flex; align-items: center; gap: 5px; }
.ev-bar:hover { transform: translateX(1px); filter: brightness(1.06); }
.ev-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.ev-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.ev-bar .ev-ic { width: 11px; height: 11px; flex: none; opacity: .9; }
.ev-soft { background: rgba(0,0,0,0); color: var(--tinta); border: 1px dashed; }

/* Multi-recurso: chips por equipo */
.cell-multi .ev-bar { font-size: 10px; padding: 2px 6px; }

/* Leyenda */
.legend { display: flex; flex-wrap: wrap; gap: 16px 22px; padding: 14px 18px; border-top: 1px solid var(--line); background: #FCFBFE; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.legend-sw { width: 13px; height: 13px; border-radius: 4px; flex: none; }
.legend-sw.weekend { background: var(--weekend); border: 1px solid var(--line); }
.legend-sw.holiday { background: var(--holiday-bg); border: 1px solid #FECDD3; }

/* Panel lateral del calendario (resumen recurso) */
.cal-layout { display: grid; grid-template-columns: 1fr 290px; gap: 20px; align-items: start; }
.side-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.side-card + .side-card { margin-top: 16px; }
.sc-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 14px; }
.occ-ring-wrap { display: flex; align-items: center; gap: 16px; }
.occ-num { font-family: var(--font-head); font-size: 30px; font-weight: 700; line-height: 1; }
.occ-cap { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mini-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.mini-row:last-child { border-bottom: none; }
.mini-row .k { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mini-row .v { font-weight: 700; font-family: var(--font-head); }
.dotk { width: 9px; height: 9px; border-radius: 3px; flex: none; }

.profile-card { display: flex; align-items: center; gap: 13px; }
.profile-card .avatar { width: 44px; height: 44px; border-radius: 12px; font-size: 16px; }
.pc-name { font-family: var(--font-head); font-weight: 700; font-size: 15px; }
.pc-role { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- Resumen anual (heatmap) ---------- */
.heat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.heat-scroll { overflow-x: auto; }
.heat-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 880px; }
.heat-table th, .heat-table td { padding: 0; }
.heat-table thead th { position: sticky; top: 0; background: var(--panel); z-index: 2; }
.heat-corner { position: sticky; left: 0; z-index: 3; background: var(--panel); text-align: left; padding: 14px 16px !important; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; min-width: 230px; border-bottom: 1px solid var(--line); }
.heat-mh { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 0 !important; text-align: center; border-bottom: 1px solid var(--line); }
.heat-team-row td { background: #FAF8FD; font-family: var(--font-head); font-weight: 700; font-size: 12px; padding: 9px 16px !important; color: var(--tinta); border-bottom: 1px solid var(--line); position: sticky; left: 0; }
.heat-rname { position: sticky; left: 0; z-index: 1; background: var(--panel); padding: 8px 16px !important; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.heat-cell { text-align: center; border-bottom: 1px solid var(--line-2); border-left: 1px solid var(--line-2); }
.heat-box { margin: 4px; height: 30px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--tinta); transition: transform .1s; cursor: default; }
.heat-box:hover { transform: scale(1.08); box-shadow: var(--shadow); }
.heat-legend { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.heat-scale { display: flex; height: 12px; border-radius: 20px; overflow: hidden; width: 200px; }
.heat-scale span { flex: 1; }

/* ---------- KPIs ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; position: relative; overflow: hidden; }
.kpi-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--accent-soft); opacity: .6; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; position: relative; z-index: 1; }
.kpi-val { font-family: var(--font-head); font-size: 36px; font-weight: 700; line-height: 1; margin: 12px 0 6px; position: relative; z-index: 1; letter-spacing: -.02em; }
.kpi-val .u { font-size: 16px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.kpi-meta { font-size: 11.5px; display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; display: inline-flex; align-items: center; gap: 5px; }
.chip.ok { background: #DCFCE7; color: #15803D; }
.chip.warn { background: #FEF3C7; color: #B45309; }
.chip.bad { background: #FFE4E6; color: #BE123C; }

.kpi-section-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; margin: 30px 0 14px; display: flex; align-items: center; gap: 9px; letter-spacing: -.01em; }
.kpi-section-title .bar { width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(var(--accent), var(--accent-2)); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.panel-card h3 { font-family: var(--font-head); font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.panel-card .pc-sub { font-size: 12px; color: var(--muted); margin-bottom: 16px; }

/* barras horizontales */
.bar-row { display: grid; grid-template-columns: 130px 1fr 48px; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-row .bl { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.bar-track { height: 10px; background: var(--bg); border-radius: 20px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bar-val { font-family: var(--font-head); font-weight: 700; font-size: 13px; text-align: right; }

/* tabla catálogo */
.catalog { width: 100%; border-collapse: collapse; }
.catalog th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 0 14px 12px; border-bottom: 1px solid var(--line); }
.catalog td { padding: 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; font-size: 13px; }
.catalog tr:last-child td { border-bottom: none; }
.catalog .kn { font-weight: 700; font-family: var(--font-head); color: var(--tinta); }
.catalog .kf { font-family: var(--font-body); color: var(--morado-700); font-weight: 600; }
.catalog .kdef { color: var(--muted); max-width: 360px; }
.catalog .kmeta { font-weight: 700; white-space: nowrap; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,18,26,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: var(--panel); border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; overflow: hidden; animation: pop .18s ease both; }
@keyframes pop { from { transform: scale(.96) translateY(8px); } to { transform: none; } }
.modal-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-family: var(--font-head); font-size: 17px; font-weight: 700; margin: 0; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 15px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px; color: var(--tinta); background: var(--panel); }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; background: var(--panel); transition: all .12s; }
.type-opt:hover { border-color: var(--muted-2); }
.type-opt.sel { border-color: var(--accent); background: var(--accent-soft); }
.type-opt .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: space-between; background: #FCFBFE; }
.warn-text { font-size: 12px; color: var(--rojo-700); display: flex; align-items: center; gap: 6px; }

/* ---------- CRUD: checkbox, sidebar acciones, solicitudes ---------- */
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--tinta); cursor: pointer; line-height: 1.4; }
.check-row input { margin-top: 1px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check-row b { color: var(--accent); font-weight: 700; }

.section-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px; }
.section-row .side-section-label { padding: 0; }
.side-add { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #fff; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; transition: background .14s; }
.side-add:hover { background: linear-gradient(135deg, var(--rojo), var(--morado)); border-color: transparent; }
.side-add svg { width: 14px; height: 14px; }

.row-wrap { position: relative; }
.side-actions { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: flex; gap: 3px; opacity: 0; transition: opacity .12s; z-index: 4; }
.row-wrap:hover .side-actions { opacity: 1; }
.icon-act { width: 23px; height: 23px; border-radius: 6px; border: none; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; transition: background .12s; }
.icon-act:hover { background: rgba(255,255,255,.30); }
.icon-act.danger:hover { background: var(--rojo); }
.icon-act svg { width: 13px; height: 13px; }
.row-wrap:hover .team-meta, .row-wrap:hover .res-role { opacity: 0; }

.add-res-btn { width: calc(100% - 20px); margin: 3px 0 8px 14px; text-align: left; background: transparent; color: rgba(255,255,255,.55); border: 1px dashed rgba(255,255,255,.18); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; transition: all .12s; }
.add-res-btn:hover { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.add-res-btn svg { width: 13px; height: 13px; }

.proj-head { display: grid; grid-template-columns: 110px 1fr 170px 34px; gap: 10px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 0 2px 2px; }
.proj-row { display: grid; grid-template-columns: 110px 1fr 170px 34px; gap: 10px; align-items: center; }
.proj-row input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; font-family: inherit; font-size: 13px; color: var(--tinta); width: 100%; }
.proj-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.proj-code { font-family: var(--font-head); font-weight: 700; }
.proj-marcas { font-size: 10.5px; color: var(--muted-2); font-weight: 600; margin-top: 3px; padding-left: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.swatch { width: 18px; height: 18px; border-radius: 5px; border: 2px solid transparent; cursor: pointer; padding: 0; transition: transform .1s; }
.swatch:hover { transform: scale(1.15); }
.swatch.sel { border-color: var(--tinta); box-shadow: 0 0 0 2px #fff inset; }
.del-sm { width: 34px; height: 34px; border-color: var(--line); }
.del-sm:hover { color: var(--rojo); border-color: #F3D0D4; }
.add-proj { width: 100%; justify-content: center; border-style: dashed; color: var(--muted); margin-top: 4px; }
.add-proj:hover { color: var(--accent); border-color: var(--accent); }

/* Menú de datos */
.btn-ghost { background: var(--panel); border: 1px solid var(--line); }
.data-menu-wrap { position: relative; }
.data-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; width: 258px; z-index: 90; animation: pop .14s ease both; }
.menu-cap { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 700; padding: 6px 11px 2px; }
.menu-item { width: 100%; text-align: left; background: transparent; border: none; padding: 10px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--tinta); display: flex; align-items: center; gap: 11px; transition: background .12s; }
.menu-item:hover { background: var(--bg); }
.menu-item svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.menu-item .mi-sub { font-size: 11px; color: var(--muted-2); font-weight: 500; margin-top: 1px; }
.menu-item.danger { color: var(--rojo-700); }
.menu-item.danger svg { color: var(--rojo); }
.menu-item.danger:hover { background: var(--holiday-bg); }
.menu-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* Toast de confirmación */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 300; background: var(--tinta); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 9px; box-shadow: var(--shadow-lg); animation: toastIn .22s cubic-bezier(.2,.8,.2,1) both; }
.toast svg { color: #4ADE80; }
@keyframes toastIn { from { transform: translateX(-50%) translateY(14px); } to { transform: translateX(-50%) translateY(0); } }

/* ---------- Tooltip ---------- */
.tip { position: fixed; z-index: 200; background: var(--tinta); color: #fff; font-size: 12px; padding: 8px 11px; border-radius: 9px; box-shadow: var(--shadow-lg); pointer-events: none; max-width: 240px; line-height: 1.35; }
.tip b { font-family: var(--font-head); }
.tip .tip-row { display: flex; gap: 8px; justify-content: space-between; margin-top: 3px; color: rgba(255,255,255,.7); }
.tip .tip-row b { color: #fff; }

/* empty */
.empty { text-align: center; color: var(--muted); padding: 50px 20px; }

/* Tweak: estilo plano (sin degradados) */
body.flat .brand-mark { background: var(--accent) !important; }
body.flat .allbtn.active { background: var(--accent) !important; }
body.flat .btn-primary { background: var(--accent) !important; }
body.flat .bar-fill { background: var(--accent) !important; }
body.flat .kpi-section-title .bar { background: var(--accent) !important; }
body.flat .occ-ring-wrap svg circle:nth-child(2) { stroke: var(--accent) !important; }

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .cal-layout { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
