@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

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

[hidden] {
  display: none !important;
}

:root {
  --primary-color: #2dd4bf;
  --primary-dark: #14b8a6;
  --primary-light: #5eead4;
  --on-primary: #042f2e;
  --primary-soft: rgba(45, 212, 191, 0.14);
  --primary-ring: rgba(45, 212, 191, 0.28);
  --wash: rgba(45, 212, 191, 0.07);
  --secondary-color: #2dd4bf;
  --accent-color: #2dd4bf;
  --success-color: #2dd4bf;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --bg: #09090b;
  --bg-gradient: #09090b;
  --card-bg: #141418;
  --surface-2: #1c1c22;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-light: #a1a1aa;
  --border-color: rgba(255, 255, 255, 0.08);
  --tab-bar-bg: #0c0c10;
  --tab-active-bg: var(--primary-color);
  --tab-active-fg: var(--on-primary);
  --input-bg: #0f0f13;
  --sheet-bg: #111114;
  --cal-day-mix: #1c1c22;
  --cal-day-ink: #fafafa;
  --shadow-sm: none;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-xl: none;
}

html {
  -webkit-tap-highlight-color: transparent;
}

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

button,
a,
[role="button"],
.shift-card,
.agenda-block,
.schedule-item,
.theme-chip,
.accent-dot,
.cal-grid-day,
.cal-month-adj,
.cal-view-toggle,
.cal-owner-btn,
.cal-owner-option {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  appearance: none;
  -webkit-appearance: none;
  touch-action: manipulation;
  outline: none;
  transition: transform 0.14s ease, filter 0.14s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

button:focus,
a:focus,
[role="button"]:focus,
.shift-card:focus,
.agenda-block:focus,
.schedule-item:focus,
.theme-chip:focus,
.accent-dot:focus,
.cal-grid-day:focus,
.cal-month-adj:focus,
.cal-view-toggle:focus,
.cal-owner-btn:focus,
.cal-owner-option:focus {
  outline: none;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
.theme-chip:focus-visible,
.accent-dot:focus-visible,
.cal-grid-day:focus-visible,
.cal-month-adj:focus-visible,
.cal-view-toggle:focus-visible,
.cal-owner-btn:focus-visible,
.cal-owner-option:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:not(:disabled):active,
a:active,
[role="button"]:active,
.shift-card:active,
.agenda-block:active,
.schedule-item:active,
.theme-chip:active,
.accent-dot:active,
.cal-grid-day:active,
.cal-month-adj:active,
.cal-view-toggle:active,
.cal-owner-btn:active,
.cal-owner-option:active {
  transform: scale(0.96);
  filter: brightness(1.08);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, var(--wash), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

.app-container {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px));
}

.app-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 2px 4px;
  background: transparent;
  border: 0;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: none;
}

.icon-btn svg,
.tab-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn-add {
  background: var(--text-primary);
  color: var(--bg);
}

.settings-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.settings-head h2 {
  margin-bottom: 2px;
  padding-right: 0;
}

.settings-user {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

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

.app-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.tab-panel.is-active {
  display: flex;
}

.today-hero {
  padding: 4px 4px 8px;
}

.today-weekday {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.today-hero-date {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.today-daynum {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -2.5px;
  line-height: 0.9;
  color: var(--text-primary);
}

.today-month {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-bottom: 8px;
  color: var(--text-primary);
}

.today-hero .day-remaining {
  margin: 10px 0 0;
  font-size: 13px;
}

.today-tasks-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 2px 4px;
}

.today-tasks-head h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
}

.btn-block {
  width: 100%;
  margin-top: 10px;
}

.link-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.work-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-picker .work-chip {
  flex: 1 1 calc(50% - 8px);
  min-width: 140px;
}

.work-picker .work-chip-name {
  flex: 1 1 auto;
}

.work-chip.is-selected {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-ring);
  background: var(--primary-soft);
}

.work-chip-dot-plus {
  background: rgba(255, 255, 255, 0.2);
  position: relative;
}

.work-chip-dot-plus::before,
.work-chip-dot-plus::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.work-chip-dot-plus::before {
  width: 8px;
  height: 2px;
}

.work-chip-dot-plus::after {
  width: 2px;
  height: 8px;
}

.paid-hours-card {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-ring);
  font-family: 'Space Grotesk', sans-serif;
}

.paid-hours-card[hidden] {
  display: none;
}

