/* ================================================================
   SysmaproPlus — Design System
   Modo oscuro (por defecto) y modo claro | Syne + DM Sans + DM Mono

   El tema se elige por usuario (pw_usuarios.tema) y se aplica con
   <html data-theme="dark|light">. TODO color debe salir de una variable
   de esta sección: ver Documentacion/Temas/Guia-Nuevas-Vistas-Temas.md
================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&display=swap');

/* ── Tokens compartidos (no cambian con el tema) ── */
:root {
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --sidebar-w: 240px;
    --sidebar-collapsed-w: 70px;
}

/* ── MODO OSCURO (por defecto) ── */
:root,
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a0c10;
    --surface: #111318;
    --surface2: #181c24;
    --surface3: #1f2433;
    --border: #252b3b;
    --border2: #2e3650;
    --accent: #4f8ef7;
    --accent2: #7c5af7;
    --accent3: #f75a8e;
    --accent7: #e3dff5;
    --green: #2dcea8;
    --orange: #f7924f;
    --red: #f75a5a;
    --yellow: #f7d44f;
    --text: #e8eaf2;
    --text2: #8b90a8;
    --text3: #4a5068;

    /* Texto de más contraste que --text (títulos, cifras destacadas) y variantes intermedias */
    --text-bright: #ffffff;
    --text-strong: #dfe4f3;
    --text-soft: #cdd3e6;
    --on-accent: #ffffff;            /* texto sobre fondos de color sólido (botón primario, avatar, badge) */
    --on-yellow: #000000;            /* texto sobre fondo amarillo sólido */
    --purple-text: #a58bff;          /* texto/etiquetas moradas (actividades) */
    --purple-soft: #b9a6ff;
    --amber-text: #ffb43c;           /* texto ámbar (estado "en progreso" de reportes, pendientes de soporte) */
    --indigo-text: #818cf8;          /* texto índigo (badges de soportes) */
    --teal-text: #2dd4bf;            /* texto turquesa (fecha de creación) */
    --primary: var(--accent);        /* alias que usan Proyectos y Sitios de cliente */

    /* Hover de botones y variantes de color sólido */
    --accent-hover: #3a7aee;
    --btn-req-bg: #1e2433;
    --btn-req-disabled: #0d0f14;

    /* Superposiciones neutras: "tint" aclara sobre fondo oscuro, "shade" lo oscurece (en claro ambas oscurecen apenas) */
    --tint-01: rgba(255,255,255,.01);
    --tint-015: rgba(255,255,255,.015);
    --tint-02: rgba(255,255,255,.02);
    --tint-03: rgba(255,255,255,.03);
    --tint-04: rgba(255,255,255,.04);
    --tint-05: rgba(255,255,255,.05);
    --shade-10: rgba(0,0,0,.10);
    --shade-12: rgba(0,0,0,.12);
    --shade-15: rgba(0,0,0,.15);
    --shade-20: rgba(0,0,0,.20);
    --shade-25: rgba(0,0,0,.25);
    --shade-30: rgba(0,0,0,.30);

    /* Fondos de capas flotantes y sombras */
    --overlay: rgba(0,0,0,.75);              /* telón de fondo de los modales */
    --toolbar-bg: rgba(10,12,16,.94);        /* barras fijas semitransparentes */
    --shadow-md: 0 8px 32px rgba(0,0,0,.4);
    --shadow-lg: 0 14px 30px rgba(0,0,0,.5);
    --shadow-card: 0 10px 30px rgba(0,0,0,.3);
    --shadow-chip: 0 4px 10px rgba(0,0,0,.3);
    --shadow-sprint: 0 6px 20px rgba(0,0,0,.25);
    --shadow-drawer: -20px 0 50px rgba(0,0,0,.5);
    --on-bar: #ffffff;                       /* texto sobre las barras del cronograma */
    --on-bar-shadow: #000000;
    --shadow-login: 0 32px 80px rgba(0,0,0,.5);
    --shadow-up: 0 -8px 32px rgba(0,0,0,.5);   /* barras fijas inferiores */
    --shadow-side: 0 18px 40px rgba(0,0,0,.45); /* sidebar móvil */

    /* Paneles con tono propio */
    --agenda-bg: #09131F;
    --agenda-head: #0A192A;
    --field-readonly: #092847;               /* inputs de solo lectura destacados */

    /* Alias que usan algunas vistas antiguas (antes solo existían como fallback dentro de var(--x, #valor)) */
    --text1: #f1f5f9;
    --surface1: #1e2030;
    --bg1: #111318;
    --bg2: #1a1c24;
    --bg3: #22242e;

    /* Pantalla de detalle de proyecto: grises secundarios más claros que los globales */
    --pd-text2: #cdd3e6;
    --pd-text3: #a9b1ca;
}

