*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;color:#14213d;background:#f5f7fb}button,input,select,textarea{font:inherit}.login-body{overflow:hidden}.login-shell{height:100vh;display:grid;grid-template-columns:1.1fr .9fr}.hero{position:relative;overflow:hidden;padding:42px;background:linear-gradient(145deg,#071527,#0b2f5d 60%,#0d4fa4);color:#fff;display:flex;flex-direction:column}.hero:after{content:"";position:absolute;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,#3b82f655,transparent 65%);right:-80px;bottom:-60px}.logo{font-weight:800;font-size:34px;letter-spacing:1px}.logo span{color:#3b82f6}.logo small{display:block;font-size:12px;font-weight:500;letter-spacing:0}.hero-copy{margin:auto 0;max-width:620px;z-index:1}.eyebrow{font-size:12px;letter-spacing:1.4px;color:#93c5fd}.hero h1{font-size:48px;line-height:1.04;margin:14px 0}.hero p{font-size:18px;color:#dbeafe;line-height:1.5}.hero-stat{margin-top:28px;padding:18px;border:1px solid #ffffff22;border-radius:18px;background:#ffffff10;backdrop-filter:blur(8px)}.hero-stat span{display:block;color:#dbeafe;margin-top:5px}.login-panel{display:grid;place-items:center;padding:28px}.login-card{width:min(460px,100%);background:white;border:1px solid #e7ebf2;padding:30px;border-radius:24px;box-shadow:0 22px 70px #0f172a14}.login-card h2{margin:0 0 5px}.login-card p{color:#64748b;margin:0 0 18px}.role-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0 20px}.role-tabs button{border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:10px 6px;cursor:pointer;font-size:12px}.role-tabs button.active{background:#eaf2ff;border-color:#77a8ff;color:#1357b8}.login-card label,.form-grid label{display:grid;gap:6px;font-size:13px;font-weight:600;margin-bottom:12px}.login-card input,.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid #dbe2ec;border-radius:11px;padding:10px 12px;background:#fff;outline:none}.login-card input:focus,.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:var(--accent,#2563eb);box-shadow:0 0 0 3px #2563eb14}.btn{border:0;border-radius:11px;padding:10px 14px;cursor:pointer;font-weight:700;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:all 0.2s cubic-bezier(0.175,0.885,0.32,1.275)}.btn:hover{transform:translateY(-2px);box-shadow:0 6px 15px rgba(0,0,0,0.1)}.btn:active{transform:translateY(0);box-shadow:none}.btn.primary{color:#fff;background:linear-gradient(135deg,#3b82f6,#2563eb);box-shadow:inset 0 1px #ffffff55,0 5px 15px rgba(37,99,235,0.25)}.btn.primary:hover{background:linear-gradient(135deg,#60a5fa,#1d4ed8);box-shadow:inset 0 1px #ffffff55,0 8px 20px rgba(37,99,235,0.35)}.btn.secondary{background:linear-gradient(180deg,#ffffff,#f1f5f9);color:#334155;border:1px solid #cbd5e1;box-shadow:0 2px 5px rgba(0,0,0,0.02)}.btn.secondary:hover{background:#fff;border-color:#94a3b8;color:#0f172a}.btn.success{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;box-shadow:inset 0 1px #ffffff44,0 4px 12px rgba(22,163,74,0.2)}.btn.success:hover{background:linear-gradient(135deg,#4ade80,#15803d);box-shadow:inset 0 1px #ffffff44,0 6px 16px rgba(22,163,74,0.3)}.btn.danger{background:linear-gradient(135deg,#ef4444,#dc2626);color:#fff;box-shadow:inset 0 1px #ffffff44,0 4px 12px rgba(220,38,38,0.2)}.btn.danger:hover{background:linear-gradient(135deg,#f87171,#b91c1c);box-shadow:inset 0 1px #ffffff44,0 6px 16px rgba(220,38,38,0.3)}.btn.full{width:100%}.btn.tiny{padding:7px 9px;font-size:12px}.demo,.notice{margin-top:14px;background:#f5f8fd;border:1px solid #e1e8f2;padding:12px;border-radius:12px;font-size:12px;color:#53647a}.alert{padding:12px 14px;border-radius:12px;margin-bottom:14px;font-size:13px}.alert.danger{background:#fff1f2;color:#a30f24;border:1px solid #fecdd3}.alert.success{background:#ecfdf5;color:#166534;border:1px solid #bbf7d0}.app-body{overflow:hidden}.app-shell{height:100vh;display:grid;grid-template-columns:240px 1fr}.sidebar{background:linear-gradient(180deg,#071426,#0b213c);color:#fff;padding:22px 15px;display:flex;flex-direction:column;overflow:hidden}.sidebar .logo{font-size:27px;padding:0 10px 18px}.profile{display:flex;gap:10px;align-items:center;padding:13px;border-radius:15px;background:#ffffff0c;border:1px solid #ffffff12}.avatar{width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#3b82f6,#7c3aed);display:grid;place-items:center;font-weight:800}.profile b,.profile small{display:block}.profile b{font-size:13px}.profile small{font-size:11px;color:#9fb1c7;margin-top:3px}.sidebar nav{margin-top:18px;display:grid;gap:6px}.sidebar nav a,.logout{color:#cbd5e1;text-decoration:none;padding:11px 12px;border-radius:11px;font-size:13px}.sidebar nav a:hover,.sidebar nav a.active{background:linear-gradient(180deg,#2879df,#1758a9);color:#fff;box-shadow:inset 0 1px #ffffff55}.logout{margin-top:auto}.app-shell main{min-width:0;display:grid;grid-template-rows:76px 1fr;overflow:hidden}.app-shell header{background:#fff;border-bottom:1px solid #e8edf3;padding:14px 24px;display:flex;align-items:center;gap:14px}.app-shell header h1{font-size:20px;margin:0}.app-shell header p{font-size:12px;color:#6b7b90;margin:3px 0 0}.top-actions{margin-left:auto;display:flex;align-items:center;gap:10px}.pill{font-size:11px;padding:7px 10px;border-radius:999px;background:#eaf2ff;color:#1d5fac}.bell{font-size:18px}.menu-btn{display:none;border:0;background:#eef3f8;border-radius:9px;padding:8px}.workspace{padding:14px;overflow:hidden}.view{height:100%;overflow:auto;padding-right:3px;padding-bottom:14px}.cards{display:grid;gap:14px;margin-bottom:14px}.cards.four{grid-template-columns:repeat(4,1fr)}.cards.two{grid-template-columns:repeat(2,1fr)}.card{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:20px;box-shadow:0 8px 24px rgba(15,23,42,0.04);transition:transform 0.2s,box-shadow 0.2s}.card:hover{box-shadow:0 12px 32px rgba(15,23,42,0.08);border-color:#cbd5e1}.metal .card,.metal .modal-box{box-shadow:inset 0 1px #fff,0 8px 24px #0f172a0d;background:linear-gradient(180deg,#fff,#fbfcfe)}.plastic .card,.plastic .modal-box{border-radius:22px;box-shadow:0 12px 28px #0f172a12}.card h3{margin:0 0 12px;font-size:15px}.metric{display:flex;align-items:center;gap:12px;min-height:92px}.metric i{font-style:normal;width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:#eef5ff;font-size:22px}.metric b{display:block;font-size:26px}.metric span{font-size:12px;color:#64748b}.flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.flow span{padding:10px;border-radius:10px;background:#f7f9fc;font-size:12px}.flow b{color:#7c8ca0}.quick{display:flex;gap:8px;flex-wrap:wrap}.quick button,.quick a{border:1px solid #dfe6ef;background:#f8fafc;padding:10px 12px;border-radius:10px;color:#234;cursor:pointer;text-decoration:none;font-size:12px}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-head h2{margin:0;font-size:19px}.section-head p{margin:3px 0 0;color:#6b7b90;font-size:12px}.table-card{padding:0;overflow:auto;max-height:calc(100vh - 160px)}table{width:100%;border-collapse:collapse;min-width:760px}th,td{text-align:left;padding:12px 14px;border-bottom:1px solid #edf0f5;font-size:12px}th{position:sticky;top:0;background:#f8fafc;color:#526276;z-index:1}.tag{display:inline-block;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:700}.tag.blue{background:#e8f1ff;color:#1d5fac}.tag.green{background:#eafaf0;color:#16733a}.tag.red{background:#fff0f0;color:#bd2424}.tag.amber{background:#fff7e7;color:#a15d00}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.form-grid label:has(textarea),.form-grid .notice,.form-grid button,.form-grid h4{grid-column:1/-1}.list-scroll{max-height:300px;overflow:auto}.list-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 3px;border-bottom:1px solid #edf0f5}.list-row b,.list-row span{display:block}.list-row b{font-size:12px}.list-row span{font-size:11px;color:#6b7b90;margin-top:3px}.action-row>div:last-child{display:flex;gap:5px;align-items:center}.icon-btn{border:1px solid #dfe6ef;background:#fff;color:#334155;border-radius:9px;padding:7px;cursor:pointer;text-decoration:none}.inline{display:inline}.subject-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.subject-card{padding:12px;border:1px solid #e4eaf2;border-radius:13px;text-decoration:none;color:#223;display:grid;gap:4px}.subject-card span{font-size:20px}.subject-card b{font-size:12px}.subject-card small{font-size:11px;color:#6b7b90}.empty{text-align:center;padding:36px}.modal{display:none;position:fixed;inset:0;background:#06111fb8;z-index:50;place-items:center;padding:18px}.modal.show{display:grid}.modal-box{width:min(560px,100%);max-height:min(760px,92vh);overflow:auto;background:#fff;border-radius:18px;border:1px solid #dce4ee;padding:18px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:13px}.modal-head h3{margin:0}.modal-head button{width:34px;height:34px;border-radius:10px;border:1px solid #dfe6ef;background:#f8fafc;font-size:20px;cursor:pointer}.modal-actions{display:flex;justify-content:flex-end;gap:8px;grid-column:1/-1}.danger.icon-btn{color:#b91c1c}@media(max-width:980px){.app-shell{grid-template-columns:82px 1fr}.sidebar .logo{font-size:0}.sidebar .logo span{font-size:24px}.sidebar .logo small,.profile div:not(.avatar),.sidebar nav a span{display:none}.sidebar nav a{text-align:center;font-size:18px}.cards.four{grid-template-columns:repeat(2,1fr)}}@media(max-width:720px){.login-shell{grid-template-columns:1fr}.hero{display:none}.role-tabs{grid-template-columns:repeat(2,1fr)}.app-shell{grid-template-columns:1fr}.sidebar{position:fixed;z-index:40;left:-260px;top:0;bottom:0;width:240px;transition:.2s}.sidebar.open{left:0}.sidebar .logo{font-size:27px}.sidebar .logo span{font-size:inherit}.sidebar .logo small,.profile div:not(.avatar),.sidebar nav a span{display:block}.sidebar nav a{text-align:left;font-size:13px}.menu-btn{display:block}.workspace{padding:12px}.cards.four,.cards.two{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid>*{grid-column:1!important}.app-shell header{padding:12px 14px}.app-shell header p{display:none}.subject-grid{grid-template-columns:1fr}.pill{display:none}}
.form-actions{grid-column:1/-1;display:flex;gap:10px;flex-wrap:wrap}.muted{color:#64748b;font-size:12px}.modal-wide{width:min(940px,94vw);max-height:88vh;overflow:hidden;display:flex;flex-direction:column}.connection-result{overflow:auto;padding-right:4px}.connection-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.connection-table{border:1px solid #e2e8f0;border-radius:14px;padding:13px;background:#fff}.connection-table h4{margin:0 0 7px}.connection-table .ok{color:#15803d}.connection-table .bad{color:#b91c1c}.column-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}.column-chips span{font-size:10px;padding:4px 7px;border-radius:999px;background:#eef2f7;color:#475569}.locked-modal.show{display:grid}@media(max-width:800px){.connection-grid{grid-template-columns:1fr}.modal-wide{width:96vw;max-height:92vh}}
.student-folder-link{border:0;background:transparent;padding:0;color:var(--primary,#2563eb);font:inherit;font-weight:800;cursor:pointer;text-align:left}.student-folder-link:hover{text-decoration:underline}.folder-detail-content{max-height:70vh;overflow:auto;padding-right:4px}.folder-summary{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:12px 14px;border-radius:14px;background:rgba(148,163,184,.12);margin-bottom:12px}.folder-summary span{color:#64748b}.nested-subject{border:1px solid rgba(148,163,184,.28);border-radius:16px;margin:12px 0;overflow:hidden;background:rgba(255,255,255,.72)}.nested-subject-head{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:14px 16px;background:rgba(148,163,184,.10)}.nested-subject-head>div{display:flex;flex-direction:column;gap:4px}.nested-subject-head span,.material-line span{display:block;color:#64748b;font-size:.84rem}.nested-materials{padding:8px 14px 14px}.material-line{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:10px 4px;border-bottom:1px solid rgba(148,163,184,.18)}.material-line:last-child{border-bottom:0}.material-actions{display:flex;gap:6px;flex-shrink:0}.tag.blue{background:rgba(37,99,235,.12);color:#1d4ed8}@media(max-width:700px){.folder-summary,.nested-subject-head,.material-line{align-items:flex-start;flex-direction:column}.nested-subject-head form{width:100%}.nested-subject-head .btn{width:100%}.material-actions{align-self:flex-end}}
/* NEXUS V3 */
.utp-flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.utp-flow span{display:flex;align-items:center;gap:7px;padding:9px 11px;border:1px solid #e2e8f0;border-radius:12px;background:#f8fafc;font-size:12px}.utp-flow span b,.builder-step span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--accent);color:#fff}.utp-flow i{font-style:normal;color:#94a3b8}.nexus-builder{padding:18px}.builder-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-bottom:18px}.builder-step{display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;border-radius:13px;background:#f8fafc;border:1px solid #e2e8f0;font-size:12px}.nexus-link-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.builder-field{display:flex;flex-direction:column;gap:6px}.builder-field b{font-size:12px}.builder-field small{font-size:10px;color:#64748b}.builder-subjects{grid-column:1/-1}.subject-check-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:250px;overflow:auto;padding:10px;border:1px solid #dfe6ef;border-radius:13px;background:#fbfdff}.subject-check-list label{display:flex;gap:8px;align-items:flex-start;padding:8px;border-radius:9px;background:#fff;border:1px solid #edf2f7;font-size:11px}.subject-check-list input{margin-top:2px}.builder-submit{grid-column:1/-1;display:flex;align-items:center;gap:14px;justify-content:flex-end}.builder-submit p{margin:0;color:#64748b;font-size:11px}.tree-list{display:grid;gap:10px}.tree-student,.tree-subject,.tree-activity{border:1px solid #e2e8f0;border-radius:14px;background:#fff;overflow:hidden}.tree-student>summary,.tree-subject>summary,.tree-activity>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px}.tree-student>summary::-webkit-details-marker,.tree-subject>summary::-webkit-details-marker,.tree-activity>summary::-webkit-details-marker{display:none}.tree-student>summary{background:#f8fafc}.tree-subject>summary{background:#fbfdff}.tree-activity>summary{padding:11px 13px}.tree-student summary small,.tree-subject summary small,.tree-activity summary small{color:#64748b;font-size:10px}.tree-children{padding:10px 14px 14px;margin-left:18px;border-left:2px solid #e2e8f0}.tree-activity-body{padding:0 14px 14px}.tree-activity-body p{font-size:12px;color:#475569}.tree-empty{padding:12px}.scope-tools,.scope-modal-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:9px}.scope-update-form{display:flex;align-items:center;gap:7px;flex:1}.scope-update-form select{min-width:200px;max-width:360px}.evidence-block{margin-top:12px;padding:10px;border-radius:12px;background:#f8fafc;border:1px dashed #cbd5e1}.evidence-block>b{font-size:11px}.evidence-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid #e8edf3;font-size:11px}.evidence-row:last-child{border-bottom:0}.evidence-row small{display:block;color:#64748b;margin-top:2px}.check-option{grid-column:1/-1!important;display:flex!important;flex-direction:row!important;align-items:flex-start;gap:10px;padding:12px;border:1px solid #dbe5f0;border-radius:12px;background:#f8fafc}.check-option input{width:auto;margin-top:3px}.check-option span{display:block}.check-option small{display:block;color:#64748b;margin-top:3px}.folder-summary>div span{display:block;margin-top:3px}.scope-modal-tools{justify-content:flex-end}.scope-modal-tools .scope-update-form{flex:0 1 auto}
@media(max-width:800px){.builder-steps{grid-template-columns:1fr}.nexus-link-form{grid-template-columns:1fr}.builder-subjects,.builder-submit{grid-column:1}.subject-check-list{grid-template-columns:1fr}.builder-submit{align-items:stretch;flex-direction:column}.scope-update-form{width:100%;flex-direction:column;align-items:stretch}.scope-update-form select{max-width:none}.tree-children{margin-left:8px;padding-left:10px}}

/* ===== NEXUS UI refinement 2026-08 ===== */
:root{--nx-navy:#0b1f3a;--nx-blue:#2563eb;--nx-cyan:#0ea5e9;--nx-green:#16a34a;--nx-amber:#d97706;--nx-red:#dc2626;--nx-slate:#64748b;--nx-line:#e5eaf1;--nx-soft:#f6f8fc}
.sidebar{padding:14px 10px 12px;background:linear-gradient(180deg,#08182d 0%,#0b2545 55%,#0a1d35 100%);box-shadow:10px 0 30px #0b1f3a12;display:flex;flex-direction:column;height:100vh;max-height:100vh;overflow:hidden}
.sidebar .logo{font-size:24px;padding:0 6px 10px;flex:0 0 auto}
.profile{display:flex;gap:10px;align-items:center;padding:8px 10px;border-radius:13px;background:#ffffff0c;border:1px solid #ffffff12;flex:0 0 auto;margin-bottom:2px}
.sidebar nav{margin-top:10px;display:grid;gap:4px;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:3px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,0.18) transparent}
.sidebar nav::-webkit-scrollbar{width:4px}
.sidebar nav::-webkit-scrollbar-track{background:transparent}
.sidebar nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);border-radius:4px}
.sidebar nav::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.35)}
.sidebar nav a{position:relative;display:flex;align-items:center;gap:8px;min-height:37px;padding:6px 9px;border:1px solid transparent;background:#ffffff05;border-radius:9px;font-size:12px;font-weight:600;color:#cbd5e1;text-decoration:none;transition:transform .15s ease,background .15s ease,border-color .15s ease,box-shadow .15s ease}
.sidebar nav a:hover{transform:translateX(3px);background:#ffffff0d;border-color:#ffffff12}
.sidebar nav a.active{background:linear-gradient(135deg,#2f80ed,#1760b9);border-color:#ffffff2b;box-shadow:inset 0 1px #ffffff55,0 8px 18px #020d1e38;color:#fff}
.nav-icon{width:24px;height:24px;display:grid;place-items:center;border-radius:7px;background:#ffffff12;font-size:13px;font-weight:900;flex:0 0 24px}
.sidebar nav a.active .nav-icon{background:#ffffff20}
.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#f59e0b;color:#fff;display:grid;place-items:center;font-size:10.5px;font-style:normal;font-weight:800;box-shadow:0 4px 10px #0003}
.nav-attention:not(.active) .nav-badge{animation:nxPulse 2.2s infinite}
.logout{border:1px solid #ffffff10;background:#ffffff05;text-align:center;flex:0 0 auto;margin-top:8px;padding:8px 10px;border-radius:9px;font-size:12px;font-weight:600}
.logout:hover{background:#ffffff0d;color:#fff}
.app-shell header{background:linear-gradient(180deg,#fff,#fcfdff);box-shadow:0 4px 16px #0f172a08}.app-shell header h1{font-weight:800;letter-spacing:-.25px}.workspace{background:linear-gradient(180deg,#f7f9fc,#f4f6fa)}
.card{border-color:#e2e8f0;box-shadow:0 8px 24px #0f172a0a}.card:hover{border-color:#d7e0eb}.metric{position:relative;overflow:hidden}.metric:after{content:"";position:absolute;width:70px;height:70px;border-radius:50%;right:-28px;top:-30px;background:linear-gradient(135deg,#2563eb10,#0ea5e918)}.metric i{box-shadow:inset 0 1px #fff;border:1px solid #dbeafe;background:linear-gradient(145deg,#f0f7ff,#e7f0ff)}.metric b{letter-spacing:-.6px}
.card-title-row,.field-title-row,.section-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.card-title-row h3,.field-title-row b{margin:0}.inbox-count{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#fff7ed;color:#b45309;border:1px solid #fed7aa;font-size:11px;font-weight:800;white-space:nowrap}.text-link{display:inline-block;margin-top:10px;color:var(--accent,#2563eb);font-size:12px;font-weight:800;text-decoration:none}.text-link:hover{text-decoration:underline}
.pending-row{padding:11px 9px;border-radius:12px;margin-bottom:5px;border:1px solid transparent}.pending-row:hover{background:#f8fbff;border-color:#dbeafe}.inbox-empty{display:grid;place-items:center;text-align:center;padding:24px 10px;color:#64748b}.inbox-empty span{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#ecfdf5;color:#15803d;font-size:22px;margin-bottom:8px}.inbox-empty b{color:#334155}.inbox-empty small{margin-top:4px}.inbox-empty.large{min-height:240px;border:1px dashed #cbd5e1;border-radius:18px;background:#fff}
.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}.search-box{display:flex;align-items:center;gap:8px;min-width:min(420px,100%);padding:8px 12px;border:1px solid #dbe3ed;border-radius:13px;background:#fff;box-shadow:0 3px 10px #0f172a08;color:#94a3b8}.search-box input{width:100%;border:0;outline:0;background:transparent;color:#1e293b}.toolbar-hint{font-size:11px;color:#64748b}.status-dot{width:9px;height:9px;border-radius:50%;display:inline-block}.status-dot.pending{background:#f59e0b;box-shadow:0 0 0 4px #f59e0b18}.section-actions{justify-content:flex-end;font-size:12px;color:#475569}
.inbox-board{display:grid;gap:10px}.inbox-item{display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px 16px;background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 5px 18px #0f172a08;transition:.18s ease}.inbox-item:hover{transform:translateY(-1px);border-color:#cddcf2;box-shadow:0 9px 24px #0f172a0d}.inbox-item.is-new{border-left:4px solid #3b82f6}.inbox-file-icon{width:45px;height:45px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#eff6ff,#e0ecff);border:1px solid #dbeafe;font-size:21px}.inbox-main h3{margin:5px 0 4px;font-size:14px}.inbox-main p{margin:2px 0;font-size:12px}.inbox-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:10px;color:#8492a6}.inbox-actions{display:flex;gap:7px;align-items:center}
.nexus-builder{padding:20px}.builder-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-bottom:20px;padding:8px;border:1px solid #e2e8f0;background:#f8fafc;border-radius:16px}.builder-step{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:11px;color:#64748b;font-size:11px}.builder-step span{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#e2e8f0;color:#334155;font-weight:900}.builder-step:first-child,.builder-step:hover{background:#fff;color:#0f172a;box-shadow:0 3px 12px #0f172a0a}.builder-field{padding:14px;border:1px solid #e5eaf1;background:#fff;border-radius:15px;margin-bottom:11px}.builder-field> b,.builder-field .field-title-row b{font-size:12px;color:#334155}.builder-field select{margin-top:8px;width:100%;border:1px solid #dbe3ed;border-radius:11px;padding:11px 12px;background:#fbfdff;outline:0}.builder-field select:focus{border-color:#93b7ee;box-shadow:0 0 0 3px #2563eb12}.builder-field small{display:block;color:#7b8a9d;font-size:10px;margin-top:6px}.selected-counter{padding:6px 9px;border-radius:999px;background:#eef6ff;color:#1d5fac;font-size:10px;font-weight:800;border:1px solid #d8e8fb;white-space:nowrap}
.subject-slider-shell{margin-top:10px}.subject-slider{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;padding:2px 1px 8px}.subject-slider::-webkit-scrollbar{display:none}.subject-slide-btn{display:none}.subject-slide-btn:hover{background:#eff6ff;color:#1d5fac;border-color:#bfdbfe}.subject-choice{position:relative;min-width:100%;cursor:pointer}.subject-choice input{position:absolute;opacity:0;pointer-events:none}.subject-choice-card{height:102px;padding:12px;border:1px solid #dfe6ef;border-radius:15px;background:linear-gradient(180deg,#fff,#fbfcfe);display:flex;flex-direction:column;justify-content:center;gap:5px;transition:.16s ease;box-shadow:0 3px 10px #0f172a07}.subject-choice-card i{font-style:normal;font-size:20px}.subject-choice-card b{font-size:11px;line-height:1.25;color:#25364d}.subject-choice-card small{margin:0;font-size:9px;color:#8b99aa}.subject-choice:hover .subject-choice-card{transform:translateY(-2px);border-color:#bcd1ed;box-shadow:0 8px 18px #0f172a0d}.subject-choice input:checked+.subject-choice-card{background:linear-gradient(145deg,#eaf4ff,#f5f9ff);border-color:#72a9ed;box-shadow:inset 0 0 0 1px #72a9ed,0 8px 18px #2563eb13}.subject-choice input:checked+.subject-choice-card:after{content:"✓";position:absolute;right:9px;top:8px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#2563eb;color:#fff;font-size:11px;font-weight:900}.subject-quick-actions{display:flex;gap:7px;justify-content:flex-end;margin-top:6px}.btn.ghost{background:transparent;color:#64748b;border:1px solid #e2e8f0}
.professional-table{border-radius:16px;box-shadow:0 6px 20px #0f172a08}.professional-table table{min-width:820px}.professional-table th{padding:13px 15px;background:linear-gradient(180deg,#f9fbfd,#f4f7fa);font-size:10px;text-transform:uppercase;letter-spacing:.55px;color:#64748b}.professional-table td{padding:13px 15px}.professional-table tbody tr:nth-child(even){background:#fbfcfe}.professional-table tbody tr:hover{background:#f3f8ff}.student-folder-link{border:0;background:transparent;color:#1558a6;font-weight:800;cursor:pointer;padding:0;text-align:left}.student-folder-link:hover{text-decoration:underline}
.tree-list{display:grid;gap:10px}.tree-student,.tree-subject,.tree-activity{background:#fff;border:1px solid #e2e8f0;border-radius:15px;overflow:hidden;box-shadow:0 4px 14px #0f172a06}.tree-student>summary,.tree-subject>summary,.tree-activity>summary{padding:13px 15px;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;transition:all 0.3s ease}.tree-student>summary::-webkit-details-marker,.tree-subject>summary::-webkit-details-marker,.tree-activity>summary::-webkit-details-marker{display:none}.tree-student>summary:after,.tree-subject>summary:after,.tree-activity>summary:after{content:"⌄";font-size:16px;color:#64748b;transition:.18s}.tree-student[open]>summary:after,.tree-subject[open]>summary:after,.tree-activity[open]>summary:after{transform:rotate(180deg)}.tree-student>summary{background:linear-gradient(180deg,#fff,#f9fbfd)}.tree-subject{margin:8px}.tree-subject>summary{background:#f8fbff}.tree-activity{margin:7px 0}.tree-activity>summary{background:#fff}.tree-student[open]>summary{background:linear-gradient(180deg,#eff6ff,#dbeafe);border-bottom:1px solid #bfdbfe;color:#1e3a8a}.tree-subject[open]>summary{background:linear-gradient(180deg,#f0fdf4,#dcfce7);border-bottom:1px solid #bbf7d0;color:#14532d}.tree-activity[open]>summary{background:linear-gradient(180deg,#fdf4ff,#fae8ff);border-bottom:1px solid #f5d0fe;color:#701a75}.tree-children{padding:6px 10px 11px}.tree-activity-body{padding:12px 15px;border-top:1px solid #edf1f5}.scope-tools{display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:7px 4px}.scope-update-form{display:flex;gap:7px;align-items:center}.scope-update-form select{border:1px solid #dbe3ed;border-radius:9px;padding:7px 9px;background:#fff}
.tag{border:1px solid transparent}.tag.blue{border-color:#cfe1fb}.tag.green{border-color:#c9efd6}.tag.amber{border-color:#fde2ae}.tag.red{border-color:#ffd2d2}
.modal{backdrop-filter:blur(5px)}.modal-box{box-shadow:0 28px 80px #02081745;border-color:#dbe3ed}.modal-head{position:sticky;top:-18px;z-index:3;background:#fff;padding:15px 0 11px;border-bottom:1px solid #edf1f5}.modal-head button:hover{background:#eef4fb;color:#0f5db5}.notice{border-left:4px solid #8fb9ee;background:#f7fbff}
@media(max-width:900px){.inbox-item{grid-template-columns:44px 1fr}.inbox-actions{grid-column:1/-1;justify-content:flex-end}.builder-steps{grid-template-columns:repeat(5,minmax(90px,1fr));overflow:auto}.list-toolbar{align-items:stretch;flex-direction:column}.search-box{min-width:0}.toolbar-hint{padding-left:3px}}
@media(max-width:720px){.nav-icon{display:inline-grid!important}.sidebar nav a{display:flex;text-align:left}.inbox-item{grid-template-columns:1fr}.inbox-file-icon{display:none}.inbox-actions{justify-content:stretch}.inbox-actions .btn{flex:1}.subject-slider-shell{grid-template-columns:28px minmax(0,1fr) 28px}.subject-choice{min-width:145px}.nexus-builder{padding:14px}.field-title-row{align-items:flex-start}.builder-step{min-width:100px}.section-actions{display:none}}
.subject-choice-card{position:relative}

/* ===== NEXUS PORTAL DE INICIO 2026 ===== */
.portal-body{margin:0;min-height:100vh;overflow:auto;background:#eef3f9;color:#0f172a}.portal-shell{min-height:100vh;display:grid;grid-template-rows:84px minmax(0,1fr) 42px;background:radial-gradient(circle at 10% 0%,#dbeafe 0,transparent 34%),linear-gradient(180deg,#f8fbff,#eef3f9)}
.portal-topbar{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:14px clamp(18px,4vw,64px);background:#ffffffed;backdrop-filter:blur(14px);border-bottom:1px solid #dfe7f1;box-shadow:0 5px 20px #0f172a08;z-index:10}.portal-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#0f172a;min-width:0}.portal-brand>img{width:52px;height:52px;object-fit:contain;border-radius:13px;background:#fff;border:1px solid #e2e8f0;padding:4px;box-shadow:0 5px 14px #0f172a0c}.portal-brand-copy{display:grid;line-height:1.05}.portal-brand-copy>b{font-size:25px;letter-spacing:1.2px}.portal-brand-copy>b span{color:var(--accent,#2563eb)}.portal-brand-copy small{font-size:11px;color:#64748b;margin-top:4px;font-weight:700}.portal-brand-copy em{font-style:normal;font-size:10px;color:#94a3b8;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:330px}.staff-access{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,0.7);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:5px;border-radius:100px;border:1px solid rgba(255,255,255,0.8);box-shadow:0 4px 20px rgba(15,23,42,0.03),inset 0 1px 2px rgba(255,255,255,1)}.staff-access button{display:flex;align-items:center;gap:6px;border:none;background:transparent;color:#475569;border-radius:100px;padding:8px 16px;font-size:11.5px;font-weight:700;cursor:pointer;transition:all .3s cubic-bezier(0.175,0.885,0.32,1.275);position:relative;overflow:hidden}.staff-access button svg{width:15px;height:15px;stroke-width:2.2;transition:all .3s ease}.staff-access button:hover{background:#fff;color:#0f172a;box-shadow:0 4px 14px rgba(15,23,42,0.06),0 1px 3px rgba(15,23,42,0.03);transform:translateY(-1px)}.staff-access button:hover svg{transform:scale(1.15) rotate(-3deg);color:var(--accent,#2563eb)}
.portal-main{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);gap:clamp(22px,4vw,58px);align-items:center;padding:clamp(24px,4vw,58px) clamp(20px,5vw,76px);min-height:0}.portal-visual{min-width:0;position:relative}.portal-copy{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}.portal-kicker{display:inline-flex;align-items:center;padding:7px 11px;border-radius:999px;background:#eaf2ff;color:#1558a6;border:1px solid #cfe1fb;font-size:10px;font-weight:900;letter-spacing:1.5px}.portal-copy h1{margin:7px 0 0;font-size:clamp(30px,4.1vw,54px);letter-spacing:-1.7px;line-height:1;color:#0f172a}.school-name-home{margin:0 0 5px;color:#64748b;font-size:13px;font-weight:700;text-align:right;max-width:280px}.portal-carousel{position:relative;width:100%;aspect-ratio:16/9;min-height:360px;max-height:620px;border-radius:30px;overflow:hidden;background:#dce6f3;border:1px solid #d9e2ee;box-shadow:0 30px 70px #0f172a20}.portal-slide{position:absolute;inset:0;margin:0;opacity:0;transform:scale(1.035);transition:opacity .9s ease,transform 6s ease}.portal-slide.active{opacity:1;transform:scale(1)}.portal-slide img{width:100%;height:100%;object-fit:cover;display:block}.slide-shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 60%,#07142622)}.carousel-dots{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);display:flex;gap:8px;padding:7px 10px;border-radius:999px;background:#08152652;backdrop-filter:blur(8px)}.carousel-dots button{width:8px;height:8px;border:0;border-radius:999px;padding:0;background:#ffffff80;cursor:pointer;transition:.2s}.carousel-dots button.active{width:26px;background:#fff}
.student-access-panel{display:grid;place-items:center}.student-login-card{width:min(430px,100%);background:#fffffff5;border:1px solid #dde6f0;border-radius:28px;padding:clamp(24px,3vw,36px);box-shadow:0 25px 65px #0f172a18;backdrop-filter:blur(14px);position:relative;overflow:hidden}.student-login-card:before{content:"";position:absolute;width:160px;height:160px;border-radius:50%;background:radial-gradient(circle,#dbeafe,transparent 68%);right:-55px;top:-55px}.student-login-icon{width:54px;height:54px;border-radius:17px;display:grid;place-items:center;font-size:25px;background:linear-gradient(145deg,#eff6ff,#dcecff);border:1px solid #cfe1fb;box-shadow:inset 0 1px #fff,0 8px 18px #2563eb15;margin-bottom:16px}.login-kicker{font-size:10px;text-transform:uppercase;letter-spacing:1.1px;color:#5c74a0;font-weight:900}.student-login-card h2{margin:7px 0 6px;font-size:25px;letter-spacing:-.7px}.student-login-card>p{margin:0 0 22px;color:#718097;line-height:1.45;font-size:13px}.student-login-card label,.staff-login-form label{display:grid;gap:7px;margin:0 0 13px;font-size:12px;font-weight:800;color:#3c4b60}.student-login-card input,.staff-login-form input{width:100%;border:1px solid #d8e2ed;border-radius:13px;padding:12px 13px;background:#fbfdff;outline:0;transition:.15s}.student-login-card input:focus,.staff-login-form input:focus{border-color:#83abe1;box-shadow:0 0 0 4px #2563eb10;background:#fff}.portal-login-btn{padding:12px 14px;margin-top:4px}.student-help{display:block;text-align:center;color:#94a3b8;font-size:10px;margin-top:13px}.portal-footer{display:flex;align-items:center;justify-content:space-between;padding:0 clamp(20px,5vw,76px);color:#8391a4;font-size:10px;border-top:1px solid #e3e9f1;background:#f8fafccc}
.staff-login-modal{z-index:100}.staff-login-box{width:min(430px,94vw);border-radius:24px;padding:22px}.staff-login-box .modal-head{align-items:flex-start}.staff-login-box .modal-head h3{font-size:22px;margin:5px 0 0}.staff-login-form{margin-top:8px}
/* Administración: identidad y carrusel */
.portal-config-card{grid-column:1/-1}.brand-file-field{align-content:start}.brand-preview{margin-top:7px;display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;border:1px solid #e2e8f0;background:#f8fafc}.brand-preview img{width:58px;height:58px;object-fit:contain;border-radius:10px;background:#fff}.brand-preview.wide img{width:110px;height:64px;object-fit:cover}.brand-preview small{color:#64748b}.inline-check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center!important;gap:7px!important;font-weight:600!important;color:#64748b!important;font-size:11px!important}.inline-check input{width:auto!important}.portal-slide-config{grid-column:1/-1;border-top:1px solid #edf1f5;padding-top:12px}.portal-slide-config>b,.portal-slide-config>small{display:block}.portal-slide-config>small{margin-top:4px;color:#7b8a9d;font-size:10px}.slide-upload-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:10px}.slide-upload-grid>label{padding:10px;border:1px solid #e2e8f0;border-radius:13px;background:#fbfcfe}
/* Marca del establecimiento en panel interno */
.sidebar-brand{display:flex!important;align-items:center;gap:9px}.sidebar-brand>img{width:34px;height:34px;border-radius:9px;object-fit:contain;background:#fff;padding:3px}.sidebar-brand>div{font:inherit}.sidebar-brand em{display:block;font-style:normal;font-size:9px;color:#7891ae;max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:4px}.sidebar .logo.sidebar-brand small{display:block}
@media(max-width:980px){.portal-main{grid-template-columns:1fr .72fr;gap:24px;padding:30px}.portal-carousel{min-height:300px}.sidebar-brand>img{display:none}.sidebar-brand>div{display:block}.sidebar .logo.sidebar-brand{font-size:0}.sidebar .logo.sidebar-brand>div>span{font-size:24px}.sidebar .logo.sidebar-brand small,.sidebar .logo.sidebar-brand em{display:none}}
@media(max-width:780px){.portal-shell{grid-template-rows:auto auto 42px}.portal-topbar{align-items:flex-start;flex-direction:column;padding:13px 18px}.staff-access{width:100%;justify-content:flex-end;overflow-x:auto}.staff-access button{white-space:nowrap;padding:8px 11px}.portal-main{grid-template-columns:1fr;padding:22px 18px 34px}.portal-copy{align-items:flex-start;flex-direction:column}.school-name-home{text-align:left}.portal-carousel{aspect-ratio:16/10;min-height:250px;border-radius:22px}.student-access-panel{margin-top:2px}.student-login-card{width:100%}.portal-footer{padding:0 18px}.slide-upload-grid{grid-template-columns:1fr}.portal-brand-copy em{max-width:210px}}
@media(max-width:520px){.portal-brand>img{width:44px;height:44px}.portal-brand-copy>b{font-size:21px}.portal-brand-copy small{font-size:10px}.staff-access{justify-content:flex-start}.portal-copy h1{font-size:32px}.portal-carousel{min-height:220px}.carousel-dots{bottom:11px}.portal-footer span:last-child{display:none}}
/* Portada fotográfica con login glass */
.portal-body{background:#06111f}.portal-shell{background:#06111f;grid-template-rows:80px minmax(0,1fr) 42px}.portal-topbar{background:#071827e8;border-bottom:1px solid #ffffff1c;box-shadow:0 8px 30px #0004;color:#fff}.portal-brand{color:#fff}.portal-brand-copy small{color:#d9e8f7}.portal-brand-copy em{color:#9fb3c8}.staff-access{background:rgba(15,23,42,0.4);border-color:rgba(255,255,255,0.08);box-shadow:0 8px 32px rgba(0,0,0,0.2),inset 0 1px 0 rgba(255,255,255,0.05)}.staff-access button{color:#cbd5e1}.staff-access button:hover{background:rgba(255,255,255,0.1);color:#fff;box-shadow:0 4px 16px rgba(0,0,0,0.3),inset 0 1px 0 rgba(255,255,255,0.15)}.portal-main-photo{position:relative;display:block;padding:0;min-height:0;overflow:hidden}.portal-visual-photo{position:absolute;inset:0}.portal-carousel-photo{height:100%;max-height:none;min-height:0;aspect-ratio:auto;border:0;border-radius:0;box-shadow:none;background:#071827}.portal-carousel-photo .portal-slide img{object-position:center}.photo-shade{background:linear-gradient(90deg,#03101dcc 0%,#0615227d 42%,#07182733 66%,#03101d66 100%),linear-gradient(180deg,#06111f22 55%,#06111f88 100%)}.portal-photo-copy{position:absolute;z-index:4;left:clamp(34px,6vw,98px);top:50%;transform:translateY(-50%);width:min(520px,42vw);color:#fff;text-shadow:0 2px 20px #0007}.glass-kicker{background:#1686e533;border-color:#5ab9ff88;color:#dff3ff;backdrop-filter:blur(10px)}.portal-photo-copy h1{font-size:clamp(38px,5vw,70px);line-height:.98;letter-spacing:-2px;margin:14px 0 8px}.portal-photo-copy .school-name-home{text-align:left;color:#d6e5f2;font-size:14px;margin:0 0 12px}.portal-tagline{font-size:17px;line-height:1.5;color:#eef7ff;max-width:430px}.portal-benefits{display:grid;gap:10px;margin-top:24px}.portal-benefits span{width:max-content;max-width:100%;padding:9px 13px;border:1px solid #ffffff2b;background:#06182770;border-radius:12px;backdrop-filter:blur(10px);font-size:13px}.student-access-glass{position:absolute;z-index:6;right:clamp(28px,7vw,110px);top:50%;transform:translateY(-50%);width:min(430px,38vw)}.glass-login-card{width:100%;background:linear-gradient(145deg,#0a1b29a8,#ffffff20);border:1px solid #6fc8ff8c;color:#fff;box-shadow:inset 0 1px #ffffff35,0 30px 80px #0007;backdrop-filter:blur(24px) saturate(130%);-webkit-backdrop-filter:blur(24px) saturate(130%)}.glass-login-card:before{background:radial-gradient(circle,#1686e545,transparent 68%)}.glass-login-icon{margin-left:auto;margin-right:auto;background:linear-gradient(145deg,#157ee8,#0751ad);border-color:#63baff;color:#fff}.glass-login-kicker{display:block;text-align:center;color:#bcdfff}.glass-login-card h2{text-align:center;font-size:27px}.glass-login-card h2 span{color:#39a9ff}.glass-login-card>p{text-align:center;color:#d3e0ec}.glass-login-card label{color:#eef7ff}.glass-login-card input{background:#ffffff10;border-color:#ffffff3b;color:#fff;backdrop-filter:blur(10px)}.glass-login-card input::placeholder{color:#d5dce4b8}.glass-login-card input:focus{background:#ffffff18;border-color:#68c3ff;box-shadow:0 0 0 4px #2498e927}.glass-login-card .student-help{color:#c6d6e5}.portal-footer{background:#071827ed;border-top:1px solid #ffffff1c;color:#b7c8d8;z-index:10}.portal-carousel-photo .carousel-dots{left:50%;bottom:18px}.staff-login-box{background:#f8fbff}
@media(max-width:900px){.portal-photo-copy{left:32px;width:46vw}.student-access-glass{right:28px;width:42vw}.portal-benefits{display:none}.portal-photo-copy h1{font-size:44px}}
@media(max-width:720px){.portal-main-photo{min-height:780px}.portal-photo-copy{left:22px;right:22px;top:18%;transform:none;width:auto}.portal-photo-copy h1{font-size:38px}.portal-tagline{font-size:14px}.student-access-glass{left:18px;right:18px;top:auto;bottom:36px;transform:none;width:auto}.glass-login-card{padding:22px}.portal-carousel-photo .carousel-dots{bottom:10px}.portal-shell{grid-template-rows:auto minmax(0,1fr) 42px}}

/* NEXUS V4 - seguimiento, semáforos y notificaciones */
.tag.red{background:#fee2e2;color:#b91c1c}.tag.gray{background:#eef2f7;color:#526071}.tag.amber{background:#fff3cd;color:#8a5a00}.tag.blue{background:#e8f1ff;color:#1956a8}.tag.green{background:#e7f8ee;color:#18794e}
.read-info{margin:10px 0;padding:9px 12px;border-radius:12px;background:rgba(37,99,235,.07);font-size:12px;color:#49617e}.timeline{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.timeline span{font-size:11px;padding:6px 9px;border-radius:999px;background:#eef2f7;color:#7a8798}.timeline span.done{background:#e7f8ee;color:#18794e;font-weight:700}.evidence-review-card{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:11px 12px;border:1px solid rgba(148,163,184,.25);border-radius:14px;margin-top:8px;background:rgba(255,255,255,.7)}.evidence-review-card small{display:block;color:#718096;margin-top:3px}.evidence-review-card p{margin:6px 0 0;font-size:12px}.notification-list{display:grid;gap:12px}.notification-card{display:flex;gap:14px;padding:16px;border-radius:18px;background:var(--panel,#fff);border:1px solid rgba(148,163,184,.2);box-shadow:0 8px 24px rgba(15,23,42,.05)}.notification-card.unread{border-left:4px solid var(--accent);background:linear-gradient(90deg,rgba(37,99,235,.07),rgba(255,255,255,.95))}.notification-icon{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:rgba(37,99,235,.1);color:var(--accent);font-weight:800}.notification-body{flex:1}.notification-head{display:flex;justify-content:space-between;gap:12px}.notification-head span{font-size:11px;color:#7a8798}.notification-body p{margin:5px 0 9px;color:#5f6f82}.notification-actions{display:flex;gap:8px}.student-welcome{background:linear-gradient(135deg,rgba(37,99,235,.08),rgba(16,185,129,.06))}

/* Visor de documentos integrado */
.document-viewer-modal{z-index:120}.document-viewer-box{width:min(1180px,96vw);height:min(840px,92vh);max-height:92vh;padding:16px;overflow:hidden;display:flex;flex-direction:column;border-radius:20px}.document-viewer-box .modal-head{flex:0 0 auto;margin-bottom:8px}.document-viewer-box .modal-head p{margin:3px 0 0;max-width:760px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.document-viewer-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 0 10px;flex:0 0 auto}.document-viewer-stage{position:relative;min-height:320px;flex:1 1 auto;border:1px solid #dce4ee;border-radius:14px;overflow:hidden;background:#eef2f7}.document-viewer-stage iframe{width:100%;height:100%;border:0;background:#fff;display:block}.document-viewer-loading{position:absolute;inset:0;display:grid;place-items:center;color:#64748b;background:#f8fafc;z-index:1;font-weight:600}.document-viewer-note{font-size:10px;color:#64748b;padding:8px 2px 0;flex:0 0 auto}.document-viewer-modal.show{display:grid}@media(max-width:720px){.document-viewer-box{width:98vw;height:88vh;padding:11px;border-radius:15px}.document-viewer-toolbar{align-items:stretch;flex-direction:column}.document-viewer-toolbar .btn{width:100%;text-align:center}.document-viewer-stage{min-height:420px}}

/* Profesor: alumnos y asignaturas agrupadas en árbol */
.teacher-student-tree{display:grid;gap:12px}.teacher-student-node{background:#fff;border:1px solid #e1e8f0;border-radius:18px;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.06)}.teacher-student-node>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px;background:linear-gradient(180deg,#fff,#f7faff);transition:all 0.3s ease}.teacher-student-node>summary::-webkit-details-marker{display:none}.teacher-student-node>summary:after{content:'⌄';color:#64748b;font-size:18px;transition:.2s}.teacher-student-node[open]>summary:after{transform:rotate(180deg)}.teacher-student-node[open]>summary{background:linear-gradient(180deg,#eff6ff,#dbeafe);border-bottom:1px solid #bfdbfe;color:#1e3a8a}.teacher-student-main{display:flex;align-items:center;gap:12px;min-width:0}.teacher-student-avatar{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:linear-gradient(145deg,#e8f2ff,#f2edff);font-size:20px}.teacher-student-main b,.teacher-student-main small{display:block}.teacher-student-main b{font-size:14px}.teacher-student-main small{font-size:11px;color:#6b7b90;margin-top:3px}.teacher-student-hint{font-size:11px;color:#2563eb;font-weight:700;margin-left:auto}.teacher-subject-children{padding:10px 15px 15px;border-top:1px solid #edf1f5;background:#fbfdff}.teacher-subject-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 10px;border-bottom:1px solid #edf1f5}.teacher-subject-row:last-child{border-bottom:0}.teacher-subject-info{display:flex;align-items:center;gap:10px;min-width:0}.teacher-subject-icon{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#edf5ff}.teacher-subject-info b,.teacher-subject-info small{display:block}.teacher-subject-info b{font-size:13px}.teacher-subject-info small{font-size:10px;color:#718096;margin-top:3px}.teacher-subject-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
/* Notificaciones del profesor agrupadas y codificadas por estado */
.notification-tree{display:grid;gap:12px}.notification-student,.notification-subject{border:1px solid #e2e8f0;border-radius:17px;background:#fff;overflow:hidden}.notification-student>summary,.notification-subject>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;transition:all 0.3s ease}.notification-student>summary::-webkit-details-marker,.notification-subject>summary::-webkit-details-marker{display:none}.notification-student>summary{background:linear-gradient(180deg,#fff,#f7faff)}.notification-subject{margin:9px 12px}.notification-subject>summary{background:#f8fafc}.notification-student[open]>summary{background:linear-gradient(180deg,#eff6ff,#dbeafe);border-bottom:1px solid #bfdbfe;color:#1e3a8a}.notification-subject[open]>summary{background:linear-gradient(180deg,#f0fdf4,#dcfce7);border-bottom:1px solid #bbf7d0;color:#14532d}.notification-student summary small,.notification-subject summary small{color:#718096;font-size:10px}.notification-subjects{padding:2px 0 10px}.notification-subject .notification-list{padding:0 12px 12px}.notification-card.notif-approved{border-left:4px solid #16a34a;background:linear-gradient(90deg,rgba(22,163,74,.10),rgba(255,255,255,.97))}.notification-card.notif-approved .notification-icon{background:rgba(22,163,74,.13);color:#15803d}.notification-card.notif-rejected{border-left:4px solid #dc2626;background:linear-gradient(90deg,rgba(220,38,38,.10),rgba(255,255,255,.97))}.notification-card.notif-rejected .notification-icon{background:rgba(220,38,38,.12);color:#b91c1c}.notification-card.notif-approved.unread{box-shadow:0 8px 24px rgba(22,163,74,.09)}.notification-card.notif-rejected.unread{box-shadow:0 8px 24px rgba(220,38,38,.09)}
@media(max-width:720px){.teacher-student-node>summary{align-items:flex-start}.teacher-student-hint{display:none}.teacher-subject-row{align-items:flex-start;flex-direction:column}.teacher-subject-actions{width:100%;justify-content:space-between}.notification-student>summary,.notification-subject>summary{align-items:flex-start}}

/* Log de accesos */
.login-log-modal{width:min(1100px,96vw);max-height:92vh;overflow:hidden;display:flex;flex-direction:column;border-radius:20px;padding:22px}
.login-log-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:12px;align-items:end;margin:20px 0;padding:16px;background:linear-gradient(135deg,#f8fafc,#f1f5f9);border-radius:16px;border:1px solid #e2e8f0}
.filter-field{display:flex;flex-direction:column;gap:6px}
.filter-field > span{display:flex;align-items:center;gap:6px;font-size:11.5px;font-weight:800;color:#334155}
.filter-field input, .filter-field select{width:100%;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;transition:.2s;outline:0}
.filter-field input:focus, .filter-field select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px rgba(59,130,246,0.15)}
.filter-clear-btn{padding:10px 16px;border-radius:10px;height:42px;display:flex;align-items:center;gap:6px;font-weight:700}
.login-log-table{max-height:55vh;overflow:auto;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 10px 25px -5px rgba(0,0,0,0.05)}
.login-log-table thead{position:sticky;top:0;z-index:2;background:#f8fafc}
.login-log-table th{text-transform:uppercase;font-size:10.5px;letter-spacing:1px;color:#64748b;padding:14px 16px}
.login-log-count{font-size:12px;color:#64748b;margin-bottom:12px;display:flex;align-items:center;gap:6px}
.login-log-count span{background:#e2e8f0;color:#334155;padding:4px 8px;border-radius:999px;font-weight:800;font-size:11px}
.log-avatar{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;font-size:15px;font-weight:800;flex-shrink:0}
.student-bg{background:linear-gradient(135deg,#ecfdf5,#d1fae5);color:#059669;border:1px solid #a7f3d0}
.teacher-bg{background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#2563eb;border:1px solid #bfdbfe}
.metric-mini{display:flex;align-items:center;gap:14px;padding:16px 20px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;box-shadow:0 4px 12px rgba(15,23,42,0.03);transition:.2s}
.metric-mini:hover{transform:translateY(-2px);box-shadow:0 8px 16px rgba(15,23,42,0.06)}
.metric-mini .metric-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;flex-shrink:0}
.metric-mini.total-metric .metric-icon{background:#eff6ff;color:#3b82f6;border:1px solid #bfdbfe}
.metric-mini.student-metric .metric-icon{background:#ecfdf5;color:#10b981;border:1px solid #a7f3d0}
.metric-mini.teacher-metric .metric-icon{background:#fdf2f8;color:#ec4899;border:1px solid #fbcfe8}
.metric-mini b{display:block;font-size:26px;line-height:1;margin-bottom:4px;color:#0f172a}
.metric-mini span{font-size:12px;color:#64748b;font-weight:600}
@media(max-width:760px){.login-log-filters{grid-template-columns:1fr 1fr;padding:12px}.filter-field:first-child{grid-column:1/-1}.login-log-modal{width:98vw;padding:16px}.filter-clear-btn{grid-column:1/-1;justify-content:center}}

/* ===== ESTILOS GLOBALES: LISTAS DESPLEGABLES Y SOMBRAS TENUES ===== */

/* 1. Listas desplegables (<select>) con color suave, borde fino y sombra sutil */
select, 
.form-grid select, 
.builder-field select, 
.filter-field select, 
.scope-update-form select,
.login-card select {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
    outline: none !important;
}

select:hover, 
.form-grid select:hover, 
.builder-field select:hover, 
.filter-field select:hover, 
.scope-update-form select:hover {
    border-color: #93c5fd !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
}

select:focus, 
.form-grid select:focus, 
.builder-field select:focus, 
.filter-field select:focus, 
.scope-update-form select:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), 0 4px 14px rgba(37, 99, 235, 0.1) !important;
}

select option {
    background: #ffffff;
    color: #0f172a;
    padding: 8px 10px;
    font-weight: 500;
}

/* 2. Árboles y Listas Desplegables (<details> en todos los perfiles) */
.tree-student, 
.tree-subject, 
.tree-activity, 
.teacher-student-node, 
.notification-student, 
.notification-subject,
.nested-subject {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.25s ease !important;
    overflow: hidden;
}

.tree-student:hover, 
.tree-subject:hover, 
.tree-activity:hover, 
.teacher-student-node:hover, 
.notification-student:hover, 
.notification-subject:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.03) !important;
}

/* Estado abierto con color distintivo y sombra suave */
.tree-student[open], 
.teacher-student-node[open], 
.notification-student[open] {
    border-color: #bfdbfe !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08), 0 2px 6px rgba(37, 99, 235, 0.03) !important;
}

.tree-student[open] > summary, 
.teacher-student-node[open] > summary, 
.notification-student[open] > summary {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border-bottom: 1px solid #bfdbfe !important;
    color: #1e40af !important;
}

.tree-subject[open], 
.notification-subject[open] {
    border-color: #bbf7d0 !important;
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.07), 0 2px 5px rgba(22, 163, 74, 0.03) !important;
}

.tree-subject[open] > summary, 
.notification-subject[open] > summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border-bottom: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

.tree-activity[open] {
    border-color: #f5d0fe !important;
    box-shadow: 0 6px 20px rgba(192, 38, 211, 0.07), 0 2px 5px rgba(192, 38, 211, 0.03) !important;
}

.tree-activity[open] > summary {
    background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%) !important;
    border-bottom: 1px solid #f5d0fe !important;
    color: #86198f !important;
}

/* 3. Filas y tarjetas de lista generales con sombra tenue y hover refinado */
.list-row {
    padding: 12px 14px !important;
    border-radius: 12px !important;
    margin-bottom: 7px !important;
    border: 1px solid #edf2f7 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.2s ease !important;
}

.list-row:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05) !important;
}

.teacher-subject-row {
    background: #ffffff !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    padding: 12px 16px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02) !important;
    transition: all 0.2s ease !important;
}

.teacher-subject-row:hover {
    border-color: #bfdbfe !important;
    background: #fcfdff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06) !important;
}

.notification-card {
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02) !important;
    border: 1px solid #e2e8f0 !important;
    transition: all 0.2s ease !important;
}

.notification-card:hover {
    transform: translateY(-1px);
    border-color: #cbd5e1 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06) !important;
}

.table-card, .professional-table {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.02) !important;
    border: 1px solid #e2e8f0 !important;
}

/* ===== MODAL CARPETA NEXUS: JERARQUÍA E INDENTACIÓN ===== */
.folder-detail-content {
    max-height: 74vh;
    overflow-y: auto;
    padding: 6px 8px 18px 2px;
}

.folder-summary-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.06);
    margin-bottom: 20px;
}

.folder-summary-student {
    display: flex;
    align-items: center;
    gap: 14px;
}

.folder-summary-avatar {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}

.folder-summary-name {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

.folder-summary-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.folder-summary-counts {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

/* Nivel 1: Asignatura (Indentación base con acento azul) */
.nested-subject {
    border: 1px solid #cbd5e1 !important;
    border-left: 5px solid #2563eb !important;
    border-radius: 16px !important;
    margin: 14px 0 18px 8px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.nested-subject:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08) !important;
    border-color: #93c5fd !important;
}

.nested-subject-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f6fd 100%) !important;
    border-bottom: 1px solid #e2e8f0;
}

.nested-subject-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nested-subject-icon {
    font-size: 20px;
}

.nested-subject-title b {
    font-size: 14px;
    color: #1e293b;
}

.nested-subject-teacher {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nested-subject-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Nivel 2: Trabajos y Actividades (Indentación marcada a la derecha con guía vertical) */
.nested-materials {
    padding: 14px 16px 16px 20px !important;
    margin-left: 20px !important;
    border-left: 2px dashed #93c5fd !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.nested-activity-card {
    border: 1px solid #e2e8f0 !important;
    border-left: 4px solid #10b981 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.nested-activity-card:hover {
    border-color: #a7f3d0 !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.08) !important;
}

.nested-activity-card > summary {
    padding: 12px 15px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%) !important;
    transition: all 0.2s ease !important;
}

.nested-activity-card[open] > summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border-bottom: 1px solid #bbf7d0 !important;
    color: #166534 !important;
}

.nested-activity-body {
    padding: 14px 16px !important;
}

.nested-activity-body p {
    margin: 0 0 12px 0 !important;
    font-size: 12.5px !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}

.nested-activity-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Nivel 3: Evidencias del Alumno (Mayor indentación con borde verde) */
.nested-evidence-box {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #10b981;
}

.nested-evidence-box b {
    font-size: 11.5px;
    color: #1e293b;
    display: block;
    margin-bottom: 8px;
}

.nested-evidence-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 9px;
    margin-bottom: 6px;
    font-size: 11.5px;
}

.nested-evidence-row:last-child {
    margin-bottom: 0;
}

@media(max-width:720px){
    .folder-summary-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .nested-subject-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .nested-subject-tools {
        width: 100%;
        justify-content: space-between;
    }
    .nested-materials {
        margin-left: 8px !important;
        padding-left: 10px !important;
    }
}

/* ===== SELECTOR DE COLUMNAS PARA TABLAS ===== */
.col-selector-dropdown {
    position: relative;
    display: inline-block;
}

.col-selector-menu {
    display: none;
    position: fixed;
    min-width: 210px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 12px 14px;
    z-index: 5000;
}

.col-selector-menu.show {
    display: block;
    animation: nxFadeDown 0.18s ease-out;
}

@keyframes nxFadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.col-selector-menu h4 {
    margin: 0 0 10px 0;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 6px;
}

.col-selector-item {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 7px 8px !important;
    border-radius: 9px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    margin-bottom: 2px !important;
}

.col-selector-item:hover {
    background: #f1f5f9 !important;
}

.col-selector-item input {
    cursor: pointer !important;
    width: 16px !important;
    height: 16px !important;
    accent-color: #2563eb !important;
    margin: 0 !important;
}

/* Clases dinámicas de ocultación de columnas */
.table-hide-num .col-num { display: none !important; }
.table-hide-rut .col-rut { display: none !important; }
.table-hide-nombre .col-nombre { display: none !important; }
.table-hide-sexo .col-sexo { display: none !important; }
.table-hide-nacimiento .col-nacimiento { display: none !important; }
.table-hide-estado .col-estado { display: none !important; }
.table-hide-acciones .col-acciones { display: none !important; }

/* Tag purple & pink */
.tag.purple {
    background: #f3e8ff !important;
    color: #7e22ce !important;
    border-color: #e9d5ff !important;
}
.tag.pink {
    background: #fdf2f8 !important;
    color: #db2777 !important;
    border-color: #fbcfe8 !important;
}

/* ===== SECCIÓN VINCULACIÓN: ESTILOS COLORIDOS (ADMIN & UTP) ===== */

/* 1. Perfil Administrador: Vinculación Académica */
.admin-link-card-form {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%) !important;
    border: 1px solid #bae6fd !important;
    border-top: 4px solid #0284c7 !important;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.07) !important;
    border-radius: 18px !important;
}

.admin-link-card-form h3 {
    color: #0369a1 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.admin-link-card-info {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
    border: 1px solid #e9d5ff !important;
    border-top: 4px solid #7c3aed !important;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.07) !important;
    border-radius: 18px !important;
}

.admin-link-card-info h3 {
    color: #6d28d9 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    margin: 0 !important;
}

.admin-link-card-info .list-row {
    background: #ffffff !important;
    padding: 10px 14px !important;
    border-radius: 11px !important;
    margin-bottom: 8px !important;
    border: 1px solid #f5f3ff !important;
    box-shadow: 0 2px 6px rgba(109, 40, 217, 0.04) !important;
}

.admin-link-card-info .list-row:last-child {
    margin-bottom: 0 !important;
}

.admin-link-table-card {
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05) !important;
}

.admin-link-table-card th {
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%) !important;
    color: #334155 !important;
    font-weight: 800 !important;
}

/* 2. Perfil UTP: Crear / Ampliar Carpeta NEXUS */
.utp-vinculacion-builder {
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-top: 5px solid #2563eb !important;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.07) !important;
    border-radius: 20px !important;
}

.utp-vinculacion-builder .builder-steps {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0effe 100%) !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 16px !important;
    padding: 8px !important;
}

.utp-vinculacion-builder .builder-step {
    color: #1e40af !important;
    font-weight: 700 !important;
    border-radius: 11px !important;
    transition: all 0.2s ease !important;
}

.utp-vinculacion-builder .builder-step span {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    font-weight: 900 !important;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.3) !important;
}

/* Bloque Paso 1: Curso */
.builder-field-course {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
    border: 1px solid #bae6fd !important;
    border-left: 4px solid #0284c7 !important;
    border-radius: 15px !important;
    padding: 14px !important;
}

.builder-field-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.builder-field-course .builder-field-header b {
    color: #0369a1 !important;
    font-size: 13px !important;
}

/* Bloque Paso 2: Alumno */
.builder-field-student {
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%) !important;
    border: 1px solid #fef08a !important;
    border-left: 4px solid #eab308 !important;
    border-radius: 15px !important;
    padding: 14px !important;
}

.builder-field-student .builder-field-header b {
    color: #854d0e !important;
    font-size: 13px !important;
}

/* Bloque Paso 3: Asignaturas */
.builder-field-subjects {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%) !important;
    border: 1px solid #bbf7d0 !important;
    border-left: 4px solid #16a34a !important;
    border-radius: 18px !important;
    padding: 18px !important;
}

.builder-field-subjects .field-title-row b {
    color: #166534 !important;
    font-size: 13.5px !important;
}

.builder-field-subjects .selected-counter {
    background: #15803d !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid #166534 !important;
    box-shadow: 0 3px 8px rgba(21, 128, 61, 0.25) !important;
}

.builder-field-subjects .subject-slider {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 14px !important;
    padding: 12px !important;
}

.builder-field-subjects .subject-choice-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
    transition: all 0.2s ease !important;
}

.builder-field-subjects .subject-choice:hover .subject-choice-card {
    border-color: #93c5fd !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.1) !important;
}

.builder-field-subjects .subject-choice input:checked + .subject-choice-card {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%) !important;
    border: 2px solid #2563eb !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22) !important;
}

.builder-field-subjects .subject-choice input:checked + .subject-choice-card b {
    color: #1d4ed8 !important;
    font-weight: 800 !important;
}

/* Bloque Paso 4: Profesor */
.builder-field-teacher {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%) !important;
    border: 1px solid #e9d5ff !important;
    border-left: 4px solid #7c3aed !important;
    border-radius: 15px !important;
    padding: 14px !important;
}

.builder-field-teacher .builder-field-header b {
    color: #6d28d9 !important;
    font-size: 13px !important;
}

/* Bloque Paso 5: Confirmación y Envío */
.builder-field-submit {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 16px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
}

.builder-submit-info b {
    color: #1e293b !important;
    font-size: 13px !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.builder-submit-info p {
    margin: 0 !important;
    color: #64748b !important;
    font-size: 11.5px !important;
}

.builder-btn-create {
    font-size: 13.5px !important;
    padding: 12px 22px !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.3) !important;
    white-space: nowrap !important;
}

@media(max-width:768px) {
    .builder-field-submit {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .builder-btn-create {
        width: 100% !important;
    }
}

/* ===== MEJORAS GESTIÓN DE ALUMNOS (ADMIN & UTP) ===== */
#alumnos_admin.view, #profesores_admin.view {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
}

#alumnos_admin[style*="display: none"], #profesores_admin[style*="display: none"] {
    display: none !important;
}

/* Botones de acción de tabla alineados y de tamaño uniforme */
.table-row-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    white-space: nowrap !important;
}

.action-table-btn {
    min-width: 84px !important;
    height: 29px !important;
    padding: 0 10px !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.col-acciones {
    min-width: 190px !important;
    text-align: right !important;
}

.admin-students-metrics-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.student-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    transition: all 0.2s ease;
}

.student-stat-pill .pill-val {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 11.5px;
}

.student-stat-pill.stat-total .pill-val { background: #e0f2fe; color: #0284c7; }
.student-stat-pill.stat-active .pill-val { background: #dcfce7; color: #16a34a; }
.student-stat-pill.stat-inactive .pill-val { background: #fee2e2; color: #dc2626; }

/* Segmented Control para Filtro de Estado */
.status-filter-group {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.status-filter-btn {
    border: none;
    background: transparent;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.status-filter-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.6);
}

.status-filter-btn.active {
    background: #ffffff;
    color: #1e40af;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* Cabeceras de tabla ordenables */
th.sortable {
    cursor: pointer !important;
    user-select: none;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

th.sortable:hover {
    background: #eef2f7 !important;
    color: #1e293b !important;
}

th.sortable .sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 11px;
    color: #94a3b8;
    transition: color 0.15s;
}

th.sortable.sort-asc, th.sortable.sort-desc {
    color: #1d4ed8 !important;
    background: #eff6ff !important;
}

th.sortable.sort-asc .sort-indicator, th.sortable.sort-desc .sort-indicator {
    color: #1d4ed8;
    font-weight: 900;
}

/* Pie de tabla con conteo visible */
.admin-table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    flex-shrink: 0;
}

/* Estilos de Impresión Optimizados para 1 Hoja */
@media print {
    @page {
        size: portrait;
        margin: 10mm 12mm 10mm 12mm;
    }
    body * {
        visibility: hidden !important;
    }
    #printSection, #printSection * {
        visibility: visible !important;
    }
    #printSection {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #fff !important;
        color: #000 !important;
        font-family: Arial, sans-serif !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .no-print {
        display: none !important;
    }
    .print-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-bottom: 2px solid #1e293b !important;
        padding-bottom: 8px !important;
        margin-bottom: 10px !important;
    }
    .print-title {
        font-size: 16pt !important;
        font-weight: bold !important;
        margin: 0 !important;
        color: #0f172a !important;
    }
    .print-subtitle {
        font-size: 10pt !important;
        color: #475569 !important;
        margin: 2px 0 0 !important;
    }
    .print-meta-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 10px !important;
        font-size: 9pt !important;
    }
    .print-meta-card {
        border: 1px solid #cbd5e1 !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
        background: #f8fafc !important;
    }
    .print-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 8.5pt !important;
    }
    .print-table th {
        background: #1e3a8a !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        border: 1px solid #1e3a8a !important;
        padding: 5px 6px !important;
        text-align: left !important;
        font-weight: bold !important;
    }
    .print-table td {
        border: 1px solid #cbd5e1 !important;
        padding: 4px 6px !important;
        color: #0f172a !important;
    }
    .print-table tr:nth-child(even) td {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .print-table .col-acciones {
        display: none !important;
    }
}

/* ==========================================================================
   ESTADÍSTICA GLOBAL DEL ESTABLECIMIENTO Y GESTIÓN DE PRIORITARIOS
   ========================================================================== */

.establishment-stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.est-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf2f7;
}

.est-stats-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.est-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #bfdbfe;
    display: grid;
    place-items: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
}

.est-badge-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.est-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.est-stat-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.est-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.est-stat-box .est-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.est-stat-box.box-regular .est-stat-icon {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.est-stat-box.box-prio {
    border-color: #fef08a;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.est-stat-box.box-prio .est-stat-icon {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.est-stat-box.box-hombres .est-stat-icon {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.est-stat-box.box-mujeres .est-stat-icon {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
}

.est-stat-data {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.est-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 2px;
}

.est-stat-values {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.est-stat-values b {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

.est-pct {
    font-size: 11.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
}

.est-pct.prio-pct {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Píldoras de Métricas por Curso */
.student-stat-pill.stat-regular .pill-val {
    background: #eff6ff;
    color: #1d4ed8;
}

.student-stat-pill.stat-prio {
    border-color: #fde68a;
    background: #fffbeb;
}

.student-stat-pill.stat-prio .pill-val {
    background: #fef3c7;
    color: #b45309;
}

/* Badges de Condición de Alumno */
.tag.tag-prio {
    background: linear-gradient(135deg, #fef3c7, #fef08a);
    color: #92400e;
    border: 1px solid #fcd34d;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
}

.tag.tag-prio .prio-star {
    font-size: 12px;
}

.tag.tag-regular {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11.5px;
}

/* Fila destacada si es prioritario */
.row-prioritario {
    background: #fffdf5;
}

.row-prioritario:hover td {
    background: #fefce8 !important;
}

/* Botón de cambio de curso en la tabla */
.btn-change-course {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e3a8a;
    font-weight: 700;
}

.btn-change-course:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

/* Toggle de columnas para condición */
.table-hide-condicion .col-condicion {
    display: none !important;
}

/* ==========================================================================
   VENTANA MODAL FLOTANTE AMPLIADA PARA NÓMINA DE ALUMNOS
   ========================================================================== */
.modal-floating-roster {
    z-index: 55 !important;
    backdrop-filter: blur(8px);
    background: rgba(6, 17, 31, 0.82) !important;
    padding: 14px !important;
}

.modal-floating-roster.show {
    display: grid !important;
}

.floating-roster-box {
    width: min(1480px, 98vw) !important;
    height: 94vh !important;
    max-height: 94vh !important;
    padding: 16px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45) !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
    animation: modalFloatingPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFloatingPop {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(8px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.floating-roster-header {
    background: #ffffff;
}

#adminFloatingStudentsTableWrapper {
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
}

#adminFloatingStudentsTable thead th {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

/* Elevación de modales hijas (Editar alumno, Cambiar curso y Permisos) */
#adminStudentModal,
#adminChangeCourseModal {
    z-index: 90 !important;
}

#adminStudentPermitsModal {
    z-index: 95 !important;
}

@media (max-width: 900px) {
    .floating-roster-box {
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        padding: 12px !important;
    }
}

/* ==========================================================================
   VENTANA MODAL DE DETALLE DE PERMISOS, ENFERMERÍA Y SERVICIOS HIGIÉNICOS
   ========================================================================== */
.modal-permits-box {
    width: min(1280px, 96vw) !important;
    height: 92vh !important;
    max-height: 92vh !important;
    padding: 18px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 22px !important;
    background: #ffffff !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45) !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
}

.tag-enfermeria {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.tag-higienicos {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.tag-generales {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.permits-month-group {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-bottom: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.permits-month-header {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: #ffffff;
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.permits-month-header .month-count-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.permits-filter-pill {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.permits-filter-pill:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.permits-filter-pill.active {
    background: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

.btn-student-permits {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-weight: 800;
}

.btn-student-permits:hover {
    background: #dbeafe;
    color: #1e3a8a;
    border-color: #93c5fd;
}

/* ==========================================================================
   FOTOGRAFÍA Y AVATAR DEL ALUMNO (CARPETA FOTO2026/UPLOADS/ALUMNOS)
   ========================================================================== */
.student-name-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-photo-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    background: #e2e8f0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.student-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.student-photo-fallback {
    width: 100%;
    height: 100%;
    display: none;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.student-photo-fallback.fem {
    background: linear-gradient(135deg, #ec4899, #be185d);
}

.student-photo-large {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    border: 2px solid #bfdbfe;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

/* ==========================================================================
   NEE (NECESIDADES EDUCATIVAS ESPECIALES) Y APODERADOS
   ========================================================================== */
.tag-nee {
    background: #fdf4ff;
    color: #86198f;
    border: 1px solid #f0abfc;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    box-shadow: 0 1px 3px rgba(134, 25, 143, 0.08);
}

.tag-none-nee {
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10.5px;
}

.box-nee {
    background: linear-gradient(135deg, #fdf4ff, #fae8ff);
    border-color: #f0abfc;
}

.box-nee .est-stat-icon {
    background: #f5d0fe;
    color: #86198f;
}

.box-nee .est-stat-values b {
    color: #701a75;
}

.box-nee .nee-pct {
    background: #f5d0fe;
    color: #701a75;
}

.student-stat-pill.stat-nee {
    border-color: #f0abfc;
    background: #fdf4ff;
}

.student-stat-pill.stat-nee .pill-val {
    background: #fae8ff;
    color: #86198f;
    font-weight: 800;
}

.btn-student-guardians {
    background: #fdf2f8;
    color: #9d174d;
    border: 1px solid #fbcfe8;
    font-weight: 800;
}

.btn-student-guardians:hover {
    background: #fce7f3;
    color: #831843;
    border-color: #f472b6;
}

/* MODAL DE APODERADOS */
.guardians-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 860px) {
    .guardians-grid {
        grid-template-columns: 1fr;
    }
}

.guardian-panel {
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.guardian-panel-titular {
    background: #f0f7ff;
    border-color: #bfdbfe;
}

.guardian-panel-suplente {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.guardian-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    margin-bottom: 4px;
}

.guardian-panel-title {
    font-size: 14px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guardian-panel-titular .guardian-panel-title {
    color: #1e40af;
}

.guardian-panel-suplente .guardian-panel-title {
    color: #6b21a8;
}

#adminStudentGuardiansModal {
    z-index: 90 !important;
}

/* ==========================================================================
   BOTONES DE ACCIÓN DE LA LISTA DE ALUMNOS (COLORES DIFERENCIADOS)
   ========================================================================== */
.table-row-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.table-row-actions .action-table-btn {
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 4px 8px !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    transition: all 0.15s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    cursor: pointer !important;
    line-height: 1.3 !important;
}

/* 1. Botón Apoderados (Fucsia / Magenta) */
.table-row-actions .btn-student-guardians {
    background: linear-gradient(135deg, #fdf2f8, #fce7f3) !important;
    color: #9d174d !important;
    border: 1px solid #fbcfe8 !important;
    box-shadow: 0 1px 3px rgba(157, 23, 77, 0.08) !important;
}
.table-row-actions .btn-student-guardians:hover {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8) !important;
    color: #831843 !important;
    border-color: #f472b6 !important;
    box-shadow: 0 2px 6px rgba(219, 39, 119, 0.22) !important;
    transform: translateY(-1px);
}

/* 2. Botón Permisos (Azul Zafiro / Índigo) */
.table-row-actions .btn-student-permits {
    background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.08) !important;
}
.table-row-actions .btn-student-permits:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe) !important;
    color: #1e3a8a !important;
    border-color: #93c5fd !important;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.22) !important;
    transform: translateY(-1px);
}

/* 3. Botón Trasladar Curso (Ámbar / Naranja) */
.table-row-actions .btn-change-course {
    background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    box-shadow: 0 1px 3px rgba(180, 83, 9, 0.08) !important;
}
.table-row-actions .btn-change-course:hover {
    background: linear-gradient(135deg, #fef3c7, #fde68a) !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.22) !important;
    transform: translateY(-1px);
}

/* 4. Botón Editar Alumno (Esmeralda / Verde) */
.table-row-actions .btn-edit-student {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7) !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
    box-shadow: 0 1px 3px rgba(21, 128, 61, 0.08) !important;
}
.table-row-actions .btn-edit-student:hover {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
    color: #14532d !important;
    border-color: #86efac !important;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.22) !important;
    transform: translateY(-1px);
}

/* 5. Botón Desvincular (Rojo Coral) */
.table-row-actions .btn-deactivate-student {
    background: linear-gradient(135deg, #fef2f2, #fee2e2) !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    box-shadow: 0 1px 3px rgba(185, 28, 28, 0.08) !important;
}
.table-row-actions .btn-deactivate-student:hover {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    color: #991b1b !important;
    border-color: #f87171 !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.22) !important;
    transform: translateY(-1px);
}

/* 6. Botón Reactivar (Verde Menta) */
.table-row-actions .btn-reactivate-student {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    box-shadow: 0 1px 3px rgba(4, 120, 87, 0.08) !important;
}
.table-row-actions .btn-reactivate-student:hover {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important;
    color: #065f46 !important;
    border-color: #34d399 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.22) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   MODAL DE VALIDACIÓN Y AUDITORÍA DE CONTACTOS / EMAILS
   ========================================================================== */
#adminValidateContactsModal {
    z-index: 95 !important;
}

#adminStudentGuardiansModal {
    z-index: 120 !important;
}

#adminChangeCourseModal, #adminStudentPermitsModal {
    z-index: 110 !important;
}

.validate-contacts-box {
    max-width: 1140px !important;
    width: 96vw !important;
    height: 94vh !important;
    max-height: 94vh !important;
    padding: 18px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.45) !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
}

.carrier-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    white-space: nowrap;
}

.carrier-pill.blue {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.carrier-pill.red {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.carrier-pill.purple {
    background: #faf5ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

.carrier-pill.gray {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.progress-track {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 6px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 6px;
    transition: width 0.15s ease-out;
}

.btn-validate-contacts {
    background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 8px rgba(14, 165, 233, 0.3) !important;
}

.btn-validate-contacts:hover {
    background: linear-gradient(135deg, #0284c7, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4) !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   ESTILOS MEJORADOS: MODAL DE EDICIÓN DE APODERADOS Y ESTADO PENDIENTE
   ========================================================================== */
.guardians-modal-box {
    max-width: 1240px !important;
    width: 96vw !important;
    height: 94vh !important;
    max-height: 94vh !important;
    padding: 20px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 22px !important;
    background: #f8fafc !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.5) !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
}

.guardians-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
    padding-bottom: 8px !important;
}

@media (max-width: 980px) {
    .guardians-grid {
        grid-template-columns: 1fr !important;
    }
}

.guardian-panel {
    border-radius: 16px !important;
    padding: 16px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04) !important;
}

.guardian-panel-titular {
    background: linear-gradient(180deg, #f0f7ff 0%, #e0f2fe 100%) !important;
    border: 2px solid #93c5fd !important;
}

.guardian-panel-suplente {
    background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%) !important;
    border: 2px solid #d8b4fe !important;
}

.guardian-panel-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid rgba(0,0,0,0.06) !important;
}

.guardian-panel-title {
    font-size: 15.5px !important;
    font-weight: 900 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.guardian-panel-titular .guardian-panel-title {
    color: #1e40af !important;
}

.guardian-panel-suplente .guardian-panel-title {
    color: #6b21a8 !important;
}

.guardian-section-box {
    background: #ffffff !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

.guardian-section-box-title {
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.4px !important;
    margin-bottom: 2px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.guardian-panel-titular .guardian-section-box-title {
    color: #1d4ed8 !important;
}

.guardian-panel-suplente .guardian-section-box-title {
    color: #7e22ce !important;
}

.guardian-field-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    margin: 0 !important;
}

.guardian-field-label {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #475569 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin: 0 !important;
    display: block !important;
}

.guardian-control {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    border: 1.5px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.15s ease-in-out !important;
}

.guardian-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18) !important;
    outline: none !important;
}

select.guardian-control {
    cursor: pointer !important;
    padding-right: 28px !important;
}

.guardian-field-feedback {
    font-size: 11px !important;
    font-weight: 700 !important;
    min-height: 14px !important;
    line-height: 1.2 !important;
}

.guardian-grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.guardian-grid-address {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 10px !important;
}


.tag-guardian-pending {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    font-weight: 800 !important;
    font-size: 10.5px !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

.btn-guardians-pending {
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25) !important;
    background: linear-gradient(135deg, #fffbeb, #fef3c7) !important;
    color: #b45309 !important;
}

/* ==========================================================================
   ESTILOS: BOTÓN Y MODAL DE RESOLUCIONES (SANCIONES Y ACUERDOS)
   ========================================================================== */
.btn-student-resolutions {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    color: #ffffff !important;
    border: 1px solid #3730a3 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25) !important;
}

.btn-student-resolutions:hover {
    background: linear-gradient(135deg, #4338ca, #3730a3) !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35) !important;
    transform: translateY(-1px);
}

.resolutions-modal-box {
    max-width: 1080px !important;
    width: 95vw !important;
    height: 92vh !important;
    max-height: 92vh !important;
    padding: 20px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    background: #f8fafc !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.5) !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
}

.res-type-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    gap: 12px;
}

.res-type-card.selected-sancion {
    border-color: #ef4444 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fef2f2 100%) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.res-type-card.selected-acuerdo {
    border-color: #3b82f6 !important;
    background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.res-timeline-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
    position: relative;
}

.res-timeline-item.is-sancion {
    border-left: 5px solid #ef4444;
}

.res-timeline-item.is-acuerdo {
    border-left: 5px solid #3b82f6;
}

/* ==========================================================================
   ESTILOS: BOTÓN INTERACTIVO NEE Y MODAL DE DIAGNÓSTICO
   ========================================================================== */
.btn-nee-badge {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 900 !important;
    font-size: 11px !important;
    padding: 3px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
    transition: all 0.15s ease-in-out !important;
}

.btn-nee-badge:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45) !important;
    transform: translateY(-1px) scale(1.04) !important;
}

.nee-modal-box {
    max-width: 680px !important;
    width: 92vw !important;
    max-height: 90vh !important;
    padding: 22px 26px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.5) !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
}

.nee-diag-card {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
}

/* ==========================================================================
   ESTILOS: FOTOGRAFÍA AMPLIADA Y LIGHTBOX DE ALUMNO
   ========================================================================== */
.student-photo-wrapper.clickable-photo {
    cursor: pointer !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.student-photo-wrapper.clickable-photo:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    border-color: #3b82f6;
}

.photo-lightbox-box {
    max-width: 440px !important;
    width: 90vw !important;
    padding: 20px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    border-radius: 20px !important;
    background: #ffffff !important;
    box-shadow: 0 35px 90px rgba(15, 23, 42, 0.6) !important;
    border: 1px solid #cbd5e1 !important;
}

.photo-lightbox-img-container {
    width: 260px;
    height: 310px;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    border: 3px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px 0 16px;
    position: relative;
}

.photo-lightbox-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-lightbox-fallback {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    padding: 20px;
    text-align: center;
}

/* ==========================================================================
   ESTILOS: ENVÍO DE NÓMINA PDF POR CORREO A PROFESORES
   ========================================================================== */
.teacher-email-toolbar-group {
    display: inline-flex;
    align-items: center;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    padding: 2px 6px;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.08);
}

.teacher-email-select {
    font-size: 12px;
    font-weight: 700;
    color: #0f5132;
    background: #ffffff;
    border: 1px solid #86efac;
    border-radius: 6px;
    padding: 4px 8px;
    max-width: 230px;
    outline: none;
}

.teacher-email-select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}






