:root {
  color-scheme: light;
  --bg: #ffe7f1;
  --panel: #fff4f9;
  --ink: #1a1a1a;
  --muted: #7b6070;
  --accent: #e91e63;
  --accent-2: #ff8ab4;
  --danger: #b00042;
  --line: #f2c9db;
  --shadow: 0 20px 45px rgba(233, 30, 99, 0.12);
  --radius: 18px;
  --font-title: "Spectral", "Times New Roman", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 600;
  src: local("Spectral SemiBold");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  src: local("Manrope Medium");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #fff6fb 0%, #ffe1ef 55%, #ffd4e7 100%);
  color: var(--ink);
}

.app {
  max-width: 1200px;
  margin: 32px auto 40px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.top,
.toolbar,
.content,
.weekbar,
.plans,
.bottom {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.top {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

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

.logo {
  padding: 8px 14px;
  min-width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #a00050);
  color: #fff;
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 600;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 25px rgba(233, 30, 99, 0.35);
}

.titles h1 {
  font-family: var(--font-title);
  margin: 0;
  font-size: 28px;
}

.titles p {
  margin: 4px 0 0;
  color: var(--muted);
}

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

.user-email {
  font-size: 13px;
  color: var(--muted);
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
}

.hidden {
  display: none !important;
}

button,
select,
input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="time"] {
  font-family: inherit;
  font-size: 15px;
}

button,
select {
  border: 1px solid var(--line);
  background: transparent;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

button:hover,
select:hover,
.file-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.ghost {
  background: #fff;
}

.danger {
  color: var(--danger);
  border-color: rgba(179, 64, 42, 0.4);
}

.file-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.auth {
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fff8fb;
}

.auth-card h2 {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-size: 20px;
}

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.auth-card input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}

.auth-status {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 13px;
}

.toolbar {
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  align-items: center;
}

.weekbar {
  padding: 14px 20px;
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
}

.week-title {
  font-family: var(--font-title);
  font-size: 18px;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-pill {
  padding: 8px 10px;
  text-align: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
}

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

.day-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
}

.badge.accent {
  background: var(--accent-2);
  color: #5a2036;
  border-color: transparent;
}

#search {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.content {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 520px;
  overflow: hidden;
}

.list {
  border-right: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff0f6;
}

.note-card {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.note-card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
}

.note-card.active {
  border-color: var(--accent);
  box-shadow: 0 12px 18px rgba(233, 30, 99, 0.2);
}

.note-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.note-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.editor {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#title {
  border: none;
  border-bottom: 2px solid var(--line);
  padding: 10px 4px;
  font-size: 22px;
  background: transparent;
}

#title:focus,
#body:focus,
#search:focus,
#tomorrow:focus,
.day-card textarea:focus,
.reminder-field input:focus {
  outline: none;
  border-color: var(--accent);
}

#body {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.6;
  background: #fff;
  resize: none;
}

.meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.editor-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

#status {
  color: var(--accent);
}

.plans {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.plans-head h2 {
  font-family: var(--font-title);
  margin: 0;
  font-size: 20px;
}

#tomorrow-label {
  color: var(--muted);
  font-size: 13px;
}

#tomorrow {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.6;
  background: #fff;
  resize: vertical;
}

.plans-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

#tomorrow-status {
  color: var(--accent);
}

.week-plans,
.reminder {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

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

.day-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.day-card header strong {
  font-size: 14px;
  color: var(--ink);
}

.day-card textarea {
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

.day-card textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.reminder-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.reminder-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.reminder-field input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
}

#reminder-status {
  color: var(--accent);
}

.bottom {
  padding: 12px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .list {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

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

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

@media (max-width: 600px) {
  .app {
    padding: 16px;
  }

  .actions {
    width: 100%;
  }
}