/* ── MODO CLARO ── */
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f3f5fa;
    --surface: #ffffff;
    --surface2: #f4f6fb;
    --surface3: #e8ecf4;
    --border: #e0e5ef;
    --border2: #cdd5e5;
    --accent: #2563eb;
    --accent2: #6d4ae6;
    --accent3: #d6336c;
    --accent7: #3b2f73;
    --green: #0b8a6b;
    --orange: #c2570c;
    --red: #d03a3a;
    --yellow: #a16207;
    --text: #141a2c;
    --text2: #4b5472;
    --text3: #6b7390;

    --text-bright: #0b1220;
    --text-strong: #1e2740;
    --text-soft: #3b4463;
    --on-accent: #ffffff;
    --on-yellow: #ffffff;
    --purple-text: #6d4ae6;
    --purple-soft: #5b3dd1;
    --amber-text: #b45309;
    --indigo-text: #4f46e5;
    --teal-text: #0f766e;
    --primary: var(--accent);

    --accent-hover: #1d4fd0;
    --btn-req-bg: #eef3fd;
    --btn-req-disabled: #eef0f5;

    --tint-01: rgba(20,30,60,.015);
    --tint-015: rgba(20,30,60,.02);
    --tint-02: rgba(20,30,60,.025);
    --tint-03: rgba(20,30,60,.035);
    --tint-04: rgba(20,30,60,.045);
    --tint-05: rgba(20,30,60,.055);
    --shade-10: rgba(20,30,60,.03);
    --shade-12: rgba(20,30,60,.035);
    --shade-15: rgba(20,30,60,.04);
    --shade-20: rgba(20,30,60,.05);
    --shade-25: rgba(20,30,60,.065);
    --shade-30: rgba(20,30,60,.075);

    --overlay: rgba(15,23,42,.5);
    --toolbar-bg: rgba(243,245,250,.94);
    --shadow-md: 0 8px 28px rgba(20,30,60,.16);
    --shadow-lg: 0 14px 30px rgba(20,30,60,.18);
    --shadow-card: 0 10px 28px rgba(20,30,60,.12);
    --shadow-chip: 0 4px 10px rgba(20,30,60,.15);
    --shadow-sprint: 0 6px 20px rgba(20,30,60,.10);
    --shadow-drawer: -20px 0 50px rgba(20,30,60,.18);
    --on-bar: #0b1220;
    --on-bar-shadow: #ffffff;
    --shadow-login: 0 24px 60px rgba(20,30,60,.16);
    --shadow-up: 0 -8px 28px rgba(20,30,60,.14);
    --shadow-side: 0 18px 40px rgba(20,30,60,.22);

    --agenda-bg: #f4f7fd;
    --agenda-head: #e6edf8;
    --field-readonly: #e9eef7;

    --text1: #141a2c;
    --surface1: #ffffff;
    --bg1: #eef1f7;
    --bg2: #ffffff;
    --bg3: #f4f6fb;

    --pd-text2: #3b4463;
    --pd-text3: #566080;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'DM Sans',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;overflow-x:hidden}
a{color:var(--accent);text-decoration:none}
::-webkit-scrollbar{width:5px;height:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:3px}

