/* Tanshar Home — approved navy / violet / gold glass design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

:root{
  --th-bg:#061127;
  --th-bg-2:#09162f;
  --th-panel:#101d37;
  --th-panel-2:#14213d;
  --th-panel-soft:#182642;
  --th-line:rgba(170,187,222,.16);
  --th-line-strong:rgba(170,187,222,.28);
  --th-text:#f4f7ff;
  --th-muted:#99a7c2;
  --th-purple:#8066f2;
  --th-purple-2:#6548df;
  --th-gold:#e0ad58;
  --th-green:#55c98b;
  --th-red:#ff7181;
  --th-blue:#65aef3;
  --th-shadow:0 18px 48px rgba(0,0,0,.22);
}

body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
h1,h2,h3,h4,.money,.home-kpi strong,.brand strong{font-family:Manrope,Inter,sans-serif}

/* Login */
body[data-signed="0"]{min-height:100vh;background:#061127;color:#fff}
body[data-signed="0"] .auth-wrap{
  position:relative;isolation:isolate;min-height:100vh;display:grid;
  grid-template-columns:minmax(420px,1.15fr) minmax(430px,.85fr);
  align-items:center;gap:clamp(36px,6vw,110px);padding:clamp(30px,6vw,92px);
  background-image:linear-gradient(90deg,rgba(2,9,24,.54),rgba(3,10,25,.12) 48%,rgba(3,10,25,.46)),url('tanshar-login-home.webp');
  background-size:cover;background-position:center;
}
body[data-signed="0"] .auth-wrap:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(5,13,34,.08),rgba(3,9,24,.38))}
.auth-brand-panel{max-width:610px;color:#fff;text-shadow:0 2px 20px rgba(0,0,0,.22)}
.auth-brand-mark,.auth-card-mark{width:74px;height:74px;display:grid;place-items:center;border:1px solid rgba(192,181,255,.42);border-radius:22px;background:linear-gradient(145deg,rgba(139,111,255,.27),rgba(47,38,92,.32));box-shadow:0 18px 42px rgba(71,47,181,.32),inset 0 1px rgba(255,255,255,.15);color:#b5a6ff;backdrop-filter:blur(12px)}
.auth-brand-mark svg{width:37px;height:37px;stroke-width:2.2}.auth-brand-panel h1{margin:27px 0 2px;font-size:clamp(42px,4.3vw,68px);font-weight:800;letter-spacing:-2.2px}.auth-brand-subtitle{margin:0;color:var(--th-gold);font-size:clamp(18px,1.6vw,26px);font-weight:600}.auth-brand-promise{max-width:560px;margin:58px 0 0;font-size:clamp(18px,1.7vw,27px);font-weight:500;line-height:1.4}
body[data-signed="0"] .auth-card{justify-self:end;width:min(610px,100%);padding:clamp(32px,4vw,56px);border:1px solid rgba(194,205,235,.28);border-radius:30px;background:linear-gradient(145deg,rgba(26,37,66,.82),rgba(16,23,45,.72));box-shadow:0 35px 90px rgba(0,0,0,.38),inset 0 1px rgba(255,255,255,.08);backdrop-filter:blur(25px) saturate(120%);color:#fff}
.auth-card-mark{width:68px;height:68px;margin:0 auto 20px;border-radius:20px}.auth-card-mark svg{width:33px;height:33px}.auth-card h2{text-align:center;margin:0;font-size:clamp(30px,2.5vw,42px);font-weight:800}.auth-card-copy{text-align:center;margin:8px 0 30px;color:#b8c3d8;font-size:15px}.auth-field{margin-bottom:20px}.auth-card .form-label{margin-bottom:8px;color:#f1f4fc;font-size:14px;font-weight:600}.auth-input{position:relative}.auth-input>svg{position:absolute;left:17px;top:50%;z-index:2;width:20px;height:20px;transform:translateY(-50%);color:#b4bfd4}.auth-card .auth-input .form-control{height:58px;padding:0 52px;border:1px solid rgba(183,197,229,.3);border-radius:13px;background:rgba(9,18,39,.42);box-shadow:none;color:#fff;font-size:15px}.auth-card .form-control::placeholder{color:#8794ae}.auth-card .form-control:focus{border-color:#927df8;background:rgba(10,18,39,.68);box-shadow:0 0 0 4px rgba(128,102,242,.16)}.auth-password-toggle{position:absolute;right:9px;top:50%;width:42px;height:42px;display:grid;place-items:center;transform:translateY(-50%);border:0;border-radius:10px;background:transparent;color:#b4bfd4}.auth-password-toggle:hover{background:rgba(255,255,255,.07);color:#fff}.auth-password-toggle svg{width:19px;height:19px}.auth-options{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:-1px 0 21px;color:#b6c0d4;font-size:13px}.auth-options label{display:flex;align-items:center;gap:8px;cursor:pointer}.auth-options input{width:17px;height:17px;accent-color:var(--th-purple)}.auth-options span{color:#aa98ff}.auth-submit{height:58px;border:0!important;border-radius:13px!important;background:linear-gradient(135deg,#7658ea,#8a6af5)!important;box-shadow:0 15px 28px rgba(76,49,184,.33);font-size:16px!important}.auth-submit:hover{filter:brightness(1.08);transform:translateY(-1px)}.auth-submit:disabled{opacity:.72;transform:none}.auth-card #authMsg .alert{margin:0 0 16px;border-radius:12px}.auth-security{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:28px;padding-top:24px;border-top:1px solid rgba(179,192,221,.17)}.auth-security>svg{width:31px;height:31px;color:#9d86ff}.auth-security span{display:flex;flex-direction:column}.auth-security strong{font-size:13px}.auth-security small{color:#aeb9ce;font-size:11px}

/* Signed-in application shell */
body[data-signed="1"]{
  --violet:var(--th-purple);--violet-soft:rgba(128,102,242,.16);--ink:var(--th-text);
  --muted:var(--th-muted);--line:var(--th-line);--bg:var(--th-bg);--green:var(--th-green);--navy:var(--th-bg-2);
  min-height:100vh;background:radial-gradient(circle at 70% -10%,rgba(87,66,184,.18),transparent 34%),linear-gradient(150deg,#07132b,#050e21 72%);color:var(--th-text)
}
body[data-signed="1"] .app-shell{grid-template-columns:250px minmax(0,1fr)}
body[data-signed="1"] .sidebar{padding:17px 12px;background:linear-gradient(180deg,rgba(14,27,53,.98),rgba(8,18,38,.98));border-right:1px solid var(--th-line);box-shadow:12px 0 36px rgba(0,0,0,.12)}
body[data-signed="1"] .brand{gap:12px;padding:2px 9px 19px;color:#fff;font-size:16px;border-bottom:1px solid var(--th-line)}
body[data-signed="1"] .brand .brand-mark{width:43px;height:43px;flex:0 0 43px;border:1px solid rgba(178,165,255,.28);border-radius:13px;background:linear-gradient(145deg,rgba(130,103,244,.28),rgba(64,52,117,.22));color:#b4a4ff}
body[data-signed="1"] .brand .brand-mark svg{width:23px;height:23px}.brand>span:last-child{display:flex;min-width:0;flex-direction:column}.brand strong{font-size:15px}.brand small{margin-top:1px;color:#7f8da9;font-size:8px;font-weight:500;letter-spacing:.1px}
body[data-signed="1"] .sidebar nav{gap:5px;margin-top:17px;overflow-y:auto;scrollbar-width:thin}.nav-chevron{margin-left:auto;width:13px!important;height:13px!important;opacity:.48}
body[data-signed="1"] .nav-link{min-height:43px;padding:10px 12px;border:1px solid transparent;border-radius:11px;color:#aeb9cd;font-size:12px;font-weight:600}.nav-link span{white-space:nowrap}.nav-link:hover{color:#fff;background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.06)}body[data-signed="1"] .nav-link.active{color:#fff;background:linear-gradient(135deg,#7355e6,#8064ed);border-color:rgba(183,169,255,.36);box-shadow:0 11px 22px rgba(70,45,180,.27)}
.sidebar-footer{margin-top:auto!important;padding:12px!important;border:1px solid var(--th-line)!important;border-radius:13px!important;background:rgba(255,255,255,.035)!important}.sidebar-footer strong{color:#e9edfa!important}.sidebar-footer small{color:#7f8da9!important}.sidebar-home-icon{color:#a08cff!important;background:rgba(128,102,242,.14)!important}
body[data-signed="1"] .main{background:transparent}.topbar{height:74px;padding:9px 24px;background:rgba(6,16,36,.82);border-bottom:1px solid var(--th-line);backdrop-filter:blur(20px)}.topbar h1{color:#f5f7ff;font-size:18px}.topbar p{color:#8391aa;font-size:10px}.sidebar-toggle,.icon-button,.owner-profile{border-color:var(--th-line)!important;background:rgba(255,255,255,.035)!important;color:#c7d0e3!important}.sidebar-toggle:hover,.icon-button:hover,.owner-profile:hover{border-color:rgba(128,102,242,.48)!important;background:rgba(128,102,242,.1)!important;color:#fff!important}.topbar-search{border-color:var(--th-line)!important;background:rgba(255,255,255,.035)!important}.topbar-search input{color:#e9edfa!important}.topbar-search input::placeholder{color:#74819a!important}.topbar-search svg{color:#8e9ab1!important}.owner-copy strong{color:#f3f5fc!important}.owner-copy small{color:#8592aa!important}.owner-avatar{background:linear-gradient(135deg,#7355e6,#4f8dd9)!important;box-shadow:0 7px 18px rgba(73,54,184,.3)}
body[data-signed="1"] .content{padding:22px 24px 80px;max-width:1800px;margin:0 auto}.loading{color:var(--th-muted)}

/* Global surfaces, typography and controls */
body[data-signed="1"] .cardx,body[data-signed="1"] .modal-content,body[data-signed="1"] .dropdown-menu,body[data-signed="1"] .profile-menu,body[data-signed="1"] .settings-manager,body[data-signed="1"] .notification-card{
  color:var(--th-text);border-color:var(--th-line);background:linear-gradient(145deg,rgba(18,31,58,.96),rgba(13,25,49,.96));box-shadow:var(--th-shadow)
}
body[data-signed="1"] .cardx:hover{border-color:rgba(157,139,248,.28)}
body[data-signed="1"] h1,body[data-signed="1"] h2,body[data-signed="1"] h3,body[data-signed="1"] h4,body[data-signed="1"] strong,body[data-signed="1"] .merchant{color:var(--th-text)}
body[data-signed="1"] p,body[data-signed="1"] small,body[data-signed="1"] .meta,body[data-signed="1"] .hint,body[data-signed="1"] .section-subtitle{color:var(--th-muted)}
body[data-signed="1"] .form-control,body[data-signed="1"] .form-select,body[data-signed="1"] textarea{
  color:#edf1fb;border-color:var(--th-line);background-color:#0b1830;box-shadow:none;color-scheme:dark
}
body[data-signed="1"] .form-control:focus,body[data-signed="1"] .form-select:focus,body[data-signed="1"] textarea:focus{color:#fff;border-color:#8066f2;background-color:#0d1b35;box-shadow:0 0 0 3px rgba(128,102,242,.13)}
body[data-signed="1"] .form-control::placeholder{color:#68758e}.form-label{color:#c8d1e3}.form-check-input{background-color:#0c1931;border-color:#53617b}.form-check-input:checked{background-color:var(--th-purple);border-color:var(--th-purple)}
body[data-signed="1"] .btn-primary{border-color:#8267ef;background:linear-gradient(135deg,#7254e3,#8166ef);box-shadow:0 8px 20px rgba(77,50,189,.22)}body[data-signed="1"] .btn-primary:hover{filter:brightness(1.08)}
body[data-signed="1"] .btn-light{color:#d7deed;border:1px solid var(--th-line);background:#15233f}body[data-signed="1"] .btn-light:hover{color:#fff;border-color:#715be0;background:#1a2949}
body[data-signed="1"] .btn-success{border-color:#3ba873;background:#2d8e63}.btn-danger{border-color:#b44759;background:#96384a}
body[data-signed="1"] .modal-header,body[data-signed="1"] .modal-footer,body[data-signed="1"] .table-tools,body[data-signed="1"] .section-head,body[data-signed="1"] .home-panel-head{border-color:var(--th-line)}
body[data-signed="1"] .btn-close{filter:invert(1) grayscale(1);opacity:.8}.modal-backdrop.show{opacity:.72}.dropdown-item{color:#d7deed}.dropdown-item:hover,.dropdown-item:focus{color:#fff;background:rgba(128,102,242,.14)}
body[data-signed="1"] .alert-danger{color:#ffbbc4;border-color:rgba(255,113,129,.3);background:rgba(149,43,59,.24)}body[data-signed="1"] .alert-success{color:#a7ecc5;border-color:rgba(85,201,139,.3);background:rgba(44,135,91,.2)}body[data-signed="1"] .alert-warning{color:#f2ce91;border-color:rgba(224,173,88,.3);background:rgba(142,95,29,.2)}
body[data-signed="1"] .empty{border-color:var(--th-line-strong);background:rgba(255,255,255,.018)}
body[data-signed="1"] ::-webkit-scrollbar{width:8px;height:8px}body[data-signed="1"] ::-webkit-scrollbar-track{background:transparent}body[data-signed="1"] ::-webkit-scrollbar-thumb{border-radius:99px;background:#33415d}body[data-signed="1"] ::-webkit-scrollbar-thumb:hover{background:#53617f}

/* Dashboard */
.home-dashboard-head{position:relative;overflow:hidden;min-height:118px;align-items:center;padding:22px 24px;margin-bottom:14px;border:1px solid var(--th-line);border-radius:18px;background:linear-gradient(90deg,rgba(15,28,53,.98),rgba(13,27,53,.82)),url('tanshar-login-home.webp') center 55%/cover;box-shadow:var(--th-shadow)}.home-dashboard-head:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,transparent 40%,rgba(128,102,242,.08))}.home-dashboard-head>div{position:relative;z-index:1}.home-dashboard-head h2{color:#fff;font-size:28px}.home-dashboard-head p{color:#aeb9cd}.dashboard-eyebrow{color:#a794ff}.currency-switch,.month-badge{border-color:var(--th-line)!important;background:rgba(10,21,43,.86)!important;box-shadow:none!important}.currency-switch button{color:#93a1ba}.currency-switch button.active{background:linear-gradient(135deg,#7255e4,#846bee)}
.home-kpi,.transaction-mini-summary>span,.family-summary article{border-color:var(--th-line);background:linear-gradient(145deg,#14223f,#101d38);box-shadow:var(--th-shadow)}.home-kpi small{color:#98a5bd}.home-kpi strong{color:#f5f7ff}.home-kpi-icon{box-shadow:inset 0 0 0 1px rgba(255,255,255,.04)}.kpi-progress,.budget-progress,.progress{background:#25334d}
.home-panel{background:linear-gradient(145deg,#13213d,#0e1b35)}.home-panel-head h3,.quick-actions-panel h3{color:#f4f6fd}.home-view{color:#a895ff;background:rgba(128,102,242,.13)}.home-list-row,.list-row,.rent-due-row,.tenant-compact-row,.schedule-due-row,.schedule-directory-row,.bill-compact-row,.transaction-compact-row,.settings-manage-row{border-color:var(--th-line)}.home-list-icon,.bill-logo{background:#1b2a47;box-shadow:inset 0 0 0 1px var(--th-line)}

/* Tables, cards and module-specific surfaces */
body[data-signed="1"] .table{--bs-table-color:#dfe5f2;--bs-table-bg:transparent;--bs-table-border-color:var(--th-line);--bs-table-hover-color:#fff;--bs-table-hover-bg:rgba(128,102,242,.055)}
body[data-signed="1"] .table th{color:#95a3bb;background:#0e1b34}.table-card,.transaction-card{border:1px solid var(--th-line);background:linear-gradient(145deg,#13213d,#0e1b34);box-shadow:var(--th-shadow)}
.transaction-filters,.table-tools{background:rgba(255,255,255,.012)}.transaction-page{color:#b8c3d7;border-color:var(--th-line);background:#14223f}.transaction-main strong,.schedule-due-row strong,.schedule-directory-row strong,.rent-due-row strong,.tenant-compact-row strong{color:#edf1fa}.transaction-type.income{color:#72d7a0;background:rgba(85,201,139,.14)}.transaction-type.expense{color:#ff919e;background:rgba(255,113,129,.13)}.transaction-amount.income,.amount.income,.positive{color:var(--th-green)!important}.transaction-amount.expense,.amount.expense,.negative{color:var(--th-red)!important}
.family-head,.module-hero{border-color:var(--th-line)!important;background:linear-gradient(130deg,#162541,#101d36 70%,#1a2050)!important;box-shadow:var(--th-shadow)!important}.family-role,.family-permission-box,.family-active-toggle,.transaction-edit-summary,.rent-receive-summary,.pdf-private-note{border-color:var(--th-line)!important;background:#172541!important}.family-permission-grid label{color:#cbd4e5;border-color:var(--th-line);background:#101d36}.family-permission-grid label:has(input:checked){color:#c4b8ff;border-color:#6e58d1;background:rgba(128,102,242,.16)}.family-member-card.inactive{background:#111d35}.family-module-chips span,.family-module-chips b,.tag,.count-badge,.currency-pill{color:#b4a7ff;background:rgba(128,102,242,.16)}
.budget-total-card{background:linear-gradient(135deg,#152541 55%,#191e49)}.budget-card-head h3,.investment-summary-grid strong{color:var(--th-text)}.budget-card-foot,.budget-total-stats,.transaction-pager{border-color:var(--th-line)}.budget-alert-strip{border-color:rgba(224,173,88,.26);background:rgba(137,91,26,.13)}.budget-alert-chip{color:#f1ca88;background:rgba(224,173,88,.13)}
.month-switcher{border-color:var(--th-line);background:#101d36}.month-switcher .budget-current{background:#172541}.segmented{background:#0b1730}.segmented .btn{color:#9daac0}.segmented .btn-check:checked+.btn{color:#fff;background:#1b2b4a;box-shadow:none}
.choose-icon-button,.icon-choice>span{color:#d9e0ed;border-color:var(--th-line);background:#101d36}.choose-icon-button:hover,.icon-choice:hover>span{border-color:#7861e1;background:#182746}.chosen-icon-preview{color:#ad9cff;background:rgba(128,102,242,.15)}.icon-popup-backdrop{background:rgba(1,7,18,.82)}.icon-popup-window{color:#eef2fb;border:1px solid var(--th-line);background:#101d37}.icon-popup-toolbar,.icon-popup-head{border-color:var(--th-line)}
.mini-bill-day{color:#c7d0e1;border-color:var(--th-line);background:#101d36}.mini-bill-day.today{color:#c4b8ff;border-color:#755ee0;background:rgba(128,102,242,.16)}.mini-bill-day i{color:#f0c67f;background:rgba(224,173,88,.16)}
.investment-summary-grid article{border-color:var(--th-line)!important;background:linear-gradient(145deg,#14223f,#101d38)}.investment-summary-icon{color:#b2a3ff;background:rgba(128,102,242,.15)}
.settings-organized-grid>.settings-manager{border:1px solid var(--th-line);background:linear-gradient(145deg,#13213d,#0e1b35)}.settings-card-body{scrollbar-color:#465474 transparent}.danger{border-color:rgba(255,113,129,.3)!important}.danger h2{color:#ff8795!important}

/* Shopping, pantry, reports, schedules and notifications */
body[data-signed="1"] .shopping-summary-card,body[data-signed="1"] .shopping-panel,body[data-signed="1"] .pantry-panel,body[data-signed="1"] .stock-activity-panel,body[data-signed="1"] .scheduled-transfer-card,body[data-signed="1"] .report-card,body[data-signed="1"] .notification-group{
  color:var(--th-text)!important;border-color:var(--th-line)!important;background:linear-gradient(145deg,#14223f,#101d38)!important;box-shadow:var(--th-shadow)!important
}
body[data-signed="1"] .shopping-row,body[data-signed="1"] .pantry-row,body[data-signed="1"] .stock-activity-row{border-color:var(--th-line)!important}.shopping-toolbar,.pantry-toolbar{border-color:var(--th-line)!important;background:rgba(255,255,255,.012)!important}.shopping-status,.pill-status{color:#b9adff;background:rgba(128,102,242,.15)}

/* Responsive */
@media(max-width:1050px){body[data-signed="0"] .auth-wrap{grid-template-columns:1fr;padding:40px}.auth-brand-panel{display:none}body[data-signed="0"] .auth-card{justify-self:center}}
@media(max-width:768px){body[data-signed="1"] .app-shell{display:block}.topbar{padding:9px 12px}.topbar-search{display:none}.owner-copy{display:none}body[data-signed="1"] .content{padding:14px 11px 88px}.mobile-nav{border-color:var(--th-line);background:#0b1830}.mobile-nav .nav-link{color:#99a7bd}.home-dashboard-head{min-height:150px;align-items:flex-start;flex-direction:column}.home-dashboard-controls{width:100%;justify-content:space-between}.auth-card h2{font-size:29px}}
@media(max-width:520px){body[data-signed="0"] .auth-wrap{padding:16px;background-position:62% center}body[data-signed="0"] .auth-card{padding:27px 20px;border-radius:22px}.auth-card-mark{width:58px;height:58px}.auth-card-copy{margin-bottom:23px}.auth-input .form-control{height:54px!important}.auth-options{font-size:11px}.auth-security{margin-top:22px;padding-top:20px}.top-actions .add-entry-top{width:42px}.home-dashboard-head{padding:18px}.home-dashboard-head h2{font-size:23px}}

@media print{body[data-signed="1"]{background:#fff!important;color:#111!important}body[data-signed="1"] .cardx,body[data-signed="1"] .table-card{color:#111!important;background:#fff!important;box-shadow:none!important}}

/* Wide-screen readability, consistent module surfaces and automatic card flow */
body[data-signed="1"] .content{width:100%;max-width:none;margin:0;padding-left:clamp(18px,2vw,42px);padding-right:clamp(18px,2vw,42px)}
body[data-signed="1"] .text-secondary,body[data-signed="1"] .text-muted,
body[data-signed="1"] .shopping-summary small,body[data-signed="1"] .shopping-summary em,
body[data-signed="1"] .shopping-copy span,body[data-signed="1"] .low-stock-row span,
body[data-signed="1"] .notification-open small,body[data-signed="1"] .notification-open em,
body[data-signed="1"] .report-group-head p,body[data-signed="1"] .account-currency-heading p,
body[data-signed="1"] .settings-manage-row span{color:#aebad0!important}
body[data-signed="1"] .dashboard-eyebrow{color:var(--th-gold)!important;letter-spacing:.12em}
body[data-signed="1"] .section-head>div>p,body[data-signed="1"] .shopping-card-head>div>span,
body[data-signed="1"] .account-toolbar p{color:#aebad0!important}

body[data-signed="1"] .shopping-summary article,
body[data-signed="1"] .shopping-list-card,body[data-signed="1"] .cart-card,
body[data-signed="1"] .low-card,body[data-signed="1"] .pantry-card,
body[data-signed="1"] .notification-hero,body[data-signed="1"] .notification-hero-count,
body[data-signed="1"] .reports-hero,body[data-signed="1"] .report-group,
body[data-signed="1"] .account-currency-section{
  color:var(--th-text)!important;border-color:var(--th-line)!important;
  background:linear-gradient(145deg,#14223f,#101d38)!important;box-shadow:var(--th-shadow)!important
}
body[data-signed="1"] .shopping-summary strong,body[data-signed="1"] .shopping-card-head h2,
body[data-signed="1"] .notification-hero h2,body[data-signed="1"] .notification-group-head h3,
body[data-signed="1"] .reports-hero h2,body[data-signed="1"] .report-group-head h3,
body[data-signed="1"] .report-link,body[data-signed="1"] .account-currency-heading h3{color:#f5f7ff!important}
body[data-signed="1"] .report-link{border-color:var(--th-line)!important;background:transparent!important}
body[data-signed="1"] .report-link:hover{color:#f0c97f!important;background:rgba(224,173,88,.07)!important}
body[data-signed="1"] .reports-hero,body[data-signed="1"] .notification-hero{
  background:linear-gradient(120deg,#172642,#101d38 72%,rgba(125,84,34,.35))!important
}
body[data-signed="1"] .settings-unit-grid>span,body[data-signed="1"] .catalog-selected,
body[data-signed="1"] .choose-product-icon{color:#e7ecf7!important;border-color:var(--th-line)!important;background:#172541!important}
body[data-signed="1"] .pantry-head{color:#b6c1d5!important;background:#0c1931!important}
body[data-signed="1"] .product-picture{background:#1a2946!important}
body[data-signed="1"] .shopping-list-search{border-color:var(--th-line)!important;background:#0c1931!important}
body[data-signed="1"] .shopping-list-search input{color:#edf2fb!important}
body[data-signed="1"] .shopping-actions button,body[data-signed="1"] .notification-actions button{background:#182744!important;color:#cbd4e4!important}

body[data-signed="1"] .home-kpi.amber,body[data-signed="1"] .cardx.th-gold-edge{border-top:2px solid rgba(224,173,88,.72)!important}
body[data-signed="1"] .shopping-summary article.amber>span,
body[data-signed="1"] .notification-icon.amber{color:#f1c979!important;background:rgba(224,173,88,.15)!important}
body[data-signed="1"] .bill-status.pending,body[data-signed="1"] .shopping-status.planned,
body[data-signed="1"] .budget-alert-chip{color:#f2cf91!important;background:rgba(224,173,88,.14)!important}

/* Major page panels use the Settings-page size and scroll internally. */
body[data-signed="1"] .th-scroll-card{height:330px!important;min-height:0!important;overflow:auto!important;scrollbar-width:thin;scrollbar-color:#465474 transparent}
body[data-signed="1"] .th-scroll-card>.section-head,
body[data-signed="1"] .th-scroll-card>.shopping-card-head,
body[data-signed="1"] .th-scroll-card>.notification-group-head,
body[data-signed="1"] .th-scroll-card>.report-group-head{position:sticky;top:0;z-index:4;background:#12203b;padding-top:2px}
body[data-signed="1"] .th-empty-card{order:99!important;opacity:.82}
body[data-signed="1"] .th-empty-card:after{content:"Available for future items";display:block;margin:12px;color:#806b45;font-size:10px;text-align:center}
body[data-signed="1"] .notification-grid,body[data-signed="1"] .report-group-grid,
body[data-signed="1"] .rent-compact-grid,body[data-signed="1"] .schedule-compact-grid,
body[data-signed="1"] .bill-compact-grid,body[data-signed="1"] .shopping-main-grid,
body[data-signed="1"] .pantry-workspace-grid{align-items:stretch}

/* Account groups remain dark; zero-balance cards are intentionally last but readable. */
body[data-signed="1"] .account-currency-grid .finance-account.balance-zero{color:#dce3f0!important;background:linear-gradient(145deg,#111f39,#0d1930)!important;opacity:.78}
body[data-signed="1"] .account-balance-heading small{color:#c4cde0!important;background:#172541!important}

@media(min-width:2100px){body[data-signed="1"] .content{padding-left:48px;padding-right:48px}.home-kpi-grid{grid-template-columns:repeat(6,minmax(190px,1fr))}}

/* August layout correction: predictable three-column modules */
body[data-signed="1"] .brand>span:last-child{display:flex!important;visibility:visible!important;opacity:1!important}
body[data-signed="1"] .brand strong{display:block!important;color:#fff!important;font-size:15px!important;line-height:1.2!important}
body[data-signed="1"] .brand small{display:block!important;color:#aeb9cd!important;font-size:9px!important;line-height:1.35!important}

body[data-signed="1"] .th-scroll-card>.section-head,
body[data-signed="1"] .th-scroll-card>.shopping-card-head,
body[data-signed="1"] .th-scroll-card>.notification-group-head,
body[data-signed="1"] .th-scroll-card>.report-group-head{position:static!important;background:transparent!important;padding-top:0!important}

body[data-signed="1"] .rent-compact-grid,
body[data-signed="1"] .schedule-compact-grid,
body[data-signed="1"] .bill-compact-grid,
body[data-signed="1"] .notification-grid,
body[data-signed="1"] .report-group-grid,
body[data-signed="1"] .shopping-main-grid,
body[data-signed="1"] .pantry-workspace-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
body[data-signed="1"] .shopping-main-grid>.shopping-list-card{grid-column:auto!important}
body[data-signed="1"] .shopping-card-head{align-items:flex-start!important}
body[data-signed="1"] .shopping-card-head>div:last-child{flex-wrap:wrap;justify-content:flex-end}
body[data-signed="1"] .shopping-card-head .complete-cart{width:auto!important;margin:0!important;white-space:nowrap}
body[data-signed="1"] .shopping-store{width:130px}

body[data-signed="1"] .schedule-directory-row>span,
body[data-signed="1"] .tenant-compact-row>span,
body[data-signed="1"] .finance-account-balance strong,
body[data-signed="1"] .low-stock-row span,
body[data-signed="1"] .low-stock-row button,
body[data-signed="1"] .pantry-row b,
body[data-signed="1"] .pantry-row em,
body[data-signed="1"] .pantry-history-row span,
body[data-signed="1"] .stock-action{color:#eaf0fb!important}
body[data-signed="1"] .schedule-due-row span,
body[data-signed="1"] .rent-due-row span,
body[data-signed="1"] .shopping-copy span{color:#aebbd1!important}
body[data-signed="1"] .low-stock-row em{color:#f4ce8c!important;background:rgba(224,173,88,.17)!important}
body[data-signed="1"] .low-stock-row button{color:#b7a7ff!important}
body[data-signed="1"] .pantry-row>em.good{color:#a8e8c4!important;background:rgba(85,201,139,.15)!important}
body[data-signed="1"] .pantry-row>em.low{color:#f4ce8c!important;background:rgba(224,173,88,.16)!important}

/* Accounts are one continuous USD-then-INR grid with no section separators. */
body[data-signed="1"] .account-card-grid.account-flat-layout{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:14px!important}
body[data-signed="1"] .account-flat-layout .finance-account{min-width:0;min-height:240px}
body[data-signed="1"] .account-flat-layout .finance-account.balance-positive{border-top:3px solid var(--th-green)!important}
body[data-signed="1"] .account-flat-layout .finance-account.balance-negative{border-top:3px solid var(--th-red)!important}
body[data-signed="1"] .account-flat-layout .finance-account.balance-zero{border-top:3px solid #65728a!important;opacity:.78}

/* Empty Settings managers always occupy the final grid positions. */
body[data-signed="1"] .settings-organized-grid>.settings-manager{order:0}
body[data-signed="1"] .settings-organized-grid>.settings-manager:has(.settings-empty),
body[data-signed="1"] .settings-organized-grid>.settings-manager:has(.empty){order:90}
body[data-signed="1"] .settings-organized-grid>.danger{order:99}
body[data-signed="1"] .settings-stats span{color:#d9e1ef!important;background:#172541!important;border:1px solid var(--th-line)!important}
body[data-signed="1"] .settings-stats strong{color:#f2cb84!important}

body[data-signed="1"] .account-flat-layout .finance-account,
body[data-signed="1"] .family-card-grid>.family-member-card,
body[data-signed="1"] .budget-card-grid>.budget-card{height:330px!important;min-height:330px!important;overflow:auto!important}
body[data-signed="1"] .module-goals>article.cardx:not(.module-hero){width:calc((100% - 28px)/3)!important;height:330px!important;overflow:auto!important}

/* Single-list modules use one third of the desktop row, leaving future columns free. */
body[data-signed="1"] .module-goals>article:not(.module-hero),
body[data-signed="1"] #view>.family-card-grid,
body[data-signed="1"] #view>.report-group-grid{max-width:none}

@media(max-width:1250px){
 body[data-signed="1"] .rent-compact-grid,body[data-signed="1"] .schedule-compact-grid,
 body[data-signed="1"] .bill-compact-grid,body[data-signed="1"] .notification-grid,
 body[data-signed="1"] .report-group-grid,body[data-signed="1"] .shopping-main-grid,
 body[data-signed="1"] .pantry-workspace-grid,body[data-signed="1"] .account-card-grid.account-flat-layout{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:760px){
 body[data-signed="1"] .rent-compact-grid,body[data-signed="1"] .schedule-compact-grid,
 body[data-signed="1"] .bill-compact-grid,body[data-signed="1"] .notification-grid,
 body[data-signed="1"] .report-group-grid,body[data-signed="1"] .shopping-main-grid,
 body[data-signed="1"] .pantry-workspace-grid,body[data-signed="1"] .account-card-grid.account-flat-layout{grid-template-columns:1fr!important}
}

/* Gold signature line on every module card except Accounts & Cards. */
body[data-signed="1"] .content:not(.page-accounts) article,
body[data-signed="1"] .content:not(.page-accounts) .cardx,
body[data-signed="1"] .content:not(.page-accounts) .shopping-summary article,
body[data-signed="1"] .content:not(.page-accounts) .module-stat,
body[data-signed="1"] .content:not(.page-accounts) .family-summary article,
body[data-signed="1"] .content:not(.page-accounts) .notification-hero,
body[data-signed="1"] .content:not(.page-accounts) .reports-hero{
 border-top:2px solid rgba(224,173,88,.78)!important
}
body[data-signed="1"] .modal-content,
body[data-signed="1"] .icon-popup-window{border-top:3px solid var(--th-gold)!important}
body[data-signed="1"] .catalog-search-results{border-top:2px solid rgba(224,173,88,.72)!important}

/* Module stat cards must stay dark and readable in the navy theme. */
body[data-signed="1"] .module-stat{
 color:var(--th-text)!important;border-color:var(--th-line)!important;
 background:linear-gradient(145deg,#14223f,#101d38)!important;box-shadow:var(--th-shadow)!important
}
body[data-signed="1"] .module-stat small{color:#aebad0!important}
body[data-signed="1"] .module-stat strong{color:#f5f7ff!important}

/* One scrollbar per panel: fixed shell, scrollable content area. */
body[data-signed="1"] .rent-compact-grid>.cardx,
body[data-signed="1"] .schedule-compact-grid>.cardx,
body[data-signed="1"] .bill-compact-grid>.cardx,
body[data-signed="1"] .shopping-main-grid>.cardx,
body[data-signed="1"] .pantry-workspace-grid>.cardx{overflow:hidden!important;display:flex!important;flex-direction:column!important}
body[data-signed="1"] .rent-due-card>#rentDue,
body[data-signed="1"] .tenant-card>.tenant-compact-list,
body[data-signed="1"] .schedule-compact-grid>.cardx>#recurringPending,
body[data-signed="1"] .schedule-compact-grid>.cardx>#subscriptionPending,
body[data-signed="1"] .schedule-compact-grid>.cardx>.schedule-directory,
body[data-signed="1"] .bill-compact-grid>.cardx>.bill-compact-list,
body[data-signed="1"] .shopping-list-card>#shoppingRows,
body[data-signed="1"] .low-card>.low-stock-list,
body[data-signed="1"] .pantry-card>.pantry-list-scroll,
body[data-signed="1"] .pantry-history-card>.pantry-history-list{flex:1 1 auto;min-height:0;max-height:none!important;overflow-y:auto!important;overflow-x:hidden}
body[data-signed="1"] .tenant-compact-list,
body[data-signed="1"] .schedule-directory,
body[data-signed="1"] .bill-compact-list{max-height:none!important}

/* Shopping & Pantry: compact controls and a cleaner one-third card layout. */
body[data-signed="1"] .page-shopping .shopping-summary article{min-height:88px;padding:13px 15px}
body[data-signed="1"] .page-shopping .shopping-summary article>span{width:40px;height:40px}
body[data-signed="1"] .page-shopping .shopping-summary strong{font-size:20px}
body[data-signed="1"] .page-shopping .shopping-card-head{min-height:76px;padding:12px 14px;gap:10px}
body[data-signed="1"] .page-shopping .shopping-store-title{align-items:flex-start}
body[data-signed="1"] .page-shopping .shopping-store-title h2{line-height:1.15}
body[data-signed="1"] .page-shopping .shopping-card-head .btn,
body[data-signed="1"] .page-shopping .shopping-card-head .form-select{min-height:34px;height:34px;border-radius:9px;font-size:11px;padding-top:4px;padding-bottom:4px}
body[data-signed="1"] .page-shopping .shopping-card-head .btn{padding-left:9px;padding-right:9px;gap:4px}
body[data-signed="1"] .page-shopping .shopping-card-head .btn svg{width:14px;height:14px}
body[data-signed="1"] .page-shopping .shopping-store{width:105px}
body[data-signed="1"] .page-shopping .shopping-list-search{height:36px;margin:10px 13px;padding:0 10px}
body[data-signed="1"] .page-shopping .shopping-row{min-height:56px;padding:7px 13px;grid-template-columns:34px 23px minmax(90px,1fr) auto auto;gap:7px}
body[data-signed="1"] .page-shopping .shopping-row .product-picture{width:33px;height:33px}
body[data-signed="1"] .page-shopping .shopping-copy strong{font-size:12px}
body[data-signed="1"] .page-shopping .shopping-copy span{font-size:10px}
body[data-signed="1"] .page-shopping .shopping-actions button{width:28px;height:28px}
body[data-signed="1"] .page-shopping .shopping-status{font-size:9px;padding:4px 6px}

/* Dark product autocomplete and selected-product preview. */
body[data-signed="1"] .catalog-search-results{border-color:rgba(224,173,88,.38)!important;background:#0d1a33!important;box-shadow:0 20px 45px rgba(0,0,0,.45)!important}
body[data-signed="1"] .catalog-search-results button{color:#edf2fb!important;background:#13213e!important;border:1px solid transparent!important}
body[data-signed="1"] .catalog-search-results button+button{margin-top:4px}
body[data-signed="1"] .catalog-search-results button:hover,
body[data-signed="1"] .catalog-search-results button:focus{color:#fff!important;border-color:rgba(224,173,88,.46)!important;background:#1a2a49!important}
body[data-signed="1"] .catalog-search-results button strong{color:#fff!important}
body[data-signed="1"] .catalog-search-results button small,
body[data-signed="1"] .catalog-search-hint{color:#b7c2d7!important}
body[data-signed="1"] .catalog-selected{color:#edf2fb!important;border-color:rgba(85,201,139,.3)!important;background:#142640!important}
body[data-signed="1"] .selected-store-note{color:#e5dcff!important;border:1px solid rgba(128,102,242,.25)!important;background:#172541!important}

@media(max-width:1550px){
 body[data-signed="1"] .page-shopping .shopping-card-head>div:last-child{width:100%;justify-content:flex-start}
 body[data-signed="1"] .page-shopping .shopping-card-head{flex-direction:column}
}

/* Unified Transactions ledger. */
body[data-signed="1"] .transaction-type.transfer{color:#c2b8ff;background:rgba(128,102,242,.16)}
body[data-signed="1"] .transaction-amount.transfer.in{color:var(--th-green)!important}
body[data-signed="1"] .transaction-amount.transfer.out{color:#c2b8ff!important}
body[data-signed="1"] .tx-transfer-icon{background:rgba(128,102,242,.13);color:#c2b8ff;box-shadow:inset 0 0 0 1px var(--th-line)}
body[data-signed="1"] .transfer-ledger-row{background:linear-gradient(90deg,rgba(128,102,242,.045),transparent)}