.paid-hours-kicker {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.paid-hours-card strong {
  font-size: 28px;
  font-weight: 800;
}

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--tab-bar-bg) 88%, transparent);
  border-top: 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tab-btn {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: var(--surface-2);
  color: var(--text-primary);
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-btn.is-active {
  width: auto;
  min-width: 72px;
  padding: 0 22px;
  border-radius: 999px;
  color: var(--tab-active-fg, var(--on-primary));
  background: var(--tab-active-bg, var(--primary-color));
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.time-field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.time-field input[type="time"] {
  width: 100%;
  font-size: 16px;
}

.break-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.break-preset.is-active,
.repeat-mode.is-active,
.repeat-day.is-active {
  background: var(--primary-soft);
  border-color: var(--primary-color);
  color: var(--primary-light);
}

.repeat-until-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
}

.repeat-until-wrap label {
  margin: 0;
}

.repeat-until-wrap select {
  flex: 1;
}

.paid-hours-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 12px;
}

.day-agenda {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 16px;
  position: relative;
}

.shift-card,
.agenda-block,
.schedule-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 18px 16px;
  border-radius: 28px;
  border: 0;
  background: color-mix(in srgb, var(--work-color, var(--surface-2)) 42%, var(--cal-day-mix));
  color: var(--cal-day-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.shift-card .schedule-item-name,
.agenda-block .schedule-item-name,
.schedule-item .schedule-item-name {
  color: var(--cal-day-ink);
  font-size: 17px;
}

.shift-card .schedule-item-meta,
.agenda-block .schedule-item-meta,
.schedule-item .schedule-item-meta {
  color: color-mix(in srgb, var(--cal-day-ink) 72%, transparent);
}

.duration-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cal-day-ink) 12%, transparent);
  color: var(--cal-day-ink);
  font-size: 12px;
  font-weight: 700;
}

.shift-card.is-open,
.agenda-shift.is-open .agenda-block,
.schedule-item.is-open {
  box-shadow: 0 0 0 2px var(--primary-color);
}

.agenda-block-main {
  min-width: 0;
  flex: 1 1 auto;
}

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

.stats-primary .stat-card {
  padding: 14px 16px;
}

.stats-primary .stat-value {
  font-size: 28px;
}

.stat-card {
  background: var(--card-bg);
  border: 0;
  border-radius: 28px;
  padding: 22px;
}

.stat-card.stat-card-primary {
  grid-column: span 1;
}

.stat-card h3 {
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #fff;
}

.stat-sub {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.hours-breakdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.hours-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--primary-color);
  font-size: 13px;
}

.hours-breakdown-empty {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 10px;
}

.paycheck-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paycheck-item {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 14px;
}

.paycheck-item.highlight {
  color: var(--text-primary);
  font-weight: 700;
}

.goal-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goal-info {
  color: var(--text-primary);
  font-weight: 600;
}

.progress-bar {
  height: 10px;
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.goal-status {
  font-size: 13px;
  color: var(--text-secondary);
}

.calendar-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.works-panel,
.reports-section,
.more-section {
  background: var(--card-bg);
  border: 0;
  border-radius: 28px;
  padding: 18px 16px;
}

.calendar-section {
  background: transparent;
  border: 0;
  padding: 0;
}

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

.works-panel-head .btn-primary {
  flex-shrink: 0;
  min-height: 44px;
}

.works-chips {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.work-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  flex-shrink: 0;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
}

.works-panel h3,
.reports-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 6px;
}

.works-help {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 0;
}

.work-chip-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.work-chip-name {
  font-weight: 600;
  flex: 1;
}

.work-chip-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 999px;
}

.work-chip-badge.hourly {
  color: var(--primary-light);
  background: var(--primary-soft);
}

.reports-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.reports-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-range-select,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.report-range-select:focus,
.time-field input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-group input[type="color"] {
  width: 48px;
  height: 36px;
  padding: 2px;
  margin-top: 6px;
}

.report-range-select {
  width: auto;
  min-width: 160px;
}

.reports-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.summary-card {
  background: var(--surface-2);
  border: 0;
  border-radius: 22px;
  padding: 16px;
}

.summary-card h4 {
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.summary-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.reports-charts {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.chart-container {
  background: var(--surface-2);
  border-radius: 16px;
  padding: 16px;
}

.chart-container h3 {
  margin-bottom: 12px;
  font-size: 16px;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 14px;
  padding: 12px 16px;
  min-height: 44px;
  transition: transform 0.14s ease, filter 0.14s ease, background 0.15s ease, color 0.15s ease;
}

.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--on-primary);
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.28);
}