/* ═══════════ LOGIN ═══════════ */
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}
.login-bg{position:absolute;inset:0;background:radial-gradient(ellipse 80% 60% at 20% 50%,rgba(79,142,247,.08) 0%,transparent 60%),radial-gradient(ellipse 60% 80% at 80% 30%,rgba(124,90,247,.07) 0%,transparent 60%)}
.login-grid{position:absolute;inset:0;background-image:linear-gradient(var(--border) 1px,transparent 1px),linear-gradient(90deg,var(--border) 1px,transparent 1px);background-size:40px 40px;opacity:.3}
.login-card{position:relative;z-index:1;width:100%;max-width:400px;padding:20px}
.login-brand{text-align:center;margin-bottom:40px}
.login-brand h1{font-family:'Syne',sans-serif;font-size:32px;font-weight:800;background:linear-gradient(135deg,var(--accent),var(--accent2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;letter-spacing:-1px}
.login-brand p{font-size:12px;color:var(--text3);font-family:'DM Mono',monospace;margin-top:4px;letter-spacing:1px}
.login-box{background:var(--surface);border:1px solid var(--border2);border-radius:16px;padding:32px;box-shadow:var(--shadow-login)}
.login-box h2{font-family:'Syne',sans-serif;font-size:20px;font-weight:700;margin-bottom:6px}
.login-box .login-sub{font-size:13px;color:var(--text2);margin-bottom:28px}
.login-role-badges{display:flex;gap:6px;margin-bottom:24px;flex-wrap:wrap}
.role-badge{padding:3px 10px;border-radius:20px;font-size:10px;font-family:'DM Mono',monospace;font-weight:600;border:1px solid}
.role-badge.r1{background:rgba(247,148,79,.1);border-color:rgba(247,148,79,.3);color:var(--orange)}
.role-badge.r2{background:rgba(79,142,247,.1);border-color:rgba(79,142,247,.3);color:var(--accent)}
.role-badge.r3{background:rgba(45,206,168,.1);border-color:rgba(45,206,168,.3);color:var(--green)}
.login-error{background:rgba(247,90,90,.1);border:1px solid rgba(247,90,90,.3);border-radius:var(--radius-sm);padding:10px 14px;font-size:13px;color:var(--red);margin-bottom:16px}

/* ═══════════ APP LAYOUT ═══════════ */
.app{display:flex;min-height:100vh}
/* ═══════════ SIDEBAR ═══════════ */
/* ═══════════ SIDEBAR ═══════════ */
.sidebar{width:var(--sidebar-w);min-width:var(--sidebar-w);background:var(--surface);border-right:1px solid var(--border);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;overflow-y:auto;transition:all .3s ease;z-index:1000}
.app.sidebar-collapsed .sidebar{width:var(--sidebar-collapsed-w);min-width:var(--sidebar-collapsed-w)}
.sidebar-backdrop{display:none}
.sidebar-logo{padding:24px 20px 16px;border-bottom:1px solid var(--border)}
.sidebar-logo h1{font-family:'Syne',sans-serif;font-size:20px;font-weight:800;letter-spacing:-0.5px;background:linear-gradient(135deg,var(--accent),var(--accent2));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.sidebar-logo p{font-size:10px;color:var(--text3);margin-top:2px;font-family:'DM Mono',monospace;letter-spacing:.5px}
.sidebar-user{padding:12px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:10px}
.user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,var(--accent),var(--accent2));display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:#fff;flex-shrink:0;font-family:'Syne',sans-serif}
.user-info{flex:1;min-width:0}
.user-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.user-role{font-size:10px;color:var(--text3);font-family:'DM Mono',monospace}
/* Sidebar text and badges hide on collapse */
.app.sidebar-collapsed .sidebar-logo h1,
.app.sidebar-collapsed .sidebar-logo p,
.app.sidebar-collapsed .user-info,
.app.sidebar-collapsed .sidebar-section-label,
.app.sidebar-collapsed .nav-btn span:not(.nav-icon),
.app.sidebar-collapsed .nav-badge,
.app.sidebar-collapsed .btn-logout span:not(.nav-icon) { display:none }

.app.sidebar-collapsed .nav-btn, 
.app.sidebar-collapsed .btn-logout { justify-content:center; padding:12px }
.app.sidebar-collapsed .nav-icon { margin:0; width:auto; font-size:18px }
.app.sidebar-collapsed .sidebar-user { justify-content:center; padding:12px 0 }
.app.sidebar-collapsed .sidebar-logo { padding:20px 0; text-align:center }
.app.sidebar-collapsed .sidebar-logo h1 { display:block; font-size:14px } /* Keep a small version? Or icon */

.sidebar-toggle { background:var(--surface2); border:1px solid var(--border); color:var(--text2); font-size:18px; cursor:pointer; width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:var(--radius-sm); transition:all .2s; flex-shrink:0 }
.sidebar-toggle:hover { background:var(--surface3); color:var(--text); border-color:var(--border2) }

.sidebar-section { padding:12px 14px 4px }
.sidebar-section-label { font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:1.5px; color:var(--text3); margin-bottom:10px; padding-left:10px; font-family:'DM Mono',monospace }
.nav-btn { display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:var(--radius-sm); color:var(--text2); transition:all .2s; margin-bottom:2px; font-size:13.5px; font-weight:500 }
.nav-btn:hover { background:var(--surface2); color:var(--text) }
.nav-btn.active { background:var(--surface3); color:var(--accent); font-weight:600 }
.nav-icon { font-size:16px; width:20px; text-align:center; display:flex; align-items:center; justify-content:center }
.nav-badge { margin-left:auto; background:var(--accent); color:#fff; font-size:10px; padding:2px 6px; border-radius:10px; font-weight:700 }

.sidebar-footer { margin-top:auto; padding:16px 14px; border-top:1px solid var(--border) }
.btn-logout { display:flex; align-items:center; gap:10px; width:100%; padding:10px 12px; border-radius:var(--radius-sm); color:var(--orange); font-size:13px; font-weight:600; transition:all .2s }
.btn-logout:hover { background:rgba(247,146,79,.1) }

/* ═══════════ MAIN ═══════════ */
.main{flex:1;overflow-x:hidden;display:flex;flex-direction:column}
.topbar{padding:16px 28px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:16px;background:var(--surface);position:sticky;top:0;z-index:100}
.topbar-title{font-family:'Syne',sans-serif;font-size:17px;font-weight:700;flex:1}
.topbar-breadcrumb{font-size:11px;color:var(--text3);font-family:'DM Mono',monospace}
.topbar-actions{display:flex;gap:8px}
.view-content{padding:28px;animation:fadeIn .2s ease;flex:1}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}

/* Error banner */
.error-banner{background:rgba(247,90,90,.1);border:1px solid rgba(247,90,90,.3);border-radius:var(--radius-sm);padding:12px 16px;font-size:13px;color:var(--red);margin-bottom:20px;display:flex;align-items:center;gap:8px}

/* ═══════════ BUTTONS ═══════════ */
.btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:none;border-radius:var(--radius-sm);font-size:13px;font-family:'DM Sans',sans-serif;font-weight:500;cursor:pointer;transition:all .15s;white-space:nowrap;text-decoration:none}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn-primary{background:var(--accent);color:var(--on-accent)}
.btn-primary:hover:not(:disabled){background:var(--accent-hover);transform:translateY(-1px)}
.btn-ghost{background:var(--surface2);color:var(--text2);border:1px solid var(--border)}
.btn-ghost:hover:not(:disabled){background:var(--surface3);color:var(--text)}
.btn-danger{background:rgba(247,90,90,.12);color:var(--red);border:1px solid rgba(247,90,90,.25)}
.btn-danger:hover:not(:disabled){background:rgba(247,90,90,.2)}
.btn-success{background:rgba(45,206,168,.12);color:var(--green);border:1px solid rgba(45,206,168,.3)}
.btn-sm{padding:5px 10px;font-size:12px}
.btn-agendar{background:linear-gradient(135deg,rgba(45,206,168,.15),rgba(79,142,247,.15));color:var(--green);border:1px solid var(--green);animation:pulseGreen 2s infinite}
@keyframes pulseGreen{0%,100%{box-shadow:0 0 0 0 rgba(45,206,168,.3)}50%{box-shadow:0 0 0 5px rgba(45,206,168,0)}}

.btn-req { 
    background: var(--btn-req-bg); /* Darker steel blue */
    color: var(--accent);
    border: 1px solid var(--border2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-req:hover:not(:disabled) {
    background: var(--surface3);
    border-color: var(--accent);
    color: var(--text-bright);
    transform: translateY(-1px);
}
.btn-req:disabled {
    background: var(--btn-req-disabled);
    color: var(--text3); 
    border-color: var(--border); 
    cursor: not-allowed; 
}

/* ═══════════ FORM ═══════════ */
.form-group{margin-bottom:16px}
.form-label{display:block;font-size:11px;font-weight:600;color:var(--text2);margin-bottom:8px;text-transform:uppercase;letter-spacing:.8px;font-family:'DM Mono',monospace}
.form-control{width:100%;padding:11px 14px;background:var(--surface2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-size:14px;font-family:'DM Sans',sans-serif;outline:none;transition:border-color .15s}
.form-control:focus{border-color:var(--accent);background:var(--surface3)}
.form-control::placeholder{color:var(--text3)}
select.form-control option{background:var(--surface2)}
textarea.form-control{resize:vertical}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-hint{font-size:10px;color:var(--text3);margin-top:4px;font-family:'DM Mono',monospace}

/* ═══════════ STATS GRID ═══════════ */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;margin-bottom:28px}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;position:relative;overflow:hidden;transition:border-color .2s}
.stat-card:hover{border-color:var(--border2)}
.stat-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--c,var(--accent));border-radius:3px 3px 0 0}
.stat-label{font-size:10px;color:var(--text3);text-transform:uppercase;letter-spacing:1.2px;font-family:'DM Mono',monospace}
.stat-value{font-family:'Syne',sans-serif;font-size:28px;font-weight:800;margin-top:8px;color:var(--c,var(--text));line-height:1}
.stat-sub{font-size:11px;color:var(--text3);margin-top:5px}

