/* RallySpool app chrome — builds on the design tokens in style.css */
input[type="password"], input[type="date"], input[type="url"], input[type="search"], input[type="file"] {
  width: 100%; font: inherit; font-size: 0.9rem; color: var(--fg); background: #fff;
  border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.55rem 0.75rem;
}
input:disabled, select:disabled { opacity: 0.6; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 1rem; height: 1rem; flex: none; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn.danger, .btn-outline.danger { color: var(--danger); border-color: rgba(239, 68, 68, 0.4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
code { background: var(--muted); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.85em; }
.small { font-size: 0.8rem; } .muted { color: var(--muted-fg); } .fg { color: var(--fg); }
.center { text-align: center; } .r { text-align: right; } .pre { white-space: pre-line; }
a { color: var(--primary-ink); }
.chk { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 400; margin: 0.25rem 0; }
fieldset { border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.9rem 1rem; display: grid; gap: 0.6rem; }
legend { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-fg); padding: 0 0.4rem; }
.grid3 { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, 1fr); }
.grid4 { display: grid; gap: 0.75rem; grid-template-columns: repeat(4, 1fr); margin-top: 0.6rem; }
@media (max-width: 640px) { .grid3, .grid4 { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; } }

/* public pages */
.top-links { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
.top-links > a:not(.btn) { color: var(--fg); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.public-main > .flash, .public-main > .order-wrap, .public-main > .page-head, .public-main > .narrow-col, .public-main > .card, .public-main > .empty,
.public-main > .pass-grid, .public-main > .cycle-toggle, .public-main > p, .public-main > .auth-card { max-width: 960px; margin-left: auto; margin-right: auto; }
.public-main > .page-head, .public-main > .narrow-col, .public-main > .pass-grid, .public-main > .cycle-toggle, .public-main > .card, .public-main > .empty { padding-left: 1rem; padding-right: 1rem; }
.public-main > .flash { margin-top: 1rem; }
.public-main { min-height: 60vh; padding-bottom: 3rem; }
.public-main > .page-head { margin-top: 2rem; }
.auth-card { background: var(--card); border: 1px solid var(--border); border-radius: 1rem; padding: 2rem; margin: 3rem auto; width: min(26rem, calc(100% - 2rem)); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 0.25rem; } .auth-card .sub { color: var(--muted-fg); margin-bottom: 1.25rem; font-size: 0.9rem; }
.auth-foot { text-align: center; margin-top: 1.25rem; font-size: 0.875rem; color: var(--muted-fg); }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; }
.order-wrap { padding: 1.5rem 1rem 3rem; max-width: 42rem !important; display: grid; gap: 1rem; }
.order-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.order-top h1 { font-size: 1.8rem; } .order-top p { color: var(--muted-fg); font-size: 0.9rem; }

/* app shell */
.app-shell { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--border); padding: 1rem 0.75rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-top { padding: 0 0.5rem 1rem; } .side .logo img { height: 2.6rem; }
.side nav { display: grid; gap: 0.15rem; flex: 1; align-content: start; }
.side nav a { padding: 0.55rem 0.75rem; border-radius: 0.5rem; text-decoration: none; color: var(--fg); font-size: 0.9rem; font-weight: 500; }
.side nav a:hover { background: var(--muted); } .side nav a.on { background: rgba(197, 120, 94, 0.15); color: var(--primary-ink); }
.side-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-fg); padding: 1rem 0.75rem 0.25rem; }
.side-foot { border-top: 1px solid var(--border); padding: 0.75rem 0.5rem 0; font-size: 0.85rem; }
.side-foot .who { font-weight: 600; margin-bottom: 0.2rem; word-break: break-all; }
.app-main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 1.25rem; border-bottom: 1px solid var(--border); background: rgba(248, 246, 241, 0.9); position: sticky; top: 0; z-index: 20; }
.menu-btn { display: none; background: none; border: 1px solid var(--border); border-radius: 0.4rem; font-size: 1.1rem; padding: 0.2rem 0.6rem; cursor: pointer; }
.bell { margin-left: auto; text-decoration: none; position: relative; font-size: 1.1rem; }
.badge { position: absolute; top: -0.5rem; right: -0.7rem; background: var(--primary); color: #fff; font-size: 0.65rem; border-radius: 99px; padding: 0 0.35rem; font-weight: 700; }
.app-content { padding: 1.5rem 1.25rem 4rem; max-width: 62rem; margin: 0; display: grid; gap: 1.1rem; align-content: start; }
.app-content.wide { max-width: 78rem; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 50; left: 0; top: 0; width: 15rem; transform: translateX(-100%); transition: transform 0.2s; box-shadow: 0 0 40px rgba(0, 0, 0, 0.2); }
  .side.open { transform: none; } .menu-btn { display: block; }
}

