.app-header{background:#fff;border-bottom:1px solid #eedfe3}
.app-bar{width:min(100%,1280px);margin:auto;padding:16px clamp(16px,4vw,52px);display:flex;justify-content:space-between;align-items:center;gap:12px}
.app-bar .brand{margin:0;white-space:nowrap}
.app-bar #date{font-size:.875rem;text-align:right}
.module-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:22px}
.module-tile{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;min-height:166px;padding:18px;border-radius:16px;text-align:left;background:#fff;color:#321c25}
.module-tile:hover{background:#faedf0;border-color:#cf9bad}
.module-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#f6e5eb;color:#812f4b;font-size:1.35rem;line-height:1}
.module-name{font-size:1.06rem;line-height:1.2}
.module-description{font-size:.9rem;font-weight:400;color:#6c535e;line-height:1.35}
.back-row{margin-bottom:18px}
#view h1:focus{outline:none}
.record-label{display:none}
#modal{padding:0;overflow:hidden}
#record{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:89vh;max-height:89dvh}
.record-header,.record-footer,.record-fields{padding:14px 22px}
.record-header{border-bottom:1px solid #eedfe3}
.record-header h2,.record-fields>p{margin:0}
.record-fields{overflow-y:auto;overscroll-behavior:contain}
.record-footer{border-top:1px solid #eedfe3;background:white}
.record-footer .primary{min-width:112px}
#formError:empty{display:none}
.appointment-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.appointment-form summary{cursor:pointer;color:#71354b;font-weight:650}
.appointment-form details label{margin-top:8px}
@media(max-width:880px){.module-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.module-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:16px}.module-tile{padding:13px;min-height:142px}.module-name{font-size:1rem}.module-description{font-size:.85rem}.app-bar{padding-block:12px}}
@media(max-width:660px){
 .table{overflow:visible}
 .table table,.table tbody{display:block;white-space:normal}
 .table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;margin-top:12px;padding:12px;border:1px solid #eedfe3;border-radius:12px;background:#fffafb}
 .table td{display:block;padding:0;border:0;min-width:0;overflow-wrap:anywhere}
 .record-label{display:block;color:#6c535e;font-size:.82rem;margin-bottom:2px}
 .table td.record-actions{grid-column:1/-1;border-top:1px solid #eedfe3;padding-top:10px}
 .record-actions button{min-height:44px}
 .record-header,.record-footer,.record-fields{padding:11px 14px}
 .record-header h2{font-size:1.35rem}
 .record-fields,.appointment-grid{gap:8px}
 .record-footer .primary{flex:1}
}