/* ═══════════ SECTION HEADER ═══════════ */
.section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;flex-wrap:wrap;gap:10px}
.section-header h2{font-family:'Syne',sans-serif;font-size:15px;font-weight:700}

/* ═══════════ TABLE ═══════════ */
.table-wrap{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;margin-bottom:24px}
table{width:100%;border-collapse:collapse}
thead th{padding:10px 16px;text-align:left;font-size:10px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--text3);font-family:'DM Mono',monospace;background:var(--surface2);border-bottom:1px solid var(--border)}
tbody tr{border-bottom:1px solid var(--border);transition:background .1s}
tbody tr:last-child{border-bottom:none}
tbody tr:hover{background:var(--surface2)}
tbody td{padding:11px 16px;font-size:13px}

/* ═══════════ TAGS & BADGES ═══════════ */
.tag{display:inline-flex;align-items:center;padding:2px 9px;border-radius:20px;font-size:10px;font-weight:700;font-family:'DM Mono',monospace}
.tag-pending{background:rgba(247,148,79,.12);color:var(--orange)}
.tag-progress{background:rgba(79,142,247,.12);color:var(--accent)}
.tag-done{background:rgba(45,206,168,.12);color:var(--green)}
.tag-draft{background:rgba(247,212,79,.12);color:var(--yellow)}
.tag-published{background:rgba(45,206,168,.12);color:var(--green)}
.tag-active{background:rgba(45,206,168,.12);color:var(--green)}
.tag-inactive{background:rgba(247,90,90,.12);color:var(--red)}
.tag-r1{background:rgba(247,148,79,.12);color:var(--orange)}
.tag-r2{background:rgba(79,142,247,.12);color:var(--accent)}
.tag-r3{background:rgba(45,206,168,.12);color:var(--green)}
.badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:10px;font-size:10px;font-weight:700;font-family:'DM Mono',monospace;background:var(--surface3);color:var(--text2)}
.badge-finalizada{background:rgba(45,206,168,.15);color:var(--green)}
.badge-activa{background:rgba(79,142,247,.15);color:var(--accent)}
.badge-retraso{background:rgba(247,90,90,.18);color:var(--red)}
.badge-deadline{background:rgba(247,148,79,.18);color:var(--orange)}
.badge-atiempo{background:rgba(45,206,168,.12);color:var(--green)}
.badge-pendiente{background:rgba(247,212,79,.15);color:var(--yellow)}
.badge-progreso{background:rgba(79,142,247,.15);color:var(--accent)}

/* ═══════════ PROGRESS ═══════════ */
.progress-wrap{display:flex;align-items:center;gap:8px;min-width:110px}
.progress-bar{flex:1;background:var(--surface3);border-radius:20px;height:6px;overflow:hidden}
.progress-fill{height:100%;border-radius:20px;background:linear-gradient(90deg,var(--green),#2df7a8);transition:width .6s}
.progress-pct{font-size:11px;font-family:'DM Mono',monospace;color:var(--green);min-width:28px}

/* ═══════════ FILTER BAR ═══════════ */
.filter-bar{display:flex;align-items:flex-end;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.filter-group{display:flex;flex-direction:column;gap:4px}
.filter-label{font-size:9px;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;color:var(--text3);font-family:'DM Mono',monospace}
.filter-input{padding:7px 10px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-size:12px;font-family:'DM Sans',sans-serif;outline:none;transition:border-color .15s;min-width:130px}
.filter-input:focus{border-color:var(--accent)}
.filter-search{min-width:200px;padding-left:30px}
.filter-search-wrap{position:relative}
.filter-search-wrap::before{content:'⌕';position:absolute;left:9px;top:50%;transform:translateY(-50%);color:var(--text3);font-size:15px;pointer-events:none}

/* ═══════════ PROJECT CARD ═══════════ */
.project-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:16px;transition:border-color .2s}
.project-card:hover{border-color:var(--border2)}
.project-card-header{display:flex;align-items:flex-start;gap:16px;margin-bottom:16px}
.project-card-info{flex:1}
.project-card-info h3{font-family:'Syne',sans-serif;font-size:16px;font-weight:700;margin-bottom:4px;cursor:pointer;color:var(--accent)}
.project-card-info h3:hover{text-decoration:underline}
.project-card-info h3.no-link{cursor:default;color:var(--text)}
.project-card-meta{font-size:12px;color:var(--text2);display:flex;gap:16px;flex-wrap:wrap;font-family:'DM Mono',monospace}
.project-card-actions{display:flex;gap:6px;flex-shrink:0}
.project-dates{display:flex;gap:16px;font-size:11px;font-family:'DM Mono',monospace;color:var(--text3);margin-bottom:12px}
.project-dates span{display:flex;align-items:center;gap:4px}

/* ═══════════ SPRINT ACCORDION (Redesigned) ═══════════ */
.sprint-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: border-color .2s }
.sprint-block:hover { border-color: var(--border2) }
.sprint-header { display: flex; align-items: center; padding: 10px 16px; background: var(--tint-02); cursor: pointer; user-select: none; transition: background .15s; gap: 20px }
.sprint-header:hover { background: var(--tint-04) }

.sprint-header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0 }
.sprint-icon { color: var(--orange); font-size: 14px; text-shadow: 0 0 10px rgba(247,146,79,.3) }
.sprint-label { font-family: 'Syne', sans-serif; font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap }

