/* ====== Sistema de Control de Actividades TI · Colegio Latino ====== */
:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-light: #dbeafe;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --success: #059669;
  --success-light: #d1fae5;
  --info: #0284c7;
  --info-light: #e0f2fe;
  --purple: #7c3aed;
  --purple-light: #ede9fe;
  --gray-light: #f1f5f9;
  --sidebar-w: 250px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .15);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--text); font-size: 14px; }
body { line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0 0 .5rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }
.flex { display: flex; gap: .5rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---- Login ---- */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #0891b2 100%); padding: 1rem; }
.login-card { background: var(--surface); border-radius: 16px; padding: 2rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-logo { width: 64px; height: 64px; border-radius: 16px; background: var(--primary); color: #fff; font-weight: 800; font-size: 26px; display: flex; align-items: center; justify-content: center; margin: 0 auto .75rem; }
.login-brand h1 { font-size: 22px; }
.login-brand p { color: var(--muted); font-size: 13px; margin-top: .25rem; }
.login-footer { text-align: center; color: var(--muted); font-size: 12px; margin-top: 1.25rem; }

/* ---- Layout ---- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; transition: transform .2s; }
.sidebar-brand { display: flex; gap: .75rem; align-items: center; padding: 1.1rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.brand-title { color: #fff; font-weight: 700; font-size: 15px; }
.brand-sub { font-size: 12px; color: #94a3b8; }
.nav { flex: 1; padding: .75rem .5rem; overflow-y: auto; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; padding: .75rem .75rem .35rem; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 8px; color: #cbd5e1; font-size: 14px; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a.active { background: var(--primary); color: #fff; }
.nav a .ico { width: 22px; text-align: center; font-size: 16px; }
.nav a .cnt { margin-left: auto; background: rgba(255,255,255,.15); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.sidebar-footer { padding: .75rem; border-top: 1px solid rgba(255,255,255,.08); }
.user-chip { display: flex; gap: .6rem; align-items: center; padding: .4rem .5rem .7rem; }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: #334155; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.user-chip .name { color: #fff; font-size: 13px; font-weight: 600; }
.user-chip .role { font-size: 11px; color: #94a3b8; }
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 60px; background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; position: sticky; top: 0; z-index: 30; }
.page-title { font-size: 18px; flex: 1; }
.topbar-actions { display: flex; gap: .5rem; align-items: center; }
#btn-menu { display: none; }
.content { padding: 1.25rem; flex: 1; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  #btn-menu { display: inline-flex; }
  .content { padding: .75rem; }
  .page-title { font-size: 16px; }
}

/* ---- Notificaciones ---- */
.notif-wrap { position: relative; }
.notif-badge { position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff; font-size: 10px; border-radius: 999px; padding: 1px 5px; font-weight: 700; }
.notif-panel { position: absolute; right: 0; top: 44px; width: 360px; max-width: 90vw; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto; z-index: 50; }
.notif-panel h4 { padding: .6rem .9rem; font-size: 12px; text-transform: uppercase; color: var(--muted); background: var(--gray-light); }
.notif-item { display: block; padding: .6rem .9rem; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-item:hover { background: var(--gray-light); text-decoration: none; }
.notif-item .t { font-weight: 600; font-size: 13px; }
.notif-item .s { font-size: 12px; color: var(--muted); }
.notif-empty { padding: 1rem; text-align: center; color: var(--muted); }

/* ---- Botones ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .9rem; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--text); transition: background .15s, box-shadow .15s; white-space: nowrap; font-family: inherit; }
.btn:hover { filter: brightness(.97); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); filter: none; }
.btn-secondary { background: var(--surface); border-color: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--gray-light); }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-sm { padding: .35rem .7rem; font-size: 13px; }
.btn-xs { padding: .2rem .5rem; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-icon { padding: .4rem .55rem; font-size: 16px; }
.btn-link { background: none; border: none; color: var(--primary); padding: 0; cursor: pointer; font-size: inherit; font-family: inherit; }
.btn-link:hover { text-decoration: underline; }

/* ---- Formularios ---- */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .85rem; }
.field > span, .field > label { font-size: 13px; font-weight: 500; color: #334155; }
.field .req::after { content: " *"; color: var(--danger); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=time], input[type=search], input[type=color], input[type=tel], select, textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; color: var(--text); transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
input[type=color] { padding: 2px; height: 38px; width: 60px; }
textarea { resize: vertical; min-height: 80px; }
select { appearance: auto; }
.form-error { background: var(--danger-light); color: var(--danger); padding: .55rem .75rem; border-radius: 8px; font-size: 13px; margin-bottom: .75rem; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 1rem; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }
.checkbox { display: flex; align-items: center; gap: .5rem; font-size: 14px; cursor: pointer; }
.checkbox input { width: auto; }
.help { font-size: 12px; color: var(--muted); }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin-bottom: 0; min-width: 140px; flex: 1; }
.filters .field.wide { min-width: 220px; flex: 2; }
.filters input, .filters select { padding: .4rem .55rem; font-size: 13px; }

/* ---- Tarjetas ---- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.15rem; border: 1px solid var(--border); }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .75rem; flex-wrap: wrap; }
.card-header h3 { font-size: 15px; }
.card.p0 { padding: 0; overflow: hidden; }
.card.p0 .card-header { padding: .85rem 1.15rem 0; }
.kpi { display: flex; gap: .9rem; align-items: center; }
.kpi-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.kpi-value { font-size: 26px; font-weight: 700; line-height: 1.1; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover .kpi-value { color: var(--primary); }

/* ---- Tablas ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: #f8fafc; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: #475569; white-space: nowrap; }
tbody tr:hover { background: #f8fafc; }
tr.clickable { cursor: pointer; }
td .title { font-weight: 600; color: var(--text); }
td .sub { font-size: 12px; color: var(--muted); }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.empty .ico { font-size: 36px; margin-bottom: .5rem; }
.pagination { display: flex; gap: .35rem; align-items: center; justify-content: flex-end; padding: .75rem 0 0; flex-wrap: wrap; }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.b-gray { background: #e2e8f0; color: #334155; }
.b-blue { background: var(--primary-light); color: var(--primary-dark); }
.b-green { background: var(--success-light); color: #047857; }
.b-yellow { background: var(--warning-light); color: #b45309; }
.b-red { background: var(--danger-light); color: #b91c1c; }
.b-purple { background: var(--purple-light); color: #6d28d9; }
.b-cyan { background: var(--info-light); color: #0369a1; }
.b-orange { background: #ffedd5; color: #c2410c; }
.b-outline { background: #fff; border: 1px solid var(--border); color: var(--text); }
.tag-color { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: middle; }

/* ---- Modal ---- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex; align-items: flex-start; justify-content: center; padding: 3vh 1rem; z-index: 100; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 720px; box-shadow: var(--shadow-lg); animation: pop .15s ease-out; margin-bottom: 3vh; }
.modal.modal-sm { max-width: 460px; }
.modal.modal-lg { max-width: 960px; }
.modal.modal-xl { max-width: 1150px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 17px; }
.modal-body { padding: 1.25rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.25rem; border-top: 1px solid var(--border); background: #f8fafc; border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
@keyframes pop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Toasts ---- */
.toast-root { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; }
.toast { background: #0f172a; color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 14px; min-width: 240px; max-width: 380px; animation: pop .15s ease-out; border-left: 4px solid var(--primary); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* ---- Tabs ---- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tab { padding: .55rem .9rem; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; margin-bottom: -1px; background: none; border-top: none; border-left: none; border-right: none; font-family: inherit; font-size: 14px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.segmented button { border: none; background: none; padding: .4rem .8rem; cursor: pointer; font-size: 13px; color: var(--muted); font-family: inherit; }
.segmented button.active { background: var(--primary); color: #fff; }

/* ---- Kanban ---- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; }
.kanban-col { background: #e9eef5; border-radius: var(--radius); padding: .6rem; min-height: 200px; }
.kanban-col h4 { font-size: 13px; display: flex; justify-content: space-between; padding: .2rem .3rem .6rem; }
.kanban-card { background: #fff; border-radius: 8px; padding: .6rem .7rem; margin-bottom: .5rem; box-shadow: var(--shadow); cursor: pointer; border-left: 4px solid var(--border); font-size: 13px; }
.kanban-card:hover { box-shadow: var(--shadow-lg); }
.kanban-card .kc-title { font-weight: 600; margin-bottom: .25rem; }
.kanban-card .kc-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.kanban-card.dragging { opacity: .5; }
.kanban-col.drag-over { outline: 2px dashed var(--primary); }

/* ---- Calendario ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-head { background: #f8fafc; padding: .5rem; font-size: 12px; font-weight: 600; text-align: center; text-transform: uppercase; color: #475569; }
.cal-day { background: #fff; min-height: 110px; padding: .35rem; font-size: 12px; cursor: pointer; position: relative; }
.cal-day:hover { background: #f8fafc; }
.cal-day.other { background: #f8fafc; color: #94a3b8; }
.cal-day.today .d { background: var(--primary); color: #fff; }
.cal-day .d { font-weight: 600; display: inline-flex; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; margin-bottom: 2px; }
.cal-ev { display: block; padding: 1px 5px; border-radius: 4px; margin-bottom: 2px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; cursor: pointer; }
.cal-ev.done { opacity: .55; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--primary); font-weight: 600; }
.cal-week { display: grid; grid-template-columns: 60px repeat(7, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; }
.cal-week .wh { padding: .5rem .25rem; text-align: center; font-size: 12px; font-weight: 600; background: #f8fafc; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-week .wh.today { color: var(--primary); }
.cal-week .wcol { border-left: 1px solid var(--border); min-height: 300px; padding: .3rem; }
.cal-week .wcol .cal-ev { white-space: normal; margin-bottom: 4px; padding: 3px 6px; }
.cal-week .wtime { font-size: 11px; color: var(--muted); padding: .3rem; }
@media (max-width: 800px) { .cal-day { min-height: 70px; } .cal-ev { display: none; } .cal-day .cnt { display: inline-block; background: var(--primary); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; } }
@media (min-width: 801px) { .cal-day .cnt { display: none; } }

/* ---- Gráficos simples ---- */
.bars { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 50px; gap: .6rem; align-items: center; font-size: 13px; }
.bar-row .bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--gray-light); border-radius: 6px; height: 18px; overflow: hidden; display: flex; }
.bar-fill { height: 100%; border-radius: 6px; transition: width .3s; }
.bar-val { text-align: right; font-weight: 600; font-size: 12px; }
.donut { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.donut svg { width: 130px; height: 130px; flex-shrink: 0; }
.legend { display: flex; flex-direction: column; gap: .3rem; font-size: 13px; }
.legend .tag-color { width: 12px; height: 12px; }
.sparkline { display: flex; align-items: flex-end; gap: 3px; height: 80px; }
.sparkline .sp { flex: 1; background: var(--primary-light); border-radius: 3px 3px 0 0; position: relative; min-width: 4px; }
.sparkline .sp .spc { position: absolute; bottom: 0; left: 0; right: 0; background: var(--primary); border-radius: 3px 3px 0 0; }
.sparkline .sp:hover::after { content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; z-index: 5; }

/* ---- Detalle de actividad ---- */
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem 1rem; }
@media (max-width: 700px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-item .lbl { font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.detail-item .val { font-size: 14px; font-weight: 500; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: .7rem; padding: .5rem 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.timeline li:last-child { border-bottom: none; }
.timeline .when { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 120px; }
.comment { background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: .55rem .75rem; margin-bottom: .5rem; font-size: 13px; }
.comment .meta { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.state-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.priority-stripe { width: 4px; align-self: stretch; border-radius: 4px; }
.list-item { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border); align-items: center; cursor: pointer; }
.list-item:last-child { border-bottom: none; }
.list-item:hover .li-title { color: var(--primary); }
.li-title { font-weight: 600; font-size: 13.5px; }
.li-sub { font-size: 12px; color: var(--muted); }
.li-time { font-size: 12px; color: var(--muted); white-space: nowrap; min-width: 60px; }

/* ---- Impresión ---- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .no-print, .toast-root, .sidebar-backdrop { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .modal-backdrop { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: 100%; }
  .modal-footer, .modal-close { display: none !important; }
  .print-only { display: block; }
  a { color: inherit; }
}
.print-header { display: none; }
@media print { .print-header { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: .5rem; margin-bottom: 1rem; } }

/* ---- Proyectos y supervisión ---- */
.progreso { position: relative; background: var(--gray-light); border-radius: 999px; height: 16px; overflow: hidden; min-width: 90px; }
.progreso-fill { height: 100%; border-radius: 999px; transition: width .3s; }
.progreso span { position: absolute; inset: 0; font-size: 11px; font-weight: 700; text-align: center; line-height: 16px; color: #0f172a; }
.estrellas { color: #f59e0b; letter-spacing: 1px; font-size: 15px; }
.estrellas .off { color: #e2e8f0; }
.star-input { display: flex; gap: .25rem; font-size: 30px; cursor: pointer; color: #e2e8f0; user-select: none; }
.star-input span.on { color: #f59e0b; }
.fases { display: flex; gap: 0; margin: .5rem 0 1rem; flex-wrap: wrap; }
.fase { flex: 1; min-width: 110px; text-align: center; padding: .45rem .3rem; font-size: 12px; background: #e2e8f0; color: #475569; position: relative; }
.fase:first-child { border-radius: 8px 0 0 8px; } .fase:last-child { border-radius: 0 8px 8px 0; }
.fase.done { background: #bbf7d0; color: #065f46; } .fase.actual { background: var(--primary); color: #fff; font-weight: 700; }
.pry-card { border-left: 5px solid var(--border); }
.pry-card h4 { font-size: 15px; margin-bottom: .25rem; }
.hito { display: flex; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.hito:last-child { border-bottom: none; }
.hito .chk { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; flex-shrink: 0; }
.hito.ok .chk { background: var(--success); border-color: var(--success); color: #fff; }
.hito.vencido .chk { border-color: var(--danger); }
.hito .nombre { flex: 1; } .hito.ok .nombre { text-decoration: line-through; color: var(--muted); }

/* ====== Tema "Área de TI" (identidad tecnológica) ====== */
:root {
  --primary: #1565d8;
  --primary-dark: #0f4fb0;
  --primary-light: #dbeafe;
  --accent: #06b6d4;
  --accent-2: #22d3ee;
  --tech-navy: #0b1729;
  --tech-navy-2: #0f2140;
  --circuit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%2322d3ee' stroke-opacity='.18' stroke-width='1.2'%3E%3Cpath d='M10 10h30v20h20M10 60h20v30h40M60 10v30h30v20h20M90 90h-30v20M110 30v-20M30 110v-20h20'/%3E%3C/g%3E%3Cg fill='%2322d3ee' fill-opacity='.35'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='60' cy='30' r='2'/%3E%3Ccircle cx='10' cy='60' r='2'/%3E%3Ccircle cx='70' cy='90' r='2'/%3E%3Ccircle cx='110' cy='30' r='2'/%3E%3Ccircle cx='90' cy='90' r='2'/%3E%3Ccircle cx='30' cy='110' r='2'/%3E%3Ccircle cx='110' cy='60' r='2'/%3E%3C/g%3E%3C/svg%3E");
}
.ico-svg { vertical-align: -3px; flex-shrink: 0; }
.btn .ico-svg { vertical-align: -4px; }
.sidebar { background: var(--tech-navy); background-image: var(--circuit); background-blend-mode: soft-light; border-right: 1px solid rgba(34,211,238,.12); }
.sidebar-brand { background: linear-gradient(180deg, rgba(6,182,212,.18), transparent); }
.brand-logo { background: transparent; width: 42px; height: 42px; }
.brand-title { letter-spacing: .01em; }
.brand-sub { color: #7dd3fc; }
.nav a { gap: .7rem; }
.nav a .ico { width: 22px; color: #7dd3fc; display: inline-flex; align-items: center; justify-content: center; }
.nav a.active { background: linear-gradient(90deg, var(--primary), #1d4ed8 70%); box-shadow: 0 4px 14px rgba(21,101,216,.35); }
.nav a.active .ico { color: #fff; }
.nav-section { color: #5b7aa6; }
.user-chip .avatar { background: linear-gradient(135deg, var(--accent), var(--primary)); }
.topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(6px); border-bottom: 1px solid #dbe4f0; }
.page-title { display: flex; align-items: center; gap: .5rem; }
.page-title .ico-svg { color: var(--primary); }
.login-screen { background: radial-gradient(1200px 600px at 10% 10%, rgba(6,182,212,.25), transparent 60%), radial-gradient(900px 500px at 90% 90%, rgba(37,99,235,.35), transparent 60%), var(--tech-navy); background-image: var(--circuit), radial-gradient(1200px 600px at 10% 10%, rgba(6,182,212,.25), transparent 60%), radial-gradient(900px 500px at 90% 90%, rgba(37,99,235,.35), transparent 60%); }
.login-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; width: 100%; max-width: 960px; }
.login-hero { color: #e2e8f0; }
.login-hero h2 { font-size: 30px; line-height: 1.15; color: #fff; margin-bottom: .75rem; }
.login-hero h2 span { color: var(--accent-2); }
.login-hero p { color: #94a3b8; font-size: 15px; }
.login-hero .chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.login-hero .chip { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,.06); border: 1px solid rgba(34,211,238,.25); color: #cbd5e1; border-radius: 999px; padding: .3rem .7rem; font-size: 12.5px; }
.login-hero .chip .ico-svg { color: var(--accent-2); }
.login-card { background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.4); }
.login-logo { background: transparent; width: 72px; height: 72px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; max-width: 420px; } .login-hero { display: none; } }
.kpi-icon { color: var(--primary); }
.kpi-icon .ico-svg { width: 24px; height: 24px; }
.btn-primary { background: linear-gradient(90deg, var(--primary), #1d4ed8); }
.btn-primary:hover { background: linear-gradient(90deg, var(--primary-dark), #1e40af); }
.badge.b-cyan { background: #cffafe; color: #0e7490; }
.install-btn { width: 100%; margin-bottom: .4rem; background: rgba(34,211,238,.12); color: #a5f3fc; border: 1px dashed rgba(34,211,238,.4); }
.install-btn:hover { background: rgba(34,211,238,.2); }
.tech-strip { height: 3px; background: linear-gradient(90deg, var(--accent), var(--primary), #7c3aed); }
.card-header h3 .ico-svg { color: var(--primary); vertical-align: -4px; margin-right: 4px; }
/* Disponibilidad */
.disp-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.disp-card { border-left: 5px solid var(--border); }
.disp-card.Disponible { border-left-color: #059669; } .disp-card.Ocupado { border-left-color: #d97706; } .disp-card.Ausente { border-left-color: #dc2626; } .disp-card.Fuera { border-left-color: #94a3b8; } .disp-card.Sin { border-left-color: #cbd5e1; }
.estado-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.sem-tabla th, .sem-tabla td { vertical-align: top; font-size: 12px; padding: .4rem; }
.sem-tabla td.hoy { background: #eff6ff; }
.sem-bloque { display: block; background: #e0f2fe; color: #075985; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; font-size: 11px; }
.sem-act { display: block; color: #fff; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.sem-aus { display: block; background: #fee2e2; color: #991b1b; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; font-size: 11px; }
.timeline-dia { position: relative; height: 26px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.timeline-dia .tl-turno { position: absolute; top: 0; bottom: 0; background: #dbeafe; }
.timeline-dia .tl-act { position: absolute; top: 4px; bottom: 4px; border-radius: 4px; opacity: .9; cursor: pointer; }
.timeline-dia .tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #dc2626; }
.tl-horas { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
/* Sprints */
.burndown { width: 100%; height: 180px; }
.sprint-head { border-left: 5px solid var(--accent); }
.scrum-cols { display: grid; grid-template-columns: 1fr 2fr; gap: .75rem; }
@media (max-width: 900px) { .scrum-cols { grid-template-columns: 1fr; } }
.backlog-item { display: flex; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.backlog-item:last-child { border-bottom: none; }
/* Selector de técnicos (apoyo) */
.chips-sel { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips-sel label { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid var(--border); border-radius: 999px; padding: .2rem .6rem; font-size: 12.5px; cursor: pointer; background: #fff; }
.chips-sel label:has(input:checked) { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.chips-sel input { width: auto; margin: 0; }
.pwd-force .modal-close { display: none; }