/* content blocks */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.9rem; } .page-head .sub { color: var(--muted-fg); margin-top: 0.15rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 0.9rem; padding: 1.25rem; display: grid; gap: 0.75rem; align-content: start; }
.card h2 { font-size: 1.1rem; } .card h3 { font-size: 1rem; }
.card.narrow { max-width: 38rem; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.narrow-col { display: grid; gap: 0.75rem; max-width: 48rem; }
.faq-item h3 { margin-bottom: 0.25rem; }
.empty { border: 1px dashed var(--border); border-radius: 0.9rem; padding: 2.5rem 1rem; text-align: center; display: grid; gap: 0.75rem; justify-items: center; }
.stats { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.9rem 1rem; }
.stat .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-fg); }
.stat .v { font: 700 1.7rem var(--font-display); } .stat .v.small { font-size: 1rem; line-height: 1.3; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--border); text-decoration: none; color: var(--fg); }
.row-link:first-of-type { border-top: 0; } .row-link:hover { background: rgba(0, 0, 0, 0.02); }
.note { border-top: 1px solid var(--border); padding: 0.7rem 0; } .note.unread { border-left: 3px solid var(--primary); padding-left: 0.7rem; }
.actions-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; } .actions-row form { margin: 0; }
.cards-grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.thumb { width: 100%; height: 9rem; object-fit: cover; border-radius: 0.5rem; }
.two-col { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; } @media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.dl { display: grid; grid-template-columns: 8rem 1fr; gap: 0.5rem 0.75rem; font-size: 0.9rem; } .dl dt { color: var(--muted-fg); } .dl dd { margin: 0; }
.inline-form { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; } .inline-form label { margin: 0; flex: 1; min-width: 9rem; }
.searchbar { display: flex; gap: 0.5rem; max-width: 30rem; } .searchbar input { flex: 1; }
.checklist { list-style: none; padding: 0; display: grid; gap: 0.35rem; margin: 0.75rem 0; }

/* flash + notes */
.flash { border-radius: 0.6rem; padding: 0.7rem 1rem; font-size: 0.9rem; border: 1px solid; }
.flash-ok { background: rgba(197, 120, 94, 0.1); border-color: rgba(197, 120, 94, 0.35); }
.flash-err { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); color: #9b1c1c; }
.flash-warn { background: #fff7e0; border-color: #f0d58a; }
.note-box { background: rgba(0, 0, 0, 0.03); border: 1px solid var(--border); border-radius: 0.6rem; padding: 0.7rem 0.9rem; font-size: 0.85rem; }

/* tables, tabs, pills */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: 0.9rem; }
.tbl { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tbl th { text-align: left; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-fg); padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; } .tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; } .breakdown td { padding: 0.45rem 0.2rem; } .breakdown .tot td { font-weight: 700; border-top: 2px solid var(--border); font-size: 1rem; }
.row-red { background: rgba(239, 68, 68, 0.06); } .row-orange { background: rgba(245, 158, 11, 0.07); }
.tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; } .tabs.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.25rem; }
.tabs a { padding: 0.4rem 0.8rem; border-radius: 99px; border: 1px solid var(--border); text-decoration: none; color: var(--fg); font-size: 0.82rem; white-space: nowrap; background: #fff; }
.tabs a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill { display: inline-block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em; padding: 0.15rem 0.55rem; border-radius: 99px; white-space: nowrap; }
.pill-blue { background: #dbeafe; color: #1e40af; } .pill-green { background: #dcfce7; color: #166534; } .pill-amber { background: #fef3c7; color: #92400e; }
.pill-red { background: #fee2e2; color: #991b1b; } .pill-purple { background: #ede9fe; color: #5b21b6; } .pill-orange { background: #ffedd5; color: #9a3412; }
.pill-teal { background: #ccfbf1; color: #115e59; } .pill-grey { background: var(--muted); color: var(--muted-fg); }
.tl { display: flex; gap: 0.7rem; padding: 0.4rem 0; } .dot { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--primary); margin-top: 0.4rem; flex: none; }

/* membership page */
.cycle-toggle { display: flex; gap: 0.4rem; justify-content: center; margin: 1rem auto; }
.cycle-toggle a { padding: 0.45rem 1rem; border: 1px solid var(--border); border-radius: 99px; text-decoration: none; color: var(--fg); background: #fff; font-size: 0.9rem; }
.cycle-toggle a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.pass-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1rem; margin-bottom: 1rem; }
.pass-card.featured { border-color: var(--primary); box-shadow: 0 10px 30px -12px rgba(197, 120, 94, 0.5); }
.pass-card .checks { margin: 1rem 0; list-style: none; padding: 0; }

/* option buttons & total pill: stack title over description */
.opt .t, .opt .d, .total-pill .label, .total-pill .amt { display: block; }
.opt.row > span:first-child { display: block; }
.opt { width: 100%; cursor: pointer; }
.opt.row input[type="radio"], .opt.row input[type="checkbox"] { margin-right: 0.25rem; }
label.opt.row { font-weight: 400; align-items: center; }
.pass-card .btns, .pass-card form { margin-top: auto; }
.opt.row > span { text-align: left; }
details.snotes { background: var(--card); border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.6rem 1rem; }
details.snotes summary { cursor: pointer; font-weight: 600; font-size: 0.9rem; }

/* social sign-in */
.or-sep { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 1rem; color: var(--muted-fg); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.social-stack { display: grid; gap: .6rem; }
.btn-social { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; padding: .7rem 1rem; border-radius: .6rem; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid var(--border); }
.btn-google { background: #fff; color: #1f1f1f; }
.btn-google:hover { background: #f7f7f7; }
.btn-facebook { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-facebook:hover { background: #166fe0; }
