:root {
  color-scheme: light;
  --bg: #f3f6f9; --surface: #fff; --surface-muted: #f7f9fb;
  --text: #10202f; --muted: #697887; --blue: #1261a0;
  --blue-soft: #e7f1f9; --border: #dfe7ed; --warning: #c77812;
  --warning-soft: #fff2dc; --danger: #ba3a31; --success: #147d64;
  --shadow: 0 8px 28px rgba(26, 61, 88, .07);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1219; --surface: #121d27; --surface-muted: #182631;
  --text: #f4f8fb; --muted: #9babb8; --blue: #59a9e6;
  --blue-soft: #15334a; --border: #263846; --warning: #ffc065;
  --warning-soft: #432f16; --danger: #ff8e86; --success: #62d2b5;
  --shadow: 0 10px 30px rgba(0, 0, 0, .24);
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.topbar, main { width: min(1140px, calc(100% - 32px)); margin-inline: auto; }
.topbar { display: flex; min-height: 82px; align-items: center; justify-content: space-between; padding: 14px 0; }
.club-brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.club-brand img { width: 44px; height: 44px; padding: 2px; border-radius: 10px; background: #fff; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(9,79,137,.18)); }
.club-brand h1 { margin: 2px 0 0; font-size: 1.15rem; line-height: 1.1; letter-spacing: -.025em; }
.eyebrow { color: var(--blue); font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.user-label { display: none; padding: 7px 9px; border-radius: 9px; color: var(--muted); font-size: .7rem; font-weight: 700; text-decoration: none; }
.user-label.active { background: var(--blue-soft); color: var(--blue); }
.logout-form { margin: 0; }
.season-label { display: none; color: var(--muted); font-size: .75rem; font-weight: 700; }
.icon-button { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow); }
.icon-button svg { width: 19px; height: 19px; }
.moon-icon, [data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
main { padding-bottom: 112px; }
.hero { position: relative; display: flex; min-height: 174px; align-items: center; overflow: hidden; padding: 27px 24px; border-radius: 22px; background: linear-gradient(135deg, #064b83 0%, #126cad 58%, #2987c5 100%); color: #fff; box-shadow: 0 14px 34px rgba(9,79,137,.24); }
.hero::after { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 45%, rgba(255,255,255,.08)); content: ""; }
.hero > div { position: relative; z-index: 1; }
.hero-label { margin: 0; color: #d8edfc; font-size: .78rem; font-weight: 700; }
.hero-value { margin: 5px 0 8px; font-size: clamp(2.35rem, 12vw, 3.8rem); font-weight: 780; letter-spacing: -.065em; line-height: 1; }
.hero-caption { display: flex; align-items: center; gap: 7px; margin: 0; color: #e3f3ff; font-size: .72rem; }
.hero-caption span { width: 7px; height: 7px; border-radius: 50%; background: #79e0bd; box-shadow: 0 0 0 4px rgba(121,224,189,.16); }
.hero-watermark { position: absolute; right: -15px; bottom: -28px; width: 150px; height: 150px; color: #fff; opacity: .1; stroke-width: 3; }
.section-block, .content-grid, .quick-actions { margin-top: 24px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 0 2px; }
.section-heading h2 { margin: 3px 0 0; font-size: 1.15rem; letter-spacing: -.025em; }
.updated-label { color: var(--muted); font-size: .68rem; }
.account-grid, .content-grid, .quick-action-grid { display: grid; gap: 12px; }
.card { padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.account-title { display: flex; align-items: center; gap: 11px; }
.account-title h3 { margin: 0; font-size: .95rem; }
.account-title div > span { color: var(--muted); font-size: .68rem; }
.account-icon, .small-icon { display: grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }
.account-icon svg { width: 20px; height: 20px; }
.account-icon.paypal { background: #e7f1fb; color: #0876c9; font-size: 1.1rem; font-weight: 900; font-style: italic; }
[data-theme="dark"] .account-icon.paypal { background: #14354e; color: #65b9f4; }
.balance-main { margin: 20px 0 14px; }
.balance-main span { display: block; margin-bottom: 3px; color: var(--muted); font-size: .7rem; }
.balance-main strong { font-size: 1.65rem; letter-spacing: -.045em; }
.balance-details { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 12px 0; border-block: 1px solid var(--border); }
.balance-details div + div { padding-left: 15px; border-left: 1px solid var(--border); }
.balance-details dt { margin-bottom: 3px; color: var(--muted); font-size: .68rem; }
.balance-details dd { margin: 0; font-size: .84rem; font-weight: 750; }
.balance-details .deviation { color: var(--danger); }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.button-row button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 6px; padding: 9px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; font-size: .75rem; font-weight: 750; }
.button-row button svg { width: 15px; height: 15px; stroke-width: 2.2; }
.button-row button.secondary { border: 1px solid var(--border); background: var(--surface-muted); color: var(--text); }
button:disabled, a[aria-disabled="true"] { cursor: default; }
.button-row button:disabled { opacity: 1; }
.card-heading, .title-with-icon { display: flex; align-items: center; }
.card-heading { justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card-heading h2 { margin: 0; font-size: .96rem; }
.title-with-icon { gap: 9px; }
.small-icon { width: 32px; height: 32px; border-radius: 10px; }
.small-icon svg { width: 17px; height: 17px; }
.small-icon.warning { background: var(--warning-soft); color: var(--warning); }
.badge { min-width: 28px; padding: 5px 8px; border-radius: 999px; background: var(--warning-soft); color: var(--warning); text-align: center; font-size: .72rem; font-weight: 800; }
.penalty-total { padding: 8px 0 20px; }
.penalty-total strong { font-size: 1.75rem; letter-spacing: -.045em; }
.penalty-total p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.text-button { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 13px 0 0; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--blue); font-size: .75rem; font-weight: 750; text-decoration: none; }
.muted { color: var(--muted); font-size: .7rem; }
.transaction-list { margin: 0; padding: 0; list-style: none; }
.transaction-list li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--border); }
.transaction-list li:first-child { padding-top: 0; border-top: 0; }
.transaction-list li div strong { font-size: .82rem; }
.transaction-list li div span { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; }
.transaction-list li > strong { white-space: nowrap; font-size: .8rem; }
.positive { color: var(--success); }
.negative { color: var(--danger); }
.empty-state { display: grid; min-height: 138px; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-state .empty-icon { display: grid; width: 42px; height: 42px; margin-bottom: 9px; place-items: center; border-radius: 13px; background: var(--surface-muted); color: var(--blue); }
.empty-icon svg { width: 20px; height: 20px; }
.empty-state strong { color: var(--text); font-size: .82rem; }
.empty-state p { margin: 3px 0 0; font-size: .7rem; }
.quick-action { display: flex; width: 100%; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); color: var(--text); text-align: left; text-decoration: none; box-shadow: var(--shadow); }
.quick-action > span:nth-child(2) { min-width: 0; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { font-size: .8rem; }
.quick-action small { margin-top: 3px; color: var(--muted); font-size: .65rem; }
.quick-action .arrow { margin-left: auto; color: var(--blue); }
.bottom-nav { position: fixed; z-index: 10; right: 12px; bottom: max(10px, env(safe-area-inset-bottom)); left: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); max-width: 620px; margin-inline: auto; padding: 7px 6px; border: 1px solid var(--border); border-radius: 19px; background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: 0 12px 35px rgba(15,35,50,.18); backdrop-filter: blur(16px); }
.bottom-nav a { display: grid; min-height: 53px; place-items: center; align-content: center; gap: 3px; border-radius: 13px; color: var(--muted); font-size: .62rem; font-weight: 700; text-decoration: none; }
.bottom-nav a.active { background: var(--blue-soft); color: var(--blue); }
.bottom-nav svg { width: 19px; height: 19px; }
.bottom-nav rect { rx: 1; }
@media (min-width: 700px) {
  .user-label { display: inline; }
  .topbar { min-height: 92px; }
  .club-brand img { width: 46px; height: 46px; }
  .club-brand h1 { font-size: 1.3rem; }
  .season-label { display: inline; }
  .hero { min-height: 205px; padding: 36px; }
  .hero-watermark { right: 25px; bottom: -36px; width: 200px; height: 200px; }
  .account-grid { grid-template-columns: repeat(3, 1fr); }
  .content-grid { grid-template-columns: minmax(230px, .75fr) minmax(0, 1.6fr); }
  .quick-action-grid { grid-template-columns: repeat(3, 1fr); }
}
.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: radial-gradient(circle at top,#dceefa,var(--bg) 55%); }
[data-theme="dark"] .login-page { background: radial-gradient(circle at top,#12334b,var(--bg) 58%); }
.login-shell { width: min(100%,420px); padding: 0; }
.login-card { padding: 30px; border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.login-card img { width: 72px; height: 72px; margin-bottom: 10px; padding: 3px; border-radius: 12px; background: #fff; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(9,79,137,.2)); }
.login-card h1 { margin: 4px 0 5px; font-size: 1.55rem; }
.login-card > p { margin: 0 0 20px; color: var(--muted); font-size: .75rem; }
.login-card form { display: grid; gap: 13px; text-align: left; }
.login-card label { color: var(--muted); font-size: .7rem; font-weight: 700; }
.login-card label input { margin-top: 5px; }
.login-card form button { min-height: 44px; border: 0; border-radius: 11px; background: var(--blue); color: #fff; font-weight: 800; }
.login-register-link { display: inline-block; margin-top: 18px; color: var(--blue); font-size: .74rem; font-weight: 750; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 55%, transparent); outline-offset: 2px; }
@media (min-width: 980px) {
  main { padding-bottom: 56px; }
  .bottom-nav { position: static; width: min(560px, calc(100% - 32px)); margin: 0 auto 28px; border-radius: 16px; box-shadow: var(--shadow); }
}
@media (prefers-reduced-motion: no-preference) {
  .icon-button, .bottom-nav a { transition: background-color .18s ease, color .18s ease, transform .18s ease; }
  .icon-button:hover { transform: translateY(-1px); }
}

.flash { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: .8rem; font-weight: 700; }
.flash.error { background: var(--warning-soft); color: var(--warning); }
.page-heading, .profile-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 16px 0 18px; }
.inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.inline-actions button { font: inherit; cursor: pointer; }
.page-heading h2, .profile-head h2 { margin: 3px 0 0; font-size: 1.55rem; letter-spacing: -.04em; }
.primary-link, .form-actions button, .workflow-card button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 10px 14px; border: 0; border-radius: 11px; background: var(--blue); color: #fff; font-size: .76rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.secondary-link, .form-actions a { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 9px 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-muted); color: var(--text); font-size: .76rem; font-weight: 750; text-decoration: none; }
.danger-button { color: var(--danger) !important; }
.search-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); color: var(--text); font: inherit; }
.search-form button, .catalog-row button { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 700; }
.list-card, .form-card, .workflow-card { overflow: hidden; padding: 0; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.player-row { display: flex; align-items: center; gap: 11px; padding: 14px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.player-row:first-child { border-top: 0; }
.avatar { display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 13px; background: var(--blue-soft); color: var(--blue); font-size: .75rem; font-weight: 900; }
.avatar.large { width: 58px; height: 58px; border-radius: 18px; font-size: 1rem; }
.row-main { min-width: 0; flex: 1; }
.row-main strong, .row-main small, .row-amount small, .catalog-row strong, .catalog-row small, .compact-row small, .history-card small { display: block; }
.row-main small, .row-amount small, .catalog-row small, .compact-row small, .history-card small { margin-top: 3px; color: var(--muted); font-size: .67rem; }
.row-amount { color: var(--blue); text-align: right; font-size: .78rem; font-weight: 800; }
.empty-copy { padding: 28px 16px; color: var(--muted); text-align: center; font-size: .78rem; }
.empty-copy strong, .empty-copy span { display: block; }
.empty-copy strong { margin-bottom: 4px; color: var(--text); }
.form-card, .workflow-card { padding: 18px; }
.form-card { display: grid; gap: 14px; max-width: 650px; }
.form-card label, .workflow-card label { color: var(--muted); font-size: .7rem; font-weight: 700; }
.form-card input, .form-card select, .form-card textarea, .workflow-card input, .workflow-card select { margin-top: 5px; }
.form-card textarea { min-height: 90px; resize: vertical; }
.form-card label small { display: block; margin-top: 5px; font-size: .62rem; font-weight: 500; }
.registration-data dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; margin: 0; }
.registration-data dt { color: var(--muted); font-size: .66rem; }
.registration-data dd { margin: 4px 0 0; font-size: .8rem; font-weight: 750; overflow-wrap: anywhere; }
.registration-next-step { margin: 18px 0; padding: 14px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: .78rem; font-weight: 750; }
.filter-tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.filter-tabs a { padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: .72rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.filter-tabs a.active { background: var(--blue-soft); color: var(--blue); }
.management-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.management-summary article { padding:14px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.management-summary span,.management-summary strong { display:block; }
.management-summary span { color:var(--muted); font-size:.68rem; font-weight:700; }
.management-summary strong { margin-top:4px; color:var(--blue); font-size:1.35rem; }
.management-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin-bottom:14px; padding:5px; border:1px solid var(--border); border-radius:13px; background:var(--surface-muted); }
.management-tabs a { padding:10px; border-radius:9px; color:var(--muted); text-align:center; text-decoration:none; font-size:.76rem; font-weight:800; }
.management-tabs a.active { background:var(--surface); color:var(--blue); box-shadow:var(--shadow); }
.management-table-card { padding:0; overflow:hidden; }
.management-table { min-width:920px; }
.user-management-table { min-width:900px; }
.management-table tr.inactive { opacity:.62; }
.management-actions { min-width:190px; flex-wrap:wrap; }
.management-actions .danger-link { color:var(--danger); }
.approval-form, .rejection-form { display: grid; gap: 14px; }
.approval-form fieldset { margin: 0; padding: 13px; border: 1px solid var(--border); border-radius: 12px; }
.approval-form legend { padding: 0 5px; font-size: .76rem; font-weight: 800; }
.approval-form .choice-grid { max-height: none; }
.new-player-grid { display: grid; gap: 8px; margin: 10px 0; }
.rejection-form textarea { min-height: 70px; }
.rejection-form button { min-height: 42px; border: 1px solid var(--danger); border-radius: 11px; background: transparent; font-weight: 800; }
@media (min-width:700px) { .new-player-grid { grid-template-columns: repeat(2,1fr); } }
.user-search { display:flex; gap:8px; margin-bottom:10px; }
.user-search input { min-width:0; }
.user-search button { flex:0 0 auto; }
.user-list { display:grid; gap:10px; }
.user-row { display:flex; justify-content:space-between; gap:14px; padding:14px; border:1px solid var(--border); border-radius:14px; background:var(--surface); }
.user-row.inactive { opacity:.68; }
.user-main,.user-actions { display:flex; flex-direction:column; gap:6px; }
.user-title,.pill-line { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.user-actions { align-items:flex-end; justify-content:center; }
.user-actions form { margin:0; }
.secondary-button { border:1px solid var(--border); background:var(--surface); color:var(--text); border-radius:10px; padding:8px 11px; font-weight:750; }
.danger-link { color:var(--danger); font-weight:800; text-decoration:none; }
.user-detail-form { display:grid; gap:18px; }
.user-detail-form section { display:grid; gap:10px; }
.form-grid { display:grid; gap:10px; }
.account-meta dl { display:grid; gap:8px; margin:0; }
.account-meta dl div { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border); padding-bottom:6px; }
.account-meta dt { color:var(--muted); }
.account-meta dd { margin:0; text-align:right; }
.security-actions { display:grid; gap:12px; }
.security-actions form { display:grid; gap:8px; margin:0; }
.delete-summary ul { padding-left:20px; }
.warning-copy { padding:12px; border-left:4px solid var(--danger); background:var(--warning-soft); }
.danger-zone { display:grid; gap:14px; }
.danger-zone fieldset { border:1px solid var(--border); border-radius:12px; padding:12px; }
.danger-button { border:1px solid var(--danger); background:transparent; border-radius:10px; padding:10px 12px; font-weight:800; }
@media (max-width:600px) { .user-row { flex-direction:column; } .user-actions { align-items:stretch; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } .user-actions a,.user-actions button { text-align:center; width:100%; } }
@media (min-width:700px) { .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row input { width: auto; min-height: 0; }
.form-actions { display: flex; align-items: center; gap: 12px; }
.profile-head { justify-content: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.profile-head > div { flex: 1; }
.profile-head p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.profile-head > a { color: var(--blue); font-size: .74rem; font-weight: 800; }
.status-pill, .type-pill { display: inline-block; margin-bottom: 4px; padding: 3px 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: .58rem; font-weight: 900; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-stats article { padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.profile-stats span, .profile-stats strong { display: block; }
.profile-stats span { color: var(--muted); font-size: .66rem; }
.profile-stats strong { margin-top: 5px; font-size: 1.25rem; }
.workflow-card { margin-top: 14px; }
.workflow-card h3, .profile-columns h3, .catalog-section h3 { margin: 0 0 13px; font-size: .95rem; }
.workflow-card form { display: grid; gap: 10px; }
.stack-list { display: grid; gap: 9px; }
.history-card, .catalog-row, .compact-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.history-card > div:first-child, .catalog-row > div:first-child { min-width: 0; flex: 1; }
.history-card strong, .catalog-row strong { font-size: .78rem; }
.history-action { flex: 0 0 130px; text-align: right; }
.history-action b { font-size: .7rem; }
.history-action form { display: grid; gap: 5px; margin-top: 8px; }
.history-action input, .history-action select { min-height: 33px; padding: 5px; font-size: .67rem; }
.history-action button, .catalog-row button { min-height: 32px; padding: 5px 8px; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font-size: .65rem; font-weight: 800; }
.profile-columns { display: grid; gap: 18px; margin-top: 24px; }
.compact-row { font-size: .75rem; }
.catalog-section { margin-top: 22px; }
.catalog-row > div:last-child { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.catalog-row a { color: var(--blue); font-size: .68rem; font-weight: 800; }
.catalog-row form { margin: 0; }
.catalog-row.inactive { opacity: .55; }
.fab { position: fixed; z-index: 12; right: 18px; bottom: calc(88px + env(safe-area-inset-bottom)); display: grid; width: 54px; height: 54px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: var(--blue); color: #fff; box-shadow: 0 12px 28px rgba(9,79,137,.35); line-height: 1; text-decoration: none; cursor: pointer; }
.fab svg { width: 24px; height: 24px; stroke-width: 2.2; }
.sheet-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(2,9,15,.56); }
.action-sheet { position: fixed; z-index: 21; right: 10px; bottom: 10px; left: 10px; max-width: 480px; margin-inline: auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid var(--border); border-radius: 22px; background: var(--surface); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.action-sheet[hidden], .sheet-backdrop[hidden] { display: none; }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 13px; border-radius: 99px; background: var(--border); }
.action-sheet h2 { margin: 0 0 10px; font-size: 1rem; }
.action-sheet a, .action-sheet button { display: block; width: 100%; padding: 13px 4px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); text-align: left; font-size: .82rem; font-weight: 750; text-decoration: none; }
.workflow-sheet { max-height: min(90vh, 720px); overflow-y: auto; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-title .icon-button { width: 38px; min-height: 38px; padding: 0; border: 1px solid var(--border); text-align: center; }
.sheet-form { display: grid; gap: 11px; }
.sheet-form label, .sheet-form legend { color: var(--muted); font-size: .7rem; font-weight: 700; }
.sheet-form input, .sheet-form select { margin-top: 5px; }
.sheet-form > button { min-height: 44px; border: 0; border-radius: 11px; background: var(--blue); color: #fff; text-align: center; }
.sheet-form fieldset { margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: 11px; }
.choice-grid { display: grid; gap: 7px; max-height: 150px; overflow-y: auto; }
.choice-grid .check-row { color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (min-width: 700px) {
  .profile-columns { grid-template-columns: 1fr 1fr; }
  .workflow-card form { grid-template-columns: repeat(2, 1fr); }
  .workflow-card button { align-self: end; min-height: 42px; }
}
@media (min-width: 980px) { .fab { bottom: 28px; } }

.account-card, .content-card { padding: 17px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.account-card-title { display: flex; align-items: center; justify-content: space-between; }
.account-card-title h3, .content-card h3 { margin: 0 0 13px; font-size: .95rem; }
.account-card-title h3 { margin: 0; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.account-card .balance-details { grid-template-columns: repeat(3, 1fr); margin: 14px 0; }
.account-card .balance-details div + div { padding-left: 9px; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 9px; }
.account-actions form { margin: 0; }
.account-actions button, .account-actions summary, .compact-form button { display: grid; width: 100%; min-height: 40px; place-items: center; padding: 9px; border: 0; border-radius: 10px; background: var(--blue); color: #fff; cursor: pointer; font-size: .72rem; font-weight: 800; }
.account-actions summary { border: 1px solid var(--border); background: var(--surface-muted); color: var(--text); list-style: none; }
.account-actions details[open] { grid-column: 1 / -1; }
.account-actions details form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--surface-muted); }
.account-actions label, .compact-form label { color: var(--muted); font-size: .68rem; font-weight: 700; }
.content-card { margin-top: 16px; }
.compact-form { display: grid; gap: 10px; }
.compact-form .wide { grid-column: 1 / -1; }
.compact-form button { width: auto; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .72rem; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .63rem; letter-spacing: .04em; text-transform: uppercase; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.catalog-table { min-width: 760px; }
.catalog-table tr.inactive { opacity: .55; }
.table-actions { display: flex; align-items: center; gap: 7px; }
.table-actions a, .table-actions button { color: var(--blue); font-size: .68rem; font-weight: 800; }
.table-actions button { padding: 0; border: 0; background: transparent; cursor: pointer; }
.table-actions form { margin: 0; }
.table-actions details { position: relative; }
.table-actions summary { color: var(--blue); font-size: .68rem; font-weight: 800; cursor: pointer; list-style: none; }
.inline-edit { position: absolute; z-index: 6; right: 0; display: grid; width: min(300px, 78vw); gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.inline-edit input, .inline-edit select { min-height: 34px; font-size: .7rem; }
.inline-edit button { min-height: 36px; border-radius: 8px; background: var(--blue); color: #fff; }
@media (max-width: 520px) { .page-heading { align-items: flex-start; } .inline-actions { max-width: 180px; } }
.sort-button { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
th[aria-sort="ascending"] .sort-button::after { content: "▲"; font-size: .5rem; }
th[aria-sort="descending"] .sort-button::after { content: "▼"; font-size: .5rem; }
.error-card { max-width: 560px; margin: 70px auto; padding: 28px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); text-align: center; box-shadow: var(--shadow); }
.error-card .small-icon { margin: 0 auto 12px; }
.error-card h2 { margin: 0; font-size: 1.4rem; }
.error-card p { margin: 8px 0 22px; color: var(--muted); }
@media (min-width: 700px) {
  .compact-form { grid-template-columns: repeat(4, 1fr); }
  .compact-form button { align-self: end; min-height: 42px; }
}