.sprint-stats-row { display: flex; align-items: center; gap: 16px; margin-left: auto; margin-right: 10px }
.s-stat { display: flex; align-items: baseline; gap: 4px; font-family: 'DM Mono', monospace; font-size: 12px; color: var(--text3) }
.s-stat .v { color: var(--text2); font-weight: 500 }
.s-stat .v.success { color: var(--green) }
.s-stat .v.warning { color: var(--orange) }
.s-stat.pct .v { color: var(--green); font-weight: 700 }

.sprint-actions { display: flex; align-items: center; gap: 8px }
.icon-btn { padding: 5px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 12px; border-radius: var(--radius-xs) }
.btn-ghost.icon-btn:hover { background: var(--surface3) }

.sprint-chevron { font-size: 9px; color: var(--text3); transition: transform .3s; margin-left: 10px; opacity: .5 }
.sprint-block.open .sprint-chevron { transform: rotate(180deg) } /* Changed from .open on chevron to class on block for simplicity */

.sprint-body { display: none; padding: 0 0 12px 0; background: var(--shade-10) }
.sprint-body.open { display: block }

/* ═══════════ ACTIVITY BLOCK (Inside Sprint) ═══════════ */
.act-block 
{ 
    border-left: 2px solid var(--border); 
    margin: 0 16px 12px 42px; 
    border-radius: 0 0 var(--radius-sm) var(--radius-sm); 
    overflow: hidden;
    background: var(--tint-01)

}
.act-header {
    display: flex;
    flex-direction: column;
    padding: 8px 16px;
    background: var(--shade-15);
    cursor: pointer;
    user-select: none;
    transition: background .15s;
    gap: 6px;
}
.act-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.act-title h4 {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    flex: 1;
}
.act-title h3 {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    flex: 1;
}

.act-title {
    width: 100%;
}


.task-table td {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    flex: 1;
}
.act-header:hover {
    background: var(--shade-25)
}

.act-header h3 {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    font-weight: 600;
    flex: 1;
    color: var(--accent)
}
.act-header h4 { font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 600; flex: 1; color: var(--accent) }
.act-header h5 {
    font-family: 'Syne', sans-serif;
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    color: var(--accent)
}
.act-meta { font-size: 10px; color: var(--text3); font-family: 'DM Mono', monospace; display: flex; gap: 12px }
.act-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--shade-15);
    cursor: pointer;
    user-select: none;
    transition: background .15s;
    flex-wrap: wrap;
}

.act-chevron {
    font-size: 9px;
    color: var(--text3);
    transition: transform .2s;
    flex-shrink: 0;
}
.act-top-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.act-actions {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.act-title {
    width: 100%;
    padding-top: 4px;
}
.act-chevron.open {
    transform: rotate(90deg)
}
.act-tasks { display: none; padding: 0 }
.act-tasks.open { display: block }

.detail-item strong { color:var(--text); display:block; font-size:14px; margin-bottom:2px }

/* ═══════════ STATS BOARD (Project Detail) ═══════════ */
.stats-board-wrap { background:var(--shade-20); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:24px; overflow:hidden; display:none; animation:slideDown .3s ease }
.stats-board-wrap.open { display:block }
@keyframes slideDown { from { opacity:0; transform:translateY(-10px) } to { opacity:1; transform:translateY(0) } }

.stats-board-toggle-btn { background:var(--surface2); border:1px solid var(--border); color:var(--text2); font-size:11px; padding:6px 12px; border-radius:var(--radius-xs); cursor:pointer; display:flex; align-items:center; gap:8px; font-family:'DM Mono',monospace; text-transform:uppercase; letter-spacing:1px; margin-bottom:12px; transition:all .2s }
.stats-board-toggle-btn:hover { background:var(--surface3); color:var(--text) }
.stats-board-toggle-btn .chevron { transition:transform .3s; font-size:8px }
.stats-board-toggle-btn.open .chevron { transform:rotate(180deg) }

/* ═══════════ ACTIVITY ROW ═══════════ */
.activity-row{border:1px solid var(--border);border-radius:var(--radius-xs);margin-bottom:8px;overflow:hidden}
.activity-header{display:flex;align-items:center;gap:10px;padding:10px 14px;background:rgba(124,90,247,.05);border-bottom:1px solid var(--border)}
.activity-header h5{font-size:13px;font-weight:600;color:var(--accent2);flex:1}
.activity-meta{font-size:11px;color:var(--text3);font-family:'DM Mono',monospace}
.task-list{padding:0}
.task-item{display:grid;grid-template-columns:24px 1fr 80px 100px 120px 80px 80px;gap:8px;align-items:center;padding:9px 14px;border-bottom:1px solid var(--border);font-size:12.5px;transition:background .1s}
.task-item:last-child{border-bottom:none}
.task-item:hover{background:var(--surface2)}
.task-num{font-family:'DM Mono',monospace;font-size:10px;color:var(--text3)}

/* ═══════════ MODAL ═══════════ */
.modal-overlay{position:fixed;inset:0;background:var(--overlay);backdrop-filter:blur(4px);z-index:1000;display:none;align-items:center;justify-content:center;padding:20px}
.modal-overlay.open{display:flex}
#tareaInformeModal{z-index:1001}
.modal{background:var(--surface);border:1px solid var(--border2);border-radius:16px;width:100%;max-width:500px;max-height:90vh;overflow-y:auto;animation:slideUp .2s ease}
@keyframes slideUp{from{opacity:0;transform:scale(.96) translateY(16px)}to{opacity:1;transform:scale(1) translateY(0)}}
.modal-header{padding:22px 24px 14px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.modal-header h3{font-family:'Syne',sans-serif;font-size:16px;font-weight:700}
.modal-close{background:var(--surface2);border:none;color:var(--text2);font-size:16px;cursor:pointer;width:30px;height:30px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:background .15s}
.modal-close:hover{background:var(--surface3)}
.modal-body{padding:22px 24px}
.modal-footer{padding:14px 24px;border-top:1px solid var(--border);display:flex;gap:8px;justify-content:flex-end}

/* ═══════════ REPORTES ═══════════ */
.report-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-bottom:28px}
.report-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:22px;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}
.report-card::after{content:'';position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--rc,var(--accent));transform:scaleX(0);transition:transform .2s;transform-origin:left}
.report-card:hover{border-color:var(--border2);transform:translateY(-2px)}
.report-card:hover::after{transform:scaleX(1)}
.report-icon{font-size:28px;margin-bottom:14px}
.report-card h3{font-family:'Syne',sans-serif;font-size:14px;font-weight:700;margin-bottom:6px}
.report-card p{font-size:12px;color:var(--text2);line-height:1.5}
.report-actions{display:flex;gap:8px;margin-top:14px}
.report-preview{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin-top:20px}
.report-preview-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--border)}
.report-preview-title{font-family:'Syne',sans-serif;font-size:18px;font-weight:700}
.report-export-btns{display:flex;gap:8px}

