@font-face{font-family:Poppins;src:url("/fonts/poppins-400.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:Poppins;src:url("/fonts/poppins-600.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:Poppins;src:url("/fonts/poppins-700.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}

:root{font-family:Poppins,system-ui,-apple-system,sans-serif;color:#222036;background:#f8f7fc;--ink:#222036;--muted:#625e76;--border:#e8e4f1;--purple:#5a3ab7;--soft:#efe9fd;--white:#fff;--side:236px;font-size:16px}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}[hidden]{display:none!important}a{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #7654d2;outline-offset:3px}
.sidebar{width:var(--side);position:fixed;inset:0 auto 0 0;border-right:1px solid var(--border);background:var(--white);display:flex;flex-direction:column;padding:30px 19px 23px;z-index:2}
.brand{font-family:Inter,system-ui,-apple-system,sans-serif;display:flex;align-items:center;gap:11px;font-weight:800;font-size:1.62rem;letter-spacing:-.085em;text-decoration:none;padding:0 10px}.brand-period{color:var(--purple);margin-left:-9px}.brand-icon{display:block;flex:none;width:39px;height:39px}
nav{display:grid;gap:8px;margin-top:51px}nav a{text-decoration:none;display:flex;align-items:center;gap:11px;border:0;border-radius:10px;padding:11px 12px;text-align:left;background:transparent;color:var(--muted);font-size:.925rem;font-weight:600;min-height:44px}nav a:hover,.secondary:hover{background:#f4f0fc}nav a[aria-current]{color:#5031aa;background:#eee8fd}.sidebar-foot{margin-top:auto;display:flex;align-items:center;gap:10px;padding:12px 7px;border-top:1px solid var(--border);font-size:.85rem}.sidebar-foot small{display:block;color:var(--muted);margin-top:3px;font-size:.78rem}.foot-icon{background:#f0ebfb;color:var(--purple);padding:8px;border-radius:10px}
svg{width:19px;height:19px;display:block;flex:none}main{margin-left:var(--side)}.top{height:69px;display:flex;align-items:center;justify-content:space-between;padding:0 max(30px,calc((100% - 1128px)/2));background:#fff;border-bottom:1px solid var(--border);color:#4d465e;font-weight:600;font-size:.875rem;gap:12px;white-space:nowrap}#account-status{border:1px solid #d0eadd;background:#e6f5ee;color:#276550;padding:6px 9px;border-radius:99px;font-size:.82rem}
.workspace{max-width:1192px;margin:0 auto;padding:32px 32px 72px}.hero{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;min-height:258px;padding:36px clamp(22px,4.2vw,56px);border-radius:21px;background:linear-gradient(108deg,#eae1ff,#f1eaff 62%,#e5d9ff);border:1px solid #e7dcfd}.hero-copy{position:relative;z-index:1;max-width:74%}h1,h2,h3,p{margin:0}h1{font-size:clamp(2rem,4vw,3.8rem);letter-spacing:-.045em;line-height:1.08;font-weight:700;color:#271849}h2{font-size:1.43rem;letter-spacing:-.04em}h3{font-size:1.06rem;letter-spacing:-.015em}.hero p{color:#55476c;margin:13px 0 23px;line-height:1.5}
.primary,.secondary,.link-button,.close,.filters button{display:inline-flex;justify-content:center;align-items:center;gap:7px;border-radius:10px;padding:10px 14px;min-height:42px;font-weight:600;font-size:.9rem}.primary{background:#5a3ab7;color:white;border:1px solid #5a3ab7}.primary:hover{background:#4b2d9f}.secondary{background:#fff;border:1px solid var(--border);color:#433661}.link-button{background:transparent;border:0;color:#5834ad;padding-left:0}.close svg{width:18px;height:18px}.close{background:transparent;border:0;color:var(--muted);font-size:1.5rem;line-height:1;padding:3px 10px}
.hero-art{position:absolute;inset:0 0 0 auto;width:42%;color:#6542bf;pointer-events:none}.orbit{position:absolute;border:1px solid #bca8ed80;border-radius:50%;width:360px;height:360px;right:-35px;top:-44px}.orbit.b{width:285px;height:285px;right:3px;top:-7px}.orbit.c{width:208px;height:208px;right:42px;top:31px}.tile{position:absolute;display:grid;place-items:center;border-radius:23px;box-shadow:0 12px 32px #5233a62b}.tile svg{width:48%;height:48%}.tile.back{width:104px;height:104px;top:41px;right:44px;background:#f7f2ff;transform:rotate(12deg)}.tile.front{width:117px;height:117px;top:75px;right:104px;background:#7451d2;color:white;transform:rotate(-13deg)}.tile.tick{width:54px;height:54px;top:158px;right:49px;background:#fff;transform:rotate(12deg);border-radius:16px}
.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:19px 0 40px}.metric{background:white;border:1px solid var(--border);border-radius:15px;display:flex;align-items:center;gap:13px;padding:18px 17px;min-width:0}.metric-icon,.activity-icon{display:grid;place-items:center;flex:none;width:43px;height:43px;border-radius:12px;color:#6540be;background:#eee7fd}.metric:nth-child(2) .metric-icon{color:#81531b;background:#fff0d7}.metric:nth-child(3) .metric-icon{color:#286951;background:#e3f6ed}.metric-value{font-size:1.27rem;font-weight:700;letter-spacing:-.035em;display:block}.metric-label{font-size:.86rem;color:var(--muted);display:block;margin-bottom:3px}
.filters{display:flex;width:fit-content;max-width:100%;min-inline-size:0;margin:0 0 12px;border:0;flex-wrap:wrap;gap:4px;padding:3px;background:#eeeaf5;border-radius:11px}.filters button{border:0;background:none;color:#5d5570;padding:6px 10px;min-height:34px;font-size:.84rem;border-radius:8px}.filters button[aria-pressed=true]{background:#fff;color:#4c3295;box-shadow:0 1px 3px #33165415}
.activity{border:1px solid var(--border);background:#fff;border-radius:15px;margin-bottom:11px}.activity summary{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:22px;padding:17px;cursor:pointer;list-style:none}.activity summary::-webkit-details-marker{display:none}.activity-name{display:flex;align-items:center;gap:13px;min-width:0}.activity-name strong{display:block;overflow-wrap:anywhere}.activity-name small,.sum small{display:block;color:var(--muted);font-size:.84rem;margin-top:4px}.sum{text-align:right;white-space:nowrap}.sum strong{display:block}.activity:nth-child(3n+2) .activity-icon{color:#2c5d9d;background:#e6effe}.activity:nth-child(3n) .activity-icon{color:#286951;background:#dff3eb}.summary-end{display:flex;align-items:center;gap:14px}.chevron{color:#6d6083}.activity[open] .chevron{transform:rotate(180deg)}.status{display:inline-flex;align-items:center;width:max-content;max-width:100%;padding:5px 9px;border-radius:99px;background:#f2eff6;color:#5a5268;font-size:.805rem;font-weight:600;white-space:normal;overflow-wrap:anywhere}.status.wait{background:#fff0d7;color:#79511b}.status.confirmed{background:#e3f6ed;color:#276550}.status.disputed,.status.late{background:#fce9ed;color:#8b3749}
.activity-body{padding:0 17px 17px;border-top:1px solid var(--border)}.person{padding-top:15px}.person-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.person p,.empty{color:var(--muted);line-height:1.5}.empty{background:#fff;border:1px dashed #dbd2ed;border-radius:15px;padding:25px}.due-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #f1edf7}.due-main,.due-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.due-main time{white-space:nowrap}.due-main small{display:block;color:var(--muted);font-size:.83rem}.due-actions .primary,.due-actions .secondary{min-height:35px;padding:6px 10px}
dialog{border:1px solid var(--border);border-radius:18px;padding:24px;width:min(562px,calc(100% - 24px));max-height:calc(100% - 30px);color:var(--ink);box-shadow:0 30px 80px #23104555}dialog::backdrop{background:#21163774}.dialog-head,.dialog-actions{display:flex;justify-content:space-between;align-items:center;gap:10px}.dialog-head{margin-bottom:16px}.dialog-actions{justify-content:flex-end;margin-top:15px;flex-wrap:wrap}dialog p{color:var(--muted);line-height:1.5}form label{display:grid;align-content:start;gap:5px;margin-bottom:12px;font-size:.9rem;font-weight:600}input,select{width:100%;min-width:0;border:1px solid #dcd5e9;border-radius:9px;padding:9px 11px;background:white;color:var(--ink);min-height:42px}select{appearance:none;padding-right:30px;background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%23625e76' stroke-width='1.8'/%3E%3C/svg%3E") right 9px center/17px no-repeat}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:11px}fieldset{border:0;border-top:1px solid var(--border);margin:7px 0 0;padding:8px 0 0}legend{font-weight:700;padding-right:6px}.invite-input,.share-row{display:flex;align-items:center;gap:6px;margin-top:8px}.invite-input label,.share-row label{flex:1;margin-bottom:0;min-width:0}.share-row{align-items:end}.share-row label{display:grid;gap:4px;font-size:.9rem}.form-message{color:#8b3749;min-height:0}.form-message:empty{display:none}#toast{position:fixed;inset:auto 18px 18px auto;max-width:calc(100% - 36px);padding:12px 16px;background:#2d204a;color:white;border-radius:10px;z-index:5;box-shadow:0 6px 22px #28174935}
@media(max-width:1000px){:root{--side:190px}.sidebar{padding-inline:12px}.workspace{padding-inline:22px}.status{font-size:.76rem}.activity summary{gap:12px}.tile.back{right:23px}.tile.front{right:78px}.tile.tick{right:26px}}
@media(max-width:740px){:root{--side:0px}.sidebar{position:static;width:auto;flex-direction:row;align-items:center;justify-content:space-between;border-right:0;border-bottom:1px solid var(--border);padding:10px 13px;gap:6px}.brand{font-size:1.38rem;padding:0;gap:6px}.brand-period{margin-left:-5px}.brand-icon{width:32px;height:32px;border-radius:9px}nav{display:flex;margin:0;gap:3px}nav a{padding:7px 8px;font-size:.82rem;min-height:37px}nav svg,.sidebar-foot,.top #breadcrumb{display:none}.top{height:auto;justify-content:flex-end;padding:0 14px;border:0;background:transparent}.top #account-status{margin-top:10px}.workspace{padding:14px 13px 40px}.hero{min-height:219px;padding:20px 16px}.hero-copy{max-width:76%}.hero p{font-size:.93rem}.hero-art{width:37%;transform:scale(.65);transform-origin:right center}.tile.back{right:4px}.tile.front{right:38px}.tile.tick{right:10px}.metrics{gap:6px;margin:12px 0 25px}.metric{padding:10px 7px;gap:5px;display:grid;align-content:start}.metric-icon{width:29px;height:29px;border-radius:8px}.metric-icon svg{width:16px;height:16px}.metric-label{font-size:.78rem}.metric-value{font-size:.95rem}.activity summary{padding:12px;gap:7px;grid-template-columns:1fr auto}.summary-end{grid-column:1/-1;justify-content:space-between;padding-left:44px}.activity-icon{width:34px;height:34px;border-radius:9px}.activity-name{gap:9px}.activity-name small,.sum small{font-size:.79rem}.activity-body{padding-inline:12px}.due-row{align-items:flex-start;flex-direction:column}.due-actions{justify-content:flex-start}}
@media(max-width:370px){nav a{font-size:.74rem;padding-inline:5px}.hero-art{opacity:.53}.hero-copy{max-width:90%}.form-grid{grid-template-columns:1fr;gap:0}}

.install-banner{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:11px;padding:10px 12px;margin-bottom:12px;border:1px solid var(--border);border-radius:14px;background:var(--white)}
.install-banner img{border-radius:12px}
.install-banner h2{font-size:1rem;letter-spacing:-.02em}
.install-copy p{margin-top:2px;color:var(--muted);font-size:.85rem;line-height:1.35}
#install-status{margin-top:10px}
@media(max-width:520px){.hero-copy{max-width:100%}.hero h1{font-size:clamp(1.75rem,7.1vw,2rem)}.hero-art{display:none}.install-banner{grid-template-columns:auto minmax(0,1fr) auto;gap:8px}.install-banner img{width:35px;height:35px}.install-banner #install-button{grid-column:2;grid-row:2;justify-self:start;min-height:34px;padding:5px 11px}.install-banner #install-dismiss{grid-column:3;grid-row:1}.install-copy p{font-size:.81rem}}

.top-actions{display:flex;align-items:center;gap:10px}
.notification-button{min-height:35px;padding:6px 10px}
.notification-button[aria-pressed=true]{background:#eee8fd;color:#5031aa;border-color:#e2d7fb}
@media(max-width:740px){.top-actions #account-status{margin-top:0}.notification-button{padding:6px 8px}}

.attachment-field{margin-top:16px}
.attachment-field label{display:block;margin-bottom:6px;font-size:.9rem;font-weight:600}
.attachment-field input{padding:6px}
.attachment-field input::file-selector-button{margin-right:8px;padding:6px 9px;border:0;border-radius:6px;background:var(--soft);color:#5031aa;font:inherit;cursor:pointer}
#attachment-note{margin-top:5px;font-size:.83rem}
.due-info{min-width:0;max-width:100%}
.receipt-link {
  display: inline-grid; grid-template-columns: 20px minmax(0, 1fr);
  align-content: center; align-items: center; column-gap: 7px;
  min-height: 44px; max-width: 100%; color: var(--purple);
  text-decoration: none; overflow-wrap: anywhere;
}
.receipt-link svg { width: 18px; height: 18px; }
.receipt-link span { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.receipt-link small { grid-column: 2; color: var(--muted); font-size: .8rem; }
#receipt-message { overflow-wrap: anywhere; }
#receipt-dialog { width: min(760px, calc(100% - 24px)); }
#receipt-filename { overflow-wrap: anywhere; margin-bottom: 10px; }
.receipt-preview img, .receipt-preview canvas { display: block; margin: auto; max-width: 100%; height: auto; }
#receipt-pages { display: flex; align-items: center; justify-content: space-between; margin: 8px 0; gap: 6px; }
#receipt-pages button, #receipt-save { min-height: 44px; }
#receipt-save { display: inline-flex; align-items: center; color: var(--purple); }

.admin-link,.admin-header a.secondary{text-decoration:none}
.top-actions{flex-wrap:wrap;justify-content:flex-end}
#admin-link{min-height:35px;padding:6px 10px}
.admin-body main{margin-left:auto}
.admin-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px max(16px,calc((100% - 1100px)/2));background:#fff;border-bottom:1px solid var(--border)}
.admin-header .brand{padding:0}
.admin-main{margin:0 auto;max-width:1132px;padding:28px 16px 55px}
.admin-intro{color:var(--muted);margin:9px 0 24px}
.admin-section{margin-bottom:14px;padding:20px;background:#fff;border:1px solid var(--border);border-radius:16px;min-width:0}
.admin-section h2{margin-bottom:12px}
.admin-section p{color:var(--muted);line-height:1.45;margin:0 0 10px}
.admin-section [role=status]:empty{display:none}
.admin-section [role=status]{margin-top:8px}
.admin-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.admin-metric{display:flex;align-items:center;justify-content:space-between;gap:7px;background:#f8f6fc;border-radius:9px;padding:10px 12px;margin-bottom:6px;color:var(--muted);font-size:.9rem}
.admin-metric strong{color:var(--ink);font-size:1.02rem}
.admin-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.check-label{display:flex;align-items:center;gap:9px}
.check-label input{width:18px;height:18px;min-height:0}
.coupon-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;gap:8px;align-items:center}
.coupon-fields label{margin-bottom:0}
.coupon-fields button{align-self:end}
.coupon-table-wrap{overflow-x:auto;margin-top:14px}
#coupon-table{width:100%;border-collapse:collapse;min-width:675px;font-size:.9rem}
#coupon-table td,#coupon-table th{border-top:1px solid var(--border);text-align:left;padding:9px 6px}
#coupon-table td:last-child button{margin-right:5px}
@media(max-width:650px){
 .admin-columns{grid-template-columns:1fr}
 .admin-metrics,.coupon-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 .admin-section{padding:14px}
 .top-actions{gap:6px}
}

.metrics-heading,.metrics-group-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.metrics-heading{margin-bottom:10px}
.metrics-heading h2{margin:0 0 4px}
.metrics-heading #metrics-stamp{margin:0;font-size:.86rem}
.metrics-group{margin-top:15px;min-width:0}
.metrics-group h3{margin-bottom:7px}
.metrics-group-heading{margin-bottom:6px}
.metrics-group-heading h3{margin:0}
.metrics-group .admin-metrics+p{font-size:.86rem;margin:4px 0 0}
.metrics-filter{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.86rem;flex-wrap:wrap}
.metrics-filter select{width:auto;min-height:35px;padding-top:5px;padding-bottom:5px}
#activity-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
#repayment-metrics .admin-metric:first-child{background:#fce9ed}
.login-page{max-width:34rem;margin:12vh auto 0;padding:0 1.25rem}
.login-page .brand{width:max-content;padding:0;margin-bottom:2rem}
.login-page p{color:var(--muted);line-height:1.6}

#create-recap:not(:empty) {
  display: block;
  background: #f3effa;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 8px;
  font-size: .9rem;
  color: var(--ink);
}
#create-recap:empty { display: none; }
.summary-end, .due-info, .due-main > span { min-width: 0; max-width: 100%; }
#confirm-copy, #create-recap, .person-head h3, .activity-name small { overflow-wrap: anywhere; }

.login-body { min-height: 100vh; display: grid; align-items: center; background: #f7f5fc; }
.login-page .secondary { margin-top: 10px; }
.login-page output { display: block; margin-top: 12px; }
.push-prompt { margin-bottom: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: white; }
.push-prompt h2 { font-size: 1.05rem; }
.push-prompt p { margin: 5px 0 12px; }
.push-prompt div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.due-row:focus { outline: 2px solid #6748c7; outline-offset: 1px; border-radius: 6px; }

@media (min-width: 760px) {
  #create-dialog { width: min(720px, calc(100vw - 64px)); }
  #invite-dialog, #confirm-dialog { width: min(680px, calc(100vw - 64px)); padding: 28px 32px; }
}
#create-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; align-items: end; }
#create-form label, #invite-form label { min-width: 0; }
#create-form :is(input:not([type=radio],[type=checkbox]),select), #invite-form :is(input,select) {
  height: 46px; box-sizing: border-box; font: inherit; font-weight: 400;
}
#create-dialog { padding: 0; overflow: hidden; }
#create-form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); }
#create-form .dialog-head, #create-fields, #create-footer { padding-inline: clamp(16px, 4vw, 28px); }
#create-form .dialog-head { margin: 0; padding-block: 12px 8px; }
#create-fields { min-height: 0; overflow: auto; padding-block: 4px 18px; scroll-padding-block: 6px; }
#create-footer { border-top: 1px solid var(--border); padding-block: 10px 12px; }
#create-footer .dialog-actions { margin-top: 0; }
#create-footer .form-message:not(:empty) { margin-bottom: 8px; }
#document-field input[type=file] { height: auto; }
#document-field small { font-weight: 400; color: var(--muted); }
#amount-hint { display: block; margin: -6px 0 14px; color: var(--muted); }
.incoming { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 18px; margin: 18px 0; }
.incoming-entry, .share-controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.incoming-entry + .incoming-entry { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.incoming-entry p { margin: 3px 0; }
.share-controls { justify-content: flex-start; margin: 12px 0; }
.share-controls a { text-decoration: none; }
#share-links input { margin-top: 6px; }
.metric-value .currency-total { display: block; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  #create-form .form-grid:not(.schedule-fields) { grid-template-columns: minmax(0, 1fr); }
  #create-form .schedule-fields { gap: 0 10px; }
  #create-form :is(input:not([type=radio],[type=checkbox]),select) { font-size: 1rem; }
  #create-form { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
}

.detail-title { color: var(--ink); font-weight: 700; text-decoration-thickness: 1px; text-decoration-color: #cec3ef; text-underline-offset: 3px; }
.detail-title:hover { color: var(--purple); }

.detail-page { display: grid; gap: 18px; overflow-wrap: anywhere; }
.detail-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 24px; background: #eee8fd; border-radius: 16px; }
.detail-heading h1 { font-size: clamp(1.5rem, 3vw, 2.3rem); margin: 0; }
.detail-heading p { margin: 6px 0 0; }
.detail-heading .activity-viewer-role { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; margin-top: 12px; color: #433661; }
.activity-viewer-role span { font-size: .83rem; }
.activity-viewer-role strong { color: var(--ink); }
.detail-columns { display: grid; grid-template-columns: minmax(230px, 2fr) minmax(0, 3fr); align-items: start; gap: 18px; }
.detail-panel { min-width: 0; background: white; border: 1px solid var(--border); border-radius: 15px; padding: 20px; }
.detail-panel h2 { font-size: 1.18rem; margin: 0 0 12px; }
.detail-panel small, .event-list time { display: block; color: var(--muted); font-size: .83rem; }
.member-list, .event-list { margin: 0; padding: 0; list-style: none; }
.member-list li, .event-list li { display: flex; gap: 10px; align-items: baseline; padding-block: 11px; }
.member-list li { justify-content: space-between; flex-wrap: wrap; }
.member-list li + li, .event-list li + li { border-top: 1px solid var(--border); }
.invite-grant, form .invite-grant { display: inline-flex; align-items: center; gap: 7px; font-size: .83rem; cursor: pointer; }
.invite-grant input { width: 18px; min-height: 18px; height: 18px; accent-color: var(--purple); }
.event-list li { align-items: flex-start; }
.event-list b { margin-left: auto; white-space: nowrap; font-size: .85rem; }
.event-list .timeline-mark { color: var(--purple); }
.history-pages { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 820px) {
  .detail-columns { grid-template-columns: minmax(0,1fr); }
  .detail-panel, .detail-heading { padding: 16px; }
}
#invite-form .invite-grant input { width:18px; height:18px; min-height:18px; }

a.metric { text-decoration: none; color: var(--purple); border-color: #d9cdf4; }
a.metric:hover { background: #f4f0fc; }
a.metric .metric-label { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#confirmations { scroll-margin-top: 12px; }
#redeclarations { margin-top: 14px; }
#metrics { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:14px; }
#overview-activities { display: inline-block; margin-top: 8px; color: var(--purple); font-weight: 600; }
.activity-index-heading { min-height:0; margin-bottom:16px; padding:0; background:transparent; border:0; border-radius:0; overflow:visible; }
.activity-index-heading .hero-copy { width:100%; max-width:100%; display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.activity-index-heading h1 { font-size:clamp(1.8rem, 3vw, 2.5rem); }
.activity-index-heading .hero-art { display: none; }
:is(#confirmation-list, #redeclaration-list) { margin: 0; padding: 0; list-style: none; }
:is(#confirmation-list, #redeclaration-list) li + li { border-top: 1px solid var(--border); }
.operation-link {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: baseline; gap: 3px 8px; padding: 10px 0; min-height: 44px;
  color: var(--ink); text-decoration: none;
}
.operation-link strong { color: var(--purple); overflow-wrap: anywhere; }
.operation-link:hover strong { text-decoration: underline; }
.operation-link b, .review-payment .due-main > strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.operation-link svg { width: 18px; height: 18px; align-self: start; transform: rotate(-90deg); color: var(--purple); }
.operation-link small { grid-column: 1 / -1; overflow-wrap: anywhere; }
#confirmation-list .receipt-link { margin-bottom: 8px; }
.review-payment .due-info { flex: 1; }
.review-payment .due-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px; }
.review-payment .due-main > strong { grid-column: 2; grid-row: 1; }
.review-payment .due-main > span { grid-column: 1 / -1; }
.review-payment .declaration-credit { margin-top: 4px; overflow-wrap: anywhere; }
.review-payment .due-actions button { min-height: 44px; }
@media (max-width: 740px) {
  .review-payment { align-items: stretch; }
  .review-payment .due-actions { display: grid; grid-template-columns: 1fr 1fr; }
}
#dispute-field { display: grid; gap: 5px; margin-top: 12px; }
#dispute-field label { font-size: .9rem; font-weight: 600; }
#dispute-hint { color: var(--muted); }
#dispute-reason { width: 100%; padding: 8px 10px; color: var(--ink); font: inherit; border: 1px solid #dcd5e9; border-radius: 9px; resize: vertical; }
#dispute-reason:focus-visible { outline: 3px solid #7654d2; outline-offset: 2px; }
.dispute-note { margin-top: 6px; color: #684152; font-size: .875rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.dispute-note strong { display: block; }
.membership-notice { flex-basis: 100%; padding: 12px; border-radius: 10px; background: #fff6e7; color: #674315; }
.membership-notice p { margin-top: 4px; }
.member-invitations p { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.invitation-schedule { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #f4f0fc; }
.incoming-entry p.invitation-schedule { margin-top: 8px; }

html { overscroll-behavior-y: contain; }
#pull-status { position:fixed; z-index:20; top:1rem; left:50%; transform:translateX(-50%); background:#332466; color:white; padding:.65rem 1rem; border-radius:2rem; white-space:nowrap; pointer-events:none; }
#revision-dialog { width:min(36rem,calc(100% - 2rem)); }
#revision-dialog fieldset { border:0; padding:0; margin:0; display:grid; gap:.75rem; min-width:0; }
#revision-dialog fieldset[hidden] { display:none; }
#revision-dialog output { display:block; padding-block:1rem; }
.revision-panel details { padding-block:.45rem; }
.revision-panel summary { cursor:pointer; }
.revision-actions { display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.8rem; }
.revision-rows { margin-block:.35rem; }

.preview-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; column-gap:1rem; }
.preview-head h2 { margin:0; }
.preview-head a { display:inline-flex; align-items:center; min-height:44px; font-weight:600; color:var(--purple); }
#preview-list, #revision-inbox ul { list-style:none; padding:0; margin:0; }
#preview-list li + li, #revision-inbox li + li { border-top:1px solid var(--border); }
.preview-link, #revision-inbox a { display:flex; align-items:center; gap:.65rem; min-height:48px; padding:.75rem 0; text-decoration:none; }
.preview-link > span:first-child, #revision-inbox a > span { flex:1; min-width:0; overflow-wrap:anywhere; }
.preview-link small, #revision-inbox small { display:block; color:var(--muted); margin-top:.15rem; }
.preview-link svg, #revision-inbox svg { transform:rotate(-90deg); flex:none; color:var(--purple); }
.preview-link:hover strong, #revision-inbox a:hover strong { text-decoration:underline; }
.next-payment { border-color:#cbbcf2; }
.due-actions [data-action=declare], .revision-actions button { min-height:44px; }
.due-actions .declare-other { border-color:#ac96d0; color:var(--purple); }
.revision-terms { display:grid; gap:.3rem; padding:.85rem 1rem; background:#f6f2fc; border-radius:10px; overflow-wrap:anywhere; }
.revision-terms > strong { font-size:1.05rem; }
.revision-terms small { color:var(--muted); }
.revision-panel summary, #revision-dialog summary { padding-block:.45rem; cursor:pointer; }
.revision-archive { border-top:1px solid var(--border); margin-top:.75rem; }
.revision-archive > details { margin-left:.75rem; }
.comparison-columns { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap:.65rem; }
.comparison-columns h4 { margin:.6rem 0; }
@media(max-width:520px) {
  .next-payment .due-actions, .next-payment .due-actions button { width:100%; }
  .preview-link { display:grid; grid-template-columns:1fr auto; gap:.25rem .6rem; }
  .preview-link .status { grid-column:1; justify-self:start; }
  .preview-link svg { grid-column:2; grid-row:1 / span 2; }
}

#overview-empty.quiet-empty { padding:.25rem 0; background:transparent; border:0; }
#overview-empty.quiet-empty p { margin:.5rem 0; }

#app-update { grid-template-columns:minmax(0,1fr) auto; }
#update-now { min-height:44px; white-space:nowrap; }
@media (max-width:520px) {
  #app-update { grid-template-columns:minmax(0,1fr); }
  #update-now { width:100%; }
}

.language-choice { width:auto; min-height:42px; max-width:9rem; padding:.4rem .5rem; border:1px solid var(--border); border-radius:10px; background:white; color:var(--ink); font:inherit; }
.login-page .language-choice { justify-self:start; }
.admin-header .language-choice { margin-inline-start:auto; }

#profile-menu {position:relative}
#profile-menu summary {display:flex;align-items:center;gap:.45rem;min-height:44px;cursor:pointer;list-style:none}
#profile-menu summary::-webkit-details-marker {display:none}
#profile-menu[open] summary [data-icon=chevron] {transform:rotate(180deg)}
.profile-dropdown {position:absolute;z-index:12;right:0;top:calc(100% + 6px);width:min(18rem,90vw);padding:6px;background:white;border:1px solid var(--border);border-radius:14px;box-shadow:0 10px 30px #29223924}
.profile-dropdown a,.profile-dropdown button,.profile-dropdown label {width:100%;display:flex;gap:10px;align-items:center;min-height:44px;padding:8px 12px;background:transparent;border:0;border-radius:8px;color:inherit;text-decoration:none;text-align:left;font:inherit}
.profile-dropdown a:hover,.profile-dropdown button:hover {background:#f4f0fc}
.profile-dropdown label {justify-content:space-between}
.profile-dropdown #sign-out {border-top:1px solid var(--border);border-radius:0}
.profile-dropdown [aria-current=page] {color:var(--purple);font-weight:600}
#profile-page {display:none;max-width:44rem}
body.profile-view {min-height:100dvh;display:flex;flex-direction:column}
.profile-view main,.profile-view .workspace,.profile-view #profile-page {display:flex;flex:1;flex-direction:column}
.profile-view .workspace {width:100%;padding-bottom:max(1rem,env(safe-area-inset-bottom))}
.profile-footer {margin-top:auto;padding-top:1.5rem;color:var(--muted);font-size:.8125rem;text-align:center}
.profile-view #activity-content {display:none}
#profile-page h1 {margin:0 0 1rem;font-size:clamp(1.7rem,4vw,2.5rem)}
.profile-facts {display:grid;grid-template-columns:minmax(5rem,auto) minmax(0,1fr);align-items:baseline;gap:.7rem 1rem;margin:1rem 0 0}
.profile-facts dt,#profile-page p {color:var(--muted)}
.profile-facts dd {margin:0;overflow-wrap:anywhere;text-align:right;font-weight:600}
#profile-page p {margin:.5rem 0 1rem}

.app-header .top {margin-inline-start:var(--side)}
.profile-trigger {display:inline-flex;align-items:center;gap:.45rem}
.mobile-trigger,.mobile-pages {display:none}
@media (max-width:740px) {
  .app-header {display:flex;justify-content:space-between;align-items:center;padding:8px 14px;background:white;border-bottom:1px solid var(--border)}
  .app-header .sidebar,.app-header .top {padding:0;border:0}
  .app-header .sidebar nav,.profile-trigger {display:none}
  .mobile-trigger {display:inline-flex;align-items:center;gap:.45rem}
  .mobile-pages {display:block}
  .profile-dropdown {white-space:normal;max-height:calc(100dvh - 70px);overflow-y:auto}
}

.schedule-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.schedule-pagination span { margin-inline-end: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.schedule-pagination button { min-height: 44px; }
.schedule-pagination button:disabled { opacity: .5; cursor: default; }

.declaration-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
  align-items: center;
  gap: 16px 24px;
  margin-block: 10px;
  padding: clamp(12px, 2vw, 20px);
  border: 1px solid #e1d9ef;
  border-radius: 14px;
  background: #faf8fd;
}
.declaration-card:last-child { margin-bottom: 0; }
.declaration-facts, .declaration-controls { display: grid; min-width: 0; gap: 8px; }
.declaration-amount { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 2px; }
.declaration-amount strong { font-size: clamp(1.4rem, 2.3vw, 1.75rem); line-height: 1.25; font-variant-numeric: tabular-nums; }
.declaration-date, .declaration-byline { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; }
.declaration-card :is(.declaration-date, .declaration-byline) svg { width: 16px; height: 16px; flex: none; margin-top: .13em; color: var(--muted); }
.declaration-card .declaration-credit { margin: 0; font-size: inherit; }
.declaration-controls { gap: 10px; }
.declaration-card .receipt-link {
  grid-template-columns: 20px minmax(0, 1fr);
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: white;
  text-decoration: none;
}
.declaration-card .receipt-link span { text-decoration: none; }
.declaration-card .receipt-link:hover span { text-decoration: underline; }
.declaration-card .due-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.declaration-card .due-actions .secondary { background: white; border-color: #d5cbe7; color: var(--ink); }
@media (max-width: 740px) {
  .declaration-card { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

#page-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  border-radius: 8px; padding-inline: 4px 10px; color: var(--ink);
  font-weight: 600; text-decoration: none;
}
#page-back #heading + .back-label { display:none; }
#page-back h1 { color:inherit; font:inherit; letter-spacing:normal; }
#page-back:hover { color: var(--purple); background: var(--soft); }
#page-back svg { width: 20px; height: 20px; transform: rotate(90deg); }
#page-back > span:first-child { display: flex; }
.has-page-back #breadcrumb { display: none; }
@media (max-width: 740px) {
  .has-page-back .app-header .sidebar { display: none; }
  .has-page-back .app-header .top { flex: 1; justify-content: space-between; }
}

#create-form .receipt-setting { display: flex; align-items: center; gap: 8px; min-height: 44px; }
#create-form .receipt-setting input { flex: none; }
.detail-heading .receipt-policy { flex-basis: 100%; }

.activity-name > span:last-child { min-width:0; overflow-wrap:anywhere; }
.role-marker { display:inline-flex; align-items:center; gap:.25rem; max-width:100%; min-width:28px; min-height:28px; padding:2px; border:0; border-radius:4px; background:transparent; color:var(--muted); font-size:.82rem; text-align:start; }
.role-marker .line-icon { width:17px; height:17px; flex:none; }
.role-marker:hover, .role-marker:focus-visible { color:var(--purple); background:var(--soft); }
.activity-preview-row { display:flex; align-items:center; gap:.45rem; }
.activity-preview-row > .role-marker { justify-content:center; }
.activity-preview-row > .preview-link { min-width:0; flex:1; }

#overview-preview { margin-block-start:clamp(24px, 4vw, 40px); }
.visually-hidden { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.activity-header {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto 44px;
  grid-template-areas:"name terms state toggle";
  align-items:center;
  gap:2px 16px;
  padding:14px 16px;
}
.activity-header h2 { grid-area:name; font-size:1.05rem; line-height:1.35; margin:0; overflow-wrap:anywhere; }
.activity-terms { grid-area:terms; display:flex; align-items:center; gap:4px; min-width:0; font-variant-numeric:tabular-nums; }
.activity-terms small { color:var(--muted); font-size:.85rem; }
.activity-terms .role-marker { min-width:32px; min-height:32px; justify-content:center; flex:none; }
.member-list [data-share] { margin-top:6px; }
.activity-state { grid-area:state; }
.review-link { gap:4px; text-decoration:underline; text-underline-offset:3px; }
.review-link svg { width:14px; flex:none; transform:rotate(-90deg); }
.schedule-toggle {
  grid-area:toggle; display:grid; place-items:center; width:44px; height:44px; padding:0;
  color:var(--purple); background:transparent; border:1px solid var(--border); border-radius:10px;
}
.schedule-toggle:hover { background:var(--soft); }
.schedule-toggle svg { width:18px; height:18px; }
.schedule-toggle[aria-expanded=true] svg { transform:rotate(180deg); }
.activity-body:not([hidden]) { display:grid; gap:20px; padding:16px; }
.activity-body h3 { margin:0 0 8px; font-size:1rem; }
.activity-body > section { min-width:0; }
.list-reviews h3 span { color:var(--muted); }
.list-reviews .declaration-amount .status { display:none; }
.list-installments .due-row {
  display:grid; grid-template-columns:minmax(0,1fr) 8rem; align-items:center; gap:8px 20px;
  padding-block:12px;
}
.list-installments .due-main { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:baseline; gap:4px 12px; }
.list-installments .due-main > time { grid-column:1; }
.list-installments .due-main > strong { grid-column:2; grid-row:1; text-align:end; font-variant-numeric:tabular-nums; }
.list-installments .due-main > span { grid-column:1 / -1; overflow-wrap:anywhere; }
.list-installments .due-actions { justify-self:end; }
.list-installments .due-actions:empty { display:none; }
.list-installments .due-actions button,.activity-tools button { min-height:44px; }
.activity-tools { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding-top:12px; border-top:1px solid var(--border); }
.activity-tools p { margin:0; min-width:0; overflow-wrap:anywhere; }
@media (max-width:740px) {
  .activity-header {
    grid-template-columns:minmax(0,1fr) 44px;
    grid-template-areas:"name toggle" "terms toggle" "state state";
    gap:4px 8px; padding:12px;
  }
  .activity-terms { overflow-wrap:anywhere; }
  .activity-body:not([hidden]) { padding:14px 12px; }
  .activity-body .schedule-pagination { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .activity-body .schedule-pagination span { grid-column:1 / -1; }
  .list-installments .due-row { grid-template-columns:minmax(0,1fr); }
  .list-installments .due-actions,.list-installments .due-actions button { width:100%; }
}

#install-dialog { width:min(460px, calc(100% - 24px)); padding:clamp(14px,4vw,24px); }
#install-dialog .dialog-head { margin-bottom:2px; }
#install-platform { margin:0 0 14px; color:var(--muted); font-size:.875rem; }
#install-steps {
  display:flex; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory;
  list-style:none; margin:0; padding:0; scrollbar-width:none;
}
#install-steps::-webkit-scrollbar { display:none; }
#install-steps li { flex:0 0 100%; min-width:0; scroll-snap-align:start; scroll-snap-stop:always; }
#install-steps img { display:block; width:100%; height:auto; aspect-ratio:2 / 1; border-radius:12px; background:#eee9fa; }
#install-steps h3 { margin:14px 0 6px; line-height:1.3; }
#install-steps p { margin:0; }
.install-guide-nav { display:flex; flex-wrap:wrap; align-items:center; gap:8px; border-top:1px solid var(--border); margin-top:18px; padding-top:12px; }
#install-progress { margin-inline-end:auto; font-size:.82rem; color:var(--muted); }
.install-guide-nav button { min-height:44px; }
#install-status:empty { display:none; }

.admin-auth .login-page {margin:clamp(1rem,7vh,5rem) auto;padding:clamp(1rem,3vw,2rem);max-width:30rem}
.admin-auth header,.admin-account-menu label {display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.admin-auth .login-page form,.admin-account-menu {display:grid;gap:.75rem}
.admin-auth label {display:grid;gap:.25rem;margin:0}
.admin-auth .login-page form p {margin:0}
.admin-auth [role=alert]:empty {display:none}
.admin-auth .login-page [role=alert] {color:#8b3749}
.admin-auth #password-hint {font-size:.86rem}
.admin-auth details,.admin-auth form + form,.admin-auth form + a {display:block;margin-top:1rem}
.admin-auth summary,.admin-account summary {cursor:pointer}
.admin-account {position:relative}
.admin-account summary {min-height:44px;align-content:center}
.admin-account-menu {position:absolute;inset:calc(100% + 6px) 0 auto auto;z-index:4;width:min(17rem,calc(100vw - 32px));padding:12px;background:white;border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 24px #21163718}
.admin-account-menu a {display:flex;align-items:center;min-height:44px;color:var(--purple);font-weight:600}
.admin-account-menu button {width:100%}
.admin-metric span,.admin-metric strong {min-width:0;overflow-wrap:anywhere}
@media(max-width:650px){
  .admin-metric {flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}
  #coupon-table {min-width:0}
  #coupon-table thead {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  #coupon-table tbody,#coupon-table tr {display:block}
  #coupon-table tr {border-top:1px solid var(--border);padding:8px 0}
  #coupon-table td {display:flex;align-items:baseline;justify-content:space-between;gap:8px;border:0;overflow-wrap:anywhere}
  #coupon-table td[data-label]::before {content:attr(data-label);color:var(--muted)}
  #coupon-table td:last-child {justify-content:flex-start;flex-wrap:wrap}

}

.usage {min-width:0}
.usage-filters,.usage nav {display:flex;gap:.75rem;align-items:end;flex-wrap:wrap}
.usage-filters label {display:grid;gap:.3rem;min-width:0}
.usage-filters input {min-width:0;max-width:100%}
.usage details {padding:.8rem 0;border-block-end:1px solid #e7e3ee}
.usage summary {font-weight:600;cursor:pointer}
.usage h3 {margin-top:1.5rem}
.usage-list {list-style:none;margin:.6rem 0;padding:0}
.usage-list li {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.4rem 1rem;padding:.55rem 0;border-block-end:1px solid #eeeaf4;overflow-wrap:anywhere}
.usage-list button {max-width:100%;white-space:normal;overflow-wrap:anywhere}
.usage-days {max-height:20rem;overflow:auto}
.usage time,#usage-coverage {color:var(--muted);font-size:.88rem}
.usage nav {align-items:center}
@media(max-width:480px){.usage-filters>* {flex:1 1 100%}.usage-filters input {width:100%;box-sizing:border-box}.usage-list li {align-items:start;flex-direction:column}}
