/* Vorschau-Modus für erledigte Workouts */
.preview-mode {
  opacity: 0.6;
  filter: grayscale(0.5);
  pointer-events: auto;
}

/* Einstellungen (Settings) */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}

.exercise-variables {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exercise-variable-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.7fr 0.7fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

.exercise-variable-row input {
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.95rem;
}

.exercise-variable-row input::placeholder {
  color: var(--text-muted);
}

.exercise-variable-actions {
  display: flex;
  justify-content: flex-end;
}

.exercise-variable-row .btn--icon {
  border-radius: 10px;
  padding: 6px 10px;
  height: auto;
}

@media (max-width: 720px) {
  .exercise-variable-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name prefix"
      "sets reps"
      "actions actions";
  }

  .exercise-variable-row input[data-field="name"] {
    grid-area: name;
  }

  .exercise-variable-row input[data-field="prefix"] {
    grid-area: prefix;
  }

  .exercise-variable-row input[data-field="sets"] {
    grid-area: sets;
  }

  .exercise-variable-row input[data-field="reps"] {
    grid-area: reps;
  }

  .exercise-variable-actions {
    grid-area: actions;
  }
}

.setting-group {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.setting-group--disabled {
  opacity: 0.55;
}

.setting-group--disabled .slider {
  cursor: not-allowed;
}

.settings-form label {
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
}

.import-export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

/* Custom Number Control */
.number-control {
  display: flex;
  align-items: center;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.btn-control {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s;
}

.btn-control:hover {
  background: rgba(63, 208, 255, 0.1);
}

.number-control input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  width: 2.5em;
  text-align: center;
  font-weight: 600;
  -moz-appearance: textfield;
}

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

.number-control input:focus {
  outline: none;
}

:root {
  --bg: #0b0c10;
  --bg-elevated: #151821;
  --bg-elevated-soft: #1d202b;
  --border-subtle: #262a35;
  --text: #e4e7ef;
  --text-muted: #8c92a4;
  --accent: #3fd0ff;
  --accent-soft: rgba(63, 208, 255, 0.16);
  --danger: #ff4b5c;
  --success: #4caf50;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.5);
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease-out;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Roboto", "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

body {
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* Layout */

#app {
  width: 100%;
  max-width: 1100px;
  min-height: 100vh;
  padding: 24px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  background: linear-gradient(135deg, #10131d, #151a25);
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  letter-spacing: 0.05em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.standup-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-auth {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-btn {
  min-width: 72px;
}

.auth-popover {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 190px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-soft);
  display: none;
  flex-direction: column;
  gap: 10px;
  z-index: 1200;
}

.auth-popover--visible {
  display: flex;
}

.auth-popover-name {
  margin: 0;
  color: var(--text);
  font-size: 0.9rem;
  word-break: break-word;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.date-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.01em;
}

.date-label--hidden {
  display: none;
}

/* Views */

.view {
  flex: 1;
  padding: 20px 18px;
  border-radius: 20px;
  background: radial-gradient(circle at top left, #151929 0, #0b0c10 55%);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.view--active {
  display: flex;
}

.view--hidden {
  display: none;
}

/* Overview */

#overviewView {
  scrollbar-color: rgba(63, 208, 255, 0.6) rgba(15, 23, 36, 0.7);
  scrollbar-width: thin;
}

#overviewView::-webkit-scrollbar {
  width: 10px;
}

#overviewView::-webkit-scrollbar-track {
  background: rgba(15, 23, 36, 0.7);
  border-radius: 999px;
}

#overviewView::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3fd0ff, #0099ff);
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 36, 0.7);
}

#overviewView::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #63ddff, #1aa7ff);
}

.overview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#overviewView h2 {
  margin: 0;
  font-size: 1.3rem;
}

.date-pill {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(63, 208, 255, 0.12);
  border: 1px solid var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
  line-height: 1;
}

.date-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
}

.date-nav-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
}

.date-nav-today {
  padding: 8px 14px;
  gap: 8px;
}

.hint {
  margin: 0 0 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.workout-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

/* Workout Card */

.workout-card {
  position: relative;
  padding: 16px 16px 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #141722, #181c28);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform var(--transition-med), box-shadow var(--transition-med),
    border-color var(--transition-med), background var(--transition-med);
}

.workout-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.workout-card--completed {
  opacity: 0.5;
  filter: grayscale(0.6);
}

/* Markierung für Workouts, die heute nicht stattfinden */
.workout-card--not-today {
  opacity: 0.5;
  filter: grayscale(0.4);
}

.workout-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-right: 24px;
  /* Space for edit button */
}

.workout-time {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.workout-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
}

.workout-title {
  margin: 2px 0 0;
  font-size: 0.98rem;
}

