:root {
  color-scheme: light;
  --main-bg: #ffffff;
  --sidebar-bg: #fafafa;
  --border-strong: #e6e6e6;
  --border-soft: #f5f5f5;
  --hover-bg: #f5f5f5;
  --text-main: #383838;
  --text-muted: #747475;
  --button-primary: #329cff;
  --button-primary-hover: #238cf0;
  --button-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --main-bg: #0a0a0a;
    --sidebar-bg: #0f0f0f;
    --border-strong: #191919;
    --border-soft: #1c1c1c;
    --hover-bg: #1c1c1c;
    --text-main: #e5e5e5;
    --text-muted: #a0a0a0;
    --button-primary: #329cff;
    --button-primary-hover: #4ba7ff;
    --button-text: #ffffff;
    color-scheme: dark;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --main-bg: #ffffff;
  --sidebar-bg: #fafafa;
  --border-strong: #e6e6e6;
  --border-soft: #f5f5f5;
  --hover-bg: #f5f5f5;
  --text-main: #383838;
  --text-muted: #747475;
  --button-primary: #329cff;
  --button-primary-hover: #238cf0;
  --button-text: #ffffff;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --main-bg: #0a0a0a;
  --sidebar-bg: #0f0f0f;
  --border-strong: #191919;
  --border-soft: #1c1c1c;
  --hover-bg: #1c1c1c;
  --text-main: #e5e5e5;
  --text-muted: #a0a0a0;
  --button-primary: #329cff;
  --button-primary-hover: #4ba7ff;
  --button-text: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: var(--main-bg);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.has-overlay-sidebar {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--main-bg);
  color: var(--text-main);
  outline: none;
}

select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--main-bg);
  color: var(--text-main);
  outline: none;
  appearance: none;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus {
  border-color: var(--button-primary);
}

input:disabled,
select:disabled {
  background: var(--sidebar-bg);
  color: var(--text-muted);
  cursor: not-allowed;
}

#app {
  min-height: 100vh;
}

.auth-page {
  min-height: 100vh;
  background: var(--main-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page__inner {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.auth-page__title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.auth-page__text {
  margin: 0 0 32px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.auth-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--main-bg);
}

.auth-switch__button {
  min-width: 120px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.auth-switch__button.is-active {
  background: var(--sidebar-bg);
  color: var(--text-main);
}

.auth-form {
  display: grid;
  gap: 12px;
  width: 100%;
}

.auth-form__actions {
  padding-top: 8px;
  width: 100%;
}

.auth-form__submit {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 16px;
  background: var(--button-primary);
  color: var(--button-text);
  font-size: 15px;
  font-weight: 600;
}

.auth-form__submit:hover {
  background: var(--button-primary-hover);
}

.auth-notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  width: 100%;
}

.auth-notice.is-error {
  color: var(--text-main);
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.app-shell__backdrop {
  display: none;
}

.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-strong);
  color: var(--text-muted);
  min-width: 0;
}

.sidebar__header-wrap {
  position: relative;
  padding: 12px 12px 0;
}

.sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 60px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.sidebar__header:hover {
  background: var(--hover-bg);
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f97316;
  color: #ffffff;
  flex: 0 0 auto;
}

.sidebar__logo svg {
  width: 18px;
  height: 18px;
}

.sidebar__brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.1;
}

.sidebar__brand-title {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.sidebar__brand-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.sidebar__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex: 0 0 auto;
}

.sidebar__chevron svg {
  width: 16px;
  height: 16px;
}

.sidebar__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 12px;
  right: 12px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--main-bg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.sidebar__menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.sidebar__menu-item--switch {
  justify-content: space-between;
  gap: 12px;
}

.sidebar__menu-item:hover {
  background: var(--hover-bg);
}

.theme-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 42px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.2s ease;
  flex: 0 0 auto;
}

.theme-switch.is-active {
  background: var(--button-primary);
}

.theme-switch__thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.theme-switch.is-active .theme-switch__thumb {
  transform: translateX(18px);
}

.sidebar__nav {
  display: grid;
  gap: 4px;
  padding: 16px 12px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  appearance: none;
}

.sidebar__link:hover {
  background: var(--hover-bg);
}

.sidebar__link.is-active {
  background: var(--hover-bg);
  border-color: var(--border-soft);
  color: var(--text-main);
}

.sidebar__link span {
  text-decoration: none;
}

.sidebar__section-gap {
  height: 12px;
}

.sidebar__section-title {
  padding: 10px 12px 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar__empty {
  padding: 4px 12px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.sidebar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar__icon svg {
  width: 18px;
  height: 18px;
}

.main-content {
  background: var(--main-bg);
}

.main-content__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 32px;
}

.main-content__header-start {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.main-content__menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
}

.main-content__menu-button:hover {
  background: var(--hover-bg);
}

.main-content__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
}