.btn-tiny {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-content {
  width: min(560px, 100%);
  background: var(--card-bg);
  border: 0;
  border-radius: 28px;
  padding: 24px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.sheet-modal {
  padding: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.28s ease;
}

.sheet-modal.is-open {
  background: rgba(0, 0, 0, 0.6);
}

.sheet-content {
  width: 100%;
  max-width: none;
  border-radius: 24px 24px 0 0;
  max-height: min(92vh, 920px);
  padding: 4px 16px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  background: var(--sheet-bg);
}

.sheet-modal.is-open .sheet-content {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 8px auto 12px;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
  padding-bottom: 10px;
  background: var(--sheet-bg);
}

.sheet-header h2 {
  margin-bottom: 4px;
  padding-right: 0;
}

.sheet-header .day-remaining {
  margin-bottom: 0;
}

.sheet-close {
  flex-shrink: 0;
  border: 0;
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sheet-footer {
  flex-shrink: 0;
  background: var(--sheet-bg);
  border-top: 1px solid var(--border-color);
  padding: 10px 0 calc(16px + env(safe-area-inset-bottom, 0px));
}

.sheet-footer .modal-actions {
  margin-top: 0;
}

.sheet-footer .btn-primary,
.sheet-footer .btn-secondary {
  flex: 1;
}

.modal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 8px;
  padding-right: 32px;
}

.close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

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

.schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.schedule-empty {
  color: var(--text-secondary);
  background: transparent;
  border-radius: 0;
  padding: 28px 8px 20px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
}

.schedule-item-main {
  min-width: 0;
  flex: 1 1 auto;
}

.schedule-item-name {
  font-weight: 700;
}

.schedule-item-meta {
  font-size: 13px;
  margin-top: 4px;
}

.schedule-item-actions {
  display: none;
  width: 100%;
  gap: 8px;
  flex-shrink: 0;
}

.agenda-shift.is-open .schedule-item-actions,
.schedule-item.is-open .schedule-item-actions,
.shift-card.is-open .schedule-item-actions {
  display: flex;
}

.schedule-item-actions .btn-tiny {
  flex: 1;
  min-height: 40px;
}

.add-work-form {
  margin-top: 8px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.add-work-form h3 {
  font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 12px;
}

.pay-details {
  margin: 8px 0 16px;
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-2);
}

.pay-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.day-remaining {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 8px;
}

.more-section summary {
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  list-style: none;
}

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

.more-section[open] summary {
  margin-bottom: 16px;
}

.hour-presets,
.color-presets,
.duplicate-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hour-presets .btn-secondary {
  min-width: 64px;
}

.color-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
}

.color-dot.selected {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.duplicate-row {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.copy-day-details {
  margin: 8px 0 12px;
  padding-top: 4px;
  border-top: 1px solid var(--border-color);
}

.copy-day-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 12px 0;
  list-style: none;
}

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

.copy-day-details[open] summary {
  margin-bottom: 8px;
}

#jobs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-work-chip {
  width: 100%;
  border-left: 3px solid var(--primary-color);
}

.profile-work-chip .btn-tiny {
  margin-left: auto;
}

.duplicate-label,
.work-goals-heading {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.work-goals-heading {
  margin-top: 18px;
  font-size: 15px;
  color: var(--text-primary);
}

.copy-calendar {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
}

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

.copy-cal-header h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  margin: 0;
}

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

.copy-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding-bottom: 4px;
}

.copy-day {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.copy-day.empty {
  background: transparent;
  pointer-events: none;
}

.copy-day.is-source {
  opacity: 0.4;
  cursor: not-allowed;
}

.copy-day.is-selected {
  background: var(--primary-soft);
  border-color: var(--primary-color);
}

.work-goals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.work-goal-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border-left: 3px solid var(--primary-color);
}

.work-goal-row .work-goal-name {
  grid-column: 1 / -1;
  font-weight: 700;
}

.work-goal-row label {
  font-size: 12px;
  color: var(--text-secondary);
}

.work-goal-row input {
  width: 100%;
  margin-top: 4px;
  font-size: 16px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
}

.work-goals-progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  grid-column: 1 / -1;
}

.work-goal-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  border-radius: 24px;
  padding: 16px 18px;
}

.work-goal-stat {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 300;
  max-width: calc(100% - 24px);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: #fff;
  font-weight: 600;
}

.toast.success {
  border-color: var(--primary-ring);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.5);
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  background: var(--card-bg);
  padding-top: 8px;
}

