.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); padding: 0.625rem 1.25rem; border: none; border-radius: var(--radius-md); font-size: 0.9375rem; font-weight: 600; font-family: var(--font-sans); cursor: pointer; transition: all var(--transition); white-space: nowrap; text-decoration: none; line-height: 1; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:active { transform: none; }
.btn-primary { background: var(--color-accent); color: white; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-success { background: var(--color-work); color: white; }
.btn-danger { background: var(--color-danger); color: white; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; min-width: 44px; min-height: 44px; }
.btn-round { border-radius: var(--radius-full); }
.card { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: var(--space-lg); transition: all var(--transition); }
.card:hover { border-color: var(--border); box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); }
.card-title { font-size: 1.0625rem; font-weight: 600; }
.card-body { color: var(--text-secondary); font-size: 0.875rem; }
.card-footer { margin-top: var(--space-md); display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: var(--radius-full); font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge-work { background: var(--color-work-bg); color: var(--color-work); }
.badge-rest { background: var(--color-rest-bg); color: var(--color-rest); }
.badge-prep { background: var(--color-prep-bg); color: var(--color-prep); }
.badge-tabata { background: rgba(139,92,246,0.15); color: var(--color-accent); }
.badge-hiit { background: rgba(236,72,153,0.15); color: #ec4899; }
.badge-emom { background: rgba(34,197,94,0.15); color: var(--color-work); }
.badge-amrap { background: rgba(245,158,11,0.15); color: var(--color-prep); }
.badge-custom { background: rgba(100,116,139,0.15); color: var(--text-secondary); }
.form-group { margin-bottom: var(--space-md); }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary); margin-bottom: var(--space-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.form-input,.form-select,.form-textarea { width: 100%; padding: 0.625rem 0.875rem; background: var(--bg-primary); border: 1.5px solid var(--border-light); border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.9375rem; font-family: var(--font-sans); transition: border-color var(--transition); }
.form-input:focus,.form-select:focus,.form-textarea:focus { outline: none; border-color: var(--color-accent); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: var(--space-md); }
.form-row > * { flex: 1; }
.toggle { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; }
.toggle-track { width: 44px; height: 24px; background: var(--bg-tertiary); border-radius: var(--radius-full); position: relative; transition: background var(--transition); }
.toggle.active .toggle-track { background: var(--color-accent); }
.toggle-thumb { width: 18px; height: 18px; background: white; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform var(--transition); }
.toggle.active .toggle-thumb { transform: translateX(20px); }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: var(--space-md); opacity: 0; transition: opacity 0.2s; }
.modal-overlay.active { opacity: 1; }
.modal { background: var(--bg-secondary); border-radius: var(--radius-xl); width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; padding: var(--space-xl); transform: scale(0.95); transition: transform 0.2s; }
.modal-overlay.active .modal { transform: scale(1); }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: var(--space-md); }
.modal-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-lg); justify-content: flex-end; }
.toast-container { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: var(--space-sm); pointer-events: none; }
.toast { padding: 0.75rem 1.25rem; background: var(--bg-tertiary); color: var(--text-primary); border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease; pointer-events: auto; }
.toast-success { border-left: 3px solid var(--color-success); }
.toast-error { border-left: 3px solid var(--color-danger); }
.toast-info { border-left: 3px solid var(--color-accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.navbar { position: fixed; top: 0; left: 0; right: 0; height: 56px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-light); display: flex; align-items: center; padding: 0 var(--space-md); z-index: 100; }
.navbar-brand { font-size: 1.125rem; font-weight: 800; color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: var(--space-sm); }
.navbar-brand svg { width: 24px; height: 24px; }
.navbar-spacer { flex: 1; }
.navbar-actions { display: flex; align-items: center; gap: var(--space-xs); }
.navbar-avatar { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; height: 60px; background: var(--bg-secondary); border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-around; z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0); }
.bottom-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 48px; min-height: 48px; padding: var(--space-xs) var(--space-sm); color: var(--text-muted); text-decoration: none; font-size: 0.625rem; font-weight: 600; transition: color var(--transition); cursor: pointer; background: none; border: none; font-family: var(--font-sans); }
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--color-accent); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
.stat-card { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: var(--space-md); text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.interval-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.interval-item { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); background: var(--bg-primary); border-radius: var(--radius-md); border-left: 3px solid var(--color-work); }
.interval-item[data-type="rest"] { border-left-color: var(--color-rest); }
.interval-item[data-type="prep"] { border-left-color: var(--color-prep); }
.interval-item .interval-label { flex: 1; font-weight: 500; }
.interval-item .interval-duration { font-family: var(--font-mono); font-weight: 600; color: var(--text-secondary); }
.interval-actions { display: flex; gap: var(--space-xs); }
.tabs { display: flex; border-bottom: 1px solid var(--border-light); margin-bottom: var(--space-md); }
.tab { padding: var(--space-sm) var(--space-md); color: var(--text-muted); font-weight: 600; font-size: 0.875rem; cursor: pointer; border-bottom: 2px solid transparent; transition: all var(--transition); background: none; border-top: none; border-left: none; border-right: none; font-family: var(--font-sans); }
.tab.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); padding-top: var(--space-md); }
.page-header h1 { font-size: 1.5rem; }
.workout-card { background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: var(--space-md); margin-bottom: var(--space-sm); }
.workout-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--space-sm); }
.workout-card-stats { display: flex; gap: var(--space-md); font-size: 0.8125rem; color: var(--text-secondary); flex-wrap: wrap; }
.offline-indicator { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--color-danger); margin-left: var(--space-xs); }
.offline-indicator.visible { display: inline-block; }
