.p2-local-banner{background:#fff3cf;color:#614600;padding:7px 14px;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.p2-local-banner select{width:auto;padding:3px 7px;margin-left:8px;font-size:12px}
.p2-skip-link{position:fixed;z-index:1000;left:12px;top:8px;padding:10px 14px;background:#142a52;color:#fff;border-radius:8px;transform:translateY(-160%)}
.p2-skip-link:focus{transform:translateY(0)}
.p2-notice{padding:12px 16px;border:1px solid #dbe3ef;border-radius:12px;margin-bottom:14px;background:#f8fafc;overflow-wrap:anywhere}
.p2-error{border-color:#f0aeb7;background:#fff2f3;color:#94152e}
.p2-role-note{color:#526077;font-size:13px;padding:8px 0}
.seat.disabled{background:#f1f5f9;border-style:dashed;color:#64748b}
.p2-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.p2-action-grid .btn{min-height:44px}
.p2-table{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.modalbox{overflow-x:hidden}.modalbox .table-wrap{max-width:100%}
.summary-row>*{min-width:0;overflow-wrap:anywhere}.table-wrap{max-width:100%}
button:disabled{opacity:.55;cursor:not-allowed}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.p2-page-controls{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;padding:10px;color:#526077}.p2-page-controls button{min-height:40px}
.page-title{margin:0}.seat-clickable[role="button"]{cursor:pointer}
@media(max-width:720px){
 .mobile-nav{grid-template-columns:repeat(6,minmax(0,1fr));bottom:max(8px,env(safe-area-inset-bottom));}
 .mobile-nav button{min-height:48px;min-width:0}.topbar{height:auto;min-height:62px;gap:8px;flex-wrap:wrap;padding-block:8px}
 .topbar .row{gap:6px}.btn{min-height:44px}.btn.mini{min-height:40px}
 .content{padding-bottom:calc(104px + env(safe-area-inset-bottom))}.modal{padding:8px}
 .modalbox{max-height:calc(100dvh - 16px);padding:16px;border-radius:14px}.modal-head{align-items:flex-start}
 input,select,textarea{font-size:16px}.formgrid>*{min-width:0}.report-box,.card,.toolbar{min-width:0}
 .p2-local-banner{font-size:11px}.p2-action-grid{grid-template-columns:1fr 1fr}
 .renewal-item{flex-wrap:wrap}.summary-row{flex-wrap:wrap}.kpi-value{overflow-wrap:anywhere}
}
@media(max-width:380px){.quick-grid,.p2-action-grid{grid-template-columns:1fr}.page-title{font-size:16px}.topbar .btn{padding:8px}}

.p2-subscription-reminder{padding:14px 16px;margin:0 0 16px;border:1px solid #d97706;border-left-width:5px;border-radius:10px;background:#fffbeb;color:#78350f}.p2-subscription-reminder.urgent{border-color:#b91c1c;background:#fef2f2;color:#991b1b;font-weight:700}
.p2-subscription-suspended{border:1px solid #f0aeb7;border-left:6px solid #b91c1c;background:#fffafa;max-width:760px}.p2-subscription-suspended .summary-list{margin:16px 0}
.p2-legal-links{display:flex;justify-content:center;gap:8px 14px;flex-wrap:wrap;margin-top:20px;padding-top:14px;border-top:1px solid #e2e8f0;font-size:12px;line-height:1.5}
.p2-legal-links a{color:#526077;text-decoration:none}.p2-legal-links a:hover,.p2-legal-links a:focus-visible{color:#2563eb;text-decoration:underline}

/* Seat status clarity and tenant light/dark themes. */
:root{color-scheme:light;--bg:#f4f5f7;--card:#fff;--ink:#1a1d21;--muted:#59616c;--line:#d9dee5;--primary:#3f6fae;--primary2:#315b91;--primaryBg:#e9eef6;--green:#3f7551;--greenBg:#eaf3ed;--amber:#9b681e;--amberBg:#f8f0df;--red:#a9444e;--redBg:#f7e9eb;--purple:#7453aa;--nav:#f8f9fa;--shadow:0 8px 24px rgba(24,32,43,.06);--yai-input:#fff;--yai-soft:#f0f2f5;--yai-soft-ink:#343a43;--yai-table-head:#f8f9fa;--yai-overlay:rgba(20,23,28,.58)}
.app,body{background:var(--bg)}
.auth-shell{background:var(--bg)}.auth-side{background:var(--yai-table-head);border-color:var(--line)}
.auth-card,.auth-preview,.trust-box{background:var(--card);border-color:var(--line);box-shadow:var(--shadow)}
.sidebar{background:var(--nav);border-color:var(--line);box-shadow:4px 0 18px rgba(24,32,43,.045)}.sidebar .brand-sub,.nav button{color:var(--muted)}
.nav button:hover{background:#eceff3;color:#2e343c}.nav button.active{background:#e4e8ed;color:#242a31}
.topbar{background:rgba(248,249,250,.95);border-color:var(--line)}
.card,.report-box,.charge-box{background:var(--card);border-color:var(--line);box-shadow:var(--shadow)}
.quick,.quick-grid .quick:nth-child(1),.quick-grid .quick:nth-child(2),.quick-grid .quick:nth-child(3),.quick-grid .quick:nth-child(4){background:var(--yai-table-head);border-color:var(--line);color:#303741}
.quick:hover{background:#eef1f4;border-color:#abb4bf}.btn.primary{background:#3f6594;color:#f8fafc;box-shadow:none}.btn.primary:hover{background:#34567f}
.btn.soft,.msg{background:var(--yai-soft);color:var(--yai-soft-ink)}
.table-wrap{border-color:var(--line)}th{background:var(--yai-table-head);color:#59616c}th,td{border-color:var(--line)}
.modal{background:var(--yai-overlay)}.modalbox{background:var(--card)}
.renew-period-box,.pay-summary,.history-event{background:var(--yai-table-head);border-color:var(--line)}
.renew-choice{background:#fff;color:#444b55;border-color:var(--line)}.renew-choice:hover{background:#f4f5f7;border-color:#9ba6b3;color:#2e3946}.renew-choice-active{background:#e9eef6;color:#294b74;border-color:#6f8eb5}
.kpis .card:nth-child(1){border-top-color:#6686ae}.kpis .card:nth-child(2){border-top-color:#669077}.kpis .card:nth-child(3){border-top-color:#b28a48}.kpis .card:nth-child(4){border-top-color:#a95d65}
.theme-toggle{min-width:82px}.theme-icon{font-size:17px;line-height:1}.theme-label{font-size:12px}
.seat{background:#fff;border-color:#cfd5dd;box-shadow:none}
.seat.available{background:#edf0f3;border:2px solid #707c8b;box-shadow:inset 4px 0 0 #596574;color:#23282f}
.seat.available .seat-name{color:#28313b;font-weight:900}.seat.available .seat-meta{color:#596574}
.seat-status-label{display:inline-flex;align-items:center;gap:6px}.seat-status-label::before{content:"";width:8px;height:8px;border-radius:50%;background:#596574;border:1px solid #edf0f3;box-shadow:0 0 0 1px #596574}
.seat.occupied{background:#f6faf7;border:2px solid #7da18a;box-shadow:inset 4px 0 0 #4f8160}.seat.expiring{background:#fbf8f2;border:2px solid #b08a4c;box-shadow:inset 4px 0 0 #986b25}.seat.overdue,.seat.due{background:#fbf5f6;border:2px solid #b36b72;box-shadow:inset 4px 0 0 #9d4650}
.seat-premium{background:#f0ebf8;color:#684b91;border:1px solid #b9a9d0;padding:4px 7px}
.seat.available:hover{background:#e7ebef}.seat-book-hint{color:#466486}

[data-theme="dark"]{color-scheme:dark;--bg:#0b0d10;--card:#15181d;--ink:#f3f4f6;--muted:#aeb4be;--line:#2a3038;--primary:#7792b6;--primary2:#8ba3c2;--primaryBg:#222a35;--green:#82b391;--greenBg:#19251d;--amber:#d0a45c;--amberBg:#292217;--red:#cf7a82;--redBg:#2b1b1e;--purple:#b09ad2;--nav:#0f1115;--shadow:0 10px 28px rgba(0,0,0,.24);--yai-input:#1b1f24;--yai-soft:#20242a;--yai-soft-ink:#d3d7dd;--yai-table-head:#1b1f24;--yai-overlay:rgba(0,0,0,.74)}
[data-theme="dark"] body,[data-theme="dark"] .app{background:var(--bg)}
[data-theme="dark"] .auth-shell{background:var(--bg)}
[data-theme="dark"] .auth-side{background:#0f1115;border-color:var(--line)}
[data-theme="dark"] .auth-card,[data-theme="dark"] .auth-preview,[data-theme="dark"] .trust-box{background:var(--card);border-color:var(--line);box-shadow:var(--shadow)}
[data-theme="dark"] .sidebar{background:#0f1115;border-color:var(--line);box-shadow:4px 0 18px rgba(0,0,0,.22)}
[data-theme="dark"] .sidebar .brand-sub,[data-theme="dark"] .nav button{color:#aeb4be}
[data-theme="dark"] .nav button:hover{background:#1b1f24;color:#e5e7eb}
[data-theme="dark"] .nav button.active{background:#24282f;color:#f1f2f4;box-shadow:inset 3px 0 #71839a}
[data-theme="dark"] .topbar{background:rgba(15,17,21,.96);border-color:var(--line)}
[data-theme="dark"] .account-button .account-avatar{background:#292e35;color:#d9dde3}
[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{background:var(--yai-input);color:var(--ink);border-color:#353c45}
[data-theme="dark"] input:focus,[data-theme="dark"] select:focus,[data-theme="dark"] textarea:focus{border-color:#71839a;box-shadow:0 0 0 3px rgba(113,131,154,.18)}
[data-theme="dark"] input::placeholder,[data-theme="dark"] textarea::placeholder{color:#818894}
[data-theme="dark"] .btn.soft,[data-theme="dark"] .msg{background:var(--yai-soft);color:var(--yai-soft-ink)}
[data-theme="dark"] .btn.primary{background:#496581;color:#f3f4f6;box-shadow:none}[data-theme="dark"] .btn.primary:hover{background:#55718d}
[data-theme="dark"] .btn.warn{color:#dfb66f}[data-theme="dark"] .btn.danger{color:#db8b92}[data-theme="dark"] .btn.green{color:#91c19f}
[data-theme="dark"] .card,[data-theme="dark"] .report-box,[data-theme="dark"] .charge-box{background:var(--card);border-color:var(--line)}
[data-theme="dark"] .quick,[data-theme="dark"] .quick-grid .quick:nth-child(1),[data-theme="dark"] .quick-grid .quick:nth-child(2),[data-theme="dark"] .quick-grid .quick:nth-child(3),[data-theme="dark"] .quick-grid .quick:nth-child(4){background:#1b1f24;color:#e2e4e7;border-color:#2f353d}
[data-theme="dark"] .quick:hover{background:#20242a;border-color:#4b545f}
[data-theme="dark"] .table-wrap{border-color:var(--line)}[data-theme="dark"] th{background:var(--yai-table-head);color:#aeb4be}[data-theme="dark"] th,[data-theme="dark"] td{border-color:var(--line)}
[data-theme="dark"] .modal{background:var(--yai-overlay)}[data-theme="dark"] .modalbox{background:var(--card);box-shadow:0 25px 80px rgba(0,0,0,.55)}
[data-theme="dark"] .report-box,[data-theme="dark"] .renew-period-box,[data-theme="dark"] .pay-summary,[data-theme="dark"] .history-event{background:#1b1f24;border-color:var(--line)}
[data-theme="dark"] .renew-choice{background:#1b1f24;color:#c7cbd1;border-color:#343a43}[data-theme="dark"] .renew-choice:hover{background:#20242a;color:#e0e2e5;border-color:#4b545f}[data-theme="dark"] .renew-choice-active{background:#282d34;color:#f0f1f3;border-color:#71839a}
[data-theme="dark"] .progress{background:#252a31}[data-theme="dark"] .password-toggle:hover{background:#24282e;color:#e5e7eb}
[data-theme="dark"] .auth-tabs{background:#1b1f24}[data-theme="dark"] .auth-tabs button{color:#aeb4be}[data-theme="dark"] .auth-tabs button.active{background:#2a2f36;color:#f1f2f4;box-shadow:none}
[data-theme="dark"] .step-dot{background:#2a3038}[data-theme="dark"] .p2-notice{background:#1b1f24;border-color:var(--line)}
[data-theme="dark"] .p2-error{background:#2b1b1e;border-color:#6f3a40;color:#d99097}
[data-theme="dark"] .p2-subscription-reminder{background:#292217;color:#d4b477;border-color:#735a2e}[data-theme="dark"] .p2-subscription-suspended{background:#241719;border-color:#6f3a40}
[data-theme="dark"] .seat{background:#1b1f24;border-color:#343a43}
[data-theme="dark"] .seat.available{background:#20242a;border-color:#68727e;box-shadow:inset 4px 0 0 #7f8995;color:#eceef1}
[data-theme="dark"] .seat.available .seat-name{color:#eceef1}[data-theme="dark"] .seat.available .seat-meta{color:#aeb4be}
[data-theme="dark"] .seat-status-label::before{background:#9ba3ad;border-color:#20242a;box-shadow:0 0 0 1px #9ba3ad}
[data-theme="dark"] .seat.occupied{background:#171d19;border-color:#496f56;box-shadow:inset 4px 0 0 #5f8d6d}
[data-theme="dark"] .seat.expiring{background:#211e18;border-color:#806535;box-shadow:inset 4px 0 0 #a07b3f}
[data-theme="dark"] .seat.overdue,[data-theme="dark"] .seat.due{background:#21181a;border-color:#794149;box-shadow:inset 4px 0 0 #98515b}
[data-theme="dark"] .seat.disabled{background:#181b20;color:#818894;border-color:#343a43}
[data-theme="dark"] .seat-premium{background:#27222f;color:#c2aedf;border-color:#625573}
[data-theme="dark"] .seat.available:hover{background:#252a30}[data-theme="dark"] .seat-book-hint{color:#9eaabd}
[data-theme="dark"] .pill.gray{background:#252a30;color:#c3c7cd}[data-theme="dark"] .pill.blue{background:#222832;color:#aebbd0}
[data-theme="dark"] .kpis .card:nth-child(1){border-top-color:#60758f}[data-theme="dark"] .kpis .card:nth-child(2){border-top-color:#537562}[data-theme="dark"] .kpis .card:nth-child(3){border-top-color:#856d43}[data-theme="dark"] .kpis .card:nth-child(4){border-top-color:#805057}
[data-theme="dark"] .p2-page-controls,[data-theme="dark"] .page-controls{color:#aeb4be}
@media(max-width:720px){
 .theme-toggle{min-width:42px;padding-inline:10px}.theme-label{display:none}
 .topbar>.row{flex-wrap:nowrap;gap:6px}.topbar>.row>.pill{display:none}
 #topAdmissionBtn{width:42px;padding-inline:8px;font-size:0}#topAdmissionBtn::before{content:"+";font-size:20px;line-height:1}
}

/* Professional desktop density and hierarchy. */
.seat-legend{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;margin:-2px 0 10px;color:var(--muted);font-size:10px;line-height:1.2}
.seat-legend-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.seat-legend-item i{width:7px;height:7px;border-radius:50%;border:1px solid currentColor;background:currentColor;opacity:.72}
.seat-legend-item.occupied{color:#537963}.seat-legend-item.available{color:#657080}.seat-legend-item.expiring{color:#9b742f}.seat-legend-item.overdue{color:#a55760}
.seat-legend-item.premium b{display:grid;place-items:center;width:14px;height:14px;border:1px solid #b9a9d0;border-radius:4px;color:#684b91;font-size:8px;line-height:1}
.seat-filter{width:auto;min-width:112px;padding:7px 28px 7px 9px;font-size:11px;border-radius:7px}
.seat-controls{justify-content:flex-end;gap:7px;flex-wrap:nowrap}
.seat-arrange{min-width:190px}

@media(min-width:1051px){
 .shell{grid-template-columns:184px minmax(0,1fr)}
 .sidebar{padding:12px 9px;box-shadow:2px 0 12px rgba(24,32,43,.035)}
 .sidebar .brand{padding:2px 5px 13px;gap:9px}
 .sidebar .library-logo-wrap,.sidebar .library-logo-wrap .library-logo{width:38px;height:38px}
 .sidebar .library-logo-wrap{flex-basis:38px}
 .sidebar .brand-title{font-size:13px;font-weight:700}
 .sidebar .brand-sub{font-size:10px}
 .nav{gap:2px}
 .nav button{padding:7px 8px;border-radius:7px;gap:8px;font-size:12px;font-weight:550}
 .nav-icon{width:17px;font-size:13px}
}

@media(min-width:721px){
 .topbar{height:54px;padding:0 16px}
 .page-title{font-size:15px;font-weight:700;letter-spacing:-.01em}
 .page-sub{font-size:10px}
 .topbar>.row{gap:7px;flex-wrap:nowrap}
 .topbar .btn{min-height:32px;padding:6px 9px;border-radius:7px;font-size:11px;font-weight:600}
 .topbar .pill{padding:3px 6px;font-size:9px;font-weight:600}
 .account-button .account-avatar{width:20px;height:20px;font-size:10px;font-weight:700}
 .theme-toggle{min-width:70px}.theme-icon{font-size:14px}.theme-label{font-size:10px}

 .content{max-width:1380px;padding:14px 16px 64px}
 .grid{gap:12px}
 .card{padding:13px;border-radius:10px;box-shadow:0 1px 5px rgba(24,32,43,.04)}
 .card-title{font-size:14px;font-weight:700}
 .card-sub{margin-top:2px;font-size:11px}
 .section-head{gap:10px;margin-bottom:9px}
 .btn{border-radius:8px;padding:8px 11px;font-weight:650}
 .btn.mini{padding:5px 8px;border-radius:6px;font-size:10px}
 .pill{padding:3px 7px;font-size:10px;font-weight:600}
 .app label{font-weight:600}
 .app .strong{font-weight:650}
 .kpi-label{font-size:11px;font-weight:600}
 .kpi-value{margin-top:4px;font-size:23px;font-weight:700;letter-spacing:-.02em}
 .kpi-note{margin-top:3px}
 .kpis>.card:nth-child(1),.kpis>.card:nth-child(2),.kpis>.card:nth-child(3),.kpis>.card:nth-child(4){border-top:1px solid var(--line)}
 .quick-grid{gap:8px}.quick{padding:10px;border-radius:8px;font-size:12px;font-weight:600}
 th,td{padding:9px 10px}th{font-weight:650}

 .seat-map-card,.locker-map-card{padding:12px;box-shadow:none}
 .seat-map-card .section-head,.locker-map-card .section-head{margin-bottom:8px}
 .seat-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;align-items:stretch}
 .seat-grid>.seat{min-width:0;min-height:72px;padding:8px;border-radius:8px;line-height:1.22;text-align:center;overflow:hidden}
 .seat-grid>.seat>.row{position:relative;justify-content:center;gap:3px;flex-wrap:nowrap;align-items:flex-start}
 .seat-grid .seat-num{font-size:12px;line-height:1.2;font-weight:650;white-space:nowrap}
 .seat-grid .seat-name{margin-top:5px;font-size:11px;line-height:1.28;font-weight:500;overflow-wrap:anywhere;word-break:normal}
 .seat-grid .seat-meta{margin-top:2px;font-size:9px;line-height:1.25;font-weight:400;overflow-wrap:anywhere}
 .seat-grid .seat-book-hint{display:none}
 .seat-grid .seat-premium{position:absolute;top:-1px;right:0;padding:2px 4px;border-radius:4px;font-size:8px;line-height:1;font-weight:700;white-space:nowrap}
 .seat.available .seat-name{font-weight:500}
 .seat-status-label::before{width:6px;height:6px}
 .seat-clickable:hover{transform:translateY(-1px);box-shadow:0 3px 9px rgba(24,32,43,.07)}
 #dashboardSeatGrid{grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:7px}

 #lockerGrid>.seat{position:relative;display:flex;min-height:92px;flex-direction:column;justify-content:flex-start;text-align:left}
 #lockerGrid>.seat>b{font-size:12px;line-height:1.2;font-weight:650}
 #lockerGrid>.seat>b+div{margin-top:5px;font-size:11px;line-height:1.28;font-weight:500;overflow-wrap:anywhere}
 #lockerGrid>.seat>.small{margin-top:2px;font-size:9px;line-height:1.25;overflow-wrap:anywhere}
 #lockerGrid>.seat:not(.occupied):not(.disabled){background:#f7f9fb;border:1px solid #d6dce3}
 #lockerGrid .actions{gap:4px;margin-top:auto;padding-top:6px;opacity:0;transform:translateY(2px);transition:opacity .14s ease,transform .14s ease}
 #lockerGrid>.seat:hover .actions,#lockerGrid>.seat:focus-within .actions{opacity:1;transform:none}
 #lockerGrid .btn.mini{min-height:0;padding:4px 6px;border-radius:5px;font-size:9px;line-height:1.2}
 #lockerGrid>.btn{align-self:start;min-height:31px;padding:6px 9px;font-size:10px;border-radius:7px}
 .seat-grid>.p2-page-controls{grid-column:1/-1}
 #seatGrid{gap:6px}
 #seatGrid>.seat{min-height:66px;padding:7px;line-height:1.2}
 #seatGrid .seat-num{font-size:11px}
 #seatGrid .seat-name{margin-top:3px;line-height:1.2}
}

/* Near-white cards use restrained borders to carry status in light mode. */
.seat.available{background:#f8fafc;border:1px solid #94a3b8;box-shadow:none;color:#334155}
.seat.available .seat-name{color:#334155}
.seat-status-label::before{background:#64748b;border-color:#64748b;box-shadow:none}
.seat.occupied{background:#f4fbf6;border:1px solid #5fae73;box-shadow:none;color:#245b32}
.seat.expiring{background:#fffbf2;border:1px solid #d7a23f;box-shadow:none;color:#755314}
.seat.overdue,.seat.due{background:#fff6f7;border:1px solid #d66a74;box-shadow:none;color:#7f2f38}
.seat.disabled{border:1px dashed #cbd2da;box-shadow:none}
.seat.available:hover{background:#f1f5f9;box-shadow:none}
.seat.occupied:hover,.seat.expiring:hover,.seat.overdue:hover,.seat.due:hover{box-shadow:none}

/* Equivalent, stronger contrast in dark mode. */
[data-theme="dark"] .seat.available{background:#18202b;border:1px solid #64748b;box-shadow:none;color:#dbe4ee}
[data-theme="dark"] #lockerGrid>.seat:not(.occupied):not(.disabled){background:#1d242c;border:1px solid #66798c;box-shadow:none;color:#edf2f7}
[data-theme="dark"] .seat.available .seat-name{color:#dbe4ee}
[data-theme="dark"] .seat-status-label::before{background:#cbd5e1;border-color:#cbd5e1;box-shadow:none}
[data-theme="dark"] .seat.occupied{background:#17251d;border:1px solid #4f9b68;box-shadow:none;color:#b9e2c5}
[data-theme="dark"] .seat.expiring{background:#282217;border:1px solid #b58a3c;box-shadow:none;color:#ead4a2}
[data-theme="dark"] .seat.overdue,[data-theme="dark"] .seat.due{background:#2a1b1d;border:1px solid #b66569;box-shadow:none;color:#edbabc}
[data-theme="dark"] .seat.disabled{background:#181b20;border:1px dashed #343a43;box-shadow:none}
[data-theme="dark"] .seat.available:hover{background:#273449;box-shadow:none}
[data-theme="dark"] .seat.occupied:hover,[data-theme="dark"] .seat.expiring:hover,[data-theme="dark"] .seat.overdue:hover,[data-theme="dark"] .seat.due:hover{box-shadow:none}
[data-theme="dark"] .seat-legend-item.occupied{color:#82a68e}[data-theme="dark"] .seat-legend-item.available{color:#9aa3ae}[data-theme="dark"] .seat-legend-item.expiring{color:#c09b5e}[data-theme="dark"] .seat-legend-item.overdue{color:#c47d84}
[data-theme="dark"] .seat-legend-item.premium b{border-color:#625573;color:#c2aedf}

@media(max-width:720px){
 .seat-legend{gap:7px 11px;margin-bottom:10px}
 .seat-filter{width:100%;min-width:0;max-width:100%;padding:8px 24px 8px 8px;font-size:13px}
 .seat-arrange{min-width:0}
 .seat-map-card .section-head{align-items:stretch}.seat-map-card .section-head>.row{width:100%}
 .seat-map-card .section-head>.seat-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .seat-grid{grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:8px}
 #seatGrid{gap:6px}
 .seat-grid>.seat{min-width:0;overflow:hidden}.seat-grid .seat-name{overflow-wrap:anywhere}
 #lockerGrid .actions{margin-top:7px}
 #lockerGrid .btn.mini{min-height:40px}
}

/* Compact operational dialog system. Mobile retains the touch-friendly rules above. */
@media(min-width:721px){
 .modal{padding:14px}
 .modalbox{width:min(600px,calc(100vw - 28px));max-height:78vh;padding:14px;border-radius:8px;box-shadow:0 12px 30px rgba(24,32,43,.12);overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;font-size:13px;font-weight:400;line-height:1.4}
 [data-theme="dark"] .modalbox{box-shadow:0 12px 30px rgba(0,0,0,.32)}
 .modalbox.student-modal,.modalbox.admission-modal{width:min(640px,calc(100vw - 28px))}
 .modalbox .modal-head{margin-bottom:8px}
 .modalbox .modal-head>div{min-width:0}
 .modalbox .modal-title{font-size:18px;font-weight:700;line-height:1.2;overflow-wrap:anywhere}
 .modalbox .modal-head .small{font-size:12.5px;font-weight:400;line-height:1.3}
 .modalbox label{margin:3px 0 1px;font-size:11.5px;font-weight:600;line-height:1.2}
 .modalbox input,.modalbox select,.modalbox textarea{min-height:32px;padding:5px 9px;border-radius:6px;font-size:13.5px;font-weight:400;line-height:1.3}
 .modalbox input[type="checkbox"]{width:auto;min-height:0;padding:0;border-radius:4px}
 .modalbox textarea{min-height:42px}
 .modalbox .formgrid{gap:6px 8px}
 .modalbox .grid{gap:6px 8px}
 .modalbox .small{font-size:10.5px;font-weight:400;line-height:1.3}
 .modalbox .small[style*="margin-top"]{margin-top:2px!important}
 .modalbox .small[style*="margin-bottom"]{margin-bottom:4px!important}
 .modalbox .grid[style*="margin-top"]{margin-top:6px!important}
 .modalbox p{margin:6px 0;font-size:13px;font-weight:400;line-height:1.4}
 .modalbox .btn{min-height:32px;padding:5px 9px;border-radius:6px;font-size:12.5px;font-weight:600;line-height:1.2}
 .modalbox .btn.icon{width:28px;height:28px;min-height:28px;padding:4px}
 .modalbox .summary-row{padding:2px 0;font-size:13px;line-height:1.3}
 .modalbox .summary-row>*,.modalbox .small,.modalbox p{overflow-wrap:anywhere}
 .modalbox .summary-row>span{font-size:11px;font-weight:500;color:var(--muted)}
 .modalbox .summary-row>b{font-size:13px;font-weight:600}
 .modalbox .strong,.modalbox b{font-weight:600}
 .modalbox .summary-row>.pay-total{font-size:13px;font-weight:650}
 .modalbox .charge-box,.modalbox .pay-summary,.modalbox .renew-period-box{padding:7px 9px;border-radius:7px;box-shadow:none}
 .modalbox .pay-summary{margin-top:6px}
 .modalbox .renew-period-box{margin-bottom:6px}
 .modalbox .renew-period-grid{gap:4px}
 .modalbox .renew-choice{padding:5px 4px;border-radius:6px;font-size:12px;font-weight:600}
 .modalbox .renew-period-box>.small[style*="font-weight"]{font-weight:600!important}
 .modalbox .actions{gap:5px}
 .modalbox .actions[style],.modalbox .row[style]{margin-top:6px!important}
 .modalbox .card-title{font-size:14px;font-weight:650;line-height:1.25}
 .modalbox .charge-toggle{gap:6px;font-weight:600}
 .modalbox .pill{padding:2px 6px;font-size:10.5px;font-weight:600}
 .modalbox .msg{margin-top:6px;padding:6px 8px;font-size:11.5px;line-height:1.35}
 .modalbox th,.modalbox td{padding:5px 7px;font-size:12px}
 .student-modal .grid.two,.admission-modal .grid.two{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 8px}
 .student-modal .card-title[style],.admission-modal .card-title[style]{margin-top:8px!important}
 .admission-modal .grid.two[style]{margin-top:5px!important}
 .admission-modal .charge-box{padding:5px 7px;background:transparent;border-color:var(--line)}
 .admission-modal .admission-charge-row{display:grid;grid-template-columns:minmax(0,1fr) 136px;gap:6px;align-items:center}
 .admission-modal .charge-toggle{margin:0;white-space:nowrap}
 .admission-modal .admission-charge-amount{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px;align-items:center;margin:0}
 .admission-modal .admission-charge-amount>span{font-size:10.5px;font-weight:500;color:var(--muted)}
 .admission-modal .charge-box>.small[style]{margin-top:2px!important}
 .admission-modal .pay-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px}
 .student-modal>.grid.two{gap:6px 12px}
 .student-modal .summary-list{gap:0}
 .student-modal .actions{margin-top:6px!important;flex-wrap:nowrap}
 .student-modal .actions .btn{white-space:nowrap}
 .student-modal>.btn{margin-top:6px}
 .student-modal .membership-period{padding:4px 0}
 .student-modal .history-timeline{gap:4px;margin-top:4px}
 .student-modal .history-event{padding:5px 7px;border-left-width:2px;border-radius:0 6px 6px 0}
 .student-modal .history-title{font-weight:650}
 .student-modal .table-wrap[style]{margin-top:4px!important}
 .modalbox .empty{padding:10px}
}

/* Deterministic desktop density; smaller viewports retain responsive auto-fill. */
@media(min-width:1000px) and (max-width:1399px){#seatGrid{grid-template-columns:repeat(8,minmax(0,1fr))}}
@media(min-width:1400px) and (max-width:1599px){#seatGrid{grid-template-columns:repeat(9,minmax(0,1fr))}}
@media(min-width:1600px){#seatGrid{grid-template-columns:repeat(10,minmax(0,1fr))}}
.yai-session-notice{position:fixed;top:10px;left:50%;z-index:140;transform:translateX(-50%);max-width:min(520px,calc(100vw - 24px));padding:8px 12px;border:1px solid;border-radius:8px;font-size:12.5px;font-weight:600;line-height:1.35;box-shadow:0 4px 16px rgba(15,23,42,.12)}
.yai-session-warning{background:#fff8e6;border-color:#d69e2e;color:#744210}
.yai-session-offline{background:#f8fafc;border-color:#64748b;color:#334155}
[data-theme="dark"] .yai-session-warning{background:#282217;border-color:#b58a3c;color:#ead4a2}
[data-theme="dark"] .yai-session-offline{background:#18202b;border-color:#64748b;color:#dbe4ee}

/* V7 Seats: Owner-approved 10-column map, search, and navigation divider.
   Scoped to Seats: no billing, receipts, or other grids are modified. */
@media (min-width: 1360px){
  #seatsTab #seatGrid{grid-template-columns:repeat(10,minmax(0,1fr));gap:6px}
  #seatsTab #seatGrid>.seat{min-height:66px;padding:7px 5px}
}
@media (min-width: 721px){
  .sidebar>.brand{padding-bottom:24px;margin-bottom:13px;border-bottom:1px solid var(--line)}
  #seatsTab .seat-controls{display:flex;gap:8px;align-items:center;flex-wrap:nowrap}
  #seatsTab .yai-seat-search-wrap{position:relative;display:block;min-width:180px;width:clamp(190px,19vw,310px);margin:0;flex:0 1 auto}
  #seatsTab .yai-seat-search{width:100%;min-height:33px;padding:6px 10px 6px 32px;font-size:12px;border-radius:7px}
  #seatsTab .yai-seat-search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);font-size:19px;line-height:1;color:var(--muted);pointer-events:none}
  #seatsTab .seat-filter{flex:0 0 auto;min-width:100px}
}
@media (min-width: 721px) and (max-width: 1100px){
  #seatsTab .seat-map-card .section-head{align-items:stretch}
  #seatsTab .seat-controls{width:100%;justify-content:flex-start}
  #seatsTab .yai-seat-search-wrap{flex:1 1 auto;min-width:140px;width:auto}
}
@media (max-width:720px){
  #seatsTab .seat-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #seatsTab .yai-seat-search-wrap{grid-column:1/-1;position:relative;margin:0;min-width:0}
  #seatsTab .yai-seat-search{width:100%;min-height:44px;font-size:16px;padding-left:36px}
  #seatsTab .yai-seat-search-icon{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
}

/* V8 — verified 100% desktop zoom: V7 wrongly gated ten columns at 1360 CSS px.
   Use real viewport / content space, not screenshot pixel dimensions. Seat map only. */
@media (min-width: 1000px){
  #seatsTab #seatGrid{grid-template-columns:repeat(10,minmax(0,1fr));gap:5px}
  #seatsTab #seatGrid>.seat{min-width:0;height:60px;min-height:60px;max-height:60px;padding:4px 3px;overflow:hidden}
  #seatsTab #seatGrid .seat-num{font-size:10px;line-height:1.14}
  #seatsTab #seatGrid .seat-name{margin-top:2px;font-size:10px;line-height:1.13;min-height:11px;max-height:23px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
  #seatsTab #seatGrid .seat-meta{font-size:8.5px;line-height:1.1;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  #seatsTab .seat-map-card .section-head{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:8px}
  #seatsTab .seat-map-card .section-head>.seat-controls{width:auto;display:flex;align-items:center;flex-wrap:nowrap;justify-content:flex-end;gap:7px;max-width:100%}
  #seatsTab .seat-controls .yai-seat-search-wrap{flex:0 0 170px;width:170px;min-width:0}
  #seatsTab .seat-controls .seat-filter{flex:0 0 105px;width:105px;min-width:0;padding-left:7px;padding-right:22px}
  #seatsTab .seat-controls .seat-arrange{flex:0 0 125px;width:125px;min-width:0}
}

/* P1 seat-overview preview: presentation and filtering only; billing remains unchanged. */
.yai-seat-overview{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0 7px}
.yai-seat-quick{display:inline-flex;align-items:center;gap:10px;min-height:36px;padding:6px 10px;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:10px;font:inherit;font-size:12px;font-weight:700;cursor:pointer;box-shadow:none;white-space:nowrap}
.yai-seat-quick strong{font-size:13px;font-variant-numeric:tabular-nums;font-weight:900;color:inherit}
.yai-seat-quick:hover{border-color:var(--primary);background:var(--primaryBg)}
.yai-seat-quick.is-selected{background:var(--primaryBg);border-color:var(--primary);color:var(--primary)}
.yai-seat-quick.yai-seat-attention:not(.is-selected){color:var(--red);border-color:var(--redBg)}
.yai-seat-quick:focus-visible{outline:3px solid var(--primary);outline-offset:2px}
.yai-seat-overview-note{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:5px 12px;color:var(--muted);font-size:11px;line-height:1.35;margin:0 0 11px}
#yaiSeatResultCount{font-variant-numeric:tabular-nums;font-weight:800;white-space:nowrap}
@media(max-width:720px){.yai-seat-overview{gap:6px}.yai-seat-quick{flex:1 1 auto;justify-content:space-between;min-height:34px;padding:6px 9px;font-size:11px}}
