@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700;800&display=swap');
:root{--navy:#0d3b66;--navy2:#123d68;--blue:#2478ff;--bg:#f3f7ff;--ink:#0d2b4f;--muted:#4b6688;--line:#dce7f8;--teal:#20c7b3;--violet:#8057f5;--coral:#ff6685;--gold:#ffbd45;--white:#fff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'Roboto',Arial,sans-serif}a{color:inherit;text-decoration:none}.login-page{min-height:100vh;background:linear-gradient(145deg,#f3f7ff,#fff 55%,#e9f3ff);display:grid;place-items:center;padding:24px}.login-shell{width:min(100%,480px);text-align:center}.brand-mark{display:flex;gap:5px;justify-content:center;margin:0 auto 18px}.brand-mark span{height:6px;width:27px;border-radius:5px}.brand-mark span:nth-child(1){background:#f47765}.brand-mark span:nth-child(2){background:#f4c64e}.brand-mark span:nth-child(3){background:#39bfb2}.brand-mark span:nth-child(4){background:#a886ee}.brand-mark span:nth-child(5){background:#77b8f2}.brand-kicker{font-size:10px;font-weight:800;letter-spacing:1.6px;color:var(--muted)}h1,h2,h3,p{margin-top:0}.login-shell h1{font-size:38px;letter-spacing:-1.4px;margin:10px 0 2px;color:var(--navy)}.login-shell h1 span{color:var(--blue)}.lead{color:var(--muted);margin-bottom:24px}.login-card{background:white;border:1px solid var(--line);border-radius:22px;padding:28px;text-align:left;box-shadow:0 20px 50px #0d3b6610}.login-icon{width:46px;height:46px;border-radius:14px;background:#e8f1ff;color:var(--navy);display:grid;place-items:center;font-size:25px;font-weight:800;margin-bottom:16px}.login-card h2{font-size:20px;color:var(--navy);margin-bottom:8px}.login-card p{color:var(--muted);line-height:1.6;font-size:13px}.button{display:inline-flex;justify-content:center;align-items:center;gap:8px;border:1px solid #d8e6fb;border-radius:11px;background:#edf5ff;color:#075dc9;padding:12px 16px;font-size:13px;font-weight:800;cursor:pointer}.button-primary{background:linear-gradient(135deg,var(--blue),var(--navy));border-color:transparent;color:#fff;box-shadow:0 6px 16px #2478ff30}.button:disabled{opacity:.55;cursor:not-allowed}.button-wide{width:100%;margin:7px 0 12px}.notice{border-radius:10px;padding:12px;margin:10px 0;font-size:12px;line-height:1.5}.notice-info{border:1px solid #d6e6ff;background:#f0f6ff;color:#214b76}.notice-error{border:1px solid #ffd4d9;background:#fff0f1;color:#a5263b}.login-security{font-size:11px;color:var(--muted);text-align:center;margin-top:11px}.login-security span{color:#0f9e79}.login-shell footer{margin-top:20px;color:var(--muted);font-size:11px}.app-shell{min-height:100vh;display:grid;grid-template-columns:245px minmax(0,1fr)}.sidebar{background:linear-gradient(160deg,#0e3154,#123d68 75%,#0b2c4b);color:#fff;padding:24px 16px;display:flex;flex-direction:column}.brand{padding:0 12px 25px}.brand .brand-mark{justify-content:flex-start;margin:0 0 16px}.brand h2{font-size:23px;margin:0 0 6px}.brand p{font-size:11px;color:#d6e6fa;line-height:1.5}.nav{display:grid;gap:5px}.nav a{display:block;color:#f1f6fd;padding:12px 14px;border-radius:9px}.nav a:hover,.nav a.active{background:#e3efff;color:#10345b;font-weight:800}.side-bottom{margin-top:auto;padding:25px 14px 0;color:#d5e5f5;font-size:11px}.side-bottom strong{font-size:25px;display:block;color:white}.main{min-width:0}.topbar{min-height:68px;background:white;border-bottom:1px solid var(--line);padding:12px 25px;display:flex;align-items:center;justify-content:space-between;gap:15px}.crumb{font-size:12px;color:var(--muted)}.profile{display:flex;align-items:center;gap:10px}.avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#d7e9ff;color:#17558d;font-weight:800;overflow:hidden}.profile-name{font-weight:800;font-size:13px}.profile-role{font-size:11px;color:var(--muted);margin-top:3px}.logout{font-size:12px;color:#c72c43;border:1px solid #ffd4d9;padding:8px 11px;border-radius:9px;margin-left:8px}.content{padding:25px;max-width:1500px;margin:auto}.welcome{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.welcome h1{font-size:clamp(28px,3vw,38px);letter-spacing:-1px;color:var(--navy);margin-bottom:7px}.welcome p{color:var(--muted);margin:0;line-height:1.6}.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0}.stat-card{background:white;border:1px solid var(--line);border-radius:16px;padding:18px;box-shadow:0 8px 22px #143d6509}.stat-label{font-size:12px;font-weight:700;color:var(--muted)}.stat-value{font-size:31px;font-weight:800;margin-top:8px;color:var(--navy)}.panel{background:white;border:1px solid var(--line);border-radius:19px;padding:22px;margin-bottom:18px;box-shadow:0 8px 26px #174b7a08}.panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:18px}.panel-head h2{font-size:19px;margin:0}.muted{color:var(--muted)}.project-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.project-card{border:1px solid var(--line);border-top:5px solid var(--blue);border-radius:16px;padding:18px;background:linear-gradient(145deg,#fff,#f8fbff);min-width:0}.project-top{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}.pill{display:inline-block;border-radius:20px;padding:6px 10px;font-size:10px;font-weight:800;background:#e1f8f1;color:#087f63}.pill-private{background:#f1e9ff;color:#6843b3}.project-card h3{font-size:18px;color:var(--navy);line-height:1.35;margin:0 0 9px;overflow-wrap:anywhere}.project-card>p{font-size:12px;line-height:1.6;color:var(--muted);white-space:normal}.notes{background:#f7faff;border:1px solid #dce7ff;border-left:3px solid #234d68;padding:11px 12px;border-radius:9px;margin:12px 0}.notes strong{font-size:12px}.notes p{font-size:12px;line-height:1.6;color:var(--muted);margin:6px 0 0}.project-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0}.project-meta div{min-width:0}.project-meta dt{font-size:10px;color:var(--muted);margin-bottom:4px}.project-meta dd{margin:0;font-size:12px;font-weight:700;overflow-wrap:anywhere}.progress-label{display:flex;justify-content:space-between;font-size:11px;margin-bottom:6px;color:var(--muted)}.progress{height:8px;border-radius:9px;background:#eaf0fa;overflow:hidden}.progress span{display:block;height:100%;background:var(--blue);border-radius:9px}.read-only-note{margin-top:12px;font-size:10px;color:var(--muted);padding-top:10px;border-top:1px solid var(--line)}.empty{text-align:center;padding:36px 12px;color:var(--muted)}.empty h3{color:var(--navy);margin-bottom:6px}.footer{font-size:10px;color:var(--muted);padding:15px 2px}@media(max-width:850px){.app-shell{grid-template-columns:1fr}.sidebar{padding:12px}.brand{padding:0 6px 12px}.brand .brand-mark{margin-bottom:8px}.brand-mark span{width:17px;height:4px}.brand h2{font-size:20px}.brand p{margin-bottom:4px}.nav{display:flex;overflow-x:auto}.nav a{white-space:nowrap;padding:10px}.side-bottom{display:none}.content{padding:15px}.topbar{padding:12px 14px}.project-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.stat-grid{grid-template-columns:1fr 1fr;gap:8px}.stat-card{padding:13px}.stat-value{font-size:25px}.project-grid{grid-template-columns:1fr}.project-meta{grid-template-columns:1fr 1fr}.login-card{padding:21px}.login-shell h1{font-size:32px}.profile-role{max-width:150px}}

.field-label{display:block;font-size:12px;font-weight:800;color:var(--navy);margin:14px 0 6px}.field-input{display:block;width:100%;padding:12px 13px;border:1px solid #d9e3f0;border-radius:10px;background:white;color:var(--ink);font:inherit;margin:6px 0 10px}.field-input:focus{outline:3px solid #2478ff24;border-color:var(--blue)}.login-help{font-size:11px!important;margin:12px 0 0!important;text-align:center}.users-table{border-collapse:collapse;width:100%;min-width:700px;background:#fff}.users-table th{text-align:left;font-size:12px;padding:12px;background:#edf4ff;color:#0d3b66}.users-table td{padding:12px;border-bottom:1px solid var(--line);font-size:12px;vertical-align:top}.users-table small{display:inline-block;color:var(--muted);margin-top:4px}.users-table form{margin:0}


.card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.button-danger{background:#fff0f1;color:#c72c43;border-color:#ffd4d9}.narrow{max-width:700px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px}.field-label.full{grid-column:1/-1}.field-input{width:100%;padding:11px 12px;border:1px solid #d9e3f0;border-radius:9px;background:#fff;color:var(--ink);font:inherit;margin-top:6px}.field-input:focus{outline:3px solid #2478ff24;border-color:var(--blue)}textarea.field-input{min-height:95px;resize:vertical}.field-input[multiple]{min-height:135px}.table-wrap{overflow-x:auto}.data-table{border-collapse:collapse;width:100%;min-width:680px;background:white}.data-table th{padding:12px;text-align:left;background:#edf4ff;color:#0d3b66;font-size:12px}.data-table td{padding:12px;border-bottom:1px solid var(--line);font-size:12px;vertical-align:top;line-height:1.5}.data-table td small{display:block;color:var(--muted);margin-top:4px;max-width:400px;white-space:pre-wrap}.data-table form{margin:0}.small{font-size:11px}.inline-form{display:flex;align-items:center;gap:5px}.field-input.compact{width:auto;min-width:115px;padding:7px 8px;font-size:11px;margin:0}.inline-form .button{padding:7px 9px;font-size:10px}.temp-pass{font-size:20px;letter-spacing:1px;font-weight:900;color:var(--navy);overflow-wrap:anywhere;margin:12px 0}.home-columns{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:18px;align-items:start}.task-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:13px 0;border-bottom:1px solid #edf2f9}.task-row:last-child{border-bottom:0}.task-row strong{display:block}.task-row small{display:block;color:var(--muted);margin-top:4px}.details-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin:12px 0 18px}.details-grid small{display:block;color:var(--muted);font-size:11px;margin-bottom:5px}.details-grid strong{display:block;overflow-wrap:anywhere}.back-link{display:inline-block;color:#075dc9;margin-bottom:12px;font-weight:700}.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:18px}.calendar-toolbar h2{text-align:center;margin:0;color:var(--navy);font-size:20px}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-left:1px solid var(--line);border-top:1px solid var(--line);border-radius:10px;overflow:hidden}.calendar-day-name{padding:10px 3px;text-align:center;background:#edf4ff;color:#345779;font-weight:800;font-size:11px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.calendar-cell{min-height:104px;padding:6px;background:#fff;border-right:1px solid var(--line);border-bottom:1px solid var(--line);min-width:0}.calendar-cell.today{box-shadow:inset 0 0 0 2px var(--blue)}.calendar-number{font-weight:800;font-size:11px;margin-bottom:5px}.calendar-event{display:block;width:100%;border:0;border-radius:5px;background:#e5f2ff;color:#124d82;padding:5px;margin:3px 0;text-align:left;font-size:10px;line-height:1.3;overflow-wrap:anywhere}.calendar-event.project-event{background:#eee8ff;color:#5735a5;border-left:3px solid #8057f5}.calendar-event.done{background:#e5f7ee;color:#13734c}.calendar-legend{display:flex;gap:12px;flex-wrap:wrap;font-size:11px;color:var(--muted);margin-top:12px}.calendar-legend span{display:inline-flex;align-items:center;gap:6px}.calendar-legend i{display:inline-block;width:10px;height:10px;border-radius:3px}.person-inline{display:flex;align-items:center;gap:8px}.person-inline img{width:34px;height:34px;object-fit:cover;border-radius:50%}.person-inline .avatar{width:34px;height:34px;font-size:11px;flex-shrink:0}.avatar img{width:100%;height:100%;object-fit:cover}.resource-link{color:#075dc9;font-weight:800}.nav a{font-size:13px}.panel h2{font-size:19px}.notice-error p{margin:6px 0}.project-card p{line-height:1.55}.read-only-note{background:#f7faff;padding:10px;border-radius:8px}
@media(max-width:900px){.home-columns{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field-label.full{grid-column:auto}.details-grid{grid-template-columns:1fr 1fr}.calendar-cell{min-height:78px;padding:3px}.calendar-event{font-size:9px;padding:3px}}@media(max-width:560px){.stat-grid{grid-template-columns:1fr 1fr}.calendar-day-name{font-size:9px}.calendar-toolbar h2{width:100%;order:-1}.details-grid{grid-template-columns:1fr}}

/* Paleta viva: 25 colores de proyecto antes de repetir */
.project-grid .project-card:nth-child(1){border-top-color:#00A6E8;--project-color:#00A6E8;}
.project-grid .project-card:nth-child(2){border-top-color:#00C9A7;--project-color:#00C9A7;}
.project-grid .project-card:nth-child(3){border-top-color:#C05283;--project-color:#C05283;}
.project-grid .project-card:nth-child(4){border-top-color:#469568;--project-color:#469568;}
.project-grid .project-card:nth-child(5){border-top-color:#FF6238;--project-color:#FF6238;}
.project-grid .project-card:nth-child(6){border-top-color:#8DD8C2;--project-color:#8DD8C2;}
.project-grid .project-card:nth-child(7){border-top-color:#FF6B63;--project-color:#FF6B63;}
.project-grid .project-card:nth-child(8){border-top-color:#FF8190;--project-color:#FF8190;}
.project-grid .project-card:nth-child(9){border-top-color:#27BE37;--project-color:#27BE37;}
.project-grid .project-card:nth-child(10){border-top-color:#FFD76B;--project-color:#FFD76B;}
.project-grid .project-card:nth-child(11){border-top-color:#F58BC4;--project-color:#F58BC4;}
.project-grid .project-card:nth-child(12){border-top-color:#FFDCCB;--project-color:#FFDCCB;}
.project-grid .project-card:nth-child(13){border-top-color:#E8C681;--project-color:#E8C681;}
.project-grid .project-card:nth-child(14){border-top-color:#A0CA35;--project-color:#A0CA35;}
.project-grid .project-card:nth-child(15){border-top-color:#F0D4CB;--project-color:#F0D4CB;}
.project-grid .project-card:nth-child(16){border-top-color:#FF4F68;--project-color:#FF4F68;}
.project-grid .project-card:nth-child(17){border-top-color:#F34DAA;--project-color:#F34DAA;}
.project-grid .project-card:nth-child(18){border-top-color:#00AEB8;--project-color:#00AEB8;}
.project-grid .project-card:nth-child(19){border-top-color:#B1D52E;--project-color:#B1D52E;}
.project-grid .project-card:nth-child(20){border-top-color:#E87379;--project-color:#E87379;}
.project-grid .project-card:nth-child(21){border-top-color:#FFBD65;--project-color:#FFBD65;}
.project-grid .project-card:nth-child(22){border-top-color:#C5F000;--project-color:#C5F000;}
.project-grid .project-card:nth-child(23){border-top-color:#076AA8;--project-color:#076AA8;}
.project-grid .project-card:nth-child(24){border-top-color:#DFFF9A;--project-color:#DFFF9A;}
.project-grid .project-card:nth-child(25){border-top-color:#6D89C6;--project-color:#6D89C6;}

.institutional-logo{display:block;width:100%;max-width:205px;height:auto;background:#fff;border-radius:8px;padding:5px;margin:0 0 15px}.login-institutional-logo{display:block;width:min(100%,430px);height:auto;margin:0 auto 18px}.member-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:8px;margin:8px 0 12px}.member-option{position:relative;display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:9px 10px;background:#fff;cursor:pointer;min-width:0}.member-option:has(input:checked){border-color:var(--blue);background:#eef5ff;box-shadow:0 0 0 2px #2478ff18}.member-option input{position:absolute;opacity:0;width:1px;height:1px}.member-check{width:19px;height:19px;flex:0 0 19px;border:1px solid #b7c8dc;border-radius:6px;color:transparent;display:grid;place-items:center;font-size:13px;font-weight:900;background:white}.member-option input:checked+.member-check{background:var(--blue);border-color:var(--blue);color:#fff}.member-option img,.member-avatar{width:34px;height:34px;flex:0 0 34px;object-fit:cover;border-radius:50%;display:grid;place-items:center;background:#dce7ff;color:#0d3b66;font-weight:800;font-size:11px}.member-name{font-size:11px;font-weight:750;overflow-wrap:anywhere}.member-option:focus-within{outline:3px solid #2478ff30}


/* Gestión SIED: identidad visual retomada y componentes de selección */
.institutional-logo-bottom{display:block;width:100%;max-width:180px;max-height:86px;height:auto;object-fit:contain;background:#fff;border-radius:8px;padding:5px;margin:0 0 10px}
.side-bottom{display:flex;flex-direction:column;align-items:flex-start;gap:0}
.side-bottom>span{font-size:10px;color:#d5e5f5;line-height:1.45}
.brand .brand-mark{display:flex;gap:5px;justify-content:flex-start;margin:0 0 16px}
.brand-mark span{height:6px;width:27px;border-radius:5px;display:inline-block;flex:0 0 27px}
.brand-mark span:nth-child(1){background:#f47765}.brand-mark span:nth-child(2){background:#f4c64e}.brand-mark span:nth-child(3){background:#39bfb2}.brand-mark span:nth-child(4){background:#a886ee}.brand-mark span:nth-child(5){background:#77b8f2}
.member-section{min-width:0;margin-top:8px}
.member-section-head{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;color:var(--navy);font-size:13px;font-weight:800}
.member-section-head small{font-size:11px;color:var(--muted);font-weight:400;line-height:1.45}
.member-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:9px;margin:8px 0 12px}
.member-option{position:relative;display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:10px;background:#fff;cursor:pointer;min-width:0;transition:border-color .15s,background .15s,box-shadow .15s}
.member-option:hover{border-color:#99b7df;background:#fbfdff}
.member-option:has(input:checked){border-color:var(--blue);background:#eef5ff;box-shadow:0 0 0 2px #2478ff18}
.member-option input{position:absolute;opacity:0;width:1px;height:1px}
.member-option input:focus-visible+.member-check{outline:3px solid #2478ff55;outline-offset:2px}
.member-check{width:19px;height:19px;flex:0 0 19px;border:1px solid #b7c8dc;border-radius:6px;color:transparent;display:grid;place-items:center;font-size:13px;font-weight:900;background:white}
.member-option input:checked+.member-check{background:var(--blue);border-color:var(--blue);color:#fff}
.member-option img,.member-avatar{width:38px;height:38px;flex:0 0 38px;object-fit:cover;border-radius:50%;display:grid;place-items:center;background:#dce7ff;color:#0d3b66;font-weight:800;font-size:11px}
.member-name{font-size:11px;font-weight:750;overflow-wrap:anywhere;line-height:1.35}
.member-option:focus-within{outline:3px solid #2478ff30}
.project-links-editor{border:1px solid var(--line);border-radius:14px;background:#fbfdff;padding:14px;margin-top:8px}
.project-link-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(130px,.65fr) minmax(220px,1.4fr);gap:12px;align-items:end;border-bottom:1px solid #e9eff8;padding:5px 0 11px;margin-bottom:7px}
.project-link-row:last-child{border-bottom:0}
.project-link-row label{font-size:11px;font-weight:800;color:var(--navy)}
.project-link-row .field-input{margin-bottom:0;font-weight:400}
.project-links-list{display:grid;gap:9px}
.project-link-item{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.project-link-item:hover{border-color:#9bbff0;background:#fbfdff}
.project-link-icon{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#e8f1ff;color:var(--navy);font-weight:900;font-size:18px}
.project-link-item>span:nth-child(2){display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.project-link-item strong{font-size:12px;overflow-wrap:anywhere;color:var(--navy)}
.project-link-item small{font-size:10px;color:var(--muted)}
.project-link-open{font-size:11px;font-weight:800;color:#075dc9;white-space:nowrap}
@media(max-width:850px){.side-bottom{display:flex;align-items:flex-start;padding:12px 6px 0}.institutional-logo-bottom{max-width:145px;max-height:65px}.project-link-row{grid-template-columns:1fr 1fr}.project-link-url{grid-column:1/-1}}
@media(max-width:560px){.member-picker{grid-template-columns:1fr}.project-link-row{grid-template-columns:1fr}.project-link-url{grid-column:auto}.project-link-item{align-items:flex-start}.project-link-open{display:none}}
.project-grid .project-card:nth-child(25n + 1){border-top-color:#00A6E8;--project-color:#00A6E8;}
.project-grid .project-card:nth-child(25n + 2){border-top-color:#00C9A7;--project-color:#00C9A7;}
.project-grid .project-card:nth-child(25n + 3){border-top-color:#C05283;--project-color:#C05283;}
.project-grid .project-card:nth-child(25n + 4){border-top-color:#469568;--project-color:#469568;}
.project-grid .project-card:nth-child(25n + 5){border-top-color:#FF6238;--project-color:#FF6238;}
.project-grid .project-card:nth-child(25n + 6){border-top-color:#8DD8C2;--project-color:#8DD8C2;}
.project-grid .project-card:nth-child(25n + 7){border-top-color:#FF6B63;--project-color:#FF6B63;}
.project-grid .project-card:nth-child(25n + 8){border-top-color:#FF8190;--project-color:#FF8190;}
.project-grid .project-card:nth-child(25n + 9){border-top-color:#27BE37;--project-color:#27BE37;}
.project-grid .project-card:nth-child(25n + 10){border-top-color:#FFD76B;--project-color:#FFD76B;}
.project-grid .project-card:nth-child(25n + 11){border-top-color:#F58BC4;--project-color:#F58BC4;}
.project-grid .project-card:nth-child(25n + 12){border-top-color:#FFDCCB;--project-color:#FFDCCB;}
.project-grid .project-card:nth-child(25n + 13){border-top-color:#E8C681;--project-color:#E8C681;}
.project-grid .project-card:nth-child(25n + 14){border-top-color:#A0CA35;--project-color:#A0CA35;}
.project-grid .project-card:nth-child(25n + 15){border-top-color:#F0D4CB;--project-color:#F0D4CB;}
.project-grid .project-card:nth-child(25n + 16){border-top-color:#FF4F68;--project-color:#FF4F68;}
.project-grid .project-card:nth-child(25n + 17){border-top-color:#F34DAA;--project-color:#F34DAA;}
.project-grid .project-card:nth-child(25n + 18){border-top-color:#00AEB8;--project-color:#00AEB8;}
.project-grid .project-card:nth-child(25n + 19){border-top-color:#B1D52E;--project-color:#B1D52E;}
.project-grid .project-card:nth-child(25n + 20){border-top-color:#E87379;--project-color:#E87379;}
.project-grid .project-card:nth-child(25n + 21){border-top-color:#FFBD65;--project-color:#FFBD65;}
.project-grid .project-card:nth-child(25n + 22){border-top-color:#C5F000;--project-color:#C5F000;}
.project-grid .project-card:nth-child(25n + 23){border-top-color:#076AA8;--project-color:#076AA8;}
.project-grid .project-card:nth-child(25n + 24){border-top-color:#DFFF9A;--project-color:#DFFF9A;}
.project-grid .project-card:nth-child(25n + 25){border-top-color:#6D89C6;--project-color:#6D89C6;}


/* Lista diaria de Dirección */
.daily-checklist{display:grid;gap:8px;margin-top:12px}
.daily-checklist-row{display:flex;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.daily-checklist-row.done{background:#f4fbf8;border-color:#cceee2}
.daily-checklist-row .check-form{display:flex;align-items:center;gap:10px;flex:1;min-width:0;margin:0}
.daily-checklist-row input[type=checkbox]{width:19px;height:19px;accent-color:var(--teal);flex:0 0 19px;cursor:pointer}
.daily-checklist-row .check-text{font-size:13px;line-height:1.45;overflow-wrap:anywhere}
.daily-checklist-row.done .check-text{text-decoration:line-through;color:var(--muted)}
.daily-checklist-row .delete-check{flex:0 0 auto;padding:6px 9px;font-size:11px}
.daily-checklist-add{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;align-items:end}
.daily-checklist-add .field-input{margin:0}
.checklist-progress{font-size:12px;color:var(--muted);font-weight:700}
.task-project-link{font-weight:800;color:var(--blue)}
@media(max-width:600px){.daily-checklist-row{padding:9px}.daily-checklist-add{grid-template-columns:1fr}.daily-checklist-add .button{width:100%}}

/* Correcciones de presentación solicitadas */
body,button,input,select,textarea{font-family:'Roboto',Arial,sans-serif!important}
.field-input{font-weight:400!important}
.field-label{font-weight:700}
.field-label .field-input{font-weight:400!important}
.member-option img,.member-avatar{display:none!important}
.member-option{gap:10px;padding:11px 12px}
.member-check{opacity:1!important;position:relative!important;width:20px;height:20px;flex:0 0 20px;border:2px solid #8aa4c2;color:transparent;background:#fff}
.member-option input{position:absolute;opacity:0;width:1px;height:1px}
.member-option input:checked+.member-check{background:#0d3b66;border-color:#0d3b66;color:#fff}
.member-name{font-size:13px;font-weight:500}
.sidebar{background:linear-gradient(160deg,#0d3b66,#123d68 75%,#0b2c4b)}
.nav a{font-size:14px;font-weight:600}
.brand .brand-mark{display:flex;gap:5px;margin-bottom:16px}
.project-section-title{display:flex;align-items:center;gap:10px;color:#0d3b66;margin:22px 0 12px;font-size:20px;font-weight:700}
.project-section-title:before{content:'';display:block;width:5px;height:24px;border-radius:4px;background:#2ec4b6}
.home-calendar-frame{width:100%;height:560px;border:0;border-radius:12px;background:#fff}
.calendar-view-toggle{display:flex;gap:6px;align-items:center}
.calendar-view-toggle .active{background:#0d3b66;color:#fff;border-color:#0d3b66}
.calendar-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.calendar-week-day{min-height:180px;border:1px solid var(--line);border-radius:10px;background:#fff;padding:9px;min-width:0}
.calendar-week-day.today{border:2px solid #0d3b66;background:#f6faff}
@media(max-width:700px){.calendar-week-grid{grid-template-columns:1fr}.calendar-week-day{min-height:90px}.home-calendar-frame{height:650px}}

/* V3: identidad institucional y legibilidad */
html,body,button,input,select,textarea{font-family:'Roboto',Arial,sans-serif!important}
body{font-size:14px}
.sidebar{position:relative;border-top:0}
.sidebar:before{content:"";display:block;height:7px;position:absolute;top:0;left:0;right:0;background:linear-gradient(90deg,#f47765 0 20%,#f4c64e 20% 40%,#39bfb2 40% 60%,#a886ee 60% 80%,#77b8f2 80% 100%)}
.brand{padding-top:14px}
.nav a{font-size:14px;font-weight:600;letter-spacing:.1px;color:#fff}
.nav a:hover,.nav a.active{font-weight:700}
.field-label{font-weight:700}
.field-input,.field-input option{font-weight:400!important;font-family:'Roboto',Arial,sans-serif!important}
.field-input::placeholder{font-weight:400}
.member-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:8px}
.member-option{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;font-size:13px;font-weight:400!important}
.member-option input{position:absolute;opacity:0;width:1px;height:1px}
.member-check{width:20px;height:20px;flex:0 0 20px;display:grid;place-items:center;border:1.5px solid #8ba4c1;border-radius:5px;color:transparent;font-weight:900;background:#fff}
.member-option input:checked + .member-check{background:#0d3b66;border-color:#0d3b66;color:#fff}
.member-option:has(input:focus-visible){outline:3px solid #2478ff40}
.member-name{font-weight:400!important}
.project-section-title{display:flex;align-items:center;gap:10px;margin:0 0 14px;color:var(--navy);font-size:18px}
.project-section-title .count{font-size:12px;font-weight:500;color:var(--muted);background:#edf4ff;padding:4px 9px;border-radius:20px}
.project-section{margin-bottom:24px}
.project-card.completed{border-top-color:#20a080;background:linear-gradient(145deg,#fff,#f5fcf9)}
.home-calendar-links{display:flex;gap:8px;flex-wrap:wrap}
.calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.calendar-toolbar h2{margin:0;text-align:center;flex:1}
.calendar-view-switch{display:flex;gap:6px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.calendar-cell{min-width:0;min-height:76px;padding:7px;border:1px solid var(--line);border-radius:8px;background:#fff;overflow-wrap:anywhere}
.calendar-day-name{text-align:center;font-weight:700;color:var(--navy);padding:7px 0;font-size:12px}
.calendar-number{font-size:12px;font-weight:700;margin-bottom:5px}
.calendar-event{display:block;font-size:10px;line-height:1.35;padding:4px 5px;border-radius:5px;background:#eee8ff;color:#573d94;margin-top:3px;overflow-wrap:anywhere}
.calendar-event.project-event{background:#e5f2ff;color:#174d7b}
.calendar-cell.today{border:2px solid #2ec4b6;background:#f4fffd}
.calendar-cell.empty-day{background:#f7f9fc}
@media(max-width:650px){.member-picker{grid-template-columns:1fr}.calendar-cell{min-height:54px;padding:4px}.calendar-event{font-size:9px;padding:3px}.calendar-grid{gap:3px}.calendar-toolbar h2{order:-1;flex-basis:100%}}


/* V3.1: vista de tareas por integrante dentro de la ficha del proyecto */
.project-team-strip{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.project-team-strip h3{margin:0 0 10px;color:#0d3b66;font-size:14px;font-weight:700}
.project-team-members{display:flex;flex-wrap:wrap;gap:9px}
.project-team-person{display:flex;align-items:center;gap:8px;padding:6px 10px 6px 6px;border:1px solid #e0e9f5;border-radius:999px;background:#fff;max-width:100%}
.project-team-person img,.project-team-initials{width:30px;height:30px;flex:0 0 30px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#dce7ff;color:#0d3b66;font-size:10px;font-weight:800}
.project-team-person>span:last-child{display:flex;flex-direction:column;gap:1px;min-width:0}
.project-team-person strong{font-size:12px;font-weight:600;color:#173b62;overflow-wrap:anywhere}
.project-team-person small{font-size:10px;color:#647995;font-weight:400}
.person-task-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:14px;align-items:start;margin-top:14px}
.person-task-column{min-width:0;padding:12px;border:1px solid #e1eaf5;border-radius:16px;background:#f8fbff}
.person-task-column-head{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.person-task-column-head img,.person-task-initials{width:38px;height:38px;flex:0 0 38px;object-fit:cover;border-radius:50%;display:grid;place-items:center;background:#dce7ff;color:#0d3b66;font-size:11px;font-weight:800}
.person-task-column-head>div{min-width:0}
.person-task-column-head h3{margin:0;color:#0d3b66;font-size:13px;font-weight:700;overflow-wrap:anywhere}
.person-task-column-head small{display:block;margin-top:3px;color:#6b7f99;font-size:10px;font-weight:400}
.add-person-task{display:flex;width:100%;justify-content:center;margin:0 0 10px;font-size:12px}
.person-task-empty{padding:14px 9px;text-align:center;color:#8191a6;font-size:12px;border:1px dashed #cbd8e8;border-radius:11px;background:#fff}
.person-task-card{margin-top:9px;padding:12px;border:1px solid color-mix(in srgb,var(--task-card-color) 65%,white);border-left:4px solid var(--task-card-color);border-radius:12px;background:linear-gradient(135deg,color-mix(in srgb,var(--task-card-color) 43%,white),#fff 85%);box-shadow:0 3px 10px #0d3b6608;overflow-wrap:anywhere}
.person-task-card-top{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:8px}
.task-state-badge,.task-priority{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:600;background:#fff;color:#294867}
.task-priority.priority-alta{background:#ffe4e6;color:#a61b36}.task-priority.priority-media{background:#fff1cf;color:#8a5b00}.task-priority.priority-baja{background:#dff5e8;color:#176c48}
.person-task-card h4{margin:0 0 6px;color:#153a60;font-size:13px;font-weight:700;line-height:1.4}
.person-task-card p{margin:0 0 8px;color:#536983;font-size:12px;line-height:1.45;font-weight:400;white-space:pre-line}
.person-task-card .task-due{color:#607792;font-size:10px;font-weight:500}
.button-small{padding:7px 10px;font-size:11px}
@media(max-width:560px){.person-task-board{grid-template-columns:1fr}.project-team-members{gap:6px}.project-team-person{max-width:100%}}

/* V3.2: acceso rápido al perfil desde la esquina superior izquierda */
.sidebar-profile-link{display:flex;align-items:center;gap:10px;margin:0 4px 20px;padding:10px;border:1px solid #ffffff2b;border-radius:13px;background:#ffffff0d;color:#fff;text-decoration:none;min-width:0;transition:background .15s ease,border-color .15s ease}.sidebar-profile-link:hover{background:#ffffff19;border-color:#ffffff55}.sidebar-profile-avatar{width:38px;height:38px;flex:0 0 38px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:#dce7ff;color:#0d3b66;font-weight:800;font-size:12px}.sidebar-profile-avatar img{width:100%;height:100%;object-fit:cover}.sidebar-profile-copy{display:flex;flex-direction:column;gap:3px;min-width:0}.sidebar-profile-copy strong{font-size:12px;font-weight:700;line-height:1.25;overflow-wrap:anywhere}.sidebar-profile-copy small{font-size:10px;color:#dce7ff;font-weight:400}.sidebar-profile-arrow{margin-left:auto;font-size:23px;color:#dce7ff}.panel-preview-card{border:1px solid var(--line);border-radius:14px;padding:16px;background:#fff;margin-bottom:12px}.panel-preview-card h3{margin:0 0 8px;color:var(--navy);font-size:16px}.preview-task{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:11px;border-radius:10px;margin:8px 0;background:var(--task-bg,#dce7ff);border-left:4px solid var(--task-edge,#4a90e2)}.preview-task-title{font-weight:600;color:#17324d}.preview-task-meta{font-size:11px;color:#405a73;margin-top:4px}.preview-section-title{font-size:17px;color:var(--navy);margin:22px 0 12px}.preview-person{display:flex;align-items:center;gap:12px;margin-bottom:16px}.preview-person img,.preview-person .avatar{width:54px;height:54px;border-radius:50%;object-fit:cover}.preview-person p{margin:4px 0 0;color:var(--muted);font-size:12px}@media(max-width:850px){.sidebar-profile-link{margin:0 2px 10px;max-width:320px}.sidebar-profile-avatar{width:32px;height:32px;flex-basis:32px}}


/* =====================================================
   GESTIÓN SIED · TABLERO POR INTEGRANTE
   ===================================================== */

.person-task-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 18px;
    align-items: start;
    margin-top: 22px;
}

.person-task-column {
    min-width: 0;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f5f8fd;
    border: 1px solid #dce7ff;
    border-radius: 16px;
}

.person-task-column-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-bottom: 13px;
    border-bottom: 1px solid #dce7ff;
}

.person-task-column-head img,
.person-task-initials {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 50%;
    object-fit: cover;
}

.person-task-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dce7ff;
    color: #0d3b66;
    font-weight: 700;
}

.person-task-column-head h3 {
    margin: 0;
    color: #0d3b66;
    font-size: 14px;
    font-weight: 700;
}

.person-task-column-head small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.add-person-task {
    width: 100%;
    justify-content: center;
    text-align: center;
    border-radius: 9px;
}

.person-task-empty {
    padding: 16px 10px;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #cbd8e9;
    border-radius: 11px;
    font-size: 12px;
    text-align: center;
}

/* Tarjetas de tareas */

.person-task-card {
    padding: 14px 12px 12px;
    background: linear-gradient(
        to bottom,
        var(--task-card-color, #dce7ff) 0,
        var(--task-card-color, #dce7ff) 5px,
        #ffffff 5px,
        #ffffff 100%
    );
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(13, 59, 102, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.person-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 59, 102, 0.10);
}

.person-task-card h4 {
    margin: 11px 0 7px;
    color: #173b60;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
}

.person-task-card p {
    margin: 7px 0;
    color: #52657c;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    white-space: pre-line;
}

.person-task-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
}

.task-state-badge,
.task-priority {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
}

.priority-alta {
    background: #ffe4e6;
    color: #9f1239;
}

.priority-media {
    background: #fef3c7;
    color: #92400e;
}

.priority-baja {
    background: #dcfce7;
    color: #166534;
}

.task-due {
    display: block;
    margin-top: 11px;
    color: #64748b;
    font-size: 11px;
}

/* =====================================================
   VENTANA EMERGENTE PARA AGREGAR TAREAS
   ===================================================== */

.sied-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
    background: rgba(9, 31, 56, 0.55);
    backdrop-filter: blur(3px);
}

.sied-modal-backdrop.is-open {
    display: flex;
}

.sied-modal {
    width: min(620px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    color: #173b60;
    background: #ffffff;
    border: 1px solid #dce7ff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(7, 27, 53, 0.25);
    font-family: Roboto, Arial, sans-serif;
    animation: siedModalEnter 0.18s ease-out;
}

@keyframes siedModalEnter {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sied-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 17px;
    border-bottom: 1px solid #e8eef7;
}

.sied-modal-kicker {
    color: #2872d8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.sied-modal-head h2 {
    margin: 7px 0;
    color: #0d3b66;
    font-size: 23px;
    font-weight: 700;
}

.sied-modal-head p {
    margin: 0;
    color: #60738c;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
}

.sied-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #0d3b66;
    background: #edf4ff;
    border: 0;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
}

.sied-modal-close:hover {
    background: #dce7ff;
}

.sied-modal-body {
    display: grid;
    gap: 16px;
    padding: 21px 24px;
}

.sied-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.sied-modal-full {
    grid-column: 1 / -1;
}

.sied-modal .field-label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    color: #29435f;
    font-size: 13px;
    font-weight: 600;
}

.sied-modal .field-input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    color: #253b53;
    background: #ffffff;
    border: 1px solid #d7e1ee;
    border-radius: 9px;
    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
}

.sied-modal .field-input:focus {
    border-color: #4a90e2;
    outline: 3px solid rgba(74, 144, 226, 0.13);
}

.sied-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 22px;
    background: #f8faff;
    border-top: 1px solid #e8eef7;
}

.sied-modal-actions button {
    cursor: pointer;
}

/* Adaptación a celulares */

@media (max-width: 650px) {
    .person-task-board {
        grid-template-columns: 1fr;
    }

    .sied-modal-grid {
        grid-template-columns: 1fr;
    }

    .sied-modal-full {
        grid-column: auto;
    }

    .sied-modal-head,
    .sied-modal-body {
        padding-right: 17px;
        padding-left: 17px;
    }

    .sied-modal-actions {
        padding: 14px 17px 18px;
    }
}


/* ===== MENU HAMBURGUESA MOVIL ===== */

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid #dce7ff;
    border-radius: 12px;
    background: #ffffff;
    color: #0d3b66;
    font-size: 25px;
    cursor: pointer;
}

.mobile-menu-overlay {
    display: none;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: inline-flex;
        flex-shrink: 0;
    }

    .sidebar {
        position: fixed !important;
        z-index: 10001;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(290px, 85vw) !important;
        height: 100dvh;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }

    body.mobile-menu-open .sidebar {
        transform: translateX(0);
        box-shadow: 12px 0 35px rgba(13, 59, 102, 0.18);
    }

    .mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: rgba(8, 28, 49, 0.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease, visibility 0.25s ease;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Evita que el contenido desborde la pantalla */
    .main-content,
    .main,
    .content {
        min-width: 0;
        max-width: 100%;
    }

    .topbar {
        gap: 10px;
        padding: 12px 14px;
    }

    .page-content {
        padding: 16px 12px;
    }

    button,
    .btn,
    input[type="submit"] {
        min-height: 42px;
    }

    input,
    select,
    textarea {
        max-width: 100%;
        font-size: 16px;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sied-modal-backdrop {
        padding: 10px;
    }

    .sied-modal {
        width: 100%;
        max-height: 92dvh;
        border-radius: 16px;
    }
}


/* ==================================================
   INFORME GENERAL SIED
   ================================================== */

.report-page {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    color: #173b60;
}

.report-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid #2ec4b6;
}

.report-kicker {
    color: #4a90e2;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.report-heading h1 {
    margin: 9px 0 5px;
    color: #0d3b66;
    font-size: 28px;
}

.report-heading p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.report-date {
    flex-shrink: 0;
    padding: 12px 15px;
    background: #edf4ff;
    border-radius: 12px;
    color: #53657b;
    font-size: 12px;
    line-height: 1.8;
}

.report-date strong {
    color: #0d3b66;
}

.report-info {
    margin-bottom: 18px;
    padding: 13px 16px;
    background: #f0fdfa;
    border-left: 4px solid #2ec4b6;
    border-radius: 8px;
    color: #315a63;
    font-size: 13px;
}

.report-project {
    margin-bottom: 18px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e1eaf5;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(13, 59, 102, 0.04);
    break-inside: avoid;
}

.report-project-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.report-project-mark {
    flex-shrink: 0;
    width: 5px;
    min-height: 27px;
    background: #2ec4b6;
    border-radius: 5px;
}

.report-project-title h2 {
    margin: 0;
    color: #0d3b66;
    font-size: 18px;
    line-height: 1.45;
}

.report-label,
.report-edit-form label {
    display: block;
    margin-bottom: 7px;
    color: #0d3b66;
    font-size: 12px;
    font-weight: 700;
}

.report-notes p {
    margin: 0 0 15px;
    color: #52657c;
    font-size: 14px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.report-advance {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.report-advance .report-label {
    margin: 0;
}

.report-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-pending {
    background: #fff4d6;
    color: #8a5a00;
}

.status-progress {
    background: #dce7ff;
    color: #0d3b66;
}

.status-advanced {
    background: #d9f7ef;
    color: #116b5b;
}

.status-done {
    background: #dcfce7;
    color: #166534;
}

.report-edit-form {
    display: grid;
    gap: 9px;
}

.report-edit-form textarea,
.report-edit-form select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    padding: 11px 12px;
    border: 1px solid #d7e1ee;
    border-radius: 9px;
    background: #ffffff;
    color: #173b60;
    font: inherit;
    font-size: 14px;
}

.report-save {
    justify-self: start;
    min-height: 42px;
    padding: 10px 16px;
    background: #0d3b66;
    color: #ffffff;
    border: 0;
    border-radius: 9px;
    font-weight: 600;
    cursor: pointer;
}

.report-save:hover {
    background: #174f83;
}

.report-empty {
    padding: 25px;
    text-align: center;
    color: #64748b;
    background: #ffffff;
    border: 1px dashed #d7e1ee;
    border-radius: 12px;
}

.report-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #dce7ff;
    color: #64748b;
    font-size: 11px;
}

/* ==================================================
   RESPONSIVE: MENÚ, BARRA SUPERIOR Y CONTENIDO
   ================================================== */

.mobile-menu-toggle,
.mobile-menu-overlay {
    display: none;
}

@media (max-width: 768px) {
    .app-shell {
        display: block !important;
        width: 100%;
        min-width: 0;
    }

    .sidebar {
        position: fixed !important;
        inset: 0 auto 0 0;
        z-index: 10001;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: min(290px, 85vw) !important;
        height: 100vh;
        height: 100dvh;
        overflow-x: hidden !important;
        overflow-y: auto;
        background: #ffffff;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
    }

    body.mobile-menu-open .sidebar {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(13, 59, 102, 0.18);
    }

    /* Fuerza las opciones a estar una debajo de otra. */
    .sidebar .nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        flex-wrap: nowrap !important;
        width: 100%;
        gap: 5px;
    }

    .sidebar .nav a {
        display: flex !important;
        flex: 0 0 auto !important;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        align-items: center;
        white-space: normal;
        padding: 13px 18px;
    }

    .side-bottom {
        display: flex !important;
        justify-content: center;
        margin-top: auto;
        padding: 20px;
    }

    .institutional-logo-bottom {
        display: block !important;
        width: 100%;
        max-width: 180px;
        height: auto;
        object-fit: contain;
    }

    .mobile-menu-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 10000;
        background: rgba(13, 35, 57, 0.48);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .main {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
    }

    .topbar {
        display: flex !important;
        align-items: center;
        gap: 9px;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 10px 12px;
    }

    .crumb {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }

    .profile {
        order: 2;
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        gap: 7px;
        margin-left: auto;
    }

    .profile-copy {
        display: none !important;
    }

    .avatar {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        overflow: hidden;
        border-radius: 50%;
    }

    .avatar img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .logout {
        padding: 7px 9px;
        font-size: 12px;
    }

    .mobile-menu-toggle {
        order: 3;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin-left: 0;
        padding: 0;
        background: #ffffff;
        color: #0d3b66;
        border: 1px solid #dce7ff;
        border-radius: 11px;
        font-size: 25px;
        cursor: pointer;
    }

    .content {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 14px 12px;
    }

    .report-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .report-heading h1 {
        font-size: 22px;
    }

    .report-date {
        padding: 8px;
        font-size: 10px;
    }

    .report-project {
        padding: 15px;
    }

    .report-project-title h2 {
        font-size: 16px;
    }

    .report-save {
        width: 100%;
        justify-self: stretch;
    }
}

/* Escritorio: mantener el logo visible en el menú lateral. */
@media (min-width: 769px) {
    .sidebar {
        display: flex;
        flex-direction: column;
    }

    .side-bottom {
        display: flex !important;
        justify-content: center;
        margin-top: auto;
        padding: 20px 14px;
    }

    .institutional-logo-bottom {
        display: block !important;
        width: 100%;
        max-width: 180px;
        height: auto;
        object-fit: contain;
    }
}

/* =========================================================
   GESTIÓN SIED — RESPONSIVE CORREGIDO
   Este bloque prevalece sobre las reglas responsive anteriores.
   ========================================================= */

@media (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .main {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Cabecera compacta: ruta y hamburguesa arriba; perfil debajo */
    .topbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px !important;
        grid-template-areas:
            "crumb menu"
            "profile profile";
        align-items: center !important;
        justify-content: initial !important;
        gap: 12px !important;
        width: 100% !important;
        min-height: 0 !important;
        padding: 14px 16px !important;
    }

    .topbar .crumb {
        grid-area: crumb;
        display: block !important;
        min-width: 0;
        margin: 0 !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        overflow-wrap: anywhere;
    }

    .topbar .mobile-menu-toggle {
        grid-area: menu;
        display: flex !important;
        align-items: center;
        justify-content: center;
        justify-self: end;
        width: 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        margin: 0 !important;
        padding: 0 !important;
        flex-shrink: 0;
    }

    .topbar .profile {
        grid-area: profile;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
        width: 100%;
        min-width: 0;
        margin: 0 !important;
        padding-top: 12px;
        border-top: 1px solid var(--line);
    }

    .topbar .profile .avatar {
        display: grid;
        flex: 0 0 42px;
        width: 42px !important;
        height: 42px !important;
        min-width: 42px;
        margin: 0 !important;
        border-radius: 50%;
        overflow: hidden;
    }

    .topbar .profile .avatar img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .topbar .profile .profile-copy {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 !important;
    }

    .topbar .profile .profile-name {
        font-size: 14px !important;
        line-height: 1.3 !important;
        overflow-wrap: anywhere;
    }

    .topbar .profile .profile-role {
        max-width: none !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    .topbar .profile .profile-edit-link {
        display: none !important;
    }

    .topbar .profile .logout {
        flex: 0 0 auto;
        margin: 0 0 0 auto !important;
        padding: 8px 10px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }

    /* Menú lateral móvil: opciones verticales */
    .sidebar {
        position: fixed !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 10001 !important;
        width: min(290px, 85vw) !important;
        max-width: 85vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        padding: 24px 16px !important;
        overflow-y: auto !important;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s ease;
    }

    body.mobile-menu-open .sidebar {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    .sidebar .brand {
        display: block !important;
        padding: 14px 6px 20px !important;
    }

    .sidebar .nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 5px !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .sidebar .nav a {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 12px 14px !important;
        white-space: normal !important;
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .sidebar .side-bottom {
        display: flex !important;
        align-items: flex-start !important;
        margin-top: auto !important;
        padding: 22px 6px 8px !important;
    }

    .sidebar .institutional-logo-bottom {
        display: block !important;
        width: 100% !important;
        max-width: 175px !important;
        max-height: none !important;
        height: auto !important;
    }

    .mobile-menu-overlay {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 10000 !important;
        background: rgba(8, 28, 49, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Área de contenido */
    .content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 20px 16px !important;
    }

    .welcome {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }

    .welcome h1 {
        font-size: 34px !important;
        line-height: 1.15 !important;
        overflow-wrap: anywhere;
    }

    .welcome p {
        font-size: 17px !important;
        line-height: 1.5 !important;
    }

    .welcome .button,
    .welcome .button-primary {
        align-self: flex-start;
        max-width: 100%;
        white-space: normal;
    }

    .stat-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        margin: 18px 0 !important;
    }

    .stat-card {
        min-width: 0;
        padding: 18px !important;
    }

    .project-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    .panel {
        min-width: 0;
        padding: 18px !important;
        border-radius: 15px !important;
    }

    .panel-head {
        align-items: flex-start !important;
    }

    .panel-head h2 {
        font-size: 21px !important;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .project-card {
        min-width: 0;
        padding: 16px !important;
    }

    .home-columns {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .form-grid,
    .details-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .table-wrap,
    .table-responsive {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content input,
    .content select,
    .content textarea {
        max-width: 100%;
    }

    .footer {
        overflow-wrap: anywhere;
    }

    .report-heading {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .report-date {
        width: 100%;
    }
}

/* Escritorio: barra lateral normal y logo institucional visible */
@media (min-width: 769px) {
    .app-shell {
        display: grid !important;
        grid-template-columns: 245px minmax(0, 1fr) !important;
    }

    .sidebar {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        width: auto !important;
        height: auto !important;
        min-height: 100vh;
        transform: none !important;
        visibility: visible !important;
    }

    .sidebar .nav {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        overflow: visible !important;
    }

    .sidebar .side-bottom {
        display: flex !important;
        margin-top: auto !important;
    }

    .sidebar .institutional-logo-bottom {
        display: block !important;
    }

    .mobile-menu-toggle,
    .mobile-menu-overlay {
        display: none !important;
    }
}


/* CORRECCIÓN DEL MENÚ HAMBURGUESA EN CELULARES */
@media (max-width: 768px) {
    body.mobile-menu-open .sidebar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        background: #ffffff !important;
        overflow-y: auto !important;
        visibility: visible !important;
        transform: translateX(0) !important;
    }

    body.mobile-menu-open .sidebar .brand {
        display: block !important;
        flex-shrink: 0;
    }

    body.mobile-menu-open .sidebar .nav {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        height: auto !important;
        flex: 1 0 auto !important;
        overflow: visible !important;
        gap: 6px !important;
    }

    body.mobile-menu-open .sidebar .nav a {
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        width: 100% !important;
        min-height: 44px;
        padding: 12px 14px !important;
        color: #0d3b66 !important;
        background: transparent;
        text-decoration: none;
        white-space: normal !important;
    }

    body.mobile-menu-open .sidebar .nav a.active {
        background: #dce7ff !important;
        border-radius: 10px;
    }

    body.mobile-menu-open .sidebar .side-bottom {
        display: flex !important;
        flex-shrink: 0;
        margin-top: auto !important;
    }
}