/* ═══════════ TOAST ═══════════ */
.toast-wrap{position:fixed;bottom:20px;right:20px;z-index:9999;display:flex;flex-direction:column;gap:8px;pointer-events:none;max-width:320px}
.toast{padding:11px 16px;border-radius:10px;font-size:13px;font-weight:500;display:flex;align-items:center;gap:10px;pointer-events:all;animation:toastIn .25s ease;box-shadow:var(--shadow-md)}
/* El tinte va sobre --surface para que el aviso sea legible en ambos temas (sin transparencia real) */
.toast.success{background:linear-gradient(rgba(45,206,168,.12),rgba(45,206,168,.12)),var(--surface);border:1px solid rgba(45,206,168,.3);color:var(--green)}
.toast.error{background:linear-gradient(rgba(247,90,90,.12),rgba(247,90,90,.12)),var(--surface);border:1px solid rgba(247,90,90,.3);color:var(--red)}
.toast.loading{background:linear-gradient(rgba(79,142,247,.12),rgba(79,142,247,.12)),var(--surface);border:1px solid rgba(79,142,247,.3);color:var(--accent)}
@keyframes toastIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}

.empty{text-align:center;padding:48px 20px;color:var(--text3)}
.empty-icon{font-size:40px;margin-bottom:12px;opacity:.4}
.actions{display:flex;gap:5px;flex-wrap:wrap}

/* ═══════════ CONFIRM ═══════════ */
.confirm-dialog{background:var(--surface);border:1px solid var(--border2);border-radius:16px;padding:28px;max-width:340px;width:100%;text-align:center;animation:slideUp .2s ease}
.confirm-icon{font-size:36px;margin-bottom:12px}
.confirm-dialog h3{font-family:'Syne',sans-serif;font-size:15px;font-weight:700;margin-bottom:8px}
.confirm-dialog p{font-size:13px;color:var(--text2);margin-bottom:20px}
.confirm-actions{display:flex;gap:8px;justify-content:center}

/* ═══════════ AGENDAR ═══════════ */
.agendar-dialog{background:var(--surface);border:1px solid rgba(45,206,168,.3);border-radius:16px;padding:28px;max-width:400px;width:100%;text-align:center;animation:slideUp .2s ease}
.agendar-dialog h3{font-family:'Syne',sans-serif;font-size:18px;font-weight:800;color:var(--green);margin-bottom:8px}
.agendar-meta{background:var(--surface2);border-radius:8px;padding:12px;margin:14px 0;text-align:left;font-size:12px;font-family:'DM Mono',monospace;color:var(--text2);border:1px solid var(--border)}
.agendar-meta .meta-row{display:flex;justify-content:space-between;padding:2px 0}
.agendar-meta .meta-val{color:var(--text)}

@media(max-width:860px){
  .sidebar{
    display:flex;
    position:fixed;
    top:0;
    left:-280px;
    width:min(82vw,280px);
    min-width:0;
    height:100vh;
    z-index:1200;
    box-shadow:var(--shadow-side)
  }
  .app.sidebar-collapsed .sidebar{
    width:min(82vw,280px);
    min-width:0
  }
  .app.sidebar-collapsed .sidebar-logo h1,
  .app.sidebar-collapsed .sidebar-logo p,
  .app.sidebar-collapsed .user-info,
  .app.sidebar-collapsed .sidebar-section-label,
  .app.sidebar-collapsed .nav-btn span:not(.nav-icon),
  .app.sidebar-collapsed .nav-badge,
  .app.sidebar-collapsed .btn-logout span:not(.nav-icon){
    display:block
  }
  .app.sidebar-collapsed .nav-btn,
  .app.sidebar-collapsed .btn-logout{
    justify-content:flex-start;
    padding:10px 12px
  }
  .app.sidebar-collapsed .nav-icon{
    margin:0;
    width:20px;
    font-size:16px
  }
  .app.sidebar-collapsed .sidebar-user{
    justify-content:flex-start;
    padding:12px 20px
  }
  .app.sidebar-collapsed .sidebar-logo{
    padding:24px 20px 16px;
    text-align:left
  }
  .app.sidebar-collapsed .sidebar-logo h1{
    font-size:20px
  }
  .app.sidebar-open .sidebar{left:0}
  .sidebar-backdrop{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    pointer-events:none;
    transition:opacity .25s ease;
    z-index:1100
  }
  .app.sidebar-open .sidebar-backdrop{
    opacity:1;
    pointer-events:auto
  }
  .task-item{grid-template-columns:20px 1fr 70px 80px}
  .task-item>*:nth-child(n+5){display:none}
}