.main-content__logout {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.main-content__body {
  min-height: calc(100vh - 72px);
  padding: 32px;
}

.page-notice {
  margin-bottom: 24px;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  background: var(--sidebar-bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.5;
}

.page-notice.is-success {
  border-color: rgba(50, 156, 255, 0.24);
}

.dashboard-stack {
  display: grid;
  gap: 40px;
}

.dashboard-card {
  max-width: 760px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

.dashboard-card__title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.dashboard-card__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.dashboard-eyebrow {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-card--wide {
  max-width: 760px;
}

.dashboard-card--full {
  max-width: none;
}

.dashboard-inline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.primary-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: #329cff;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.primary-pill-button:hover {
  background: #238cf0;
}

.primary-pill-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.dashboard-list {
  display: grid;
  gap: 0;
  margin-top: 20px;
  border-top: 1px solid var(--border-soft);
}

.dashboard-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 56px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border-soft);
}

.dashboard-list__item strong {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.dashboard-list__item span {
  color: var(--text-muted);
  font-size: 14px;
  text-align: right;
}

.dashboard-list__item--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.dashboard-list__primary,
.dashboard-list__secondary {
  display: grid;
  gap: 4px;
}

.dashboard-list__primary {
  min-width: 0;
}

.dashboard-list__item--split .dashboard-list__primary strong {
  font-size: 16px;
}

.dashboard-list__item--split .dashboard-list__primary span {
  color: var(--text-muted);
  line-height: 1.6;
  text-align: left;
}

.dashboard-list__secondary {
  justify-items: end;
  min-width: 148px;
  text-align: right;
}

.dashboard-list__item--split .dashboard-list__secondary span {
  text-align: right;
}

.dashboard-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-preview__item {
  min-height: 144px;
  padding: 18px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: var(--sidebar-bg);
  display: grid;
  align-content: start;
  gap: 10px;
}

.dashboard-preview__item.is-today {
  border-color: rgba(50, 156, 255, 0.3);
  background: rgba(50, 156, 255, 0.08);
}

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

.dashboard-preview__weekday {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
}

.dashboard-preview__badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--main-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-preview__date {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.dashboard-preview__training {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.dashboard-preview__meta {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.calendar-page {
  display: grid;
  gap: 20px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-toolbar__group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-toolbar__group--centered {
  width: 100%;
  justify-content: center;
}

.calendar-toolbar__button,
.calendar-toolbar__icon-button,
.calendar-toolbar__view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
}

.calendar-toolbar__button:hover,
.calendar-toolbar__icon-button:hover,
.calendar-toolbar__view:hover {
  background: var(--hover-bg);
}

.calendar-toolbar__icon-button {
  width: 40px;
  padding: 0;
  color: var(--text-muted);
}

.calendar-toolbar__label {
  min-width: 160px;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
}

.calendar {
  overflow: auto;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--main-bg);
}

.calendar__weekdays,
.calendar__grid {
  min-width: 980px;
}

.calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-soft);
}

.calendar__weekday {
  padding: 14px 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid var(--border-soft);
}

.calendar__weekday:last-child {
  border-right: none;
}

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

.calendar__cell {
  min-height: 148px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: inset -1px -1px 0 var(--border-soft);
}

.calendar__cell.is-outside {
  background: var(--sidebar-bg);
}

.calendar__cell.is-today .calendar__date {
  color: var(--button-primary);
}

.calendar__date {
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
}

.calendar__events {
  display: grid;
  gap: 8px;
}

.calendar-event {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.calendar-event__dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--button-primary);
  flex: 0 0 auto;
}

.calendar-event.is-rest .calendar-event__dot {
  background: var(--text-muted);
}

.calendar-event__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-event__title,
.calendar-event__meta {
  display: block;
  overflow: hidden;
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event__meta {
  color: var(--text-muted);
}

.profile-section {
  max-width: 880px;
  display: grid;
  gap: 24px;
}

.profile-section--summary {
  gap: 20px;
}

.profile-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.profile-section__title {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.profile-section__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.section-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: none;
  border-radius: 12px;
  background: var(--hover-bg);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  flex: 0 0 auto;
}

.section-action svg {
  width: 16px;
  height: 16px;
}

.section-action.is-active {
  background: var(--button-primary);
  color: var(--button-text);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.profile-field {
  display: grid;
  gap: 8px;
}

.profile-field.is-checkbox {
  grid-column: 1 / -1;
  padding-top: 8px;
}

.profile-field__label {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.profile-field__control {
  min-width: 0;
}

.profile-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
}

.profile-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-toggle__ui {
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.2s ease;
  flex: 0 0 auto;
}

.profile-toggle__ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
  transition: transform 0.2s ease;
}

.profile-toggle input:checked + .profile-toggle__ui {
  background: var(--button-primary);
}

.profile-toggle input:checked + .profile-toggle__ui::after {
  transform: translateX(18px);
}

.profile-toggle__text {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
}

.category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.category-form,
.category-list-panel {
  padding: 24px;
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  background: var(--sidebar-bg);
  display: grid;
  gap: 24px;
}

.category-form__header,
.category-list-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.category-form__title {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-form__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.category-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.category-form__field {
  display: grid;
  gap: 8px;
}

.category-form__field--full {
  grid-column: 1 / -1;
}

.category-form__field span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.category-form__color-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.category-form__color {
  min-width: 0;
  padding: 6px;
  cursor: pointer;
}

.icon-choice-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.icon-choice {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 112px;
  padding: 14px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.icon-choice:hover {
  background: var(--hover-bg);
}

.icon-choice.is-selected {
  border-color: rgba(50, 156, 255, 0.34);
  background: rgba(50, 156, 255, 0.08);
  color: var(--text-main);
}

.icon-choice__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
}

.icon-choice__glyph svg {
  width: 24px;
  height: 24px;
}

.muscle-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.muscle-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.muscle-chip:hover {
  background: var(--hover-bg);
}

.muscle-chip.is-selected {
  border-color: rgba(50, 156, 255, 0.3);
  background: rgba(50, 156, 255, 0.08);
  color: var(--text-main);
}

.category-list {
  display: grid;
  gap: 14px;
}

.category-item,
.category-empty {
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: var(--main-bg);
  display: grid;
  gap: 14px;
}

.category-item__header,
.category-item__title-row,
.category-item__chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-item__header {
  justify-content: space-between;
}

.category-item__color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.category-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.category-item__icon svg,
.sidebar__icon--category svg {
  width: 18px;
  height: 18px;
}

.category-item__title {
  margin: 0;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.category-item__text,
.category-item__empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.category-item__chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 600;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.modal-shell__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(10, 10, 10, 0.4);
}

.split-dialog {
  position: relative;
  width: min(100%, 1040px);
  max-height: min(88vh, 980px);
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border-strong);
  border-radius: 28px;
  background: var(--main-bg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.16);
}

.split-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.split-dialog__title {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.split-dialog__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 680px;
}

.split-dialog__close,
.split-dialog__secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
}

.split-dialog__close:hover,
.split-dialog__secondary-button:hover {
  background: var(--hover-bg);
}

.split-dialog__state {
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: var(--sidebar-bg);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.6;
}

.split-dialog__state.is-error {
  border-color: rgba(255, 95, 95, 0.18);
}

.split-dialog__form {
  display: grid;
  gap: 24px;
}

.split-dialog__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}

