/* Pulseboard theme layer: everything colour-related is driven by the gym's brand variables
   (--accent, --accent-rgb, --accent-ink, --bg, --panel ...) which base.html sets per request. */
body.os-body { font-variant-numeric: tabular-nums; }

.metric-card, .os-panel, .member-card, .trainer-card { background: var(--panel); border-radius: 10px; }
.hero-panel { background: var(--panel); border-radius: 10px; box-shadow: none; }
.day-pill:not(.is-active) { background: var(--panel-2); }
.upcoming-card:not(.upcoming-card--cancelled):not(.upcoming-card--unselected):not(.upcoming-card--trial) {
    background: var(--panel-2);
    border-color: var(--line-strong);
    box-shadow: none;
}
.upcoming-card__meta { background: var(--bg); }
.upcoming-card .trainer-avatar { background: var(--bg); border-color: var(--line-strong); }
.upcoming-card__actions a:not(.is-danger-action),
.upcoming-card__actions button:not(.is-danger-action) { background: var(--panel); }
.upcoming-card__actions a:not(.is-danger-action):hover,
.upcoming-card__actions button:not(.is-danger-action):hover { border-color: var(--accent); }

.status-dot--planned::before { background: var(--accent); }
.training-history-item--planned { border-left-color: var(--accent); }
.daily-report-row--planned { border-left-color: var(--accent); background: rgba(var(--accent-rgb), .08); }

.os-topbar { background: rgba(var(--bg-rgb), .92); padding-block: 9px; }
.os-brand { align-items: center; gap: 10px; }
.os-brand img { width: auto; max-width: 96px; height: 42px; object-fit: contain; }
.os-brand__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .02em;
}
.os-brand .os-brand__name { font-family: inherit; font-weight: 700; font-size: 16px; letter-spacing: -.01em; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hero-panel h1, .page-head h1 { letter-spacing: -.03em; line-height: 1.12; }
.action-btn, .icon-btn { border-radius: 7px; }
.action-btn:active, .icon-btn:active { transform: translateY(1px); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.os-mobile-nav { background: rgba(var(--bg-rgb), .97); border-radius: 12px; overflow: hidden; }
.os-mobile-nav a.is-active { color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.topbar-icon.is-active { color: var(--accent); }
.os-form input, .os-form select, .os-form textarea { border-radius: 7px; }
.os-form input.color-input { width: 72px; height: 44px; padding: 3px; cursor: pointer; }

/* Login */
.login-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 8%, rgba(var(--accent-rgb), .2) 0, var(--bg) 62%);
    padding: 32px 20px;
}
.login-card {
    width: min(440px, 100%);
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
.login-brand { flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand img { width: auto; max-width: 200px; height: 96px; object-fit: contain; }
.login-brand__mark {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 20px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 28px;
    font-weight: 700;
}
.login-brand h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; text-align: center; }
.login-brand p { margin: 0; text-align: center; text-transform: none; font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.login-help { margin: 16px 0 0; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.5; }
.login-help a { color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.form-errors, .errorlist { color: var(--danger); font-size: 13px; }
.powered-by { margin: 22px 0 0; text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .04em; }

/* Owner banner while looking at a gym */
.owner-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 18px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 500;
}
.owner-banner form { margin: 0; }
.owner-banner button {
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    padding: 4px 12px;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
}

/* Locked gym page */
.notice-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.notice-card { width: min(480px, 100%); padding: 32px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px; text-align: center; }
.notice-card h1 { margin: 12px 0 8px; font-size: 22px; }
.notice-card p { color: var(--muted); line-height: 1.6; margin: 0 0 20px; }

/* Package categories / settings helpers */
.settings-grid { display: grid; gap: 16px; }
.settings-logo-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.settings-logo-preview img { max-height: 64px; max-width: 160px; object-fit: contain; background: var(--bg); border-radius: 8px; padding: 6px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; border: 1px solid var(--line-strong); color: var(--soft); }
.pill--on { border-color: var(--accent); color: var(--accent); }

@media (max-width: 480px) {
    .login-card { padding: 26px 22px; }
    .os-brand .os-brand__name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Top-bar icons: unread dot (support replies) and room for six icons on a phone */
.topbar-icon { position: relative; }
.topbar-badge { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #ff5a5f; box-shadow: 0 0 0 2px var(--bg); }
@media (max-width: 480px) {
    .os-topbar__meta { gap: 8px; }
    .topbar-icon, .os-topbar__meta button { width: 36px; height: 36px; }
}
