/* =====================================================================
   DABI · Plataforma de Gestión de Proyectos
   Tema moderno y minimalista · v1.2
   Colores institucionales: rojo #DE1F1C · rojo oscuro #8B181A · carbón #393A35
   ===================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Marca */
  --dabi-red: #DE1F1C;
  --dabi-red-600: #C81B18;
  --dabi-red-dark: #8B181A;
  --dabi-tint: #FCE9E8;
  --dabi-tint-2: #FDF3F2;
  --dabi-char: #393A35;
  --dabi-char-2: #262724;
  --dabi-gray: #F3F3F2;
  --dabi-gray-mid: #D9D9D6;
  --dabi-gray-txt: #6E6F68;
  --dabi-bg: #F6F5F2;
  /* Superficies */
  --surface: #FFFFFF;
  --surface-2: #FAF9F7;
  --line: #ECEAE5;
  --line-2: #E1DFD9;
  --muted: #6E6F68;
  --muted-2: #9A9B93;
  --ok: #1E6B2E;   --ok-bg: #E8F5EC;
  --warn: #8A5A00; --warn-bg: #FFF5DB;
  --bad: #B3201C;  --bad-bg: #FDECEB;
  --info: #1F4E79; --info-bg: #EAF2FA;
  /* Forma */
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 9px;
  --shadow-xs: 0 1px 2px rgba(27, 28, 24, .04);
  --shadow-sm: 0 1px 2px rgba(27, 28, 24, .04), 0 4px 14px rgba(27, 28, 24, .045);
  --shadow-md: 0 2px 6px rgba(27, 28, 24, .05), 0 12px 32px rgba(27, 28, 24, .09);
  --ring: 0 0 0 4px rgba(222, 31, 28, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Bootstrap */
  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --bs-body-color: #2C2D29;
  --bs-body-bg: var(--dabi-bg);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--r-sm);
  --bs-border-radius-sm: 8px;
  --bs-border-radius-lg: var(--r);
  --bs-link-color: #8B181A;
  --bs-link-color-rgb: 139, 24, 26;
  --bs-link-hover-color: #DE1F1C;
  --bs-link-hover-color-rgb: 222, 31, 28;
  --bs-secondary-color: var(--muted);
  --bs-emphasis-color: #1F201C;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; }
