/* WeeklyLoan Pro 5.6.4 — responsive dashboard, contrast and PWA controls */
/* Header menu is nested inside a white header popover; prevent inherited white foreground. */
.app-shell .header-menu-panel{color:var(--text);max-height:min(78dvh,750px);overflow-y:auto;overscroll-behavior:contain}
.app-shell .header-menu-user strong{color:var(--text);font-weight:850;font-size:1rem;line-height:1.35;white-space:normal}
.app-shell .header-menu-user small{color:var(--muted);font-size:.77rem;line-height:1.5}
.app-shell .header-menu-avatar{flex:none}
.app-shell .header-menu-user>div:last-child{min-width:0;flex:1}
.app-shell .header-controls{min-width:0}
.app-shell .header-menu-panel[hidden],.app-shell .install-help[hidden],.app-shell #installApp[hidden]{display:none!important}
/* Collection rows: one independent icon-and-label group, one amount, a subordinate note. */
.app-shell .collection-overview article{min-width:0}
.app-shell .collection-top{display:flex;align-items:center;gap:12px;min-width:0;max-width:none}
.app-shell .collection-top>span:last-child{max-width:none;min-width:0;overflow-wrap:normal;word-break:normal}
.app-shell .collection-overview .collection-icon{width:44px;height:44px;min-width:44px;min-height:44px;max-width:none;display:grid;place-items:center;border-radius:13px;flex-shrink:0}
.app-shell .collection-icon svg{display:block;width:22px;height:22px}
.app-shell .collection-overview strong{font-variant-numeric:tabular-nums}
.app-shell .collection-overview small{max-width:none}
.app-shell .section-head{min-width:0}
.app-shell .section-head>div:first-child{min-width:0}
.app-shell .toolbar-chip-group{min-width:0}
/* Modal is intentionally invisible until Install is pressed. */
.app-shell .install-help{position:fixed!important;inset:0!important;z-index:125!important;background:rgba(12,20,43,.62)!important;backdrop-filter:blur(4px);max-width:none!important;margin:0!important;padding:16px!important;display:flex;align-items:center;justify-content:center;box-shadow:none!important;overflow-y:auto;overscroll-behavior:contain}
.app-shell .install-dialog{width:min(100%,430px);max-height:calc(100dvh - 36px);overflow-y:auto;padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:0 20px 72px rgba(7,17,42,.32);color:var(--text)}
.app-shell .install-dialog-head{display:flex;align-items:flex-start;gap:12px}
.app-shell .install-dialog-head>div:nth-child(2){flex:1;min-width:0}
.app-shell .install-dialog-icon{flex:none;display:grid;place-items:center;color:var(--primary);background:var(--primary-soft);border-radius:14px;width:46px;height:46px}
.app-shell .install-dialog h2{font-size:1.08rem;margin:0 0 5px;font-weight:850;line-height:1.3;color:var(--text)}
.app-shell .install-dialog-head p{font-size:.77rem;color:var(--muted);line-height:1.55;margin:0}
.app-shell .install-dialog-close{border:0;background:var(--surface-2);color:var(--text);border-radius:10px;width:36px;height:36px;flex:none;font-size:1.5rem;cursor:pointer;display:grid;place-items:center}
.app-shell .install-steps{margin:16px 0;display:grid;gap:10px}
.app-shell .install-step{display:flex;align-items:flex-start;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}
.app-shell .install-step-num{background:var(--primary-soft);color:var(--primary);display:grid;place-items:center;width:27px;height:27px;border-radius:9px;flex:none;font-weight:850}
.app-shell .install-step p{color:var(--text);font-size:.84rem;line-height:1.55;margin:0}
.app-shell .install-dialog-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}
.app-shell .install-dialog-actions .btn{min-height:42px;flex:1 1 auto}
body.install-dialog-open{overflow:hidden}
@media(max-width:700px){
 .app-shell .premium-section.section-head{display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px;margin-top:23px}
 .app-shell .premium-section.section-head>div:first-child{flex:1 1 100%;max-width:100%}
 .app-shell .premium-section .toolbar-chip-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%}
 .app-shell .toolbar-chip-group .btn{min-width:0;min-height:42px;padding:8px 9px;white-space:normal;line-height:1.2;overflow-wrap:anywhere}
 .app-shell .collection-overview{display:grid;grid-template-columns:1fr;gap:11px;margin-top:8px}
 .app-shell .collection-overview article{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;justify-content:stretch;gap:6px 12px;min-height:112px;padding:14px 15px;border-radius:19px}
 .app-shell .collection-overview .collection-top{grid-column:1;grid-row:1;align-self:center;flex:none;min-width:0;max-width:none;width:100%;gap:10px}
 .app-shell .collection-overview .collection-top>span:last-child{font-weight:770;font-size:.82rem;line-height:1.35;max-width:none;flex:1 1 auto}
 .app-shell .collection-overview .collection-icon{width:46px;height:46px;min-width:46px;min-height:46px;margin:0}
 .app-shell .collection-overview strong{grid-column:2;grid-row:1;align-self:center;max-width:none;margin:0;text-align:right;white-space:nowrap;font-size:clamp(1rem,4.1vw,1.3rem)}
 .app-shell .collection-overview small{grid-column:1/-1;grid-row:2;max-width:none;margin:0 0 0 56px;line-height:1.35;font-size:.73rem}
 .app-shell .header-menu-panel{width:min(350px,calc(100vw - 20px));right:0}
 .app-shell .install-help{padding:12px!important}
 .app-shell .install-dialog{padding:17px;border-radius:20px}
}
@media(max-width:355px){
 .app-shell .collection-overview article{grid-template-columns:1fr;grid-template-rows:auto auto auto}
 .app-shell .collection-overview strong{grid-row:2;grid-column:1;text-align:left;margin-left:56px}
 .app-shell .collection-overview small{grid-row:3;grid-column:1}
 .app-shell .install-dialog-actions{flex-direction:column}
}
@media print{.app-shell .install-help{display:none!important}}

#toast.sync-failed{background:#8d2020;color:#fff}
