/* Region mode, planner extras, Next 30 days, land portals, help, own categories,
   Money hub, Emergency sheet, mobile dashboard, backup reminder, icons, demo bar…
   Loaded last, so these rules win. */
/* ══ REGION MODE ══ */
body.region-intl [data-region="bd"]{display:none!important;}

/* ══ ANNUAL DAY — toolbar, panels, extra tags ══ */
.ad-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px;}
.ad-panel-box{background:var(--white);border:1.5px solid var(--border);border-radius:12px;padding:14px;margin-bottom:14px;box-shadow:0 2px 10px rgba(0,0,0,.05);}
.ad-panel-title{font-size:13px;font-weight:700;color:var(--navy);margin-bottom:10px;}
.ad-panel-actions{display:flex;gap:8px;align-items:center;margin-top:12px;flex-wrap:wrap;}
.ad-pack-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px;}
.ad-pack{display:flex;align-items:center;gap:8px;font-size:13px;padding:8px 10px;border:1.5px solid var(--border);border-radius:8px;cursor:pointer;}
.ad-pack:hover{background:var(--blue-pale);}
.ad-tag-custom{background:#fff8e1;color:#8a6d00;}
.ad-tag-hol{background:#e8eaf6;color:#283593;}
body.theme-dark .ad-panel-box,body.theme-dark .ad-pack{background:#1a2236;border-color:var(--border);}
body.theme-dark .ad-panel-title{color:#dde5f0;}

/* ══ DASHBOARD — NEXT 30 DAYS ══ */
.up-row{display:flex;align-items:center;gap:12px;padding:8px 6px;border-radius:8px;border-bottom:1px solid var(--border);}
.up-row:last-child{border-bottom:none;}
.up-row:hover{background:var(--blue-pale);}
.up-date{width:42px;text-align:center;flex-shrink:0;line-height:1.1;}
.up-date b{display:block;font-size:17px;color:var(--navy);}
.up-date span{font-size:10px;text-transform:uppercase;color:var(--muted);font-weight:600;}
.up-icon{font-size:20px;flex-shrink:0;}
.up-info{flex:1;min-width:0;}
.up-title{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.up-meta{font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.up-when{font-size:11px;font-weight:700;color:var(--muted);white-space:nowrap;}
.up-row.soon .up-when{color:#c0392b;}
body.theme-dark .up-date b{color:#dde5f0;}
body.theme-dark .up-row:hover{background:rgba(255,255,255,.05);}

/* ══ OFFICIAL LAND PORTAL LINKS ══ */
.land-links{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 12px;font-size:12px;}
.land-links-lbl{color:var(--muted);font-weight:600;margin-right:2px;}
.land-links a{padding:4px 10px;border:1px solid var(--border);border-radius:14px;background:var(--white);color:var(--blue);text-decoration:none;font-weight:600;font-family:'Noto Sans Bengali','IBM Plex Sans',sans-serif;}
.land-links a:hover{background:var(--blue-pale);}
body.theme-dark .land-links a{background:#1a2236;}

/* ══ HELP & FAQ ══ */
.help-callout{background:#fff8e1;border:1.5px solid #ffe082;border-radius:10px;padding:12px 14px;font-size:13px;color:#6b4c00;line-height:1.6;margin-bottom:14px;}
.help-body details{border:1.5px solid var(--border);border-radius:10px;padding:0 14px;margin-bottom:8px;background:var(--white);}
.help-body summary{cursor:pointer;font-weight:700;font-size:14px;color:var(--navy);padding:12px 0;list-style-position:inside;}
.help-body details[open] summary{border-bottom:1px solid var(--border);margin-bottom:8px;}
.help-body p,.help-body li{font-size:13px;line-height:1.65;color:var(--text);margin-bottom:8px;}
.help-body ol{padding-left:20px;margin-bottom:6px;}
body.theme-dark .help-body details{background:#1a2236;}
body.theme-dark .help-body summary{color:#dde5f0;}
body.theme-dark .help-callout{background:#3a2f0b;border-color:#6b5a1e;color:#ffe9a8;}

/* ══ v1.6: own categories, people, tags, warranty, secure PDF ══ */
.badge-warranty{background:#e0f7fa;color:#00838f;}
.badge-custom{background:#eceff1;color:#37474f;}
.nav-add-cat{opacity:.75;}
.nav-add-cat:hover{opacity:1;}
.nav-add-cat .nav-icon{font-weight:700;}
.fg-hint{font-size:11.5px;color:var(--muted);margin-top:4px;line-height:1.45;}
.tag-chip{display:inline-block;font-size:11px;font-weight:600;color:#3949ab;background:#e8eaf6;border-radius:10px;padding:1px 8px;margin:2px 4px 0 0;}
.member-chip{display:inline-block;font-size:11px;font-weight:600;color:#00695c;background:#e0f2f1;border-radius:10px;padding:1px 8px;margin:2px 4px 0 0;}
.doc-extras-line{margin-top:3px;line-height:1.5;font-weight:400;}
.tag-row{align-items:center;margin-top:-4px;}
.tag-row-lbl{font-size:12px;font-weight:700;color:var(--muted);margin-right:2px;}
.link-btn{color:var(--blue);font-weight:600;text-decoration:none;}
.link-btn:hover{text-decoration:underline;}
.linked-doc{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--border);border-radius:8px;margin-bottom:6px;cursor:pointer;font-size:13px;}
.linked-doc:hover{background:var(--blue-pale);}
.linked-doc-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;color:var(--text);}
.exp-badge{display:inline-block;font-size:11.5px;font-weight:700;border-radius:10px;padding:2px 9px;white-space:nowrap;}
.exp-ok{background:#e8f5e9;color:#2e7d32;}
.exp-soon{background:#fff3e0;color:#e65100;}
.exp-over{background:#ffebee;color:#c62828;}
.cc-row{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1.5px solid var(--border);border-radius:10px;margin-bottom:8px;}
.cc-icon{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
.cc-name{flex:1;font-weight:700;font-size:14px;color:var(--text);}
.cc-count{font-size:11.5px;font-weight:500;color:var(--muted);}
.cc-empty{font-size:13px;color:var(--muted);text-align:center;padding:14px;border:1.5px dashed var(--border);border-radius:10px;}
.cc-form{margin-top:14px;display:flex;flex-direction:column;gap:10px;}
.cc-picks{display:flex;flex-wrap:wrap;gap:6px;}
.cc-pick{width:36px;height:36px;border-radius:9px;border:2px solid var(--border);background:var(--white);font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.cc-pick.on{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue-pale);}
.cc-color{width:30px;height:30px;border-radius:50%;}
.cc-color.on{border-color:var(--text);}
.sp-intro{font-size:13px;line-height:1.6;color:var(--text);margin-bottom:12px;}
.modal-body .fg{margin-bottom:10px;}
.sp-check{display:flex;align-items:center;gap:8px;font-size:13px;margin:6px 0;cursor:pointer;}
body.theme-dark .tag-chip{background:#283057;color:#c5cae9;}
body.theme-dark .member-chip{background:#123b37;color:#a7e3dc;}
body.theme-dark .cc-pick{background:#1a2236;}
body.theme-dark .badge-warranty{background:#0f3a40;color:#80deea;}
.doc-extras{grid-column:1/-1;}

/* ══ v2.0: Money hub, Emergency sheet ══ */
.money-hero{display:grid;grid-template-columns:1.4fr 1fr;gap:14px;background:linear-gradient(135deg,var(--navy),#1b3a63);color:#fff;border-radius:14px;padding:18px 20px;margin-bottom:14px;}
.mh-lbl{font-size:11px;text-transform:uppercase;letter-spacing:.6px;opacity:.75;font-weight:700;}
.mh-val{font-size:32px;font-weight:800;margin:4px 0 2px;}
.mh-val.neg{color:#ffb4a8;}
.mh-sub{font-size:12.5px;opacity:.85;}
.mh-month{background:rgba(255,255,255,.08);border-radius:10px;padding:10px 14px;}
.mh-row{display:flex;justify-content:space-between;font-size:13px;padding:3px 0;}
.mh-total{border-top:1px solid rgba(255,255,255,.2);margin-top:4px;padding-top:6px;}
.money-hero .pos{color:#9be7a6;}.money-hero .neg{color:#ffb4a8;}
.money-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin-bottom:14px;}
.money-card{border:1.5px solid var(--border);border-radius:12px;padding:14px;cursor:pointer;background:var(--white);border-top:4px solid var(--c,#1a6db5);transition:box-shadow .15s,transform .15s;}
.money-card:hover{box-shadow:0 6px 18px rgba(13,34,64,.12);transform:translateY(-1px);}
.mc-blue{--c:#0078d4;}.mc-orange{--c:#e65100;}.mc-purple{--c:#5e35b1;}
.money-card-icon{font-size:24px;}
.money-card-title{font-weight:800;font-size:14.5px;color:var(--navy);margin:4px 0 6px;}
.money-card-line{font-size:12.5px;color:var(--text);line-height:1.6;}
.money-card-go{font-size:12px;font-weight:700;color:var(--c);margin-top:6px;}
.money-card .pos,.money-up .pos{color:#2e7d32;}.money-card .neg{color:#c62828;}
.money-grid{display:grid;grid-template-columns:1.2fr 1fr;gap:12px;}
.money-panel{border:1.5px solid var(--border);border-radius:12px;padding:12px 14px;background:var(--white);min-width:0;}
.money-panel-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--muted);margin-bottom:8px;}
.money-chart-box{position:relative;height:200px;}
.money-up{display:flex;align-items:center;gap:10px;padding:7px 0;border-bottom:1px solid var(--border);cursor:pointer;}
.money-up:last-child{border-bottom:none;}
.money-up-icon{font-size:18px;}
.money-up-txt{flex:1;min-width:0;}
.money-up-title{font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.money-up-meta{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.money-up-when{font-size:11.5px;font-weight:700;color:var(--blue);white-space:nowrap;}
.money-empty{font-size:13px;color:var(--muted);padding:16px 0;text-align:center;}
.money-tip{margin-top:12px;font-size:12.5px;color:var(--muted);background:var(--blue-pale);border-radius:8px;padding:9px 12px;}
@media(max-width:768px){.money-hero,.money-grid{grid-template-columns:1fr;}.mh-val{font-size:26px;}}
.em-intro{font-size:13px;line-height:1.6;color:var(--text);background:#fff8e1;border:1.5px solid #ffe082;border-radius:10px;padding:10px 12px;margin-bottom:12px;}
.em-row{display:grid;gap:6px;margin-bottom:6px;align-items:center;}
.em-contact{grid-template-columns:1.3fr 1fr 1fr 34px;}
.em-med{grid-template-columns:1.1fr .8fr 1fr 1fr 1fr 34px;}
.em-row input,.em-row select{width:100%;padding:8px 10px;border:1.5px solid var(--border);border-radius:8px;font-size:13px;background:var(--white);color:var(--text);font-family:inherit;}
.em-checks{display:flex;flex-direction:column;gap:6px;font-size:13px;}
.em-checks label{display:flex;gap:8px;align-items:center;cursor:pointer;}
@media(max-width:768px){.em-contact,.em-med{grid-template-columns:1fr 1fr;}.em-row .act-btn{justify-self:end;}}
body.theme-dark .money-card,body.theme-dark .money-panel{background:#1a2236;}
body.theme-dark .money-card-title{color:#dde5f0;}
body.theme-dark .em-intro{background:#3a2f0b;border-color:#6b5a1e;color:#ffe9a8;}
body.theme-dark .em-row input,body.theme-dark .em-row select{background:#1a2236;}
@media(max-width:768px){.pwa-banner{bottom:66px;}} /* keep the install prompt above the bottom bar */

/* ══ Mobile dashboard: category counts as a compact two-row strip, so "Next 30 days" is on the first screen ══ */
@media(max-width:768px){
  .stats-grid{display:grid;grid-template-columns:none;grid-template-rows:repeat(2,auto);grid-auto-flow:column;grid-auto-columns:minmax(124px,40%);
    gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:6px;margin-bottom:12px;-webkit-overflow-scrolling:touch;scrollbar-width:thin;}
  .stat-card{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:9px 10px;scroll-snap-align:start;}
  .stat-icon{grid-row:1/3;font-size:20px;margin:0;}
  .stat-icon .ic{width:20px;height:20px;}
  .stat-num{font-size:18px;}
  .stat-label{font-size:10.5px;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
}

/* ══ Backup reminder ══ */
.backup-nudge{display:flex;align-items:center;gap:12px;background:#fff8e1;border:1.5px solid #ffe082;border-radius:10px;padding:10px 14px;margin-bottom:14px;font-size:13px;color:#6b4c00;}
.backup-nudge-txt{flex:1;line-height:1.5;}
.backup-nudge .btn{white-space:nowrap;}
.backup-nudge-later{background:none;border:none;color:#8a6d1f;font-size:12px;cursor:pointer;text-decoration:underline;white-space:nowrap;}
@media(max-width:600px){.backup-nudge{flex-wrap:wrap;}.backup-nudge-txt{flex-basis:100%;}}
body.theme-dark .backup-nudge{background:#3a2f0b;border-color:#6b5a1e;color:#ffe9a8;}
body.theme-dark .backup-nudge-later{color:#e6cf86;}
@media(max-width:768px){
  .dash-toolbar{flex-wrap:wrap;row-gap:8px;}
  .dash-toolbar .toolbar-search{flex:1 1 100%;}
  .dash-toolbar .toolbar-sep{display:none;}
  .dash-toolbar select{flex:1 1 40%;min-width:0;}
}

/* Password-protected backup */
.bk-pw-toggle{display:block;padding-left:24px;text-indent:-24px;font-size:13px;font-weight:600;color:#1b5e20;margin:4px 0 8px;cursor:pointer;line-height:1.45;}
.bk-pw-toggle input{width:16px;margin:0 8px 0 0;vertical-align:-2px;accent-color:#2e7d32;}
.bk-pw-toggle span{display:block;text-indent:0;font-weight:400;color:var(--muted);font-size:12px;}
.bk-pw-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.bk-pw-grid input{padding:9px 10px;border:1.5px solid var(--border);border-radius:8px;font-size:13px;min-width:0;}
.bk-pw-note{font-size:11.5px;color:#8a5a00;margin:6px 0 10px;line-height:1.5;}
@media(max-width:520px){.bk-pw-grid{grid-template-columns:1fr;}}

/* Note shown when the app is opened from disk */
.file-note{display:flex;align-items:center;gap:10px;margin:12px 24px 0;padding:10px 14px;background:#e3f2fd;border:1.5px solid #90caf9;border-radius:10px;color:#0d47a1;font-size:12.5px;line-height:1.5;}
.file-note[hidden]{display:none;}
.file-note-txt{flex:1;}
body.theme-dark .file-note{background:#10213a;border-color:#1e4a7a;color:#9ecbff;}
@media(max-width:768px){.file-note{margin:10px 12px 0;flex-wrap:wrap;}}

/* Demo site bar (config.js demo: true) */
.demo-bar{background:#fff4d6;border-bottom:1.5px solid #f0c75e;color:#6b4e00;font-size:12.5px;padding:7px 24px;line-height:1.5;}
.demo-bar a{color:#0d47a1;font-weight:700;margin-left:6px;white-space:nowrap;}
body.theme-dark .demo-bar{background:#2c2410;border-color:#6b5414;color:#f2d68a;}
body.theme-dark .demo-bar a{color:#9ecbff;}
@media(max-width:768px){.demo-bar{padding:6px 12px;font-size:12px;}}

/* Tagline: split evenly over two lines instead of leaving one word alone */
.pw-sub,.brand-sub{text-wrap:balance;}

/* Pro edition (config.js pro.enabled) */
.pro-reason{font-size:14px;font-weight:600;color:var(--navy);margin-bottom:10px;}
.pro-list{margin:0 0 12px 18px;font-size:13.5px;line-height:1.9;}
.pro-note{font-size:12.5px;color:var(--muted);line-height:1.5;margin-top:4px;}

/* ── Google Drive backup list ── */
.bk-drive-list{margin-top:10px;display:flex;flex-direction:column;gap:6px;}
.bk-drive-row{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#fff;border:1px solid #bbdefb;border-radius:8px;padding:8px 10px;font-size:12.5px;}
.bk-drive-row span{color:var(--muted);font-size:11.5px;}
.bk-drive-row b{word-break:break-all;}
body.theme-dark .bk-drive-row{background:#1a2236;border-color:var(--border);}

/* ── Dashboard tape: today's events ──
   Two identical copies of the row sit inside the track, and the track is slid left by exactly
   half its width: at the moment the first copy leaves, the second is where it began, so the
   loop has no seam. The item spacing is padding rather than a gap for the same reason - a gap
   would be counted once and make the two halves different widths. */
.today-tape{display:flex;align-items:center;gap:10px;margin-bottom:14px;padding:8px 12px;background:var(--white);border:1px solid var(--border);border-left:4px solid var(--blue);border-radius:10px;cursor:pointer;overflow:hidden}
.today-tape .tt-label{flex:0 0 auto;font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--blue);white-space:nowrap}
.today-tape .tt-win{flex:1 1 auto;min-width:0;overflow:hidden}
.today-tape .tt-track{display:inline-flex;white-space:nowrap;font-size:13px;color:var(--text)}
.today-tape .tt-item{flex:0 0 auto;padding-right:38px}
.today-tape .tt-item i{font-style:normal;color:var(--muted)}
.today-tape .tt-quiet,.today-tape .tt-quiet b{color:var(--muted);font-weight:500}
/* Small, quiet, and out of the way until it is wanted - it closes the line for the day, which
   is not a thing anybody should press by accident. */
.today-tape .tt-close{flex:0 0 auto;background:none;border:0;margin-left:2px;padding:3px 5px;font-size:13px;line-height:1;color:var(--muted);cursor:pointer;border-radius:5px}
.today-tape .tt-close:hover{background:rgba(0,0,0,.07);color:var(--text)}
body.theme-dark .today-tape .tt-close:hover{background:rgba(255,255,255,.12)}
.today-tape.is-moving .tt-track{animation:tt-roll var(--tt-sec,20s) linear infinite}
.today-tape.is-moving:hover .tt-track{animation-play-state:paused}
@keyframes tt-roll{from{transform:translateX(0)}to{transform:translateX(-50%)}}
/* Someone who has asked their phone to stop animations gets the line standing still. */
@media (prefers-reduced-motion:reduce){.today-tape.is-moving .tt-track{animation:none}}
body.theme-dark .today-tape{background:#1a2236;border-color:var(--border)}
@media(max-width:480px){
  .today-tape{gap:7px;padding:7px 9px}
  .today-tape .tt-label{font-size:10px}
  .today-tape .tt-track{font-size:12px}
  .today-tape .tt-item{padding-right:28px}
}

/* ── Prize bond: the rules, folded away ──
   The Bengali line is half as long again as the English it was laid out for, so the line is given
   room to wrap and the button drops below it rather than squeezing the sentence. */
.pb-rules{background:var(--white);border:1px solid var(--border);border-left:4px solid var(--blue);border-radius:9px;padding:9px 12px;margin-bottom:12px}
.pb-rules-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.pb-rules-line{flex:1 1 200px;min-width:0;font-size:12.5px;line-height:1.5;color:var(--muted)}
.pb-rules-body{margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}
.pb-rule{font-size:13px;line-height:1.6;margin-bottom:9px}
.pb-rule b{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--blue)}
.pb-rules-note{font-size:12px;line-height:1.55;color:var(--muted);border-top:1px dashed var(--border);padding-top:8px}
body.theme-dark .pb-rules{background:#1a2236}
