@font-face { font-family: 'Apercu'; src: url('fonts/apercu-light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Apercu'; src: url('fonts/apercu-regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Apercu'; src: url('fonts/apercu-medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Apercu'; src: url('fonts/apercu-bold.otf') format('opentype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fira Mono'; src: url('fonts/fira-mono-regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Fira Mono'; src: url('fonts/fira-mono-medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

:root {
    --font-main: "Apercu", "SF Pro Text", "Segoe UI", sans-serif;
    --font-mono: "Fira Mono", "SF Mono", Menlo, monospace;
    --page-bg: #eef1f6;
    --app-bg: #eef1f6;
    --surface: #fff;
    --surface-2: #f5f6f9;
    --surface-3: #f2f3f6;
    --ink: #1a1a2e;
    --ink-soft: #4a4a5a;
    --ink-muted: #7e8593;
    --line: #dde0e8;
    --line-soft: #e8eaef;
    --nav-bg: #f2f6fb;
    --nav-pill: #e4ecf6;
    --nav-text: #3e4656;
    --accent: #0a84ff;
    --accent-2: #409cff;
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 26px;
    --radius-pill: 999px;
    --shadow-soft: none;
    --shadow-heavy: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    min-height: 100%;
}

h1, h2, h3, h4, h5, h6, p, span, a, button, input, select, textarea, label, li, td, th, div {
    font-family: 'Apercu', sans-serif;
}

body {
    font-family: 'Apercu', sans-serif !important;
    background: var(--page-bg);
    color: var(--ink);
    min-height: 100dvh;
    display: block;
}

.login-screen {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--page-bg);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.login-card h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.login-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 24px;
}

.login-card form {
    display: grid;
    gap: 12px;
}

.login-card input {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: var(--font-main);
    color: #1e293b;
    background: #f8f9fb;
    transition: border-color 0.15s ease;
}

.login-card input:focus {
    outline: none;
    border-color: #22d3ee;
}

.login-btn {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 11px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-main);
    transition: background 0.15s ease;
    margin-top: 4px;
}

.login-btn:hover {
    background: #1e293b;
}

.login-error {
    color: #ef4444;
    font-size: 0.75rem;
    text-align: center;
    min-height: 1em;
}

.app {
    width: 100%;
    min-height: 100dvh;
    background: var(--app-bg);
    padding: 10px 10px 10px 0;
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.sidebar {
    border: none;
    border-right: none;
    border-radius: 0 16px 16px 0;
    background: #f8fafe;
    box-shadow: none;
    padding: 8px 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: sticky;
    top: 0;
    align-self: start;
    height: calc(100dvh - 20px);
    width: auto;
    overflow-y: visible;
    transition: none;
}

.app-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-width: 0;
    width: 100%;
    padding-bottom: 6px;
}

.app-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: transparent;
    border: 1px solid transparent;
    color: #697083;
    display: grid;
    place-items: center;
    font-size: 0.92rem;
}

.app-badge i {
    font-size: 1rem;
}

.app-title h1 {
    display: none;
}

.tabs {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    padding-top: 2px;
}

.nav-divider,
#google-connect,
#sync-now {
    display: none;
}

.tab {
    border: none;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    color: #687183;
    font-size: 0.93rem;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    transition: transform 0.16s ease, opacity 0.16s ease;
    position: relative;
    opacity: 0.65;
}

.tab[data-label]::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

.tab[data-label]:hover::after {
    opacity: 1;
}

.tab i,
.tab svg {
    display: inline-block;
    font-size: 0.95rem;
}

.tab::before {
    display: none;
}

.tab:hover {
    opacity: 1;
    transform: scale(1.12);
    background: transparent;
}

.tab.active {
    opacity: 1;
    transform: scale(1.12);
    background: #edf0f4;
}

.icon-btn::after {
    display: none;
}

.mobile-hero {
    display: none;
}

.mobile-date {
    display: none;
}

.mobile-top-row {
    display: none;
}

.ws-back-mobile {
    display: none;
}

.main {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
}

.app-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.top-strip {
    display: none;
}

.brand-mark {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.top-strip-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.level-chip {
    border-radius: 9px;
    padding: 6px 10px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--line);
    background: var(--surface-3);
    color: var(--ink-soft);
}

.page-head {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: grid;
    gap: 5px;
}

.app-kicker {
    color: var(--ink-muted);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 500;
}

.page-title {
    font-size: clamp(2rem, 4.3vw, 3.45rem);
    line-height: 0.94;
    white-space: normal;
    letter-spacing: -0.02em;
    color: #1f2430;
    font-weight: 500;
}

.app-bar-actions {
    display: inline-flex;
    align-items: flex-start;
}

.date-wrap {
    display: grid;
    gap: 4px;
    font-size: 0.62rem;
    color: var(--ink-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.top-date {
    width: 160px;
    padding: 0;
    border: none;
    background: transparent;
}

.top-date label {
    display: none;
}

#session-date {
    display: none;
}

.date-picker-custom {
    position: relative;
}

.date-picker-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    background: #fff;
    padding: 8px 14px;
    font-family: "Fira Mono", monospace;
    font-size: 0.78rem;
    font-weight: 400;
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: background 0.15s ease;
}

.date-picker-btn:hover { background: #f6f8fb; }

.date-chevron {
    opacity: 0.4;
    transition: transform 0.2s ease;
}

.date-picker-custom.open .date-chevron {
    transform: rotate(180deg);
}

.date-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 16px;
    z-index: 200;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.date-picker-custom.open .date-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.date-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.date-month-label {
    font-family: "Apercu", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
}

.date-nav-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    font-size: 1.1rem;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.date-nav-btn:hover { background: #e2e8f0; }

.date-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-family: "Fira Mono", monospace;
    font-size: 0.65rem;
    color: #94a3b8;
    margin-bottom: 6px;
}

.date-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.date-day {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    background: transparent;
    font-family: "Fira Mono", monospace;
    font-size: 0.75rem;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.12s ease;
}

.date-day:hover { background: #f1f5f9; }
.date-day.today { background: #eef2ff; color: #6366f1; font-weight: 500; }
.date-day.selected { background: #6366f1; color: #fff; }
.date-day.other-month { color: #cbd5e1; }

.date-today-btn {
    width: 100%;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    padding: 7px;
    font-family: "Apercu", sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s ease;
}

.date-today-btn:hover { background: #e2e8f0; }

#session-date::-webkit-datetime-edit {
    padding: 0 1px;
}

#session-date::-webkit-calendar-picker-indicator {
    opacity: 0.62;
    cursor: pointer;
    filter: saturate(80%) brightness(0.65);
}

.content {
    min-height: 0;
    min-width: 0;
    flex: 1;
    overflow: auto;
    background: #f8f9fb;
    border: none;
    border-radius: 14px;
    padding: 0;
    box-shadow: none;
}

.content-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px 16px;
    position: relative;
}

.content-head::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 2%;
    width: 96%;
    height: 1px;
    background: #edf2f7;
}

.content-head-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.page-title {
    font-family: "Apercu", sans-serif;
    font-size: 1.65rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.hero-section { display: none; }

.hero-highlight {
    color: #6366f1;
    -webkit-text-fill-color: #6366f1;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    padding: 0;
}
}

.hero-highlight::before { display: none; }

.hero-subtitle {
    font-family: "Apercu", sans-serif;
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 18px;
}

.btn-pill {
    border-radius: 50px;
    background: #111827;
    color: #ffffff;
    border: none;
    outline: none;
    white-space: nowrap;
}

.btn-pill:hover {
    background: #1f2937;
    outline: none;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-pill:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn.hero-cta {
    padding: 8px 18px;
    font-weight: 400;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: var(--font-main);
    text-transform: none;
    letter-spacing: 0;
    background: #111827;
    color: #ffffff;
    border-radius: 50px;
}

.btn.hero-cta:hover {
    background: #111827;
    border-color: #111827;
    transform: none;
    cursor: pointer;
}

.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(78, 84, 94, 0.2);
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: fade-up 0.24s ease;
    padding: 0 24px 24px;
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateX(12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.view.active[data-view="overview"] {
    display: block;
    padding: 0;
}

.overview-shell {
    display: grid;
    gap: 12px;
    padding: 0 24px 24px;
}

/* Dashboard widget cards */
.dash-top {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.dash-widget {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e8eaef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.dash-widget-top {
    padding: 10px 12px;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.dash-widget-val {
    font-family: "Apercu", sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
}

.dash-widget-label {
    font-family: "Fira Mono", monospace;
    font-size: 0.48rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-widget-body {
    padding: 8px;
    background: #fafbfc;
}

/* Sessions week grid */
.dash-widget-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dash-widget-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.dash-widget-day-label {
    font-family: "Fira Mono", monospace;
    font-size: 0.42rem;
    color: #a0aec0;
}

.dash-widget-day-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Fira Mono", monospace;
    font-size: 0.5rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.dash-widget-day-dot.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

.dash-widget-day-dot.today {
    border: 2px solid #1a1a2e;
    font-weight: 600;
}

/* Streak calendar */
.dash-widget-cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dash-widget-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.dash-widget-cal-label {
    font-family: "Fira Mono", monospace;
    font-size: 0.42rem;
    color: #a0aec0;
}

.dash-widget-cal-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Fira Mono", monospace;
    font-size: 0.5rem;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.dash-widget-cal-num.logged {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.dash-widget-cal-num.today {
    border: 2px solid #1a1a2e;
    font-weight: 600;
}

/* Avg sets ring gauge */
.dash-widget-gauge-body {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px;
}

.dash-widget-ring {
    width: 64px;
    height: 64px;
}

.dash-widget-ring-label {
    position: absolute;
    font-family: "Fira Mono", monospace;
    font-size: 0.6rem;
    color: #64748b;
}

.dash-card-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Shared card typography */
.dash-card-inner { display: grid; gap: 2px; }

.dash-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.dash-value {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: #1a1a2e;
    line-height: 1.1;
    margin: 2px 0;
}

.dash-hint {
    font-size: 0.72rem;
    font-weight: 400;
    font-family: "Fira Mono", monospace !important;
    color: #94a3b8;
}

/* Dashboard mid panels */
.dash-mid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.dash-panel {
    background: #fff;
    border: none;
    border-radius: 20px;
    padding: 18px;
    display: grid;
    gap: 8px;
    transition: box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dash-panel:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.dash-panel-accent { display: none; }

.dash-panel-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.dash-panel-head svg { color: #c0c5d0; }

.dash-panel-date {
    margin-left: auto;
    font-weight: 500;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
}

.dash-panel h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

.dash-block-desc {
    font-size: 0.82rem;
    font-family: "Fira Mono", monospace !important;
    color: #4a4a5a;
    line-height: 1.55;
}

.dash-panel-action {
    background: #1a1a2e;
    border: none;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    padding: 9px 20px;
    border-radius: 50px;
    text-align: center;
    transition: background 0.15s ease, transform 0.15s ease;
    justify-self: start;
}

.dash-panel-action:hover {
    background: #2d2d42;
    transform: translateY(-1px);
}

.dash-last-session .last-session-stats {
    display: flex;
    gap: 6px;
}

.dash-last-session .last-session-stats span {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 50px;
}

/* Dashboard section title */
.dash-section {
    display: grid;
    gap: 10px;
}

.dash-section-title {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.dash-section-title::before { display: none; }

/* Today I want to */
.today-actions { margin: 0; }

.today-actions-title { display: none; }

.today-actions-grid {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.today-action-btn {
    padding: 5px 12px;
    border-radius: 16px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: "Apercu", sans-serif;
    font-size: 0.7rem;
    color: #4a5568;
}

.today-action-btn:hover {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

/* Logout button */
.tab-logout {
    margin-top: auto;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.tab-logout:hover { opacity: 1; }

/* Empty state */
.dash-empty {
    padding: 24px 16px;
    background: #fff;
    border-radius: 14px;
    border: 1.5px dashed #e2e8f0;
}
.dash-empty-text {
    font-family: "Apercu", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}
.dash-empty-hint {
    font-family: "Fira Mono", monospace;
    font-size: 0.5rem;
    color: #94a3b8;
}

/* Last session exercise breakdown */
.last-session-exercises {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
}
.last-session-ex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Fira Mono", monospace;
    font-size: 0.5rem;
    color: #64748b;
    padding: 4px 0;
    border-bottom: 1px solid #f1f5f9;
}
.last-session-ex:last-child { border-bottom: none; }
.last-session-ex-name { color: #1a1a2e; font-weight: 500; }
.last-session-ex-detail { color: #94a3b8; }

/* Dashboard bottom */
.dash-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.dash-focus-panel {
    background: #fff;
    border: none;
}

.overview-chip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.overview-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 50px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    padding: 5px 12px;
    font-family: "Fira Mono", monospace !important;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
}

.overview-chip.muted {
    border: none;
    background: #f1f5f9;
    color: #94a3b8;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    padding: 16px;
}

.progress-panel {
    grid-column: 1;
    grid-row: 1 / 3;
    min-height: 540px;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    border-color: #6da8ff;
    background: linear-gradient(155deg, #1f88ff, #3f99ff 46%, #88b9ff 100%);
    color: #f6faff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

.progress-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.16), transparent 30%),
        repeating-linear-gradient(
            0deg,
            rgba(46, 108, 190, 0.18) 0px,
            rgba(46, 108, 190, 0.18) 2px,
            transparent 2px,
            transparent 11px
        ),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.28));
    pointer-events: none;
}

.progress-panel > * {
    position: relative;
    z-index: 1;
}

.progress-panel .metric-label {
    color: rgba(255, 255, 255, 0.86);
}

.progress-panel .metric-sub {
    color: rgba(248, 248, 247, 0.86);
    max-width: 360px;
}

.metric-label {
    color: var(--ink-soft);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
}

.metric-sub {
    color: var(--ink-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.progress-track-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-number {
    font-size: 3.05rem;
    letter-spacing: -0.025em;
    font-weight: 500;
    color: #ffffff;
    line-height: 0.9;
}

.segment-track {
    flex: 1;
    min-height: 30px;
    display: grid;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    gap: 3px;
    align-items: end;
}

.segment-track span {
    height: 25px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.86);
}

.segment-track span:nth-child(n + 13) {
    opacity: 0.32;
}

.challenge-panel {
    grid-column: 2;
    grid-row: 1;
    background: var(--surface-2);
    border-color: #d8dfe9;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 284px;
}

.challenge-panel h3 {
    margin-top: 14px;
    font-size: clamp(2rem, 3vw, 3.35rem);
    line-height: 0.92;
    letter-spacing: -0.025em;
    color: #2d3442;
    font-weight: 500;
    max-width: 600px;
}

.challenge-actions {
    margin-top: 26px;
    display: flex;
    justify-content: flex-end;
}

.countdown-badge {
    display: inline-flex;
    margin-top: 8px;
    border-radius: 8px;
    border: 1px solid #d3dbe8;
    background: #f3f7fd;
    color: #5d6a7f;
    padding: 4px 8px;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    min-width: 130px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(10, 132, 255, 0.35);
    background: var(--accent);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 16px;
}

.overview-dual {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-panel {
    min-height: 188px;
    border-color: #d6deea;
    background: linear-gradient(165deg, #2c6fc3, #245ea9);
    color: #f5f8fc;
    position: relative;
    overflow: hidden;
}

.stat-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), transparent 44%);
    pointer-events: none;
}

.stat-panel .metric-label,
.stat-panel .metric-sub,
.stat-panel h2 {
    position: relative;
    z-index: 1;
}

.stat-panel .metric-label,
.stat-panel .metric-sub {
    color: rgba(235, 238, 243, 0.88);
}

.stat-panel h2,
.metric h2,
.stat-card p {
    margin-top: 10px;
    font-size: 2.05rem;
    line-height: 0.95;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.stat-panel h2 {
    color: #ffffff;
}

.achievement-panel {
    margin-top: 0;
    display: grid;
    gap: 10px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.panel-head.compact {
    margin-bottom: 0;
}

.panel-head h3,
.card h3 {
    font-family: "Apercu", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.panel-head p {
    color: #94a3b8;
    font-family: "Fira Mono", monospace;
    font-size: 0.5rem;
}

.achievement-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.achievement-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #d3def4;
    background: #edf3ff;
    color: #3762ad;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 500;
}

.achievement-row p {
    font-size: 1.06rem;
    color: #1f2533;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.overview-panel {
    display: grid;
    gap: 10px;
}

.overview-panel .panel-head {
    margin-bottom: 2px;
}

.dash-card-sessions .dash-card-icon { color: rgba(99,102,241,0.4); }


.workout-btn-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    scrollbar-width: none;
    perspective: 800px;
}

.quick-start-section {
    padding: 0;
}

.workout-btn-grid::-webkit-scrollbar { display: none; }

.workout-jump-btn {
    padding: 20px;
    border-radius: 24px;
    border: none;
    color: #fff;
    font-family: 'Apercu', sans-serif;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 280px;
    width: 220px;
    flex-shrink: 0;
    scroll-snap-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.workout-jump-btn:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 36px rgba(0,0,0,0.2);
}

.workout-jump-btn .wjb-label {
    display: inline-block;
    font-size: 0.65rem;
    font-family: "Fira Mono", monospace !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 50px;
    align-self: flex-start;
}

.workout-jump-btn .wjb-name {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.25;
    margin-top: auto;
}

.wjb-blob {
    width: 120px;
    height: 120px;
    align-self: center;
    margin: auto 0;
    object-fit: contain;
}

.wjb-blob-img {
    position: relative;
}
.wjb-blob-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

.overview-checklist {
    list-style: none;
    display: grid;
    gap: 6px;
}

.overview-checklist li {
    position: relative;
    padding-left: 20px;
    color: #4a4a5a;
    font-family: "Fira Mono", monospace !important;
    font-size: 0.78rem;
    line-height: 1.6;
}

.overview-checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
}

.pill-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-list li {
    border-radius: var(--radius-pill);
    border: 1px solid #d4dce9;
    background: #f2f5fa;
    color: #4c5668;
    font-size: 0.66rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
    padding: 6px 10px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.note {
    color: #2d3748;
    font-family: "Fira Mono", monospace;
    font-size: 0.6rem;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.btn {
    border: 1.5px solid #1a1a2e;
    border-radius: 20px;
    background: #1a1a2e;
    color: #ffffff;
    padding: 8px 14px;
    font-family: "Apercu", sans-serif;
    font-size: 0.6rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.16s ease;
}

.btn:hover {
    background: #2d2d44;
    border-color: #2d2d44;
    transform: translateY(-1px);
}

.btn.ghost,
.btn-ghost {
    background: #fff;
    color: #64748b;
    border-color: #e2e8f0;
}

.btn.ghost:hover,
.btn-ghost:hover {
    border-color: #1a1a2e;
    color: #1a1a2e;
}

.btn-outline {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #ffffff;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.52rem;
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-btn {
    margin-left: auto;
}

textarea,
input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #2d3748;
    font-family: "Fira Mono", monospace;
    font-size: 0.65rem;
    padding: 10px 12px;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

textarea {
    min-height: 126px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #a0aec0;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: none;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 12px;
}

/* ── Workout Pick Grid ── */
.workout-pick {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    scrollbar-width: none;
    perspective: 800px;
}

.workout-pick::-webkit-scrollbar { display: none; }

.wp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-radius: 24px;
    border: none;
    color: #fff;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 260px;
    width: 200px;
    flex-shrink: 0;
    scroll-snap-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.wp-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 36px rgba(0,0,0,0.2);
}

.wp-card-label {
    font-family: "Fira Mono", monospace;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 50px;
    align-self: flex-start;
}

.wp-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    margin: auto 0;
}

.wp-card-name {
    font-family: "Apercu", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
}

.wp-card-count {
    font-family: "Fira Mono", monospace;
    font-size: 0.6rem;
    opacity: 0.7;
    margin-top: 2px;
}

/* ── Workout Session ── */
.ws-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ws-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-family: "Apercu", sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #687183;
    cursor: pointer;
    padding: 4px 0;
}

.ws-back:hover { color: #1a1a2e; }

/* ── Exercise Dots Carousel ── */
.exercise-dots {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 10px;
}

.exercise-dots::-webkit-scrollbar { display: none; }

.ex-dot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 20px;
    border: none;
    background: #f0f2f5;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ex-dot:active { transform: scale(0.96); }

.ex-dot.ex-dot-active {
    background: var(--dot-color, #4F7BF7);
    color: #fff;
}

.ex-dot.ex-dot-active .ex-dot-name { color: #fff; }

.ex-dot.ex-dot-done { background: #f0fff4; }
.ex-dot.ex-dot-done.ex-dot-active { background: var(--dot-color, #4F7BF7); }

.ex-dot-name {
    font-family: "Apercu", sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    color: #4a5568;
}

.ex-dot-tick { flex-shrink: 0; }

.day-carousel-wrap {
    overflow: visible;
    margin: 0;
}

.day-carousel {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 0;
    scrollbar-width: none;
}

.day-carousel::-webkit-scrollbar { display: none; }

.dc-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.25);
    color: #fff;
    font-family: "Apercu", sans-serif;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.dc-pill::before {
    display: none;
}

.dc-pill:hover {
    transform: translateY(-1px);
}

.dc-pill.dc-active {
    transform: scale(1.03);
    border-color: rgba(255,255,255,0.5);
}

.dc-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    flex-shrink: 0;
}

.dc-name {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.exercise-nav {
    display: flex;
    justify-content: center;
    padding: 4px 0;
}

.ex-nav-bar {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border-radius: 14px;
    padding: 6px 8px;
}

.ex-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4a5568;
    transition: background 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.ex-nav-btn:active { background: #e2e8f0; }

.ex-nav-label {
    font-family: "Apercu", sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #2d3748;
    min-width: 80px;
    text-align: center;
}

.exercise-list {
    display: grid;
    gap: 12px;
}

.workout-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}

.workout-footer {
    position: sticky;
    bottom: 0;
    padding: 12px 0;
    background: linear-gradient(transparent, #f8f9fb 30%);
    z-index: 10;
}

.workout-save-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    font-size: 0.85rem;
    border-radius: 14px;
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
    font-weight: 600;
}

.workout-save-btn:hover {
    background: #2d2d44;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26,26,46,0.2);
}

.workout-save-btn svg { stroke: #fff; }

.exercise-card {
    display: none;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    min-width: 0;
}

.exercise-card.active { display: block; }

/* Card header */
.ex-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    gap: 10px;
}

.ex-header-left {
    flex: 1;
    min-width: 0;
}

.ex-header-name {
    font-family: "Apercu", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.ex-header-meta {
    font-family: "Fira Mono", monospace;
    font-size: 0.62rem;
    color: #718096;
    margin-top: 2px;
    display: block;
}

/* Sets group */
.sets-group {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #edf2f7;
}

.sets-header-row {
    display: flex;
    padding: 8px 14px;
    background: #f8f9fb;
    border-bottom: 1px solid #edf2f7;
}

.sets-header-cell {
    flex: 1;
    font-family: "Fira Mono", monospace;
    font-size: 0.58rem;
    font-weight: 500;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sets-header-cell.sets-header-set { flex: 0 0 40px; }

.set-row {
    display: flex;
    align-items: center;
    padding: 0 14px;
    height: 48px;
    border-bottom: 1px solid #f7fafc;
}

.set-row:last-child { border-bottom: none; }

.set-num {
    flex: 0 0 40px;
    font-family: "Apercu", sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #a0aec0;
}

.set-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: "Fira Mono", monospace;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a2e;
    outline: none;
    padding: 8px 0;
    -moz-appearance: textfield;
}

.set-input::-webkit-inner-spin-button,
.set-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.set-input::placeholder { color: #cbd5e0; font-weight: 400; }

.set-input:focus {
    background: #f7fafc;
    border-radius: 6px;
    padding: 8px 6px;
    margin: 0 -6px;
}

/* Complete button */
.ex-complete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    background: var(--cmp-bg, #f0f4f8);
    font-family: "Apercu", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--cmp-color, #687183);
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.3s ease;
}

.ex-complete-btn:active { transform: scale(0.96); }

.ex-complete-btn.ex-completed {
    background: #48bb78;
    color: #fff;
    animation: pop-in 0.35s ease;
}

@keyframes pop-in {
    0% { transform: scale(0.92); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.ex-info { flex: 1; min-width: 0; }

.ex-info h3 {
    font-family: "Apercu", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.ex-meta {
    font-family: "Fira Mono", monospace;
    font-size: 0.65rem;
    color: #718096;
    margin-top: 2px;
    display: block;
}

.info-pill {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1.5px solid #e2e6ee;
    background: #fff;
    font-family: "Apercu", sans-serif;
    font-size: 0.6rem;
    font-weight: 600;
    color: #687183;
    cursor: pointer;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

.info-pill:hover { opacity: 0.7; }

.ex-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ex-note {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-family: "Fira Mono", monospace;
    font-size: 0.7rem;
    color: #2d3748;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}

.ex-note:focus { border-color: #a0aec0; }
.ex-note::placeholder { color: #a0aec0; }

.add-set-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-family: "Apercu", sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.15s;
    align-self: flex-start;
}

.add-set-btn:hover { border-color: #a0aec0; }

.timer-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Apercu", sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    list-style: none;
    padding: 6px 0;
}

.timer-summary::-webkit-details-marker { display: none; }

.timer-panel[open] .timer-summary { margin-bottom: 8px; }

.timer-bar {
    border: 1px solid #eef0f4;
    border-radius: 10px;
    background: #f8f9fb;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.timer-ring-wrap {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.timer-ring-wrap svg {
    width: 40px;
    height: 40px;
    transform: rotate(-90deg);
}

.timer-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 4;
}

.timer-ring-fg {
    fill: none;
    stroke: #6366f1;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 163.4;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.timer-ring-wrap.running .timer-ring-fg { stroke: #6366f1; }
.timer-ring-wrap.warning .timer-ring-fg { stroke: #f59e0b; }
.timer-ring-wrap.done .timer-ring-fg { stroke: #10b981; stroke-dashoffset: 0; }

.timer-ring-time {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Fira Mono", monospace;
    font-size: 0.6rem;
    font-weight: 700;
    color: #2d3748;
}

.timer-ring-wrap.done .timer-ring-time { color: #10b981; }

.timer-presets {
    display: flex;
    gap: 4px;
}

.timer-presets .preset {
    border-radius: 8px;
    font-family: "Fira Mono", monospace;
    font-size: 0.6rem;
    padding: 4px 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timer-presets .preset:hover { border-color: #a0aec0; }

.timer-presets .preset.active {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
}

.timer-btn-row {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-left: auto;
}

.timer-start-btn {
    padding: 5px 12px;
    border-radius: 8px;
    border: 1.5px solid #1a1a2e;
    background: #1a1a2e;
    color: #fff;
    font-family: "Apercu", sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timer-start-btn:hover { opacity: 0.85; }

.timer-reset-btn {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    font-family: "Apercu", sans-serif;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timer-reset-btn:hover { border-color: #a0aec0; }

.timer-fs-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.timer-fs-btn:hover { border-color: #a0aec0; }

.timer-bar.done {
    border-color: #c6f6d5;
    background: #f0fff4;
}

/* Fullscreen Timer Overlay */
.fs-timer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.fs-timer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.fs-timer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    transition: background 0.2s;
}

.fs-timer-close:hover { background: rgba(255,255,255,0.2); }

.fs-timer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.fs-timer-exercise {
    font-family: "Apercu", sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.02em;
}

.fs-timer-ring {
    position: relative;
    width: 220px;
    height: 220px;
}

.fs-timer-ring svg {
    width: 220px;
    height: 220px;
    transform: rotate(-90deg);
}

.fs-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 6;
}

.fs-ring-fg {
    fill: none;
    stroke: var(--fs-bg, #7EB5F5);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 553;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease;
}

.fs-timer-overlay.fs-done .fs-ring-fg { stroke: #10b981; }

.fs-timer-time {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Fira Mono", monospace;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
}

.fs-timer-overlay.fs-done .fs-timer-time { color: #10b981; }

.fs-timer-presets {
    display: flex;
    gap: 8px;
}

.fs-preset {
    padding: 8px 18px;
    border-radius: 20px;
    border: 1.5px solid rgba(255,255,255,0.2);
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-family: "Fira Mono", monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fs-preset:hover { border-color: rgba(255,255,255,0.4); }

.fs-preset.active {
    background: var(--fs-stroke, #2B5EA7);
    border-color: var(--fs-stroke, #2B5EA7);
    color: #fff;
}

.fs-timer-actions {
    display: flex;
    gap: 10px;
}

.fs-timer-btn {
    padding: 12px 32px;
    border-radius: 20px;
    border: none;
    font-family: "Apercu", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fs-start {
    background: var(--fs-stroke, #2B5EA7);
    color: #fff;
}

.fs-start:hover { opacity: 0.9; transform: translateY(-2px); }

.fs-reset {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.fs-reset:hover { background: rgba(255,255,255,0.15); }

.last-panel {
    border-radius: 8px;
    border: 1px solid #eef0f4;
    overflow: hidden;
}

.last-panel summary {
    padding: 8px 10px;
    font-family: "Apercu", sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.last-panel summary::-webkit-details-marker { display: none; }

.last-panel .sets-table { margin: 0; }

.sets-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Fira Mono", monospace;
    font-size: 0.8rem;
    color: #2d3748;
    line-height: 1.7;
    letter-spacing: 0.01em;
}

.sets-table th,
.sets-table td {
    padding: 8px 6px;
    text-align: left;
    border: none;
}

.sets-table th {
    color: #4a5568;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    font-weight: 500;
    padding-bottom: 6px;
    border-bottom: 1px solid #edf2f7;
}

.sets-table tbody tr {
    transition: background 0.1s ease;
}

.sets-table tbody tr:hover {
    background: #f7fafc;
}

.sets-table td {
    color: #2d3748;
    border-bottom: 1px solid #f7fafc;
}

.sets-table td:first-child {
    color: #718096;
    font-size: 0.7rem;
    width: 50px;
}

/* Clean inline inputs (legacy compat) */
.sets-table-input td input {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px 10px;
    font-family: "Fira Mono", monospace;
    font-size: 0.8rem;
    color: #2d3748;
    background: #f7fafc;
    transition: all 0.15s ease;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

.sets-table-input td input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px #e2e8f0;
}

.sets-table-input td input:hover {
    background: #edf2f7;
}

.sets-table.compact {
    font-size: 0.55rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stat-card {
    border: 1px solid #d9e0ea;
    border-radius: var(--radius-sm);
    background: #ffffff;
    padding: 11px;
}

.stat-card h3 {
    color: var(--ink-muted);
    font-size: 0.63rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 5px;
}

.history {
    margin-top: 11px;
    display: grid;
    gap: 8px;
}

.history-item {
    border: 1px solid #d9e0ea;
    border-radius: var(--radius-xs);
    background: #ffffff;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    color: #5f6d82;
    font-size: 0.76rem;
}

.history-item span:last-child {
    color: #39495f;
    font-weight: 500;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
}

.calendar-day {
    min-height: 92px;
    border: 1px solid #d9e0ea;
    border-radius: var(--radius-xs);
    background: #ffffff;
    padding: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.calendar-day:hover:not(.empty) {
    transform: translateY(-1px);
    border-color: #2f82f0;
}

.calendar-day.empty {
    border-color: transparent;
    background: transparent;
    cursor: default;
}

.calendar-day-number {
    color: var(--ink-muted);
    font-size: 0.66rem;
}

.calendar-stamp {
    margin-top: auto;
    align-self: flex-start;
    border-radius: var(--radius-pill);
    background: #edf4ff;
    color: #5b6880;
    border: 1px solid #d5dce9;
    padding: 2px 6px;
    font-size: 0.57rem;
}

.calendar-score {
    color: #7d8899;
    font-size: 0.57rem;
    line-height: 1.28;
}

.upload {
    position: relative;
    overflow: hidden;
}

.upload input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(28, 37, 52, 0.22);
    display: grid;
    place-items: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 120;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    width: min(720px, 100%);
    max-height: 84vh;
    border-radius: 16px;
    border: 1px solid #eef0f4;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.modal-body {
    overflow: auto;
    display: grid;
    gap: 8px;
    line-height: 1.5;
    color: #5e6b80;
    font-size: 0.83rem;
}

.modal-body h4 {
    color: #8893a3;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-body ul {
    padding-left: 16px;
    display: grid;
    gap: 4px;
}

.log-exercises {
    margin-top: 8px;
    display: grid;
    gap: 8px;
}

.log-exercise h4 {
    color: #36455b;
    font-size: 0.87rem;
    margin-bottom: 4px;
}

.app-title h1,
.app-badge,
.brand-mark,
.tab,
.level-chip,
.app-kicker,
.date-wrap,
.metric-label,
.countdown-badge,
.status-pill,
.pill-list li,
.exercise-count,
.last-panel h4,
.sets-table th,
.stat-card h3,
.modal-body h4 {
    font-family: "Fira Mono", monospace !important;
    font-weight: 400;
    text-transform: uppercase;
}

@media (max-width: 1100px) {
    .progress-panel,
    .challenge-panel,
    .overview-dual,
    .achievement-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .dash-top {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-mid,
    .dash-bottom {
        grid-template-columns: 1fr;
    }

    .progress-panel {
        min-height: 360px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .app {
        padding: 12px;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        gap: 10px;
    }

    .sidebar {
        order: 2;
        flex-direction: row;
        align-items: stretch;
        border: none;
        border-radius: 0;
        padding: 6px 12px calc(6px + env(safe-area-inset-bottom, 0px));
        gap: 0;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        height: auto;
        z-index: 100;
        background: rgba(255,255,255,0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid #e8eaef;
    }

    .app-title {
        display: none;
    }

    .tab-logout {
        display: none;
    }

    .tabs {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .tab {
        flex: 1;
        height: auto;
        border-radius: 10px;
        padding: 6px 0 4px;
        font-size: 0.95rem;
        color: rgba(96, 106, 122, 0.82);
        flex-direction: column;
        gap: 2px;
        transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
    }

    .tab i,
    .tab svg {
        display: inline-block;
    }

    .tab::before {
        content: attr(data-label);
        display: block;
        order: 1;
        font-family: "Apercu", sans-serif;
        font-size: 0.55rem;
        font-weight: 400;
        letter-spacing: 0.02em;
        color: inherit;
    }

    .tab.active {
        opacity: 1;
        transform: scale(1.05);
        background: #edf0f4;
        color: #1a1a2e;
    }

    .tab::after,
    .tab.active::after {
        display: none;
    }

    .tab[data-label]::after {
        display: none;
    }

    .main {
        order: 1;
        padding: 0;
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    .app-bar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .app-bar-actions {
        justify-content: flex-start;
    }

    .content-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 12px 16px;
    }

    .content-head::after { display: none; }

    .content-head-left {
        align-items: center;
    }

    .content-head .page-title {
        display: none;
    }

    .mobile-hero {
        display: block;
        font-family: "Apercu", sans-serif;
        font-size: 1.65rem;
        font-weight: 600;
        color: #1a1a2e;
        text-align: center;
        padding: 0;
    }

    .mobile-date {
        display: block;
        font-family: "Apercu", sans-serif;
        font-size: 0.75rem;
        color: #a0aec0;
        text-align: center;
        letter-spacing: 0.01em;
        font-weight: 400;
        padding-top: 4px;
    }

    .mobile-top-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 4px 0 2px;
    }

    .ws-back-mobile {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        font-family: "Apercu", sans-serif;
        font-size: 0.72rem;
        font-weight: 500;
        color: #687183;
        cursor: pointer;
        padding: 4px 0;
    }

    .ws-back-mobile:hover { color: #1a1a2e; }

    .app-bar-actions {
        display: none;
    }

    .today-actions-grid {
        justify-content: center;
    }

    .top-date {
        width: 100%;
    }

    .content {
        padding: 0;
    }

    .overview-shell {
        padding: 0 16px 16px;
    }

    .view.active {
        padding: 0 16px 16px;
    }

    .view.active[data-view="overview"] {
        padding: 0;
    }

    .timer-bar { margin: 0 14px; }

    .dc-pill { padding: 6px 10px 6px 6px; gap: 6px; }
    .dc-icon { width: 22px; height: 22px; }
    .dc-name { font-size: 0.65rem; }

    .calendar-day {
        min-height: 74px;
        padding: 4px;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-stamp {
        font-size: 0.5rem;
        padding: 1px 4px;
    }

    .calendar-day-number {
        font-size: 0.58rem;
    }

    .calendar-score {
        font-size: 0.5rem;
    }
}

@media (max-width: 640px) {
    .app {
        padding: 8px;
    }

    .content {
        border-radius: 8px;
        padding: 0;
    }

    .hero-title {
        font-size: 28px;
    }

    .content-head {
        padding: 12px 12px 14px;
    }

    .overview-shell,
    .view.active {
        padding: 0 12px 12px;
    }

    .view.active[data-view="overview"] {
        padding: 0;
    }

    .overview-metrics,
    .overview-columns,
    .dash-top,
    .dash-mid,
    .dash-bottom,
    .stats {
        grid-template-columns: 1fr;
    }

    .overview-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .overview-chip-row {
        justify-content: flex-start;
    }

    .workout-btn-grid {
        gap: 12px;
        padding-left: 0;
        padding-right: 0;
    }

    .workout-jump-btn {
        width: 180px;
        height: 240px;
    }

    .dc-pill { padding: 6px 10px 6px 6px; gap: 5px; }
    .dc-icon { width: 22px; height: 22px; }
    .dc-name { font-size: 0.65rem; }

    .timer-bar {
        padding: 8px 10px;
        gap: 6px;
    }

    .timer-ring-wrap { width: 34px; height: 34px; }
    .timer-ring-wrap svg { width: 34px; height: 34px; }
    .timer-ring-time { font-size: 0.5rem; }

    .timer-presets .preset { font-size: 0.55rem; padding: 3px 6px; }
    .timer-start-btn { font-size: 0.6rem; padding: 4px 10px; }
    .timer-reset-btn { font-size: 0.6rem; padding: 4px 8px; }
    .timer-fs-btn { width: 24px; height: 24px; }

    .ex-top { padding: 10px 12px; gap: 8px; }
    .ex-info h3 { font-size: 0.85rem; }
    .ex-meta { font-size: 0.6rem; }
    .ex-body { padding: 10px 12px 12px; }
    .info-pill { font-size: 0.55rem; padding: 4px 8px; }
    .nav-arrow { width: 30px; height: 30px; }

    .sets-table-input td input { font-size: 0.75rem; padding: 6px 4px; }
    .add-set-btn { font-size: 0.6rem; }

    .fs-timer-ring { width: 180px; height: 180px; }
    .fs-timer-ring svg { width: 180px; height: 180px; }
    .fs-timer-time { font-size: 2.4rem; }
    .fs-timer-exercise { font-size: 0.95rem; }
    .fs-timer-btn { padding: 10px 24px; font-size: 0.82rem; }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 56px;
        padding: 3px;
        border-radius: 6px;
    }

    .calendar-day-number {
        font-size: 0.52rem;
    }

    .calendar-stamp {
        font-size: 0.45rem;
        padding: 1px 3px;
    }

    .calendar-score {
        display: none;
    }

    .status-pill {
        width: 100%;
    }

    .panel-actions {
        gap: 7px;
    }

    .btn:not(.hero-cta),
    .btn-small {
        font-size: 0.64rem;
    }
}
