:root {
  color-scheme: dark;
  --bg: #050605;
  --panel: #111311;
  --panel-soft: #171a17;
  --panel-deep: #0b0d0b;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f3f5ef;
  --muted: #8e9588;
  --accent: #cfff52;
  --accent-2: #81f0b2;
  --danger: #ff6b6b;
  --warning: #ffca5f;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 24%, rgba(207, 255, 82, 0.08), transparent 28%),
    radial-gradient(circle at 78% 16%, rgba(129, 240, 178, 0.07), transparent 26%),
    var(--bg);
  color: var(--text);
  font-family: Urbanist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

code {
  color: var(--accent);
}

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

.sidebar {
  border-right: 1px solid var(--line);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: rgba(8, 9, 8, 0.9);
  position: sticky;
  top: 0;
  height: 100vh;
}

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

.brand strong {
  display: block;
  font-weight: 800;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
}

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

.nav-item,
.ghost-button,
.filter,
.small-button,
.auth-form button,
.add-form button {
  border: 1px solid var(--line);
  color: var(--text);
  background: #141614;
  border-radius: 8px;
  padding: 10px 12px;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-item {
  text-align: left;
}

.nav-item:hover,
.ghost-button:hover,
.filter:hover,
.small-button:hover {
  transform: translateY(-1px);
  border-color: rgba(207, 255, 82, 0.35);
}

.nav-item.active,
.filter.active,
.add-form button,
.auth-form button {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 18px var(--accent-2);
}

.main {
  padding: 32px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.topbar,
.panel-head,
.reminder-row,
.reminder-meta,
.top-actions,
.pagination {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

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

h1 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: 0;
}

h2 {
  font-size: 19px;
  font-weight: 750;
}

h3 {
  font-size: 15px;
  font-weight: 750;
}

.eyebrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  margin-bottom: 7px;
}

.muted,
.form-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.form-note {
  margin-top: 12px;
}

.top-actions {
  gap: 10px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric-card,
.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
  min-height: 118px;
  text-align: left;
  color: var(--text);
}

.metric-card.glow {
  background:
    linear-gradient(140deg, rgba(207, 255, 82, 0.19), rgba(255, 255, 255, 0.025) 52%),
    var(--panel);
}

.action-card {
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(207, 255, 82, 0.55);
  background:
    linear-gradient(140deg, rgba(207, 255, 82, 0.14), rgba(255, 255, 255, 0.035) 60%),
    var(--panel);
}

.card-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  font-size: 34px;
  margin: 10px 0 4px;
  letter-spacing: 0;
}

.metric-card span {
  color: var(--muted);
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 14px;
}

.panel {
  padding: 18px;
  background-color: rgba(17, 19, 17, 0.78);
}

.panel-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter {
  padding: 7px 10px;
  font-size: 12px;
}

.reminder-list {
  display: grid;
  gap: 10px;
}

.reminder-list.paginated {
  min-height: 580px;
  align-content: start;
}

.reminder-list.compact {
  min-height: 360px;
}

.reminder-row {
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.reminder-row.overdue {
  border-color: rgba(255, 107, 107, 0.35);
}

.reminder-row.is-done,
.reminder-row.is-skip {
  background: rgba(255, 255, 255, 0.018);
  border-color: rgba(255, 255, 255, 0.045);
}

.reminder-row.is-done h3,
.reminder-row.is-skip h3 {
  color: #687064;
}

.reminder-row.is-done .number,
.reminder-row.is-skip .number {
  background: #111410;
  color: #687064;
}

.reminder-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.number {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #222720;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 800;
  font-size: 13px;
}

.reminder-main p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.reminder-meta {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pill.active {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
}

.pill.done {
  color: #697366;
  background: rgba(255, 255, 255, 0.03);
}

.pill.skip {
  color: var(--warning);
}

.small-button {
  padding: 7px 10px;
  font-size: 12px;
}

.done-button {
  border-color: rgba(129, 240, 178, 0.28);
}

.skip-button {
  border-color: rgba(255, 107, 107, 0.28);
}

.right-stack {
  display: grid;
  gap: 14px;
  align-content: start;
}

.add-form,
.auth-form {
  display: grid;
  gap: 12px;
}

.add-form label {
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 6px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b0d0b;
  color: var(--text);
  padding: 11px 12px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(207, 255, 82, 0.22);
  border-color: rgba(207, 255, 82, 0.5);
}

.activity-log {
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow: auto;
}

.activity-item {
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-panel {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 16px;
  align-items: end;
}

.pagination {
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  margin-top: 16px;
}

.sticker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 14px;
}

.sticker-preview-panel {
  grid-row: span 2;
}

.sticker-preview {
  min-height: 430px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  padding: 22px;
}

.sticker-preview img {
  max-width: min(360px, 100%);
  max-height: 360px;
  object-fit: contain;
  image-rendering: auto;
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .stats-grid,
  .content-grid,
  .auth-panel,
  .sticker-grid {
    grid-template-columns: 1fr;
  }

  .sticker-preview-panel {
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .main {
    padding: 20px 14px;
  }

  .topbar,
  .reminder-row {
    align-items: stretch;
    flex-direction: column;
  }

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

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