@media (min-width: 900px) {
  .modal {
    align-items: center;
    padding: 20px;
  }

  .sheet-content {
    width: min(560px, 100%);
    border-radius: 24px;
    max-height: 90vh;
    transform: none;
    padding: 16px 20px 12px;
  }

  .sheet-handle {
    display: none;
  }

  .sheet-footer {
    padding-bottom: 8px;
  }

  .today-daynum {
    font-size: 72px;
  }

  .stats-primary .stat-value {
    font-size: 36px;
  }
}

@media (max-width: 1024px) {
  .reports-charts {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .stats-section.stats-secondary,
  .reports-summary {
    grid-template-columns: 1fr;
  }

  .stat-value {
    font-size: 26px;
  }

  .today-daynum {
    font-size: 56px;
  }
}

.theme-picker {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.theme-chip {
  flex: 1;
  min-height: 40px;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
}

.theme-chip.is-selected {
  background: var(--primary-color);
  color: var(--on-primary);
  border-color: var(--primary-color);
}

.accent-picker {
  margin-top: 8px;
}

.accent-dots {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.accent-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  padding: 0;
}

.accent-dot.is-selected {
  box-shadow: 0 0 0 3px var(--primary-ring);
  border-color: var(--text-primary);
}

html[data-accent="indigo"] {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --on-primary: #eef2ff;
  --primary-soft: rgba(99, 102, 241, 0.16);
  --primary-ring: rgba(99, 102, 241, 0.32);
  --wash: rgba(99, 102, 241, 0.1);
  --secondary-color: #6366f1;
  --accent-color: #6366f1;
}

html[data-accent="blue"] {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --on-primary: #eff6ff;
  --primary-soft: rgba(59, 130, 246, 0.16);
  --primary-ring: rgba(59, 130, 246, 0.32);
  --wash: rgba(59, 130, 246, 0.1);
  --secondary-color: #3b82f6;
  --accent-color: #3b82f6;
}

html[data-accent="pink"] {
  --primary-color: #ec4899;
  --primary-dark: #db2777;
  --primary-light: #f9a8d4;
  --on-primary: #fdf2f8;
  --primary-soft: rgba(236, 72, 153, 0.16);
  --primary-ring: rgba(236, 72, 153, 0.32);
  --wash: rgba(236, 72, 153, 0.1);
  --secondary-color: #ec4899;
  --accent-color: #ec4899;
}

html[data-accent="orange"] {
  --primary-color: #f59e0b;
  --primary-dark: #d97706;
  --primary-light: #fcd34d;
  --on-primary: #422006;
  --primary-soft: rgba(245, 158, 11, 0.18);
  --primary-ring: rgba(245, 158, 11, 0.35);
  --wash: rgba(245, 158, 11, 0.1);
  --secondary-color: #f59e0b;
  --accent-color: #f59e0b;
}

html[data-theme="light"] {
  --bg: #f4f0ea;
  --bg-gradient: #f4f0ea;
  --card-bg: #ffffff;
  --surface-2: #efeae3;
  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-light: #52525b;
  --border-color: rgba(0, 0, 0, 0.06);
  --tab-bar-bg: #f4f0ea;
  --tab-active-bg: #18181b;
  --tab-active-fg: #ffffff;
  --input-bg: #f4f0ea;
  --sheet-bg: #ffffff;
  --wash: rgba(24, 24, 27, 0.04);
  --cal-day-mix: #fff8f2;
  --cal-day-ink: #18181b;
}

html[data-theme="light"][data-accent="teal"] {
  --on-primary: #042f2e;
}

html[data-theme="light"] .tab-btn.is-active,
html[data-theme="light"][data-accent="teal"] .btn-primary {
  color: var(--tab-active-fg);
}

html[data-theme="light"] .sheet-handle {
  background: rgba(0, 0, 0, 0.18);
}

html[data-theme="light"] .toast {
  color: var(--text-primary);
}

html[data-theme="light"] .btn-danger {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.28);
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

html[data-theme="purple"] {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --on-primary: #ffffff;
  --primary-soft: rgba(99, 102, 241, 0.22);
  --primary-ring: rgba(99, 102, 241, 0.4);
  --wash: transparent;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --success-color: #10b981;
  --bg: #0f172a;
  --bg-gradient: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #4facfe, #667eea);
  --card-bg: rgba(15, 23, 42, 0.55);
  --surface-2: rgba(30, 41, 59, 0.55);
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-light: #cbd5e1;
  --border-color: rgba(255, 255, 255, 0.14);
  --tab-bar-bg: rgba(15, 23, 42, 0.92);
  --tab-active-bg: #ffffff;
  --tab-active-fg: #1e1b4b;
  --input-bg: rgba(15, 23, 42, 0.7);
  --sheet-bg: rgba(15, 23, 42, 0.98);
  --cal-day-mix: rgba(15, 23, 42, 0.42);
  --cal-day-ink: #f8fafc;
}

html[data-theme="purple"] body {
  background: var(--bg-gradient);
  background-size: 400% 400%;
  animation: gradientShift 18s ease infinite;
}

html[data-theme="purple"] body::before {
  background:
    radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.22) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.18) 0%, transparent 50%);
}

