:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#0f172a;background:#f7f8fc;font-synthesis:none;text-rendering:optimizeLegibility;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;color:#475569;padding:10px 14px;font-weight:600;transition:background .15s}button:hover{background:#f1f5f9}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,a:focus-visible{outline:3px solid #a5b4fc;outline-offset:2px}input,select{min-width:0;border:1px solid #dbe1ea;border-radius:9px;padding:10px 12px;background:#fff;color:#334155;outline:none}input:focus,select:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f114}label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;color:#475569}h1,h2,h3,p{margin:0}h1{font-size:27px;letter-spacing:-.7px;line-height:1.3}h2{font-size:20px}h3{font-size:16px}p{line-height:1.6}.muted{color:#64748b;font-size:13px}.primary{background:#4f46e5;color:#fff;border-color:#4f46e5;box-shadow:0 3px 8px #4f46e51a}.primary:hover{background:#4338ca}.export{background:#059669;color:#fff;border-color:#059669}.export:hover{background:#047857}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:258px;background:#0f172a;color:#94a3b8;display:flex;flex-direction:column;z-index:20}.brand{display:flex;align-items:center;gap:12px;padding:30px 22px;border-bottom:1px solid #1e293b}.brand img{width:46px;height:46px;border-radius:50%;background:#fff}.brand strong{display:block;color:#fff;font-size:20px;letter-spacing:1px}.brand span{font-size:10px;display:block;margin-top:5px}.nav-label{font-size:10px;letter-spacing:1.7px;padding:28px 28px 12px;font-weight:700;color:#64748b}.sidebar nav{display:flex;flex-direction:column;gap:7px;padding:0 15px}.sidebar nav button{justify-content:flex-start;gap:12px;background:transparent;border:0;color:#94a3b8;padding:14px 16px;text-align:left}.sidebar nav button:hover{background:#1e293b;color:#fff}.sidebar nav button.active{background:#4f46e5;color:#fff;box-shadow:0 4px 15px #0002}.sidebar-footer{margin-top:auto;padding:20px;border-top:1px solid #1e293b;font-size:11px}.sidebar-footer p{display:flex;gap:8px;align-items:center;margin-bottom:12px}.sidebar-footer>div{display:flex;gap:12px;flex-wrap:wrap}.sidebar-footer button{border:0;border-radius:0;padding:7px 0;font-size:10px;background:transparent;color:#94a3b8}.sidebar-footer button:hover{color:#fff}.connection-dot{width:7px;height:7px;background:#fbbf24;display:inline-block;border-radius:50%}.connection-dot.connected{background:#34d399}main{margin-left:258px;padding:35px;max-width:1900px}.page-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.page-header p{color:#64748b;font-size:13px;margin-top:7px}.today{padding:11px 15px;border:1px solid #e2e8f0;border-radius:10px;white-space:nowrap;background:#fff;font-size:12px;color:#475569}.page-content{display:flex;flex-direction:column;gap:20px;min-width:0;padding:0;margin:0;border:0}.stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.stat{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:20px;box-shadow:0 2px 3px #0f172a02}.stat p{font-size:11px;text-transform:uppercase;letter-spacing:.5px;font-weight:600;color:#64748b}.stat strong{display:block;font-size:31px;margin-top:10px;letter-spacing:-.8px}.stat.green strong{color:#059669}.stat.red strong{color:#e11d48}.stat.amber strong{color:#d97706}.stat.purple strong{color:#4f46e5}.table-scroll{border:1px solid #e2e8f0;border-radius:14px;overflow:auto;background:#fff;max-height:650px}table{border-collapse:collapse;width:100%;text-align:left;font-size:12px}th{position:sticky;top:0;z-index:1;background:#f8fafc;color:#64748b;font-size:11px;font-weight:600;padding:16px;white-space:nowrap;border-bottom:1px solid #e2e8f0}td{padding:15px 16px;border-bottom:1px solid #f1f5f9;color:#475569;white-space:nowrap}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fafbff}td:first-child{color:#94a3b8}.name{font-weight:600;color:#1e293b}.empty{text-align:center!important;padding:60px 20px!important;color:#94a3b8!important}.card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;overflow:hidden;min-width:0}.card h3{padding:23px}.card .table-scroll{border:0;border-radius:0}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) 285px;gap:20px;align-items:start}.chart-card{padding-bottom:26px}.chart-card h3{text-align:center}.donut{width:175px;height:175px;border-radius:50%;margin:14px auto 28px;display:grid;place-items:center}.donut>div{width:135px;height:135px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut strong{font-size:29px}.donut small{font-size:9px;color:#94a3b8;margin-top:5px}.legend{list-style:none;margin:0;padding:0 27px;display:flex;flex-direction:column;gap:14px}.legend li{display:flex;align-items:center;gap:9px;font-size:12px;color:#64748b}.legend li strong{margin-left:auto;color:#334155}.legend-dot{width:9px;height:9px;border-radius:50%;background:#cbd5e1}.badge{display:inline-block;border-radius:7px;background:#f1f5f9;color:#64748b;padding:5px 9px;font-size:10px;font-weight:600}.status-0{background:#d1fae5!important;color:#047857!important}.status-1{background:#ffe4e6!important;color:#be123c!important}.status-2{background:#fef3c7!important;color:#b45309!important}.legend-dot.status-0{background:#10b981!important}.legend-dot.status-1{background:#f43f5e!important}.legend-dot.status-2{background:#f59e0b!important}.mark-0{color:#059669;font-weight:700}.mark-1{color:#e11d48;font-weight:700}.mark-2{color:#d97706;font-weight:700}.toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.tabs{display:flex;gap:5px;border-bottom:1px solid #e2e8f0}.tabs button{border:0;background:transparent;border-radius:0;border-bottom:2px solid transparent;padding:13px 17px;font-size:12px}.tabs button.selected{border-bottom-color:#4f46e5;color:#4f46e5}.wrap{flex-wrap:wrap}.search{width:360px;max-width:100%}.row-actions{display:flex;gap:5px}.icon-button{padding:7px;background:transparent;border:0}.notice{border:1px solid #fde68a;background:#fffbeb;color:#92400e;padding:13px 17px;font-size:12px;line-height:1.7;border-radius:10px;margin-bottom:4px}.month-picker{display:flex;gap:8px}.date-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.date-controls input{max-width:160px}.date-controls button{padding:10px}.status-buttons{display:flex;gap:4px}.status-buttons button{padding:8px 10px;font-size:11px;white-space:nowrap}.status-buttons button.selected{border-color:currentColor}.note{width:155px;font-size:12px;padding:8px}.day-cell{padding:14px 10px;text-align:center;min-width:33px;border-right:1px solid #f1f5f9;font-size:11px}.weekend{background:#f1f5f9}.dimmed{opacity:.25}.main-footer{margin-top:35px;font-size:10px;color:#94a3b8;text-align:center}.mobile-header{display:none}.toast{position:fixed;top:20px;right:20px;z-index:200;max-width:440px;background:#0f172a;color:#fff;padding:15px 18px;border-radius:12px;box-shadow:0 6px 20px #0002;display:flex;align-items:center;gap:12px;font-size:13px}.toast button{background:transparent;color:inherit;border:0;padding:2px}.error-toast{background:#9f1239}dialog{width:500px;max-width:calc(100% - 30px);max-height:90vh;overflow:auto;border:0;border-radius:22px;padding:25px;box-shadow:0 20px 80px #0003;color:#0f172a}dialog::backdrop{background:#0f172a80;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}dialog header{display:flex;align-items:center;justify-content:space-between;padding-bottom:18px;border-bottom:1px solid #f1f5f9;margin-bottom:20px;gap:16px}.student-form{display:flex;flex-direction:column;gap:16px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.student-form footer{display:flex;justify-content:flex-end;gap:10px;margin-top:5px}.error{color:#be123c;font-size:12px;line-height:1.6}.center{text-align:center}.profile-avatar{width:70px;height:70px;border-radius:20px;background:#e0e7ff;color:#4f46e5;font-size:25px;font-weight:700;display:grid;place-items:center;margin:10px auto 15px}.profile-details{background:#f8fafc;border-radius:12px;padding:15px;margin:25px 0}.profile-details>div{display:flex;justify-content:space-between;padding:8px;font-size:12px}.profile-details dt{color:#64748b}.profile-details dd{font-weight:600;margin-left:10px}.phone-links{display:grid;grid-template-columns:1fr 1fr;gap:12px}.phone-links>div{display:flex;flex-direction:column;gap:8px;font-size:12px}.phone-links small{color:#64748b}.phone-links a{color:#4f46e5;font-weight:600}.loading{min-height:100vh;display:flex;flex-direction:column;gap:20px;align-items:center;justify-content:center;text-align:center;padding:30px}.login-screen{position:fixed;inset:0;background:#0f172a;display:grid;place-items:center;padding:20px;overflow:auto}.login-card{display:flex;flex-direction:column;gap:20px;background:#fff;width:410px;max-width:100%;padding:32px;border-radius:20px}.login-card img{width:60px;height:60px}.login-card h1{font-size:22px}.login-card small{color:#64748b;font-size:11px}.sidebar-overlay{display:none}@media(min-width:1600px){main{padding:45px}.stats{gap:22px}}@media(max-width:1150px){.dashboard-grid{grid-template-columns:1fr}.chart-card{display:none}main{padding:25px}.stat{padding:15px}.stats{gap:10px}}@media(max-width:800px){.sidebar{transform:translate(-100%);transition:transform .2s}.sidebar.open{transform:translate(0)}main{margin-left:0;padding:22px 16px}.mobile-header{height:60px;background:#fff;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:13px;padding:0 14px}.sidebar-overlay{display:block;position:fixed;inset:0;background:#0f172a80;z-index:19}.page-header{align-items:flex-start;flex-direction:column;gap:12px}.today{font-size:11px;padding:8px 12px}h1{font-size:23px}.stats{grid-template-columns:repeat(3,minmax(0,1fr))}.stat strong{font-size:25px}.stat p{font-size:9px}.toolbar{align-items:flex-start}.tabs button{padding:12px 10px;font-size:11px}.toast{left:15px;right:15px;top:15px;max-width:none}.form-grid{gap:12px}.date-controls{gap:4px}.page-header p{font-size:12px}td,th{padding:13px}.phone-links{grid-template-columns:1fr}.status-buttons button{padding:9px}.student-form input{width:100%}}.source-list{display:flex;flex-direction:column;gap:18px;max-height:48vh;overflow:auto;padding:20px 0}.source-list small{font-weight:400;color:#64748b}.source-label{display:block;color:#6366f1;font-size:10px;font-weight:400;margin-top:4px}.sidebar nav{overflow-y:auto;min-height:0}.sidebar nav button{flex-shrink:0}.sidebar .brand{padding:23px 22px}.sidebar .nav-label{padding-top:18px}.sidebar-footer{flex-shrink:0}.workbook-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:20px;align-items:start}.sheet-nav{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:10px;max-height:70vh;overflow:auto}.sheet-nav h3{display:flex;align-items:center;gap:6px;font-size:11px;color:#64748b;padding:13px 8px;text-transform:uppercase;letter-spacing:.3px}.sheet-nav button{width:100%;border:0;background:transparent;justify-content:space-between;text-align:left;font-size:12px;padding:10px}.sheet-nav button.selected{background:#eef2ff;color:#4f46e5}.sheet-nav small{color:#94a3b8}.sheet-content{min-width:0;display:flex;flex-direction:column;gap:16px}.sheet-cell{white-space:normal;min-width:125px;max-width:320px;overflow-wrap:anywhere;line-height:1.5}.import-sheet-list{max-height:40vh;overflow:auto;list-style:none;padding:0}.import-sheet-list li{display:flex;justify-content:space-between;gap:12px;padding:9px;border-bottom:1px solid #f1f5f9}.import-sheet-list span{color:#64748b}.fund-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.fund-stats .stat strong{font-size:24px}.voided-row{opacity:.55}.empty.card{display:flex;flex-direction:column;align-items:center;gap:15px}@media(max-width:1050px){.workbook-layout{grid-template-columns:1fr}.sheet-nav{display:flex;gap:15px;max-height:240px}.sheet-nav section{min-width:160px}.fund-stats .stat strong{font-size:18px}}@media(max-width:500px){.fund-stats{grid-template-columns:1fr}.fund-stats .stat{display:flex;align-items:center;justify-content:space-between}.fund-stats .stat strong{margin:0}}.profile-details dd{white-space:normal;overflow-wrap:anywhere;text-align:right;max-width:65%}.fund-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.fund-collection small{display:block;margin-top:8px;color:#64748b;font-size:11px}.calendar-heading{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:32px;padding:5px 4px;border-radius:7px}.calendar-heading strong{font-size:14px}.calendar-heading small{font-size:11px;font-weight:500;text-transform:none}.calendar-off{color:#94a3b8;background:#f1f5f9}.calendar-today{background:#4f46e5;color:#fff}.day-cell.calendar-current{box-shadow:inset 2px 0 #818cf8,inset -2px 0 #818cf8;background:#eef2ff}.day-cell.calendar-week-start{border-left:2px solid #cbd5e1}.room-members{white-space:normal;min-width:220px;line-height:1.7}.room-candidates{max-height:45vh;overflow:auto}.room-candidates label{display:flex;flex-direction:row;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e2e8f0}.room-candidates input{width:18px;height:18px;flex-shrink:0}.room-candidates small{display:block;color:#64748b;margin-top:4px}@media(max-width:800px){.app-shell,main,.page-content,.toolbar,.table-scroll{min-width:0;max-width:100%}.sidebar{height:100dvh;max-width:calc(100vw - 48px);padding-bottom:env(safe-area-inset-bottom)}.mobile-header{position:sticky;top:0;z-index:10;padding-top:env(safe-area-inset-top);height:calc(60px + env(safe-area-inset-top))}.sidebar nav{overscroll-behavior:contain}.sidebar-footer button{min-height:40px;font-size:12px}.table-scroll{overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}input,select,textarea{font-size:16px;min-height:44px}button,.icon-button{min-height:44px;touch-action:manipulation}main{padding-bottom:calc(24px + env(safe-area-inset-bottom))}dialog{max-height:calc(100dvh - 24px);padding:20px;border-radius:16px;overscroll-behavior:contain}.student-form input,.student-form select{width:100%}.student-form label{min-width:0}.room-candidates label{min-height:56px}.room-candidates input{min-height:20px;width:20px;height:20px}.room-candidates span{min-width:0;overflow-wrap:anywhere}.monthly-attendance td:nth-child(3),.monthly-attendance th:nth-child(3){position:sticky;left:0;background:#fff;box-shadow:2px 0 4px #0f172a12;max-width:160px;min-width:140px;white-space:normal;overflow-wrap:anywhere}.monthly-attendance td:nth-child(3){z-index:2}.monthly-attendance th:nth-child(3){z-index:3;background:#f8fafc}}@media(max-width:600px){main{padding:18px 12px}.page-header{margin-bottom:20px}.page-content{gap:16px}.toolbar{gap:10px}.toolbar>.search{width:100%;flex-basis:100%}.toolbar>select{flex:1}.month-picker,.month-picker select{flex:1}.date-controls{display:grid;grid-template-columns:44px minmax(0,1fr) 44px auto;width:100%}.date-controls input{width:100%;max-width:none;padding:10px 6px}.date-controls button{padding:8px}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.stat{padding:14px}.stat strong{font-size:24px;overflow-wrap:anywhere}.stat p{font-size:10px}.fund-collection{grid-template-columns:1fr}.fund-collection .stat strong{font-size:26px}.form-grid{grid-template-columns:1fr}.student-form footer{flex-wrap:wrap}.student-form footer button{flex:1}.login-screen{padding:14px}.login-card{padding:24px;gap:18px;margin:auto}.login-card h1{font-size:21px}.toast{top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;overflow-wrap:anywhere}.row-actions{flex-wrap:wrap}.profile-details{padding:10px}.profile-details>div{gap:10px;padding:8px 0}.phone-links{overflow-wrap:anywhere}.mobile-cards{background:transparent;border:0;border-radius:0;max-height:none;overflow:visible}.mobile-cards table,.mobile-cards tbody{display:block;width:100%}.mobile-cards thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.mobile-cards tbody>tr{display:block;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:10px 14px;margin-bottom:12px}.mobile-cards td{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:12px;padding:10px 0;white-space:normal;min-width:0;max-width:none;overflow-wrap:anywhere}.mobile-cards td:before{content:attr(data-label);color:#64748b;font-size:11px;font-weight:500}.mobile-cards td.name{color:#1e293b;font-size:14px}.mobile-cards td.empty{display:block}.mobile-cards td.empty:before{display:none}.mobile-cards td:has(.status-buttons),.mobile-cards td:has(.note){display:block}.mobile-cards td:has(.status-buttons):before,.mobile-cards td:has(.note):before{display:block;margin-bottom:8px}.mobile-cards td:has(.status-buttons)+td:empty{display:none}.status-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.status-buttons button{font-size:11px;padding:10px 4px;gap:4px}.mobile-cards input.note{width:100%;font-size:16px}.mobile-cards input[type=number]{width:100%;max-width:100%}.mobile-cards .room-members,.mobile-cards .sheet-cell{min-width:0;max-width:none}}.room-delete{color:#be123c;border-color:#fecdd3}.room-delete:hover{background:#fff1f2}.room-transfer{display:flex;flex-direction:column;gap:10px;min-width:180px}.room-transfer select{width:100%}.room-residents{display:flex;flex-direction:column;gap:12px}.room-resident{padding:16px;border:1px solid #e2e8f0;border-radius:12px;min-width:0}.room-resident-info{display:flex;align-items:flex-start;gap:12px;margin-bottom:14px}.room-resident-info>span{color:#94a3b8;min-width:18px}.room-resident-info strong{display:block;overflow-wrap:anywhere;font-size:14px}.room-resident-info small{display:block;color:#64748b;margin-top:5px}.room-resident .row-actions{flex-wrap:wrap;gap:8px}.room-resident .room-transfer{min-width:0}.room-resident button{white-space:normal}@media(max-width:600px){.room-resident .row-actions{flex-direction:column}.room-resident .row-actions button{width:100%;min-height:44px}}.bulk-attendance{flex-wrap:wrap}.bulk-attendance .status-buttons{display:flex;flex-wrap:wrap;gap:8px}.bulk-attendance .status-buttons button{white-space:normal}