body { background: var(--dabi-bg); font-size: .915rem; line-height: 1.5; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "cv11", "ss01"; }
a { text-decoration: none; transition: color .15s var(--ease); }
b, strong, .fw-bold { font-weight: 650; }
::selection { background: var(--dabi-tint); color: var(--dabi-red-dark); }
.text-muted { color: var(--muted) !important; }
:focus-visible { outline: 2px solid rgba(222, 31, 28, .45); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible { outline: 0; }
* { scrollbar-width: thin; scrollbar-color: #D3D1CA transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #D3D1CA; border-radius: 10px; border: 3px solid var(--dabi-bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- estructura ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 252px; flex: 0 0 252px; background: linear-gradient(180deg, #2C2D29 0%, #232421 100%); color: #D9D9D4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 1030; box-shadow: 1px 0 0 rgba(255, 255, 255, .03); }
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 24px 22px 20px; }
.sidebar .brand img { height: 28px; }
.sidebar .brand span { color: #F7F6F3; font-weight: 600; letter-spacing: .2px; font-size: .92rem; border-left: 1px solid rgba(255, 255, 255, .16); padding-left: 12px; }
.sidebar .nav { padding: 6px 12px 14px; gap: 2px; flex: 1; overflow-y: auto; scrollbar-color: rgba(255, 255, 255, .15) transparent; }
.sidebar .nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-color: #262724; }
.sidebar .nav-link { color: #C9C9C2; border-radius: 10px; padding: 9px 12px; display: flex; gap: 11px; align-items: center; font-size: .9rem; font-weight: 500; transition: background .15s var(--ease), color .15s var(--ease); }
.sidebar .nav-link i { font-size: 1.05rem; opacity: .8; transition: opacity .15s; }
.sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar .nav-link:hover i { opacity: 1; }
.sidebar .nav-link.active { background: var(--dabi-red); color: #fff; box-shadow: 0 8px 20px -10px rgba(222, 31, 28, .9); }
.sidebar .nav-link.active i { opacity: 1; }
.sidebar .nav-section { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: #85867E; padding: 18px 12px 6px; }
.sidebar-foot { padding: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; color: #E9E9E4; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .04); transition: background .15s; }
.user-chip:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.user-chip.dropdown-toggle::after { margin-left: auto; opacity: .6; }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #E8403D, var(--dabi-red-dark)); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 34px; font-size: .9rem; }
.user-chip .who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-chip .who b { font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.user-chip .who small { color: #A7A8A0; font-size: .73rem; }
.sidebar-foot .ver { font-size: .68rem; color: #74756E; margin: 8px 4px 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 16px 32px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(27, 28, 24, .06); position: sticky; top: 0; z-index: 1020; }
.page-title { font-size: 1.28rem; font-weight: 700; color: #1F201C; letter-spacing: -.02em; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs { font-size: .76rem; color: var(--muted-2); margin-bottom: 3px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--dabi-red); }
.crumbs i { font-size: .6rem; margin: 0 4px; opacity: .7; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.content { padding: 28px 32px 56px; animation: aparecer .28s var(--ease) both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: -270px; transition: left .25s var(--ease); }
  .sidebar.open { left: 0; box-shadow: 20px 0 60px rgba(0, 0, 0, .35); }
  .content { padding: 18px 16px 40px; }
  .topbar { padding: 12px 16px; }
  .page-title { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- botones ---------- */
.btn { --bs-btn-font-weight: 500; --bs-btn-padding-x: .95rem; --bs-btn-padding-y: .5rem; --bs-btn-border-radius: 10px; letter-spacing: -.005em; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.btn-sm { --bs-btn-padding-x: .7rem; --bs-btn-padding-y: .32rem; --bs-btn-font-size: .82rem; --bs-btn-border-radius: 8px; }
.btn-lg { --bs-btn-padding-y: .72rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 12px; }
.btn:active { transform: translateY(1px); }
.btn i { vertical-align: -.08em; }
.btn-dabi { --bs-btn-color: #fff; --bs-btn-bg: var(--dabi-red); --bs-btn-border-color: var(--dabi-red); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--dabi-red-600); --bs-btn-hover-border-color: var(--dabi-red-600);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #B31815; --bs-btn-active-border-color: #B31815; --bs-btn-disabled-bg: #E8807E; --bs-btn-disabled-border-color: #E8807E; --bs-btn-disabled-color: #fff;
  box-shadow: 0 1px 2px rgba(222, 31, 28, .25), 0 6px 16px -8px rgba(222, 31, 28, .65); }
.btn-dabi:hover { box-shadow: 0 2px 4px rgba(222, 31, 28, .25), 0 10px 22px -10px rgba(222, 31, 28, .75); }
.btn-dabi:focus-visible { box-shadow: var(--ring); }
.btn-char { --bs-btn-color: #fff; --bs-btn-bg: var(--dabi-char); --bs-btn-border-color: var(--dabi-char); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #2A2B27; --bs-btn-hover-border-color: #2A2B27;
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #1F201C; --bs-btn-active-border-color: #1F201C; box-shadow: 0 6px 16px -10px rgba(27, 28, 24, .8); }
.btn-outline-dabi { --bs-btn-color: var(--dabi-red-dark); --bs-btn-bg: #fff; --bs-btn-border-color: #F0C3C1; --bs-btn-hover-color: var(--dabi-red-dark); --bs-btn-hover-bg: var(--dabi-tint); --bs-btn-hover-border-color: #EAA9A7;
  --bs-btn-active-color: var(--dabi-red-dark); --bs-btn-active-bg: #F9DCDA; --bs-btn-active-border-color: #EAA9A7; }
.btn-outline-secondary, .btn-light { --bs-btn-color: #393A35; --bs-btn-bg: #fff; --bs-btn-border-color: var(--line-2); --bs-btn-hover-color: #1F201C; --bs-btn-hover-bg: #F5F4F0; --bs-btn-hover-border-color: #D4D2CB;
  --bs-btn-active-color: #1F201C; --bs-btn-active-bg: #EEECE7; --bs-btn-active-border-color: #D4D2CB; box-shadow: var(--shadow-xs); }
.btn-light.border { border-color: var(--line-2) !important; }
.btn-outline-danger { --bs-btn-color: var(--bad); --bs-btn-bg: #fff; --bs-btn-border-color: #F2C9C7; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--dabi-red); --bs-btn-hover-border-color: var(--dabi-red);
  --bs-btn-active-bg: var(--dabi-red-600); --bs-btn-active-border-color: var(--dabi-red-600); }
.btn-danger { --bs-btn-bg: var(--dabi-red); --bs-btn-border-color: var(--dabi-red); --bs-btn-hover-bg: var(--dabi-red-600); --bs-btn-hover-border-color: var(--dabi-red-600); }
.btn-link { --bs-btn-color: var(--dabi-red-dark); --bs-btn-hover-color: var(--dabi-red); text-decoration: none; box-shadow: none; }
.btn-close:focus { box-shadow: var(--ring); }

/* ---------- tarjetas ---------- */
.card { --bs-card-border-color: var(--line); --bs-card-border-radius: var(--r-lg); --bs-card-inner-border-radius: calc(var(--r-lg) - 1px); --bs-card-cap-bg: transparent; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); background: var(--surface); }
.card-header { background: transparent; border-bottom: 1px solid #F1EFEA; font-weight: 600; font-size: .92rem; color: #1F201C; padding: 14px 20px; letter-spacing: -.01em; }
.card-header:first-child { border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; }
.card-body { padding: 18px 20px; }
.card-footer { background: transparent !important; border-top: 1px solid #F1EFEA; padding: 12px 20px; }
.card > .table-responsive:last-child, .card > .table-responsive:last-child .table { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.section-title { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dabi-red-dark); font-weight: 700; margin: 0 0 10px; }
.text-dabi { color: var(--dabi-red) !important; }
.bg-dabi { background-color: var(--dabi-red) !important; }
.bg-tint { background-color: var(--dabi-tint-2) !important; }

/* ---------- indicadores ---------- */
.kpi { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; height: 100%; box-shadow: var(--shadow-sm); transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.kpi .lbl { font-size: .68rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; }
.kpi .val { font-size: 1.7rem; font-weight: 700; color: #1F201C; line-height: 1.15; margin-top: 6px; letter-spacing: -.025em; word-break: break-word; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: .76rem; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.kpi.accent { border-color: #F3D2D0; background: linear-gradient(135deg, #FFFFFF 45%, var(--dabi-tint-2) 100%); }
.kpi.accent::before { content: ""; position: absolute; left: 20px; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--dabi-red); }
a.kpi:hover, a.kpi:focus { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #EBC2C0; }

/* ---------- tablas ---------- */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: #FAF9F6; --bs-table-border-color: #F0EEE9; --bs-table-active-bg: #F4F3EF; margin-bottom: 0; font-variant-numeric: tabular-nums; }
.table > :not(caption) > * > * { padding: .7rem .75rem; border-bottom-color: #F0EEE9; }
.table-sm > :not(caption) > * > * { padding: .5rem .7rem; }
.table thead th, .table.table-light-head thead th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); border-top: 0; vertical-align: middle; }
.table td { vertical-align: middle; }
.table .calc { background: #FAF9F6; color: #4A4B45; }
.table-hover > tbody > tr { transition: background-color .12s; }
.table-active > td, tr.table-active { --bs-table-bg-state: #F4F3EF; font-weight: 600; }
.table td > a.fw-semibold:first-child, .table td > a.doc-code { white-space: nowrap; }
.cell-clip { max-width: 360px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-responsive { border-radius: inherit; }

/* ---------- insignias ---------- */
.badge { font-weight: 600; letter-spacing: .01em; padding: .38em .66em; border-radius: 999px; font-size: .72em; line-height: 1.1; }
.badge.bg-success, .badge.text-bg-success { background-color: var(--ok-bg) !important; color: var(--ok) !important; }
.badge.bg-warning, .badge.text-bg-warning { background-color: var(--warn-bg) !important; color: var(--warn) !important; }
.badge.bg-danger, .badge.text-bg-danger { background-color: var(--bad-bg) !important; color: var(--bad) !important; }
.badge.bg-info, .badge.text-bg-info { background-color: var(--info-bg) !important; color: var(--info) !important; }
.badge.bg-primary, .badge.text-bg-primary { background-color: #EAEFFA !important; color: #2A4C8F !important; }
.badge.bg-secondary, .badge.text-bg-secondary { background-color: #EEEDE9 !important; color: #55564F !important; }
.badge.bg-light, .badge.text-bg-light { background-color: #F4F3EF !important; color: var(--muted) !important; box-shadow: inset 0 0 0 1px var(--line); }
.badge.bg-dark, .badge.text-bg-dark { background-color: var(--dabi-char) !important; color: #fff !important; }
.badge.bg-dabi { background-color: var(--dabi-red) !important; color: #fff !important; }
.kpi .val .badge { font-size: .55em; padding: .45em .8em; vertical-align: middle; }
.badge-aplica { min-width: 30px; border-radius: 7px; padding: .38em .5em; }
.ap-O { background: var(--dabi-char) !important; color: #fff !important; }
.ap-R { background: #A3A49C !important; color: #fff !important; }
.ap-S { background: #F7C9C3 !important; color: #6E1714 !important; }
.ap-NA, .ap-— { background: #ECEAE5 !important; color: var(--muted) !important; }
.ap-Opc { background: #DCDAD3 !important; color: #393A35 !important; }

/* ---------- formularios ---------- */
.form-label { font-weight: 600; font-size: .8rem; color: #45463F; margin-bottom: .35rem; }
.form-control, .form-select { border-color: var(--line-2); border-radius: 10px; padding: .55rem .8rem; background-color: #fff; color: #2C2D29; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s; }
.form-control::placeholder { color: #A9AAA2; }
.form-control:hover, .form-select:hover { border-color: #D1CFC8; }
.form-control:focus, .form-select:focus { border-color: #E8908E; box-shadow: var(--ring); }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { background-color: #F7F6F3; color: #55564F; }
.form-control-sm, .form-select-sm { border-radius: 8px; padding: .34rem .6rem; font-size: .84rem; }
.form-control-lg { border-radius: 12px; padding: .72rem 1rem; font-size: 1rem; }
.form-select { padding-right: 2.2rem; }
.form-control-plaintext { color: #2C2D29; }
.input-group-text { background: #F7F6F3; border-color: var(--line-2); color: var(--muted); border-radius: 10px; }
.form-check-input { border-color: #C9C7C0; }
.form-check-input:checked { background-color: var(--dabi-red); border-color: var(--dabi-red); }
.form-check-input:focus { border-color: #E8908E; box-shadow: var(--ring); }
.form-switch .form-check-input:focus { --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23E8908E'/%3e%3c/svg%3e"); }
.help { font-size: .76rem; color: var(--muted); line-height: 1.4; }
.calc-val { min-height: 40px; background: #FAF9F6; border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 12px; }

/* ---------- pestañas ---------- */
.nav-tabs { border-bottom: 1px solid var(--line); gap: 4px; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 600; font-size: .88rem; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: .7rem .85rem; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.nav-tabs .nav-link:hover { color: #1F201C; border-bottom-color: var(--line-2); }
.nav-tabs .nav-link.active { color: #1F201C; border-bottom-color: var(--dabi-red); background: transparent; }
.nav-tabs .nav-link.active i { color: var(--dabi-red); }
.sheet-tabs .badge { font-size: .68rem; }

/* ---------- avisos, listas, modales, menús ---------- */
.alert { border: 1px solid transparent; border-radius: var(--r); font-size: .88rem; }
.alert-success { background: #EEF7F1; border-color: #D9EEDF; color: var(--ok); }
.alert-warning { background: #FFF8E8; border-color: #F9E9BF; color: #7A5000; }
.alert-danger { background: #FDEFEE; border-color: #F7D3D1; color: var(--bad); }
.alert-info { background: #EFF5FB; border-color: #DCE8F4; color: var(--info); }
.alert-secondary { background: #F4F3EF; border-color: var(--line); color: #4A4B45; }
.list-group { --bs-list-group-border-color: #F0EEE9; --bs-list-group-action-hover-bg: #FAF9F6; --bs-list-group-active-bg: var(--dabi-tint); --bs-list-group-active-color: var(--dabi-red-dark); --bs-list-group-active-border-color: #F2C4C2; }
.list-group-item { padding: .8rem 1.2rem; }
.list-group-flush > .list-group-item:last-child { border-bottom-left-radius: var(--r-lg); border-bottom-right-radius: var(--r-lg); }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 24px 64px rgba(0, 0, 0, .2); }
.modal-header { border-bottom: 1px solid #F1EFEA; padding: 18px 22px; }
.modal-body { padding: 18px 22px; }
.modal-footer { border-top: 1px solid #F1EFEA; padding: 14px 22px; }
.modal-backdrop.show { opacity: .38; }
.modal-backdrop { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dropdown-menu { border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; font-size: .88rem; }
.dropdown-item { border-radius: 8px; padding: .45rem .7rem; }
.dropdown-item:hover { background: #F5F4F0; }
.dropdown-item:active { background: var(--dabi-tint); color: var(--dabi-red-dark); }
.progress { --bs-progress-bg: #EEECE7; --bs-progress-border-radius: 999px; }
.progress-bar { border-radius: 999px; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; font-size: .9rem; }
.empty i { font-size: 1.5rem; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; background: #F1F0EC; color: #A3A49C; }

/* ---------- fases del proyecto ---------- */
.fases { display: flex; gap: 6px; }
.fase { flex: 1; text-align: center; position: relative; }
.fase .dot { height: 6px; border-radius: 999px; background: #E6E4DE; transition: background .2s; }
.fase.hecha .dot { background: var(--dabi-char); }
.fase.actual .dot { background: var(--dabi-red); box-shadow: 0 0 0 4px rgba(222, 31, 28, .12); }
.fase .lbl { font-size: .7rem; color: var(--muted-2); margin-top: 7px; line-height: 1.2; }
.fase.hecha .lbl { color: var(--muted); }
.fase.actual .lbl { color: var(--dabi-red-dark); font-weight: 700; }

.proj-head { background: linear-gradient(135deg, #FFFFFF 60%, var(--dabi-tint-2) 100%); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.proj-head .code { font-size: .76rem; color: var(--dabi-red-dark); font-weight: 700; letter-spacing: .04em; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; padding: 4px 11px; border-radius: 999px; background: #F1F0EC; color: #45463F; font-weight: 600; line-height: 1.4; }
.chip.red { background: var(--dabi-tint); color: var(--dabi-red-dark); }
.chip.dark { background: var(--dabi-char); color: #fff; }

/* ---------- documentos ---------- */
.doc-row td { padding-top: .6rem; padding-bottom: .6rem; }
.doc-code { font-weight: 700; color: var(--dabi-red-dark); white-space: nowrap; letter-spacing: 0; }
.doc-na { opacity: .5; }
.fase-group th { background: #F7F6F3 !important; color: #45463F !important; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.form-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.form-sec h3 { display: flex; align-items: center; gap: 10px; font-size: .98rem; font-weight: 700; color: #1F201C; margin-bottom: 6px; letter-spacing: -.01em; }
.form-sec h3::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--dabi-red); flex: 0 0 4px; }
.form-sec .sec-help { font-size: .8rem; color: var(--muted); margin: 0 0 14px 14px; }
.tabla-edit input, .tabla-edit select, .tabla-edit textarea { border-radius: 8px; font-size: .84rem; }
.tabla-edit td { padding: 5px; }
.tabla-edit thead th { font-size: .68rem; }
.firma-box { border: 1px dashed #D4D2CB; border-radius: var(--r); padding: 14px; background: var(--surface-2); }
.info-doc dt { font-size: .76rem; color: var(--muted); font-weight: 600; }
.info-doc dd { margin-bottom: .65rem; }
.nota { background: var(--dabi-tint-2); border: 1px solid #F6D9D7; border-left: 3px solid var(--dabi-red); padding: 11px 14px; border-radius: 10px; font-size: .85rem; color: #5A1A18; }
.doc-head .doc-code { font-size: 1rem; }
.reg-table td { cursor: pointer; }
.reg-table td.acc { cursor: default; white-space: nowrap; }
.sticky-save { position: sticky; bottom: 0; z-index: 5; background: rgba(246, 245, 242, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 8px; }
.check-item { padding: 7px 10px; border-radius: 10px; transition: background .12s; }
.check-item:hover { background: #F7F6F3; }

/* ---------- visuales ---------- */
.grid2x2 { display: grid; grid-template-columns: 120px 1fr 1fr; gap: 10px; }
.grid2x2 .q { border-radius: var(--r); padding: 16px; background: var(--surface-2); border: 1px solid var(--line); min-height: 96px; }
.grid2x2 .q.hot { background: var(--dabi-tint-2); border: 1px solid #F0B9B7; box-shadow: inset 0 0 0 1px #F0B9B7; }
.grid2x2 .q b { display: block; color: #1F201C; }
.grid2x2 .q .n { font-size: 1.7rem; font-weight: 700; color: var(--dabi-red-dark); letter-spacing: -.02em; }
.grid2x2 .ax { display: flex; align-items: center; justify-content: center; font-size: .74rem; font-weight: 600; color: var(--muted); text-align: center; }
.heat { border-collapse: separate; border-spacing: 4px; }
.heat td { width: 62px; height: 48px; text-align: center; font-weight: 700; border-radius: 10px; }
.heat .h-alto { background: var(--dabi-red); color: #fff; }
.heat .h-medio { background: #FFF1CC; color: #8A5A00; }
.heat .h-bajo { background: #E3F1E4; color: #1E6B2E; }
.heat th { font-size: .72rem; text-align: center; background: transparent !important; color: var(--muted) !important; border: 0; }
.gantt { overflow-x: auto; }
.gantt table { border-collapse: separate; border-spacing: 0; font-size: .78rem; }
.gantt th, .gantt td { border-bottom: 1px solid #F1EFEA; padding: 4px 6px; white-space: nowrap; }
.gantt .wk { width: 22px; min-width: 22px; padding: 0; border-left: 1px solid #F4F2ED; }
.gantt .wk.today { background: var(--dabi-tint-2); }
.gantt .bar { height: 12px; background: var(--dabi-red); border-radius: 6px; margin: 0 1px; }
.gantt .bar.done { background: var(--dabi-red-dark); }
.gantt .bar.late { background: var(--dabi-char); }
.gantt .mile { width: 11px; height: 11px; background: var(--dabi-char); transform: rotate(45deg); margin: 0 auto; border-radius: 2px; }
.gantt .grp td { background: #F7F6F3; font-weight: 700; }
.gantt thead th { position: sticky; top: 0; background: #fff; font-size: .66rem; color: var(--muted); }
.chart-box { position: relative; height: 280px; }

/* ---------- inicio de sesión ---------- */
body.simple { min-height: 100vh; background: radial-gradient(900px 520px at 0% -10%, rgba(222, 31, 28, .28), transparent 60%), radial-gradient(800px 480px at 110% 110%, rgba(222, 31, 28, .14), transparent 60%), #212220; }
.simple-wrap { max-width: 440px; margin: 9vh auto; padding: 0 16px; }
.login-card { background: #fff; border-radius: 22px; padding: 38px 34px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); animation: aparecer .35s var(--ease) both; }
.login-card .logo { height: 40px; margin-bottom: 22px; }
.login-card h1 { font-size: 1.25rem; font-weight: 700; color: #1F201C; letter-spacing: -.02em; }
.login-bar { height: 3px; background: var(--dabi-red); border-radius: 3px; margin: 16px 0 24px; width: 48px; }

/* ---------- alta de proyecto ---------- */
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: aparecer .25s var(--ease) both; }
.enfoque-card { border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 18px; cursor: pointer; height: 100%; background: #fff; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s, transform .15s; }
.enfoque-card:hover { border-color: #EAA9A7; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn-check:checked + .enfoque-card { border-color: var(--dabi-red); background: var(--dabi-tint-2); box-shadow: 0 0 0 3px rgba(222, 31, 28, .14); }
.enfoque-card .t { font-weight: 700; color: #1F201C; }
.enfoque-card .sug { display: none; }
.enfoque-card.sugerido .sug { display: inline-block; }
.rec-box { background: linear-gradient(145deg, #3A3B36, #262724); color: #F2F1EC; border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-md); }
.rec-box .big { font-size: 1.4rem; font-weight: 700; color: #fff; letter-spacing: -.02em; }

/* ---------- archivos y bitácora ---------- */
.folder-tree .list-group-item { font-size: .86rem; border-radius: 0; }
.folder-tree .sub { padding-left: 32px; }
.folder-tree .active { background: var(--dabi-tint-2) !important; color: var(--dabi-red-dark) !important; border-color: #F6D9D7; font-weight: 600; }
.timeline { border-left: 2px solid #ECEAE5; padding-left: 20px; margin-left: 4px; }
.timeline .ev { position: relative; padding-bottom: 16px; }
.timeline .ev::before { content: ""; position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--dabi-red); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #F3CFCD; }
.timeline .ev.auto::before { background: #A3A49C; box-shadow: 0 0 0 3px #fff, 0 0 0 4px #E6E4DE; }

/* ---------- utilidades ---------- */
code { color: var(--dabi-red-dark); background: #F4F3EF; padding: 1px 6px; border-radius: 6px; font-size: .8em; }
.min-w-0 { min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media print { .sidebar, .topbar, .top-actions, .no-print, .toast-zona { display: none !important; } .content { padding: 0; animation: none; } .card, .kpi, .form-sec { box-shadow: none; } }

/* ---------- avisos emergentes (toasts) ---------- */
.toast-zona { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.aviso { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 11px; background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #2C2D29;
  border: 1px solid var(--line); border-radius: 14px; padding: 13px 13px 15px 15px; box-shadow: 0 14px 36px rgba(27, 28, 24, .14), 0 2px 6px rgba(27, 28, 24, .06);
  transform: translateX(24px); opacity: 0; transition: transform .28s var(--ease), opacity .28s var(--ease); font-size: .87rem; line-height: 1.4; }
.aviso.visible { transform: none; opacity: 1; }
.aviso.saliendo { transform: translateX(24px); opacity: 0; }
.aviso-ico { font-size: 1.15rem; margin-top: 1px; }
.aviso-txt { flex: 1; min-width: 0; }
.aviso-x { border: 0; background: transparent; color: #9A9B93; padding: 0 2px; line-height: 1; font-size: .78rem; border-radius: 6px; }
.aviso-x:hover { color: #2C2D29; }
.aviso-barra { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; animation: avisoBarra linear forwards; opacity: .5; }
.aviso.pausa .aviso-barra { animation-play-state: paused; }
@keyframes avisoBarra { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.aviso-success .aviso-ico { color: #2E8B57; } .aviso-success .aviso-barra { background: #2E8B57; }
.aviso-danger .aviso-ico { color: var(--dabi-red); } .aviso-danger .aviso-barra { background: var(--dabi-red); }
.aviso-warning .aviso-ico { color: #E8A317; } .aviso-warning .aviso-barra { background: #E8A317; }
.aviso-info .aviso-ico { color: #3B6E99; } .aviso-info .aviso-barra { background: #3B6E99; }
.confirmar { border: 0; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, .2); }
.confirmar-ico { width: 48px; height: 48px; border-radius: 14px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: #F1F0EC; color: var(--dabi-char); font-size: 1.3rem; }
.confirmar-ico.peligro { background: var(--dabi-tint); color: var(--dabi-red); }

/* ---------- comercial ---------- */
.btn-chip { --bs-btn-padding-y: .3rem; --bs-btn-padding-x: .75rem; border: 1px solid var(--line-2); background: #fff; color: #45463F; border-radius: 999px; font-weight: 500; box-shadow: var(--shadow-xs); }
.btn-chip:hover { background: #F5F4F0; color: #1F201C; border-color: #D4D2CB; }
.btn-check:checked + .btn-chip { background: var(--dabi-char); color: #fff; border-color: var(--dabi-char); box-shadow: 0 6px 14px -8px rgba(27, 28, 24, .7); }
.tabla-control td { vertical-align: top; }
.fila-notificar > td { background: #FFFAEC !important; }
.fila-notificar > td:first-child { box-shadow: inset 3px 0 0 #E8A317; }