html[data-theme="purple"] .stat-card,
html[data-theme="purple"] .works-panel,
html[data-theme="purple"] .reports-section,
html[data-theme="purple"] .more-section,
html[data-theme="purple"] .modal-content {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

html[data-theme="purple"] .icon-btn,
html[data-theme="purple"] .tab-btn:not(.is-active) {
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

html[data-theme="purple"] .icon-btn-add,
html[data-theme="purple"] .inbox-manage,
html[data-theme="purple"] .friends-switch-btn.is-active,
html[data-theme="purple"] .schedule-person.is-selected,
html[data-theme="purple"] .schedule-week-day.is-selected {
  background: #fff;
  color: #1e1b4b;
}

html[data-theme="purple"] .schedule-week-day.is-selected span,
html[data-theme="purple"] .schedule-week-day.is-selected strong {
  color: #1e1b4b;
}

html[data-theme="purple"] .btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

html[data-theme="purple"] .tab-btn.is-active {
  color: var(--tab-active-fg);
  background: var(--tab-active-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28);
}

html[data-theme="purple"] .tab-bar {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.friends-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary-color);
  color: var(--on-primary);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.friend-add-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.friend-request-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
}

.friend-req-icon {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  flex-shrink: 0;
}

.friend-req-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.friend-req-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary-color);
  color: var(--on-primary);
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

#incoming-requests:not(:empty),
#outgoing-requests:not(:empty) {
  margin-top: 10px;
}

.friend-add-row .form-group {
  flex: 1;
  min-width: 0;
}

.friend-add-row .btn-primary {
  align-self: stretch;
  padding-left: 18px;
  padding-right: 18px;
}

.friend-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.friend-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.friend-card-full {
  flex-direction: column;
  align-items: stretch;
}

.friend-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
}

.friend-card p {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.friend-card-top,
.friend-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.friends-heading {
  margin: 18px 0 8px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
}

.friends-list-heading {
  margin-top: 28px;
  margin-bottom: 6px;
}

.friends-list-hint {
  margin: 0 0 16px;
}

.inbox-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.inbox-head .today-weekday {
  margin-bottom: 2px;
}

.friends-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: min(340px, 100%);
  margin: 2px auto 14px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.friends-switch-btn {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.friends-switch-btn.is-active {
  background: var(--text-primary);
  color: var(--bg);
}

.schedule-people {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 -2px 4px;
  -webkit-overflow-scrolling: touch;
}

.schedule-person {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.schedule-person.is-selected {
  background: var(--text-primary);
  color: var(--bg);
  border-color: transparent;
}

.friends-schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}

.friends-schedule-toolbar .cal-view-toggle {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}

.friends-schedule-toolbar .schedule-week,
.friends-schedule-toolbar .friends-schedule-month-nav {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.friends-schedule-month-nav h2 {
  margin: 0;
}

.friends-schedule-month {
  margin: 0 0 12px;
}

.friends-schedule-toolbar [hidden],
.friends-schedule-month[hidden] {
  display: none !important;
}

.cal-grid-day.is-outside {
  opacity: 0.38;
}

.schedule-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin: 8px 0 12px;
}

.schedule-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 64px;
  padding: 8px 0 10px;
  border: 0;
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--text-secondary);
  font-family: inherit;
  cursor: pointer;
}

.schedule-week-day span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-week-day strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.schedule-week-day.is-selected {
  background: var(--text-primary);
}

.schedule-week-day.is-selected span,
.schedule-week-day.is-selected strong {
  color: var(--bg);
}

.schedule-week-day.has-work strong {
  color: var(--primary-color);
}

.schedule-week-day.is-selected.has-work strong {
  color: var(--bg);
}

.inbox-manage {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  left: auto;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--text-primary);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.inbox-manage svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inbox-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 2px 4px;
}

