.form-sections{display:grid;gap:16px}.form-section{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:12px}.form-section h3{margin:0 0 8px;font-size:1rem;color:#334155}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}.form-field{display:flex;flex-direction:column;gap:4px}.form-field textarea{resize:vertical;min-height:80px}.field-label{font-size:.85rem;color:#475569}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.checkbox-field{display:flex;align-items:flex-start;gap:4px}.checkbox-control{display:flex;align-items:center;gap:8px;font-size:.95rem;color:#475569}@media (max-width: 600px){.form-section{padding:10px}.form-section h3{font-size:.95rem}.form-grid{grid-template-columns:1fr}.form-actions{flex-direction:column;align-items:stretch}.checkbox-control{align-items:flex-start}}:root{font-family:Segoe UI,Arial,sans-serif;background-color:#f5f5f7;color:#1f2937}body{margin:0}.app{min-height:100vh}.header{background:#0f172a;color:#fff;padding:16px;display:flex;flex-direction:column;gap:12px}.header-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.header-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:flex-end}.group-switcher{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.group-info{display:flex;flex-direction:column;gap:2px;text-align:right}.group-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:#cbd5f5}.group-name{font-weight:600}.group-switcher select{border-radius:6px;padding:6px 10px;border:1px solid #94a3b8}.header nav{display:flex;flex-wrap:wrap;gap:8px}.header button{border:none;padding:8px 12px;border-radius:6px;cursor:pointer}.header button.active{background:#2563eb;color:#fff}.header .logout{background:#e11d48;color:#fff}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}main{padding:24px}.card{background:#fff;border-radius:8px;padding:16px;box-shadow:0 2px 8px #0f172a1a;margin-bottom:16px}.card-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.card-actions{display:flex;align-items:center;gap:8px}.icon-button{width:36px;height:36px;border-radius:999px;border:none;background:#2563eb;color:#fff;font-size:1.25rem;font-weight:700;line-height:1;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.icon-button:hover{background:#1d4ed8}.icon-button:focus-visible{outline:2px solid #1d4ed8;outline-offset:2px}.primary-button{border:none;border-radius:6px;background:#2563eb;color:#fff;padding:8px 16px;font-weight:600;cursor:pointer}.primary-button:hover{background:#1d4ed8}.primary-button:focus-visible{outline:2px solid #1d4ed8;outline-offset:2px}.table-wrapper{overflow-x:auto}.pill-list{list-style:none;display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:12px 0 0}.pill-list li{background:#e2e8f0;color:#0f172a;padding:4px 10px;border-radius:999px;font-size:.9rem}.pill-list-item{display:inline-flex;align-items:center;gap:8px}.pill-list-item button{background:transparent;border:none;color:#b91c1c;font-weight:600;cursor:pointer}.pill-list-item button:disabled{color:#94a3b8;cursor:not-allowed}.table select[multiple]{min-width:160px;min-height:80px}.table{width:max-content;min-width:100%;border-collapse:collapse}.table th,.table td{border-bottom:1px solid #e2e8f0;padding:8px;text-align:left}.table th{background:#f1f5f9;position:relative;vertical-align:middle}.patients-table{--row-height: calc(3 * 1.35em)}.patients-table .table-row{height:var(--row-height)}.patients-table .table-cell-content{display:block;line-height:1.35;max-height:var(--row-height);overflow:hidden}.table-header-cell{display:flex;align-items:center;gap:8px;min-height:32px}.table-resizer{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize}.table-resizer:hover{background:#2563eb33}.table-sort-button{background:none;border:none;padding:0;font-weight:600;color:inherit;cursor:pointer}.table-sort-button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}.table-text{white-space:pre-wrap}.table-actions{display:flex;gap:8px;flex-wrap:wrap}.table-row-resizer td{border-bottom:none;padding:0}.tab-list{display:flex;gap:8px;margin:0 0 12px;flex-wrap:wrap}.tab-button{border:1px solid #e2e8f0;background:#f8fafc;color:#1f2937;padding:8px 14px;border-radius:999px;cursor:pointer;font-size:.9rem;transition:border-color .2s ease,background .2s ease,color .2s ease}.tab-button.is-active{background:#2563eb;border-color:#2563eb;color:#fff}.tab-button:focus-visible{outline:2px solid #93c5fd;outline-offset:2px}.row-resizer{height:6px;cursor:row-resize}.row-resizer:hover{background:#2563eb33}input,select,textarea,button{font:inherit}input,select,textarea{padding:6px 8px;border:1px solid #cbd5f5;border-radius:4px}.form-row{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}.form-row label{display:flex;flex-direction:column;gap:4px}.form-row select[multiple]{min-width:160px;min-height:78px}.form-hint{color:#475569;font-size:.9rem;margin:8px 0 0}.slot-config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:12px 0}.slot-config-field{display:flex;flex-direction:column;gap:6px}.slot-config-field textarea{min-height:96px;resize:vertical}.login-form{flex-direction:column;gap:12px;width:100%}.login-title{text-align:center}.login-warmup{margin:0 0 16px;color:#475569;font-size:.95rem;text-align:center}.login-field{display:flex;flex-direction:column;gap:6px;width:100%}.login-field input{width:100%;box-sizing:border-box}.login-submit{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 16px;font-weight:600}.login-submit.is-loading{cursor:progress;opacity:.85}.loading-spinner{width:16px;height:16px;border:2px solid #cbd5f5;border-top-color:#1d4ed8;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.alert{color:#b91c1c}.alert.success{color:#15803d}.dashboard{display:flex;flex-direction:column;gap:16px}.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.dashboard-columns{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}.stat-card{display:flex;flex-direction:column;gap:8px}.stat-label{font-size:.9rem;color:#475569}.stat-value{font-size:1.6rem;color:#0f172a}.stat-footnote{font-size:.8rem;color:#64748b}.summary-list{list-style:none;padding:0;margin:12px 0 0;display:grid;gap:8px}.summary-list li{display:flex;justify-content:space-between;gap:12px;padding-bottom:6px;border-bottom:1px dashed #e2e8f0;color:#334155}.summary-list li:last-child{border-bottom:none}.summary-metric{font-weight:600;color:#0f172a}.muted{color:#64748b;margin:0}.calendar-grid{display:flex;flex-direction:column;gap:12px;margin-bottom:16px}.calendar-header{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0 16px}.calendar-title{font-size:1.1rem;text-transform:capitalize;color:#1f2937}.calendar-nav{border:1px solid #e2e8f0;background:#fff;border-radius:999px;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;color:#1f2937}.calendar-nav:hover{background:#f1f5f9}.calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px}.calendar-admin-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:16px;padding:12px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}.calendar-admin-field{display:flex;flex-direction:column;gap:6px;font-size:.85rem;color:#1f2937}.calendar-admin-field select{border-radius:6px;border:1px solid #cbd5f5;padding:6px 10px;min-width:160px}.calendar-mark-toggle{border:1px solid #2563eb;background:#eff6ff;color:#1d4ed8;border-radius:999px;padding:6px 14px;cursor:pointer;font-size:.85rem}.calendar-mark-toggle.active{background:#2563eb;color:#fff}.calendar-admin-hint{font-size:.8rem;color:#64748b}.calendar-day{border:1px solid #e2e8f0;border-radius:8px;padding:10px;background:#f8fafc;min-height:140px;display:flex;flex-direction:column;gap:8px;cursor:pointer}.calendar-day.empty{background:transparent;border-style:dashed;border-color:#e2e8f0;cursor:default;box-shadow:none}.calendar-day.today{border-color:#2563eb;box-shadow:0 0 0 1px #2563eb inset;background:#eff6ff}.calendar-day.marked{border-color:#f59e0b;background:#fff7ed}.calendar-day-header{display:flex;flex-direction:column;gap:2px;font-size:.85rem;text-transform:capitalize;color:#475569}.calendar-day-date{font-weight:600;color:#1f2937}.calendar-appointments{display:flex;flex-direction:column;gap:8px;font-size:.85rem}.calendar-appointment{background:#fff;border-radius:6px;padding:6px 8px;box-shadow:0 1px 2px #0f172a14;display:flex;flex-direction:column;gap:2px}.calendar-appointment.admission{border-left:3px solid #10b981}.calendar-appointment.canceled{opacity:.6;text-decoration:line-through}.status-text{font-size:.75rem;color:#64748b}.calendar-empty{color:#94a3b8;font-size:.8rem}.modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0f172a80;display:flex;align-items:center;justify-content:center;padding:24px;z-index:20}.modal-card{background:#fff;border-radius:12px;padding:20px;max-width:640px;width:min(640px,100%);box-shadow:0 16px 32px #0f172a33;display:flex;flex-direction:column;gap:16px}.terms-box{border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;padding:16px;max-height:300px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;color:#1f2937;font-size:.95rem}.terms-box h3{margin:0;font-size:1rem;color:#0f172a}.terms-box p{margin:0;line-height:1.5}.terms-box ol,.terms-box ul{margin:0;padding-left:20px;display:grid;gap:6px}.terms-agreement{display:flex;align-items:center;gap:8px;font-weight:600;color:#0f172a}.modal-card-wide{max-width:960px;width:min(960px,100%)}.modal-header{display:flex;justify-content:space-between;align-items:center;gap:16px}.modal-close{border:none;background:#e2e8f0;padding:6px 12px;border-radius:6px;cursor:pointer}.modal-item.canceled{opacity:.7}.row-canceled{color:#64748b;text-decoration:line-through}.sync-card .card-header{align-items:flex-start}.sync-actions{display:flex;gap:8px;flex-wrap:wrap}.sync-status{display:grid;gap:6px;font-size:.9rem;color:#1f2937}.status-pill{display:inline-flex;align-items:center;padding:2px 10px;border-radius:999px;font-size:.75rem;font-weight:600;background:#e2e8f0;color:#334155}.status-pill.ok{background:#dcfce7;color:#166534}.status-pill.warning{background:#fef3c7;color:#92400e}.sync-form{display:flex;flex-direction:column;gap:12px}.sync-import{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-input{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border:1px dashed #cbd5f5;border-radius:6px;cursor:pointer;background:#f8fafc}.file-input input{display:none}.modal-empty{color:#64748b;margin:0}.modal-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}.modal-item{display:flex;gap:16px;padding:12px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0;align-items:flex-start;flex-wrap:wrap}.modal-slot{font-weight:600;color:#1f2937;min-width:150px}.modal-info{display:flex;flex-direction:column;gap:4px;color:#334155}.modal-item-actions{margin-left:auto;display:flex;gap:8px}.modal-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.modal-field{display:flex;flex-direction:column;gap:6px;font-size:.9rem}.modal-field span{color:#475569}.modal-field textarea{resize:vertical;min-height:70px}.pendency-defaults{margin-top:8px;padding:8px;border-radius:8px;background:#f8fafc;border:1px solid #e2e8f0}.pendency-add-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.pendency-hint{margin:0 0 6px;font-size:.8rem;color:#475569}.pendency-checklist{display:flex;flex-direction:column;gap:6px}.pendency-item{display:grid;grid-template-columns:16px 1fr auto;align-items:center;gap:8px;font-size:.85rem;color:#1f2937}.pendency-item.is-resolved .pendency-text{text-decoration:line-through;color:#94a3b8}.pendency-status{font-size:.75rem;color:#64748b;background:#e2e8f0;padding:2px 6px;border-radius:999px}.pendency-item.is-resolved .pendency-status{background:#dcfce7;color:#166534}.pendency-remove{padding:4px 8px;font-size:.7rem;justify-self:end;width:fit-content}.pendency-summary{margin:6px 0 0;font-size:.8rem;color:#475569}.modal-checkbox{flex-direction:row;align-items:center;justify-content:space-between}.modal-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}.slot-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.slot-button{border:1px solid #e2e8f0;background:#f8fafc;border-radius:10px;padding:12px;text-align:left;display:flex;flex-direction:column;gap:4px;cursor:pointer;font-size:.9rem;color:#1f2937;transition:border .2s ease,box-shadow .2s ease}.slot-button:hover:not(:disabled){border-color:#3b82f6;box-shadow:0 6px 12px #3b82f61f}.slot-button.is-selected{border-color:#2563eb;box-shadow:0 8px 16px #2563eb33;background:#eff6ff}.slot-button.is-booked{opacity:.6;cursor:not-allowed;text-decoration:line-through}.slot-status{font-size:.75rem;color:#64748b}@media (max-width: 900px){.calendar-week{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 600px){:root{font-size:15px}.header{padding:12px}.header nav{flex-direction:column;align-items:stretch}.header button{width:100%;text-align:left;padding:10px 12px}.header .logout{align-self:stretch}main{padding:16px}.card{padding:12px;border-radius:10px}.card-header{flex-direction:column;align-items:flex-start}.card-actions{width:100%;flex-wrap:wrap}.card-actions button,.card-actions .primary-button,.table-actions button,.modal-item-actions button{width:100%}.primary-button{padding:10px 16px}.icon-button{width:40px;height:40px}.table th,.table td{padding:6px}.table-actions{flex-direction:column;align-items:stretch}.table-wrapper{margin:0 -16px;padding:0 16px 4px;-webkit-overflow-scrolling:touch}input,select,textarea{width:100%;box-sizing:border-box}.form-row{flex-direction:column;align-items:stretch}.modal-overlay{padding:16px}.modal-card{padding:16px;border-radius:14px}.modal-header,.modal-item{flex-direction:column;align-items:flex-start}.modal-item-actions{margin-left:0;width:100%}.modal-actions{width:100%;flex-direction:column;align-items:stretch}.modal-slot{min-width:auto}.slot-grid{grid-template-columns:1fr}.calendar-header{flex-wrap:wrap;justify-content:space-between}.calendar-week{grid-template-columns:1fr}.calendar-day{min-height:96px;padding:8px;gap:6px}.calendar-day-header{flex-direction:row;justify-content:space-between}.calendar-appointments{gap:6px;font-size:.8rem}.calendar-appointment,.admissions-page .table th,.admissions-page .table td{padding:4px 6px}}