.switch-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--text2); cursor: pointer;
}
.switch-agendar {
    appearance: none; width: 32px; height: 18px;
    background: var(--surface3); border-radius: 20px;
    position: relative; cursor: pointer; transition: background .2s;
    border: 1px solid var(--border2);
}
.switch-agendar::after {
    content: ''; position: absolute; width: 12px; height: 12px;
    background: var(--text3); border-radius: 50%;
    top: 2px; left: 2px; transition: all .2s;
}
.switch-agendar:checked { background: var(--green); border-color: var(--green); }
.switch-agendar:checked::after { left: 16px; background: #fff; }


.sch-btn-informe {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    font-size: 11px;
    text-decoration: none;
}

/* ═══════════ SOPORTES ═══════════ */
.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.soporte-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.soporte-card:hover {
    border-color: var(--border2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}
.sop-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sop-card-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'DM Mono', monospace;
}
.sop-card-date {
    font-size: 11px;
    color: var(--text3);
    font-family: 'DM Mono', monospace;
}
.sop-card-client {
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
}
.sop-card-desc {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    flex: 1;
}
.sop-card-contact {
    font-size: 12px;
    color: var(--text2);
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.sop-card-assignment {
    background: rgba(79, 142, 247, 0.1);
    border: 1px dashed rgba(79, 142, 247, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 12px;
    color: var(--text2);
    line-height: 1.6;
}
.sop-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* ═══════════ SPRINT DATES ═══════════ */
.sprint-title-group { display: flex; flex-direction: column; gap: 2px; min-width: 0 }
.sprint-dates { font-size: 10px; color: var(--text3); font-family: 'DM Mono', monospace; letter-spacing: .3px }

/* ═══════════ INLINE BULK MODE ═══════════ */

/* Row that holds Stats + Bulk toggle buttons side by side */
.stats-toggle-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0 }
.stats-toggle-row .stats-board-toggle-btn { margin-bottom: 12px }

/* Bulk mode toggle button — purple tint to distinguish */
.bulk-mode-toggle-btn { background: rgba(124,90,247,.12); border-color: rgba(124,90,247,.35); color: var(--accent2) }
.bulk-mode-toggle-btn:hover { background: rgba(124,90,247,.2); color: var(--accent2) }
.bulk-mode-toggle-btn.open { background: rgba(124,90,247,.25); border-color: var(--accent2); color: var(--accent2); box-shadow: 0 0 0 2px rgba(124,90,247,.2) }

/* Inline checkboxes — always in DOM, hidden until bulk mode active */
.bulk-cb {
    display: none;
    width: 17px; height: 17px;
    accent-color: var(--accent2);
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .15s;
}
.bulk-cb:hover { transform: scale(1.15) }
.bulk-mode-active .bulk-cb { display: inline-block }

/* Activity header checkbox */
.bulk-cb-act { margin-right: 4px; align-self: center }

/* Task table bulk column — hidden header + cell until active */
.bulk-th, .bulk-td { width: 28px !important; padding: 0 6px !important; text-align: center; display: none }
.bulk-mode-active .bulk-th,
.bulk-mode-active .bulk-td { display: table-cell }

/* Visual highlight for selected items */
.bulk-mode-active .act-block:has(.bulk-cb-act:checked) { border-left-color: var(--accent2); background: rgba(124,90,247,.04) }
.bulk-mode-active tr:has(.bulk-cb-task:checked) { background: rgba(124,90,247,.08) !important }
.bulk-mode-active .sprint-block:has(.bulk-cb-sprint:checked) { border-color: var(--accent2); box-shadow: 0 0 0 2px rgba(124,90,247,.2) }

/* Sprint checkbox in bulk mode */
.bulk-cb-sprint { margin-right: 8px; align-self: center; flex-shrink: 0 }

/* ── Fixed bottom bar ── */
.bulk-mode-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--surface);
    border-top: 2px solid var(--accent2);
    box-shadow: var(--shadow-up);
    flex-wrap: wrap;
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.bulk-mode-bar.active { transform: translateY(0) }
.app.sidebar-collapsed .bulk-mode-bar { left: var(--sidebar-collapsed-w) }

.bulk-bar-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; color: var(--accent2); white-space: nowrap; flex-shrink: 0 }
.bulk-bar-field { display: flex; flex-direction: column; gap: 4px; min-width: 140px; flex: 1; max-width: 220px }
.bulk-field-label { font-size: 10px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .8px; font-family: 'DM Mono', monospace }
.bulk-input { max-width: 100% }
.bulk-bar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; margin-left: auto }

/* Add bottom padding when bar is visible so content doesn't hide behind it */
body:has(.bulk-mode-bar.active) .view-content { padding-bottom: 90px }