.workout-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.workout-status {
  font-size: 0.8rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(9, 12, 20, 0.85);
  color: var(--text-muted);
}

.workout-status--pending {
  border-color: var(--accent-soft);
  color: var(--accent);
}

.workout-status--completed {
  border-color: rgba(76, 175, 80, 0.35);
  color: var(--success);
}

.workout-status--overdue {
  border-color: rgba(255, 75, 92, 0.4);
  color: var(--danger);
}

/* Status für Workouts, die heute nicht stattfinden */
.workout-status--not-today {
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

/* Kleines Label für Wochentage */
.workout-days {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Edit Button on Card */
.btn-edit {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.btn-edit:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

/* Buttons */

.btn {
  cursor: pointer;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 0.86rem;
  padding: 8px 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast), color var(--transition-fast);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn--disabled {
  opacity: 0.6;
  cursor: default;
}

.btn--primary {
  background: radial-gradient(circle at 0 0, #3fd0ff, #0099ff);
  color: #020308;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.75);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
}

.btn--small {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.btn--danger {
  background: rgba(255, 75, 92, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 75, 92, 0.2);
}

.btn--danger:hover {
  background: rgba(255, 75, 92, 0.2);
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.btn-icon:hover {
  color: var(--text);
}

/* Active View */

#activeView {
  align-items: stretch;
  overflow: hidden;
  min-height: 0;
}

#backToOverview {
  align-self: flex-start;
  margin-bottom: 10px;
}

.active-layout {
  display: flex;
  gap: 24px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  height: 100%;
  margin: 0;
}

.active-container {
  min-height: 0;
  max-height: 100%;
  flex: 1;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, #171c29 0, #0d1019 55%);
  border: 1px solid var(--border-subtle);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.active-header {
  text-align: center;
}

.active-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.active-label {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.active-time {
  margin: 2px 0 0;
  font-size: 0.95rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.active-date {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.active-date--off {
  color: var(--accent);
}

.active-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  scrollbar-color: rgba(63, 208, 255, 0.6) rgba(15, 23, 36, 0.7);
  scrollbar-width: thin;
  padding-right: 6px;
}

.active-body::-webkit-scrollbar {
  width: 10px;
}

.active-body::-webkit-scrollbar-track {
  background: rgba(15, 23, 36, 0.7);
  border-radius: 999px;
}

.active-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3fd0ff, #0099ff);
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 36, 0.7);
}

.active-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #63ddff, #1aa7ff);
}

.exercise-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 100%;
  width: 100%;
  text-align: left;
  font-size: clamp(var(--exercise-font-min, 1.3rem), var(--exercise-font-vw, 3vw), var(--exercise-font-max, 2.1rem));
  line-height: var(--exercise-line-height, 1.5);
  overflow-wrap: anywhere;
}

.exercise-list li {
  margin-bottom: 14px;
  padding-left: 0;
  position: relative;
}

.exercise-list .exercise-item--bullet {
  padding-left: 18px;
}

.exercise-list .exercise-item--bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(2px);
  color: var(--accent);
}

.exercise-item--heading {
  color: var(--accent);
  font-weight: 600;
}

.exercise-item strong {
  font-weight: 700;
}

.exercise-item u {
  text-decoration: underline;
}

.exercise-item a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.exercise-adjustable-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  border-radius: 8px;
  padding: 0 2px;
}

.exercise-adjustable-number__controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-2px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.exercise-adjustable-number:hover .exercise-adjustable-number__controls,
.exercise-adjustable-number:focus-within .exercise-adjustable-number__controls {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.exercise-adjustable-number__btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(63, 208, 255, 0.45);
  background: rgba(10, 16, 28, 0.95);
  color: var(--accent);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0;
}

.exercise-adjustable-number__btn:hover {
  background: rgba(63, 208, 255, 0.18);
}

.exercise-adjustable-number__original {
  opacity: 0.85;
}

.exercise-adjustable-number__new {
  color: #6dffb0;
  font-weight: 700;
}

/* Timer & Footer */

.active-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.timer-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  width: min(200px, 32vw);
  flex-shrink: 0;
}

.workout-timers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.workout-timer {
  width: 100%;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--accent-soft);
  background: linear-gradient(135deg, rgba(12, 18, 30, 0.95), rgba(7, 12, 20, 0.95));
  color: var(--text);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  text-align: left;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.workout-timer:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.workout-timer--active {
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(63, 208, 255, 0.35);
  transform: scale(1.05);
}

.workout-timer--running .workout-timer-time {
  color: var(--accent);
  text-shadow: 0 6px 18px rgba(63, 208, 255, 0.35);
}

