:root {
  color-scheme: light;
  --bg: #f4f0e6;
  --surface: #fffdf8;
  --surface-2: #f7f2e7;
  --ink: #1d2a23;
  --muted: #68736c;
  --line: #e4ddce;
  --accent: #2f6b4f;
  --accent-strong: #24543e;
  --accent-soft: #e2efe6;
  --amber: #c18128;
  --amber-soft: #fbf0da;
  --danger: #a94139;
  --danger-soft: #fbe9e6;
  --shadow: 0 20px 50px rgba(42, 52, 45, 0.08), 0 2px 8px rgba(42, 52, 45, 0.04);
  --shadow-soft: 0 10px 28px rgba(42, 52, 45, 0.07);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(255, 253, 247, 0.95), transparent 65%),
    radial-gradient(900px 600px at 100% 0%, rgba(227, 239, 230, 0.65), transparent 60%),
    linear-gradient(180deg, #f5f1e8 0%, #eee8db 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: var(--accent-strong);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

:focus-visible {
  outline: 3px solid rgba(47, 107, 79, 0.32);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.71rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 242, 233, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.site-header--simple {
  position: static;
  border-bottom: none;
  background: transparent;
  backdrop-filter: none;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 14px rgba(47, 107, 79, 0.25);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-name {
  font-size: 1.04rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.7);
}

.nav-link.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  min-width: 0;
}

.account-email {
  max-width: 230px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-form {
  display: inline;
  margin: 0;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.58;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 7px 16px rgba(47, 107, 79, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-strong);
}

.btn-secondary {
  border-color: rgba(47, 107, 79, 0.12);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.btn-secondary:hover:not(:disabled) {
  background: #d7e9dd;
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-small {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.79rem;
}

.btn-block {
  width: 100%;
}

.btn-add {
  flex: none;
  padding-inline: 14px;
}

.btn-add svg {
  width: 17px;
  height: 17px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.54;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
  opacity: 1;
}

/* ---------------------------------------------------------------- inputs */

input[type="email"],
input[type="text"],
input[type="date"],
input[type="search"] {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: #9ba39d;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="date"]:focus,
input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 79, 0.14);
}

input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.field input {
  color: var(--ink);
  font-weight: 500;
}

.form-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.form-hint--todo {
  margin: -4px 0 16px;
}

.noscript-bar {
  width: min(1180px, calc(100% - 48px));
  margin: 16px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(169, 65, 57, 0.18);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------- notices */

.notice {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.notice-info {
  border-color: rgba(47, 107, 79, 0.12);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.notice-error {
  border-color: rgba(169, 65, 57, 0.14);
  background: var(--danger-soft);
  color: var(--danger);
}

.notice-icon {
  flex: none;
  margin-top: 1px;
}

.notice-icon svg {
  width: 20px;
  height: 20px;
}

.notice a {
  color: inherit;
}

.dev-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 750;
  text-decoration: underline;
  word-break: break-all;
}

/* ------------------------------------------------------------- login page */

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(40px, 7vw, 90px);
  align-items: center;
  width: min(1120px, calc(100% - 48px));
  min-height: calc(100vh - 76px);
  margin: 0 auto;
  padding: 48px 0 68px;
}

.hero-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 30px;
  border-radius: 17px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(47, 107, 79, 0.28);
}

.hero-mark svg {
  width: 33px;
  height: 33px;
}

.login-hero h1 {
  max-width: 11ch;
  margin: 0 0 22px;
  font-size: clamp(2.7rem, 5.3vw, 4.5rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.hero-copy {
  max-width: 47ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.68;
}

.feature-list {
  display: grid;
  gap: 16px;
  max-width: 500px;
  padding: 0;
  margin: 34px 0 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.feature-list strong {
  color: var(--ink);
  font-weight: 680;
}

.feature-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 41px;
  height: 41px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.login-panel {
  width: 100%;
}

.login-card {
  padding: clamp(26px, 3.5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 27px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0 0 14px;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
}

.login-intro {
  margin: 0 0 24px;
  line-height: 1.62;
}

.login-pending {
  margin: 0 0 4px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.fineprint {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.login-footer svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------- app shell */

.container {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.container.narrow {
  width: min(900px, calc(100% - 48px));
}

.app-main {
  padding: 44px 0 64px;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-intro h1 {
  margin: 0 0 6px;
  font-size: clamp(2.2rem, 4vw, 3.25rem);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
}

.page-intro .muted {
  margin: 0;
  font-size: 0.94rem;
}

/* -------------------------------------------------------------- push card */

.push-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(240, 235, 222, 0.9));
  box-shadow: var(--shadow-soft);
}

.push-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--line);
}

.push-icon svg {
  width: 20px;
  height: 20px;
}

.push-copy {
  flex: 1;
  min-width: 0;
}

.push-copy strong {
  display: block;
  font-size: 0.87rem;
}

.push-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.45;
}

.push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.push-card--active {
  border-color: #b8d8c3;
  background: linear-gradient(135deg, rgba(244, 251, 246, 0.96), rgba(228, 242, 233, 0.92));
}

.push-card--warn {
  border-color: #ecd4a9;
  background: linear-gradient(135deg, rgba(255, 252, 245, 0.96), rgba(251, 240, 218, 0.9));
}

/* --------------------------------------------------------------- dashboard */

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

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

.list-card {
  min-height: 430px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 20px;
}

.card-head--plain {
  margin-bottom: 22px;
}

.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-icon--green {
  background: var(--accent-soft);
  color: var(--accent);
}

.card-icon--amber {
  background: var(--amber-soft);
  color: var(--amber);
}

.card-title {
  flex: 1;
  min-width: 0;
}

.card-title h2 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.card-title p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.count-badge {
  display: grid;
  place-items: center;
  min-width: 31px;
  height: 31px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 700;
}

/* ------------------------------------------------------------------ forms */

.add-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 14px;
}

.add-form > input[type="email"],
.add-form > input[type="text"],
.add-form > input:not([type]) {
  flex: 1;
  min-width: 0;
}

.add-form--todo #todo-title {
  flex: 1;
  min-width: 0;
}

.date-field {
  flex: none;
  width: 145px;
}

.date-field input {
  width: 100%;
}

/* ------------------------------------------------------------------ items */

.item-list {
  display: grid;
  gap: 0;
}

.item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 49px;
  padding: 8px 4px 8px 1px;
  border-bottom: 1px solid var(--line);
  animation: item-in 0.16s ease both;
}

.item:last-child {
  border-bottom: none;
}

.item .check {
  display: flex;
  flex: none;
  align-items: center;
  padding: 4px;
}

.item-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  line-height: 1.4;
}

.item--done .item-name {
  color: var(--muted);
  text-decoration: line-through;
}

.item-date {
  flex: none;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.item:hover .icon-btn {
  opacity: 1;
}

.empty-state {
  padding: 34px 16px;
  margin: 8px 0 0;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.done-block {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.item-list--done .item {
  min-height: 42px;
  padding-block: 5px;
}

.item-list--done .icon-btn {
  opacity: 0.3;
}

/* ----------------------------------------------------------------- history */

.history {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.history summary {
  color: var(--muted);
  font-size: 0.79rem;
  font-weight: 650;
  cursor: pointer;
}

.history-list {
  display: grid;
  gap: 8px;
  max-height: 240px;
  padding: 0;
  margin: 10px 0 0;
  overflow: auto;
  list-style: none;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.79rem;
}

.history-list time {
  flex: none;
  white-space: nowrap;
}

/* ------------------------------------------------------------------- todos */

.todo-item {
  align-items: flex-start;
}

.todo-item .check {
  padding-top: 7px;
}

.todo-main {
  display: grid;
  flex: 1;
  gap: 5px;
  min-width: 0;
  padding: 2px 0;
}

.todo-item .icon-btn {
  margin-top: 1px;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 20px;
}

.due-badge {
  appearance: none;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.71rem;
  font-weight: 650;
  cursor: pointer;
}

.due-badge:hover {
  border-color: var(--line);
}

.due-badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.due-badge--today {
  background: var(--amber-soft);
  color: #8a5a16;
}

.due-badge--soon {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.due-badge--none {
  border: 1px dashed var(--line);
  background: transparent;
}

.date-editor {
  width: 150px;
  max-width: 100%;
  min-height: 34px !important;
  padding: 5px 8px !important;
  font-size: 0.77rem !important;
}

.due-text,
.done-text {
  color: var(--muted);
  font-size: 0.73rem;
}

.done-text {
  color: #8a938c;
}

/* ------------------------------------------------------------------ footer */

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.75rem;
}

.app-footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-footer svg {
  width: 14px;
  height: 14px;
}

.app-footer a {
  color: var(--muted);
}

/* ------------------------------------------------------------------- admin */

.admin-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.5;
}

.admin-note svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.admin-note p {
  margin: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
}

.table-wrap {
  margin-top: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.user-table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.user-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.user-table tr:last-child td {
  border-bottom: none;
}

.user-email {
  overflow-wrap: anywhere;
  font-weight: 620;
}

.user-created {
  color: var(--muted);
  font-size: 0.77rem;
  white-space: nowrap;
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.role-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 680;
}

.role-badge--admin {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.role-badge--member {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.role-toggle {
  appearance: none;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 650;
  cursor: pointer;
}

.role-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.table-loading {
  padding: 30px !important;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------------- messages */

.message-main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 170px);
  padding: 40px 0;
}

.message-card {
  width: 100%;
  max-width: 580px;
  padding: clamp(30px, 5vw, 48px);
  text-align: center;
}

.message-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 22px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}

.message-icon svg {
  width: 27px;
  height: 27px;
}

.message-card h1 {
  margin: 0 0 14px;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
}

.message-card .muted {
  margin: 0 0 26px;
  line-height: 1.65;
}

/* ------------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(24, 33, 28, 0.46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal {
  width: min(445px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: modal-in 0.18s ease both;
}

.modal-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--amber-soft);
  color: var(--amber);
}

.modal-icon svg {
  width: 27px;
  height: 27px;
}

.modal h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.modal p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.6;
}

.modal .modal-note {
  font-size: 0.75rem;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.modal-actions .btn {
  flex: 1;
}

/* ------------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: min(520px, calc(100% - 32px));
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  font-size: 0.85rem;
  animation: toast-in 0.2s ease both;
  transform: translateX(-50%);
}

.toast--success {
  background: var(--accent-strong);
  color: #fff;
}

.toast--error {
  background: var(--danger);
  color: #fff;
}

/* -------------------------------------------------------------- animations */

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 1050px) {
  .login-shell {
    gap: 44px;
  }

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

  .list-card {
    min-height: 0;
  }
}

@media (max-width: 880px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    max-width: 620px;
    min-height: 0;
    padding-top: 28px;
  }

  .login-hero h1 {
    max-width: 14ch;
  }

  .feature-list {
    display: none;
  }

  .login-panel {
    margin-bottom: 24px;
  }

  .login-footer {
    display: none;
  }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
    width: calc(100% - 32px);
    padding: 10px 0 8px;
  }

  .main-nav {
    order: 3;
    width: 100%;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .nav-link {
    padding: 7px 12px;
    font-size: 0.84rem;
  }

  .account-email {
    display: none;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .container,
  .container.narrow,
  .login-shell {
    width: calc(100% - 32px);
  }

  .app-main {
    padding: 28px 0 48px;
  }

  .push-card {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .push-copy {
    flex-basis: calc(100% - 58px);
  }

  .push-actions {
    width: 100%;
    padding-left: 54px;
  }

  .card {
    padding: 18px;
  }

  .add-form {
    flex-wrap: wrap;
  }

  .add-form > input[type="email"],
  .add-form > input[type="text"] {
    flex-basis: 100%;
  }

  .date-field {
    flex: 1;
    width: auto;
  }

  .add-form .btn-add {
    flex: 1;
  }

  .form-hint--todo {
    margin-top: 0;
  }

  .app-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .modal {
    padding: 26px 22px;
  }
}

@media (max-width: 520px) {
  .login-hero h1 {
    font-size: 2.55rem;
  }

  .hero-copy {
    font-size: 0.94rem;
  }

  .login-card h2 {
    font-size: 1.6rem;
  }

  .page-intro h1 {
    font-size: 2.15rem;
  }

  .checkbox-label {
    order: 3;
  }

  .user-table th:nth-child(3),
  .user-table td:nth-child(3) {
    display: none;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------------------ dark */

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151b17;
    --surface: #1f2722;
    --surface-2: #27302a;
    --ink: #edf3ee;
    --muted: #a4b1a8;
    --line: #34413a;
    --accent: #7cc49b;
    --accent-strong: #a7ddbd;
    --accent-soft: #243b2e;
    --amber: #e0ad62;
    --amber-soft: #3a3020;
    --danger: #e08a82;
    --danger-soft: #3b2422;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.26), 0 2px 8px rgba(0, 0, 0, 0.18);
    --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.2);
  }

  body {
    background:
      radial-gradient(1000px 520px at 8% -12%, rgba(36, 59, 46, 0.42), transparent 65%),
      radial-gradient(900px 600px at 100% 0%, rgba(58, 48, 32, 0.3), transparent 60%),
      linear-gradient(180deg, #141a16 0%, #111612 100%);
  }

  .site-header {
    background: rgba(21, 27, 23, 0.86);
  }

  .brand-mark {
    color: #102018;
  }

  .nav-link:hover {
    background: rgba(39, 48, 42, 0.75);
  }

  .push-card {
    background: linear-gradient(135deg, rgba(31, 39, 34, 0.94), rgba(39, 48, 42, 0.9));
  }

  .push-card--active {
    border-color: #3e6a50;
    background: linear-gradient(135deg, rgba(32, 48, 39, 0.96), rgba(38, 62, 48, 0.9));
  }

  .push-card--warn {
    border-color: #6b5730;
    background: linear-gradient(135deg, rgba(44, 39, 29, 0.96), rgba(58, 48, 32, 0.9));
  }

  .btn-primary {
    color: #102018;
  }

  .btn-secondary:hover:not(:disabled) {
    background: #2d4938;
  }

  .due-badge--today {
    color: var(--amber);
  }

  .toast {
    background: #e9f0eb;
    color: #152018;
  }

  .toast--success {
    background: var(--accent);
    color: #102018;
  }

  .toast--error {
    background: var(--danger);
    color: #2a1110;
  }

  input::placeholder {
    color: #7d8b82;
  }

  .modal-backdrop {
    background: rgba(0, 0, 0, 0.62);
  }
}