/* ═══════════ MOBILE RESPONSIVE — DETAIL VIEW ═══════════ */
@media (max-width: 768px) {
    .view-content { padding: 12px 10px }

    /* Detail header */
    .detail-header { flex-direction: column; gap: 12px }
    .detail-header-info h1 { font-size: 18px }
    .detail-meta { flex-wrap: wrap; gap: 8px }
    .detail-meta .btn { font-size: 11px; padding: 6px 10px }
    .detail-actions { width: 100% }
    .detail-actions .btn { width: 100%; justify-content: center }

    /* Stats toggle row */
    .stats-board-toggle-btn { font-size: 10px; padding: 5px 10px }
    .stats-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; padding: 12px !important }
    .stat-value { font-size: 22px }

    /* Sprint header — stack vertically */
    .sprint-header { flex-wrap: wrap; gap: 8px; padding: 10px 12px }
    .sprint-header-left { flex: 1 1 100%; min-width: 0 }
    .sprint-stats-row { display: none }
    .sprint-actions { flex-wrap: wrap; gap: 4px; margin-left: 0; width: 100% }
    .sprint-actions .btn { font-size: 11px; padding: 5px 8px }
    .sprint-label { font-size: 13px }
    .sprint-dates { font-size: 10px }

    /* Activity block */
    .act-block { margin: 0 6px 10px 12px }
    .act-top-row { flex-wrap: wrap; gap: 8px }
    .act-actions { flex-wrap: wrap; gap: 4px; margin-left: 0; width: 100% }
    .act-actions .btn { font-size: 11px; padding: 5px 8px }
    .act-meta { flex-wrap: wrap; gap: 6px; font-size: 10px }
    .switch-label { font-size: 10px }

    /* Task table — horizontal scroll */
    .act-tasks { overflow-x: auto; -webkit-overflow-scrolling: touch }
    .task-table { min-width: 560px }
    .task-table th, .task-table td { padding: 8px 10px; font-size: 11px }

    /* Modals */
    .modal { max-width: calc(100vw - 24px); border-radius: 12px }
    .modal-body { padding: 16px }
    .modal-header { padding: 16px 16px 12px }
    .modal-footer { padding: 12px 16px }
    .form-row { grid-template-columns: 1fr }

    .sprint-body { padding: 0 0 8px 0 }

    /* Bulk mode bar — stretch full width on mobile */
    .bulk-mode-bar { left: 0; padding: 10px 14px; gap: 8px }
    .bulk-bar-field { min-width: 120px; max-width: 48% }
    .bulk-bar-actions { margin-left: 0; width: 100%; justify-content: flex-end }
    .bulk-bar-title { width: 100% }
    body:has(.bulk-mode-bar.active) .view-content { padding-bottom: 130px }
}

@media (max-width: 480px) {
    .view-content { padding: 8px 6px }
    .sprint-header { padding: 8px 10px }
    .act-block { margin: 0 4px 8px 8px }
    .detail-header-info h1 { font-size: 16px }
    .bulk-bar-field { max-width: 100% }
    body:has(.bulk-mode-bar.active) .view-content { padding-bottom: 160px }
}
/* AGENDA DEL T�CNICO EN MODAL */
.tech-agenda-panel {
    margin-top: 15px;
    background: var(--agenda-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.tech-agenda-header {
    background: var(--agenda-head);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text1);
    border-bottom: 1px solid var(--border);
}

.tech-agenda-body {
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.tech-agenda-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--tint-05);
    font-size: 12px;
}

.tech-agenda-slot:last-child {
    border-bottom: none;
}

.tech-agenda-time {
    color: var(--text2);
    min-width: 80px;
    font-family: monospace;
}

.tech-agenda-desc {
    color: var(--text1);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-agenda-empty {
    color: var(--text3);
    text-align: center;
    font-style: italic;
    padding: 10px 0;
}

.tech-agenda-loading {
    color: var(--accent2);
    text-align: center;
    padding: 10px 0;
    font-weight: 600;
}

/* ── Usuarios de solo consulta (función especial): se ocultan los controles de edición de proyectos ── */
body.solo-lectura [onclick*="openProyectoModal"],
body.solo-lectura [onclick*="editProyectoDetalle"],
body.solo-lectura [onclick*="openSprintModal"],
body.solo-lectura [onclick*="openActividadModal"],
body.solo-lectura [onclick*="openTareaModal"],
body.solo-lectura [onclick*="deleteSprint"],
body.solo-lectura [onclick*="deleteActividad"],
body.solo-lectura [onclick*="deleteTarea"],
body.solo-lectura [onclick*="openPdfConfigModal"],
body.solo-lectura [onclick*="toggleBulkMode"],
body.solo-lectura [onclick*="iniciarAgendar"],
body.solo-lectura [onclick*="VerificarProyectos"],
body.solo-lectura .project-card-actions,
body.solo-lectura #bulkModeBar,
body.solo-lectura .bulk-cb,
body.solo-lectura .solo-lectura-modal .modal-footer .btn-primary,
body.solo-lectura .solo-lectura-modal .btn-del-anexo,
body.solo-lectura .solo-lectura-modal [onclick*="agregarArchivosAColaTask"],
body.solo-lectura .solo-lectura-modal [onclick*="openCapacitacionModal"]{display:none!important}
body.solo-lectura [onchange*="toggleAgendar"]{pointer-events:none;opacity:.6}
body.solo-lectura .solo-lectura-modal input:disabled,
body.solo-lectura .solo-lectura-modal select:disabled,
body.solo-lectura .solo-lectura-modal textarea:disabled{opacity:.85;cursor:not-allowed}

/* ═══════════ NOTIFICACIONES (items del panel de la campana; los crea notificaciones.js) ═══════════ */
.notif-item{padding:10px 15px;border-bottom:1px solid #eee;cursor:pointer;transition:background .2s;background:#fff}
.notif-item.unread{background:#f0f8ff}
.notif-item:hover{background:#e6f2ff}
.notif-item .nt{font-weight:bold;font-size:13px;color:#333;margin-bottom:3px}
.notif-item .nm{font-size:12px;color:#666}
.notif-item .nh{font-size:10px;color:#aaa;margin-top:5px}
:root[data-theme="light"] .notif-item{border-bottom-color:var(--border);background:var(--surface)}
:root[data-theme="light"] .notif-item.unread{background:#eef4ff}
:root[data-theme="light"] .notif-item:hover{background:#e3edff}
:root[data-theme="light"] .notif-item .nt{color:var(--text)}
:root[data-theme="light"] .notif-item .nm{color:var(--text2)}
:root[data-theme="light"] .notif-item .nh{color:var(--text3)}

/* ═══════════ VISORES OSCUROS ═══════════
   Los visores de anexos/imágenes tienen un fondo negro fijo en ambos temas y botones de texto blanco;
   el botón de cerrar necesita un fondo translúcido para verse sobre ese negro (en claro su fondo normal es blanco). */
.modal-close[style*="color:#fff"],
.modal-close[style*="color: #fff"]{background:rgba(255,255,255,.15)}