/* Scoped additions use the current application's colors and panel geometry. */
.safe-tools-trigger{display:grid;place-items:center;width:28px;height:28px;padding:3px;flex-shrink:0;border:0;background:transparent;color:var(--green);border-radius:5px}
.safe-tools-trigger svg{width:20px;height:20px}
.safe-tools-trigger span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#safeToolsDialog{width:min(570px,calc(100vw - 28px));max-height:80dvh;padding:0;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);overflow:hidden}
#safeToolsDialog::backdrop{background:rgba(20,35,60,.45)}
#safeToolsDialog .safe-tools-header{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--line)}
#safeToolsDialog h2{font-size:17px;margin:0}
#safeToolsDialog .safe-tools-search{display:block;padding:14px 20px}
#safeToolsDialog .safe-tools-search input{width:100%;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface-soft);color:var(--ink);font-size:14px}
#safeToolsDialog .safe-tools-list{overflow:auto;max-height:45dvh;padding:0 10px 10px;display:grid;gap:4px}
#safeToolsDialog .safe-tools-result{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:start;padding:12px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--ink)}
#safeToolsDialog .safe-tools-result[aria-selected="true"],#safeToolsDialog .safe-tools-result:hover{background:var(--green-soft);border-color:var(--line)}
#safeToolsDialog .safe-tools-result span{min-width:0}
#safeToolsDialog .safe-tools-result b,#safeToolsDialog .safe-tools-result small{display:block;overflow-wrap:anywhere}
#safeToolsDialog .safe-tools-result small{font-size:11px;color:var(--muted);margin-top:4px}
#safeToolsDialog .safe-tools-result em{font-style:normal;font-size:11px;color:var(--muted);white-space:nowrap}
#safeToolsDialog .safe-tools-footer{font-size:11px;color:var(--muted);padding:12px 20px;border-top:1px solid var(--line)}
.safe-tools-empty{padding:20px;color:var(--muted);font-size:13px}
.safe-week{margin:0 0 18px;min-width:0;overflow:hidden;border:1px solid #dce6f4;border-radius:14px;background:var(--surface);box-shadow:0 4px 18px #1d4c9210}
.safe-week .panel-head{gap:12px;flex-wrap:wrap}
.safe-week .panel-head{padding:17px 18px;border-bottom:1px solid #edf2fa}
.safe-week-heading{display:flex;align-items:center;gap:11px;min-width:0}
.safe-week-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#edf4ff;color:#2169d9;flex-shrink:0}
.safe-week-icon svg{width:24px;height:24px}
.safe-week .panel-head h2{font-size:15px;margin:0}
.safe-week .panel-head p{font-size:11px;color:var(--muted);margin:5px 0 0}
.safe-week-currencies{display:flex;gap:3px;padding:3px;background:#f1f5fb;border:1px solid #e3eaf5;border-radius:9px}
.safe-week-currencies button{padding:6px 11px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:11px}
.safe-week-currencies button[aria-pressed="true"]{color:#fff;background:#2169d9;font-weight:700;box-shadow:0 2px 5px #2169d92a}
.safe-week-body{display:grid;grid-template-columns:minmax(150px,195px) minmax(0,1fr);gap:18px;padding:18px}
.safe-week-summary{padding:17px 15px;display:flex;flex-direction:column;justify-content:center;gap:8px;font-size:11px;color:#577196;background:linear-gradient(135deg,#edf4ff,#f6f9ff);border:1px solid #e0eafb;border-radius:11px;min-width:0}
.safe-week-summary>strong{color:#1b55a5;font-size:25px;letter-spacing:-.7px;overflow-wrap:anywhere}
.safe-week-summary>small{font-size:9px;color:#7387a3}
.safe-week-today{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px;margin-top:8px;padding-top:11px;border-top:1px solid #dbe6f6}
.safe-week-today b{color:#235b9d;font-size:11px}
.safe-week-chart{padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;min-width:0;align-items:end}
.safe-week-day{display:grid;gap:9px;text-align:center;min-width:0;padding:10px 3px 8px;border-radius:9px}
.safe-week-day.is-today{background:#edf4ff}
.safe-week-track{height:105px;display:flex;align-items:flex-end;justify-content:center;background:repeating-linear-gradient(to top,#e8eff8 0,#e8eff8 1px,transparent 1px,transparent 35px);border-radius:0;overflow:hidden}
.safe-week-bar{width:60%;max-width:28px;background:linear-gradient(180deg,#77a6f9,#2c70dc);min-height:0;border-radius:7px 7px 2px 2px}
.safe-week-day.is-today .safe-week-bar{background:linear-gradient(180deg,#3d89fa,#1355bd)}
.safe-week-day small{font-size:10px;color:var(--muted)}
.safe-week-day.is-today small{color:#2169d9;font-weight:700}
.safe-week-day b{font-size:10px;color:#536984;overflow-wrap:anywhere;font-weight:600}
.safe-week details{margin:0 18px 16px;font-size:11px;color:var(--muted)}
.safe-week details summary{cursor:pointer}
.safe-week table{width:100%;margin-top:8px;font-size:11px}
.safe-week th,.safe-week td{padding:6px;text-align:start}
#paymentDialog .safe-payment-shortcuts{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;width:100%;box-sizing:border-box;padding:13px;margin:12px 0 16px;border:1px solid #dfe8f6;border-radius:11px;background:#f6f9ff}
#paymentDialog .safe-payment-shortcuts button{flex:0 0 auto;min-height:40px;min-width:82px;padding:10px 14px;border:1px solid #d6e2f4;border-radius:8px;background:#fff;color:var(--green);font-size:11px;font-weight:700;box-shadow:0 1px 3px #234d8210}
#paymentDialog .safe-payment-shortcuts button:disabled{color:var(--muted)}
#paymentDialog .safe-payment-shortcuts button:hover:not(:disabled){background:var(--green-soft)}
.safe-clock{font-size:11px;color:var(--muted);white-space:nowrap}
#safeToolsDialog :focus-visible,.safe-week :focus-visible,#paymentDialog .safe-payment-shortcuts :focus-visible{outline:2px solid #075cf6;outline-offset:2px}
@media(max-width:820px){.safe-week-chart{gap:5px;padding:12px}.safe-clock{display:none}}
@media(max-width:600px){.safe-week-body{grid-template-columns:1fr;gap:12px;padding:12px}.safe-week-summary{display:grid;grid-template-columns:1fr auto;gap:7px 12px;padding:13px}.safe-week-summary>strong{grid-row:1 / 3;grid-column:2;font-size:23px;align-self:center}.safe-week-today{grid-column:1 / -1;margin-top:1px;padding-top:8px}.safe-week-chart{padding:0;gap:3px}.safe-week-track{height:90px}.safe-week .panel-head{padding:14px 12px}.safe-week .panel-head p{max-width:210px;font-size:10px}.safe-week-icon{width:32px;height:32px}.safe-week .panel-head h2{font-size:14px}}
@media(prefers-reduced-motion:reduce){#safeToolsDialog button,.safe-week button,#paymentDialog .safe-payment-shortcuts button{transition:none}}

/* Reminder workspace: keep native details behavior and all existing controls. */
.reference-shell .reference-controls{margin:16px 0 20px;border:1px solid #dbe6f6;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 4px 18px #2453990a}
.reference-shell .reference-controls>summary{display:flex;align-items:center;gap:12px;padding:17px 20px;background:linear-gradient(110deg,#eff5ff,#fbfdff);list-style:none;color:#244975}
.reference-controls>summary::-webkit-details-marker{display:none}
.safe-controls-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:11px;background:#e1edff;color:#286bdd;flex-shrink:0}
.safe-controls-icon svg{width:24px;height:24px}
.safe-controls-title{display:grid;gap:5px;min-width:0}
.safe-controls-title strong{font-size:13px;line-height:1.45}
.safe-controls-title small{font-size:11px;font-weight:400;color:#7187a6;line-height:1.45}
.safe-controls-chevron{margin-inline-start:auto;display:grid;place-items:center;width:28px;height:28px;border:1px solid #dae6f7;border-radius:8px;background:#fff;color:#3971b7;font-size:20px;flex-shrink:0}
.reference-controls[open] .safe-controls-chevron{transform:rotate(180deg)}
.reference-shell .reference-controls-body{display:grid;gap:14px;padding:18px;background:#f7faff;border-top:1px solid #e2ebf8}
.safe-controls-group{padding:16px;border:1px solid #e1e9f5;border-radius:12px;background:#fff;min-width:0}
.safe-controls-group>h3{margin:0 0 13px;font-size:11px;letter-spacing:.5px;text-transform:uppercase;color:#7489a8;font-weight:700}
.reference-shell .reference-controls .heading-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:0}
.reference-shell .reference-controls .heading-actions .btn{display:flex;align-items:center;justify-content:center;gap:7px;min-height:43px;padding:10px 12px;font-size:11px;line-height:1.5;border-radius:9px;white-space:normal;text-align:center;box-shadow:none}
.reference-controls .reference-control-shortcuts{display:flex;justify-content:flex-end}
.reference-controls .reference-control-shortcuts button{padding:7px 10px;border:1px solid #dce6f6;border-radius:8px;background:#fff;color:#2a66bc;font-size:11px}
.reference-shell .reference-controls .campaign-pair{gap:12px;margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.reference-shell .reference-controls .campaign-pair>button{min-width:0;min-height:98px;padding:15px;border-radius:11px;border:1px solid #d8e5f9;background:#f1f6ff;color:#2b5c9c;box-shadow:none;gap:12px;text-align:start}
.reference-shell .reference-controls .campaign-pair>button strong{font-size:12px;line-height:1.5}
.reference-shell .reference-controls .campaign-pair>button small{font-size:10px;line-height:1.6;color:#6a83a6}
.reference-shell .reference-controls .campaign-pair>button>b{white-space:nowrap;font-size:11px}
.reference-shell .reference-controls .campaign-pair>.urgent-all-btn{background:#fff5f5;border-color:#f1d7da;color:#ad3e4c}
.reference-shell .reference-controls .campaign-pair>.urgent-all-btn small{color:#a4777d}
.reference-shell .reference-controls .automation-banner{margin:0;padding:15px;border-radius:10px;box-shadow:none;border:1px solid #d9e9e2}
.reference-shell .reference-controls .bottom-grid{margin:14px 0 0;gap:12px}
.reference-shell .reference-controls .bottom-grid>.panel{box-shadow:none;border:1px solid #e1e9f5;border-radius:10px}
.reference-shell .reference-controls .metric-grid{margin:0;gap:10px}
.reference-shell .reference-controls .metric-card{padding:14px;border-radius:10px;box-shadow:none;min-width:0}
.reference-shell .reference-controls .metric-card>strong{font-size:21px;overflow-wrap:anywhere}
.reference-shell .reference-controls .aging-strip{margin:14px 0 0;gap:7px;flex-wrap:wrap}
.reference-shell .reference-controls .aging-strip>button{padding:10px;border-radius:8px;min-width:0}
@media(max-width:1100px){.reference-shell .reference-controls .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.reference-shell .reference-controls>summary{padding:14px 12px;gap:9px}.safe-controls-title strong{font-size:12px}.safe-controls-title small{font-size:10px}.safe-controls-icon{width:34px;height:34px}.reference-shell .reference-controls-body{padding:12px;gap:12px}.safe-controls-group{padding:12px}.reference-shell .reference-controls .heading-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-shell .reference-controls .campaign-pair,.reference-shell .reference-controls .bottom-grid{grid-template-columns:1fr}.reference-shell .reference-controls .campaign-pair>button{min-height:90px}.reference-shell .reference-controls .metric-card>strong{font-size:18px}}

/* Connection form and receipt settings: scoped spacing, native controls retained. */
#qrPanel .phone-pair-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;margin-top:20px;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}
#qrPanel .safe-pair-heading{grid-column:1/-1;display:flex;align-items:center;gap:12px}
#qrPanel .safe-pair-heading>span{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--green-soft);color:var(--green);font-size:24px;flex-shrink:0}
#qrPanel .safe-pair-heading strong{display:block;font-size:14px;line-height:1.5;color:var(--ink)}
#qrPanel .safe-pair-heading small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.5}
#qrPanel .safe-pair-field{display:grid;gap:8px;min-width:0;font-size:12px;font-weight:700;color:var(--ink)}
#qrPanel #waPairPhone{box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font-size:13px;direction:ltr;text-align:left}
#qrPanel #waPairPhone::placeholder{color:var(--muted);font-weight:400}
#qrPanel #pairPhoneBtn{align-self:end;min-height:46px;padding:12px 18px;border:1px solid var(--green);border-radius:10px;background:var(--green);color:#fff;font-size:12px;font-weight:700;box-shadow:none}
#qrPanel #pairPhoneBtn:hover:not(:disabled){background:var(--green-2)}
#qrPanel #waPairCode{padding:16px;margin-top:14px;border-color:var(--green);background:var(--green-soft);color:var(--green);font-size:22px;letter-spacing:3px}
#receiptTemplatePanel{padding:24px;min-width:0;overflow:hidden}
#receiptTemplatePanel .safe-receipt-header{padding-bottom:20px;border-bottom:1px solid var(--line-soft);margin-bottom:20px}
#receiptTemplatePanel .safe-receipt-header h2{font-size:19px;line-height:1.4;margin:0 0 8px;color:var(--ink)}
#receiptTemplatePanel .safe-receipt-header p{margin:0;max-width:700px;line-height:1.7;font-size:12px;color:var(--muted)}
#receiptTemplatePanel .receipt-logo-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px 20px;padding:18px;margin:0 0 24px;border:1px solid var(--line);border-radius:13px;background:var(--surface-soft)}
#receiptTemplatePanel .receipt-logo-controls>label{display:grid;gap:11px;font-size:13px;font-weight:700;color:var(--ink);min-width:0}
#receiptTemplatePanel #receiptLogoFile{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:8px;border:1px solid var(--line);border-radius:9px;background:var(--surface);font-size:12px;font-weight:400;color:var(--muted)}
#receiptTemplatePanel #receiptLogoFile::file-selector-button{padding:9px 12px;margin-right:12px;border:0;border-radius:7px;background:var(--green-soft);color:var(--green);font:inherit;font-weight:700;cursor:pointer}
#receiptTemplatePanel #receiptLogoPreview{width:76px;height:76px;padding:8px;border:1px solid var(--line);border-radius:12px;background:#fff;object-fit:contain}
#receiptTemplatePanel #receiptLogoPreview[hidden]{display:none}
#receiptTemplatePanel .safe-logo-actions{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:10px}
#receiptTemplatePanel .safe-logo-actions button{min-height:42px;padding:10px 16px;border-radius:9px;font-size:12px;font-weight:700;box-shadow:none}
#receiptTemplatePanel #uploadReceiptLogo{border:1px solid var(--green);background:var(--green);color:#fff}
#receiptTemplatePanel #removeReceiptLogo{border:1px solid var(--line);background:var(--surface);color:var(--red)}
#receiptTemplatePanel #receiptLogoStatus{grid-column:1/-1;margin:0;font-size:11px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
#receiptTemplatePanel .receipt-template-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:0 0 24px}
#receiptTemplatePanel .receipt-template-choice{position:relative;min-width:0;padding:14px;gap:14px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--ink)}
#receiptTemplatePanel .receipt-template-choice.is-selected{padding:13px;border:2px solid var(--green);background:var(--surface-soft);box-shadow:0 4px 14px #145ac012}
#receiptTemplatePanel .receipt-template-choice label{gap:8px;align-items:flex-start;min-height:36px;margin:0;font-size:12px;line-height:1.5;cursor:pointer}
#receiptTemplatePanel .receipt-template-choice input{accent-color:var(--green);flex-shrink:0;margin-top:3px;width:15px;height:15px}
#receiptTemplatePanel .receipt-swatch{height:82px;border:1px solid var(--line-soft);border-radius:9px;position:relative;overflow:hidden}
#receiptTemplatePanel .receipt-swatch::after{content:'';position:absolute;inset:15px 18px;border:1px solid #ffffff80;border-radius:4px;background:repeating-linear-gradient(to bottom,#ffffffa8 0,#ffffffa8 2px,transparent 2px,transparent 10px);box-shadow:0 2px 6px #00000010}
#receiptTemplatePanel [data-receipt-template-preview]{min-height:38px;padding:9px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--green);font-size:12px;font-weight:700}
#receiptTemplatePanel [data-receipt-template-preview]:hover{background:var(--green-soft);border-color:var(--green)}
#receiptTemplatePanel .safe-receipt-footer{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:18px;padding-top:20px;border-top:1px solid var(--line-soft)}
#receiptTemplatePanel .safe-receipt-footer label{display:grid;gap:9px;flex:1;min-width:190px;max-width:380px;font-size:12px;font-weight:700;color:var(--ink)}
#receiptTemplatePanel #receiptWidth{width:100%;min-height:44px;padding:11px 13px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font-size:12px}
#receiptTemplatePanel #saveReceiptTemplate{min-height:44px;min-width:150px;padding:11px 20px;border-radius:9px;border:1px solid var(--green);background:var(--green);color:#fff;font-size:12px;font-weight:700;box-shadow:none}
#receiptTemplatePanel .receipt-template-status{margin:14px 0 0;line-height:1.6;font-size:12px;color:var(--green)}
#receiptTemplatePanel .receipt-template-status:empty{display:none}
#qrPanel .phone-pair-row :focus-visible,#receiptTemplatePanel :focus-visible{outline:2px solid var(--green);outline-offset:3px}
@media(max-width:1100px){#receiptTemplatePanel .receipt-template-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){#qrPanel .phone-pair-row{grid-template-columns:minmax(0,1fr);padding:16px;gap:14px}#qrPanel #pairPhoneBtn{width:100%}#receiptTemplatePanel{padding:18px}#receiptTemplatePanel .receipt-template-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#receiptTemplatePanel .receipt-logo-controls{padding:14px;gap:12px}#receiptTemplatePanel .safe-receipt-footer label{max-width:none}#receiptTemplatePanel #saveReceiptTemplate{width:100%}#receiptTemplatePanel .safe-logo-actions button{flex:1}}
@media(max-width:380px){#receiptTemplatePanel .receipt-template-grid{grid-template-columns:minmax(0,1fr)}#receiptTemplatePanel .receipt-logo-controls{grid-template-columns:minmax(0,1fr)}}
/* Keep the expanded reminder workspace inside its available width. */
.reference-shell .reference-controls,.reference-shell .reference-controls-body,.reference-controls .bottom-grid,.reference-controls .bottom-grid>.panel{min-width:0;max-width:100%}
.reference-shell .reference-controls .bottom-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)}
.reference-controls .campaign-pair>button{grid-template-columns:auto minmax(0,1fr) auto}
.reference-controls .campaign-pair>button div{min-width:0;overflow-wrap:anywhere}
.reference-controls .mini-head>div{min-width:0}
.reference-controls .mini-head{gap:12px;flex-wrap:wrap}
.reference-controls .mini-head button{flex-shrink:0}
.reference-controls .template-preview,.reference-controls .template-vars{max-width:100%;overflow-wrap:anywhere;white-space:normal}
.reference-controls .timeline-labels{display:grid;grid-template-columns:repeat(auto-fit,minmax(68px,1fr));gap:10px}
.reference-controls .timeline-labels span{min-width:0;padding:8px 4px;border:1px solid #e3ebf7;border-radius:8px;background:#f7faff}
.reference-controls .aging-strip{grid-template-columns:repeat(5,minmax(0,1fr))}
.reference-controls .safe-controls-chevron{width:36px;height:36px;border-radius:50%;border:1px solid #cfdff5;background:#fff;box-shadow:0 2px 5px #164a9010;transition:transform .2s ease,background .2s ease}
.reference-controls .safe-controls-chevron svg{display:block;width:19px;height:19px}
.reference-controls>summary:hover .safe-controls-chevron{background:#e8f1ff}
@media(max-width:760px){.reference-shell .reference-controls .bottom-grid{grid-template-columns:minmax(0,1fr)}.reference-controls .aging-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-controls .campaign-pair>button{grid-template-columns:auto minmax(0,1fr)}.reference-controls .campaign-pair>button>b{display:none}}
@media(prefers-reduced-motion:reduce){.reference-controls .safe-controls-chevron{transition:none}}
/* Separate scroll-to-top from the red PDF follow-up action. */
#scrollToTopButton{right:calc(24px + env(safe-area-inset-right,0px));bottom:calc(104px + env(safe-area-inset-bottom,0px));z-index:900;width:44px;height:44px;padding:0;border:1px solid #d1e0f5;border-radius:50%;background:var(--surface);color:var(--green);box-shadow:0 5px 16px #173d7520;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
#scrollToTopButton svg{width:20px;height:20px}
#scrollToTopButton:hover{transform:translateY(-2px);background:var(--green-soft);box-shadow:0 7px 20px #173d7530}
#scrollToTopButton:focus-visible{outline:2px solid var(--green);outline-offset:4px}
@media(max-width:600px){#scrollToTopButton{right:calc(18px + env(safe-area-inset-right,0px));bottom:calc(92px + env(safe-area-inset-bottom,0px));width:42px;height:42px}}
@media(prefers-reduced-motion:reduce){#scrollToTopButton{transition:none}}
/* Five collection layouts share the same payment figures and currency controls. */
.reference-shell #overview .safe-week[data-week-style="emerald"]{border-color:#cce6dd;background:#fcfffd}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-body{grid-template-columns:1fr}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-summary{display:grid;grid-template-columns:1fr auto;gap:8px 20px;background:#eaf8f1;border-color:#cae9d9;color:#367961}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-summary>strong{grid-column:2;grid-row:1/3;color:#176b50}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-today{grid-column:1/-1;border-color:#c7e4d6}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-bar{background:linear-gradient(#64d6ad,#15936a);width:75%;max-width:48px}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-day.is-today,.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-icon{background:#e4f5ed;color:#176b50}
.reference-shell #overview .safe-week[data-week-style="emerald"] .safe-week-currencies button[aria-pressed="true"]{background:#17815f}
.reference-shell #overview .safe-week[data-week-style="midnight"]{background:#14233b;border-color:#2f435f;color:#f4f7fd}
.reference-shell #overview .safe-week[data-week-style="midnight"] .panel-head{border-color:#30425d}
.reference-shell #overview .safe-week[data-week-style="midnight"] .panel-head p,.reference-shell #overview .safe-week[data-week-style="midnight"] details,.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-day small,.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-day b{color:#c5d0e2}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-summary{background:linear-gradient(135deg,#263951,#1b2c46);border-color:#40516b;color:#d4bd87}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-summary>strong,.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-today b{color:#f6d488}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-summary>small{color:#bcc9db}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-today{border-color:#40516b}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-bar{background:linear-gradient(#f4dba0,#bc8c3e)}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-track{background:repeating-linear-gradient(to top,#31425c 0,#31425c 1px,transparent 1px,transparent 35px)}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-icon,.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-day.is-today{background:#2d3c51;color:#f6d488}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-currencies{background:#223550;border-color:#40516b}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-currencies button{color:#d6e0ef}
.reference-shell #overview .safe-week[data-week-style="midnight"] .safe-week-currencies button[aria-pressed="true"]{background:#e2bc70;color:#16243a}
.reference-shell #overview .safe-week[data-week-style="violet"]{background:#fdfbff;border-color:#e6def6}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-body{grid-template-columns:1fr}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-summary{display:grid;grid-template-columns:1fr auto;gap:8px 20px;background:linear-gradient(120deg,#f0e8ff,#f9f5ff);border-color:#e2d5f6;color:#735299}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-summary>strong{grid-column:2;grid-row:1/3;color:#7443b5}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-today{grid-column:1/-1;border-color:#e1d4f4}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-bar{background:linear-gradient(#c2a4f1,#8d58cf);width:80%;max-width:60px;border-radius:12px 12px 3px 3px}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-day{border:1px solid #eee5f9;background:#fff}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-day.is-today,.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-icon{background:#eee4fb;color:#7846b8}
.reference-shell #overview .safe-week[data-week-style="violet"] .safe-week-currencies button[aria-pressed="true"]{background:#8050bb}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-body{grid-template-columns:minmax(150px,195px) minmax(0,1fr)}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-chart{grid-template-columns:1fr;gap:5px;align-content:center}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-day{display:grid;grid-template-columns:48px minmax(0,1fr) 70px;gap:12px;align-items:center;padding:7px 10px;text-align:start}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-day small{grid-column:1;grid-row:1}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-day b{grid-column:3;grid-row:1;text-align:end}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-track{grid-column:2;grid-row:1;height:12px;background:#eaf0f8;display:block;border-radius:6px}
.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-bar{height:100%!important;width:var(--week-fill);max-width:none;border-radius:6px;background:linear-gradient(90deg,#68b9ce,#237d9c)}
#safeWeekStylePanel{padding:24px;margin-bottom:22px;border:1px solid var(--line);border-radius:16px;background:var(--surface);min-width:0}
.safe-week-style-header{display:flex;gap:14px;align-items:flex-start;margin-bottom:22px}
.safe-week-style-badge{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;border-radius:12px;background:#eaf2ff;color:#286cce;font-size:25px}
.safe-week-style-header h2{margin:0 0 7px;font-size:19px;color:var(--ink)}
.safe-week-style-header p{margin:0;max-width:690px;font-size:12px;line-height:1.7;color:var(--muted)}
#safeWeekStylePanel fieldset{min-width:0;margin:0;padding:0;border:0}
#safeWeekStylePanel legend{font-size:12px;font-weight:700;margin-bottom:12px;color:var(--ink)}
.safe-week-style-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
.safe-week-style-card{display:flex;flex-direction:column;gap:12px;min-width:0;padding:12px;border:1px solid var(--line);border-radius:13px;background:var(--surface);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.safe-week-style-card:has(input:checked){border-color:#286cce;box-shadow:0 0 0 1px #286cce;background:#f7faff}
.safe-week-style-card:has(input:focus-visible){outline:2px solid #286cce;outline-offset:3px}
.safe-week-style-name{display:flex;align-items:center;gap:7px;color:var(--ink);font-size:12px}
.safe-week-style-name input{accent-color:#286cce;margin:0;flex-shrink:0}
.safe-week-style-name strong{min-width:0;line-height:1.5}
.safe-week-style-check{margin-left:auto;color:#286cce;visibility:hidden}
.safe-week-style-card:has(input:checked) .safe-week-style-check{visibility:visible}
.safe-week-style-card>small{font-size:11px;color:var(--muted);line-height:1.6}
.safe-week-mini{--mini:#397ce0;display:flex;gap:8px;height:100px;padding:12px;border-radius:9px;background:#edf4ff;border:1px solid #dfebfa;overflow:hidden}
.safe-week-mini-total{width:28%;border-radius:5px;background:var(--mini);opacity:.24}
.safe-week-mini-bars{display:flex;flex:1;gap:4px;align-items:flex-end;min-width:0}
.safe-week-mini-bars i{flex:1;height:var(--bar);background:var(--mini);border-radius:3px 3px 0 0}
[data-week-preview="emerald"] .safe-week-mini{--mini:#289979;background:#edf9f3;flex-direction:column;border-color:#d4ecdf}
[data-week-preview="emerald"] .safe-week-mini-total,[data-week-preview="violet"] .safe-week-mini-total{width:100%;height:16px;flex-shrink:0}
[data-week-preview="midnight"] .safe-week-mini{--mini:#e7c177;background:#1c2c45;border-color:#314561}
[data-week-preview="violet"] .safe-week-mini{--mini:#9965d3;background:#f2ebfc;flex-direction:column;border-color:#e6d8f7}
[data-week-preview="ledger"] .safe-week-mini{--mini:#348da4;background:#f2f8fb}
[data-week-preview="ledger"] .safe-week-mini-bars{flex-direction:column;align-items:stretch;justify-content:space-between}
[data-week-preview="ledger"] .safe-week-mini-bars i{flex:0 0 6px;width:var(--bar);height:6px;border-radius:4px}
.safe-week-style-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
#safeWeekStyleStatus{font-size:12px;color:var(--green);line-height:1.6}
#safeWeekStyleView{padding:11px 16px;border:1px solid #d8e5f7;border-radius:9px;background:#edf4ff;color:#286cce;font-size:12px;font-weight:700}
@media(max-width:1100px){.safe-week-style-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){#safeWeekStylePanel{padding:18px}.safe-week-style-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.safe-week-style-header h2{font-size:17px}.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-body{grid-template-columns:1fr}.reference-shell #overview .safe-week[data-week-style="ledger"] .safe-week-day{grid-template-columns:42px minmax(0,1fr) 60px;gap:8px}.safe-week-style-footer button{width:100%}}
@media(max-width:380px){.safe-week-style-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.safe-week-style-card{transition:none}}

.reference-shell #overview .safe-week[data-week-style="midnight"] .panel-head h2{color:#f4f7fd}