.inbox-section-head .friends-heading {
  margin: 0;
}

.inbox-subhead {
  margin: 4px 0 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
}

.inbox-row {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.inbox-row-main {
  min-width: 0;
  flex: 1;
}

.inbox-row-main strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
}

.inbox-sub {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.inbox-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary-color);
  flex-shrink: 0;
}

.friend-row {
  align-items: stretch;
}

.friend-name-btn {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.friend-name-btn strong {
  display: block;
}

.friend-name-btn p {
  margin: 2px 0 0;
}

.friend-name-btn span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.friend-share-panel {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.share-scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.share-scope-btn {
  border: 1px solid var(--border-color);
  background: var(--input-bg);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.share-scope-btn.is-selected {
  background: var(--primary-color);
  color: var(--on-primary);
  border-color: transparent;
}

html[data-theme="light"] .friends-badge,
html[data-theme="light"] .friend-req-badge {
  color: var(--on-primary);
}

.friend-notes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.friend-note-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
}

.friend-note-card.is-selected {
  border-color: var(--primary-color);
}

.friend-note-main {
  min-width: 0;
  flex: 1;
}

.friend-note-main strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
}

.friend-note-main p {
  margin: 6px 0;
  color: var(--text-primary);
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.friend-note-main span {
  color: var(--text-secondary);
  font-size: 12px;
}

.friend-note-form h3 {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 16px;
}

.friends-sheet .sheet-body {
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.friend-feature-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.friend-tab {
  min-height: 44px;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  color: var(--text-secondary);
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.friend-tab.is-active {
  background: var(--primary-color);
  color: var(--on-primary);
  border-color: transparent;
}

.friend-note-open {
  width: 100%;
  border: 1px solid var(--border-color);
  background: var(--surface-2);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.friend-notepad-editor .form-group textarea {
  min-height: 220px;
  resize: vertical;
}

.friend-checklist-card {
  flex-direction: column;
  align-items: stretch;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 0;
}

.checklist-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.checklist-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.checklist-row span {
  color: var(--text-primary);
}

.checklist-row span.is-done {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.friend-remove-btn,
.share-scope-btn,
.friend-card-actions .btn-tiny,
.friend-card-actions .btn-primary {
  min-height: 44px;
}

.friend-name-btn {
  min-height: 44px;
}

@media (max-width: 640px) {
  .friend-add-row {
    flex-direction: column;
  }

  .friend-add-row .btn-primary {
    width: 100%;
    min-height: 44px;
  }

  .friend-card {
    flex-wrap: wrap;
  }

  .friend-card-actions {
    width: 100%;
  }

  .friend-card-actions .btn-tiny,
  .friend-card-actions .btn-primary,
  .friend-card-actions .btn-secondary {
    flex: 1;
    min-height: 44px;
  }
}

body.editor-open {
  overflow: hidden;
}

body.editor-open .toast {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.editor-topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
}

.editor-more svg {
  fill: currentColor;
  stroke: none;
}

.editor-done {
  border: 0;
  background: transparent;
  color: var(--primary-color);
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 8px;
  cursor: pointer;
}

.editor-menu {
  position: absolute;
  top: calc(100% - 4px);
  right: 12px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(280px, calc(100% - 24px));
  padding: 14px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
}

.editor-menu .share-scope-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.editor-menu .btn-danger {
  margin-top: 4px;
}

.editor-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

.note-title-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  outline: none;
  padding: 8px 0 0;
}

.note-edited {
  margin: 6px 0 12px;
  min-height: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.note-body-input {
  flex: 1;
  width: 100%;
  min-height: 50vh;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 17px;
  line-height: 1.5;
  outline: none;
  resize: none;
}

.list-date-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
}

.list-date-chip input {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

.reminders-list {
  display: flex;
  flex-direction: column;
}

.reminders-row,
.reminders-new {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}

.reminders-check-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.reminders-check-wrap input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.reminders-box {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--text-secondary);
}

.reminders-check-wrap input:checked + .reminders-box {
  border-color: var(--primary-color);
  background: var(--primary-color);
  box-shadow: inset 0 0 0 3px var(--bg);
}

.reminders-text {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  color: var(--text-primary);
}

.reminders-text.is-done {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.reminders-remove {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.reminders-plus {
  width: 22px;
  text-align: center;
  color: var(--primary-color);
  font-size: 22px;
  font-weight: 500;
}

.reminders-new input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 17px;
  outline: none;
}