.split-dialog__field {
  display: grid;
  gap: 8px;
}

.split-dialog__field span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.split-dialog__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
}

.split-dialog__checkbox input {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  accent-color: var(--button-primary);
}

.split-dialog__builder-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.split-dialog__section-title {
  margin: 0 0 6px;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.split-dialog__section-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.split-dialog__builder-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.split-day-list {
  display: grid;
  gap: 16px;
}

.split-day-card {
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: var(--sidebar-bg);
  display: grid;
  gap: 18px;
}

.split-day-card.is-rest {
  background: transparent;
}

.split-day-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.split-day-card__eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.split-day-card__title {
  margin: 0;
  color: var(--text-main);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.split-day-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.split-day-card__drag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: grab;
}

.split-day-card__remove {
  min-height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.split-day-card__remove:hover {
  background: var(--hover-bg);
}

.split-day-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.split-day-card__field {
  display: grid;
  gap: 8px;
}

.split-day-card__field span {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.split-day-card__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.split-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .app-shell__backdrop {
    position: fixed;
    inset: 0;
    border: none;
    background: rgba(10, 10, 10, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 30;
  }

  .app-shell__backdrop.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    border-right: 1px solid var(--border-strong);
    border-bottom: none;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 40;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main-content__header,
  .main-content__body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .main-content__menu-button {
    display: inline-flex;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar__weekdays,
  .calendar__grid {
    min-width: 840px;
  }

  .calendar__cell {
    min-height: 132px;
  }

  .profile-section__header {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-inline-header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-preview {
    grid-template-columns: 1fr;
  }

  .dashboard-list__secondary {
    justify-items: start;
  }

  .dashboard-list__item--split {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal-shell {
    padding: 16px;
  }

  .split-dialog {
    padding: 20px;
  }

  .split-dialog__header,
  .split-dialog__builder-header,
  .split-day-card__header,
  .split-dialog__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .split-dialog__meta,
  .split-day-card__grid,
  .category-form__grid,
  .category-layout,
  .icon-choice-list {
    grid-template-columns: 1fr;
  }

  .category-form__header,
  .category-list-panel__header {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-list__item {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .dashboard-list__item span {
    text-align: left;
  }

  .auth-page__inner {
    padding-top: 24px;
  }
}