.workout-timer-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workout-timer-name {
  font-weight: 600;
  font-size: 1rem;
}

.workout-timer-badge {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(63, 208, 255, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.workout-timer-time {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-variant-numeric: tabular-nums;
}

.workout-timer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(15, 23, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  scrollbar-color: rgba(63, 208, 255, 0.6) rgba(15, 23, 36, 0.7);
  scrollbar-width: thin;
}

.modal-content::-webkit-scrollbar {
  width: 10px;
}

.modal-content::-webkit-scrollbar-track {
  background: rgba(15, 23, 36, 0.7);
  border-radius: 999px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3fd0ff, #0099ff);
  border-radius: 999px;
  border: 2px solid rgba(15, 23, 36, 0.7);
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #63ddff, #1aa7ff);
}

.modal--hidden .modal-content {
  transform: translateY(20px);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row--repeat {
  align-items: center;
}

.repeat-left,
.repeat-right {
  flex: 1;
  display: flex;
}

.repeat-left {
  align-items: stretch;
}

.repeat-left .form-group {
  margin-bottom: 0;
  width: 100%;
}

.repeat-right {
  justify-content: flex-end;
}

.form-row--repeat .repeat-right {
  align-items: stretch;
}

.form-row--repeat .repeat-switch {
  display: grid;
  grid-template-rows: auto 42px;
  align-items: start;
  justify-content: flex-start;
  gap: 6px;
}

.form-row--repeat .repeat-switch .switch {
  align-self: center;
  margin-top: 15%;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group--switch {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.is-hidden {
  display: none;
}

.timer-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated-soft);
}

.timer-row-fields {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.timer-name-input,
.timer-seconds-input {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.9rem;
}

.timer-seconds-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.timer-repeat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.timer-secondary-seconds-label--hidden {
  visibility: hidden;
}

.timer-remove {
  white-space: nowrap;
}

.timer-remove i {
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.days-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.day-checkbox {
  display: none;
}

.day-label {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.day-checkbox:checked+.day-label {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.hint-small {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.hint-small code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
}

.preview-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-label {
  color: var(--text-muted);
}

.preview-content {
  color: var(--text);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-content.preview-empty {
  color: var(--accent);
}

.preview-content .exercise-item {
  position: relative;
  padding-left: 0;
}

.preview-content .exercise-item--bullet {
  padding-left: 18px;
}

.preview-content .exercise-item--bullet::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  transform: translateY(2px);
  color: var(--accent);
}

.preview-content .exercise-item--heading {
  color: var(--accent);
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.spacer {
  flex: 1;
}

/* Responsive */

@media (max-width: 768px) {
  #app {
    padding: 16px 10px 24px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .active-container {
    padding: 18px 12px 14px;
  }

  .exercise-list {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }

  .active-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .active-layout {
    flex-direction: column;
  }

  .timer-section {
    width: 100%;
  }

  .btn--primary {
    width: 100%;
  }

  .date-actions {
    width: 100%;
    justify-content: space-between;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .title-row,
  .subtitle-row {
    width: 100%;
  }

  .subtitle-row {
    align-items: flex-start;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .setting-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .timer-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timer-row-fields {
    grid-template-columns: 1fr;
  }
}

/* Stand Up Alert Styles */

.standup-timer {
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.standup-timer.active {
  color: #9ed0ff;
}

.standup-timer.standing {
  color: var(--success);
}

.standup-reset {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.standup-reset:hover:not(:disabled) {
  background: rgba(62, 140, 255, 0.08);
  color: #b9deff;
  transform: rotate(-10deg);
}

.standup-reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(62, 140, 255, 0.35);
}

.standup-reset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.settings-section {
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px;
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-row {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

.category-row input {
  flex: 1;
  min-width: 180px;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text);
  padding: 8px 10px;
  font-size: 0.95rem;
}

.category-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.category-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 720px) {
  .category-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "toggle"
      "actions";
  }

  .category-row input {
    grid-area: name;
  }

  .category-toggle {
    grid-area: toggle;
  }

  .category-actions {
    grid-area: actions;
  }
}

.standup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.standup-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.standup-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-inputs input {
  width: 60px;
  background: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 6px;
  color: var(--text);
  text-align: center;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.standup-switch {
  margin-left: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-elevated-soft);
  border: 1px solid var(--border-subtle);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
}

input:checked+.slider {
  background-color: var(--accent-soft);
  border-color: var(--accent);
}

input:checked+.slider:before {
  transform: translateX(24px);
  background-color: var(--accent);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.app-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 12, 16, 0.84);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.app-loading-overlay--hidden {
  display: none;
}

.app-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.app-loading-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  animation: app-loading-spin 0.9s linear infinite;
}

@keyframes app-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
