@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e3e7ef;
  --text: #1f2430;
  --text-muted: #7a8296;
  --primary: #4f6df5;
  --primary-dark: #3c56d6;
  --danger: #ef4444;
  --today-bg: #eef2ff;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(30, 40, 80, 0.08);
  --navy: #1f2a44;
  --gold: #c9a24a;
  --gold-deep: #a9822e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
}

a { color: inherit; text-decoration: none; }

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.brand { font-weight: 700; font-size: 1.2rem; }
.nav-controls { display: flex; align-items: center; gap: 10px; }
.month-title { font-weight: 600; font-size: 1.15rem; min-width: 150px; text-align: center; }
.user-controls { display: flex; gap: 14px; font-size: 0.9rem; color: var(--text-muted); }
.user-controls a:hover { color: var(--primary); }

.btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all .15s;
}
.btn:hover { background: #f0f2f8; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: #fef2f2; }
.btn.today-btn { font-weight: 600; }
.btn.full { width: 100%; text-align: center; }
.btn.add-task-btn { margin-bottom: 12px; }

/* ===== Layout ===== */
.content {
  display: flex;
  gap: 20px;
  padding: 20px;
  align-items: flex-start;
  max-width: 1400px;
  margin: 0 auto;
}
.calendar-wrap { flex: 1; min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.agenda {
  width: 320px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.agenda-title { margin: 0 0 12px; font-size: 1.05rem; }

/* ===== Weekday header ===== */
.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
}
.weekday-cell {
  text-align: center;
  padding: 10px 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===== Month Grid ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 120px;
}

/* ===== صفحه اصلی (امروز) ===== */
body.has-bottom-nav { padding-bottom: 86px; }

.home-hero {
  background: linear-gradient(160deg, #fdf8ec 0%, #f6e9c9 45%, #eccf8f 75%, #e0b86a 100%);
  padding: 26px 20px 22px;
  text-align: center;
  color: var(--navy);
  border-radius: 0 0 28px 28px;
}
.home-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-hero-side {
  flex: 1 1 0;
  min-width: 0;
}
.home-hero-side.is-right { text-align: right; }
.home-hero-side.is-left { text-align: left; }
.home-hero-weekday, .home-hero-jmonth { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.home-hero-hijri, .home-hero-gdate {
  font-size: 0.8rem;
  color: #6b5a30;
  margin-top: 5px;
}
.home-date-block {
  position: relative;
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  outline-offset: 4px;
}
.home-date-block:focus-visible { outline: 2px solid rgba(31,42,68,0.4); }
.home-hero-rays { position: absolute; inset: 0; }
.home-date-circle {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}
.home-date-day { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--navy); }
.home-date-today-link, .home-hero-today-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 26px;
  padding: 9px 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background .15s;
}
.home-date-today-link:hover, .home-hero-today-btn:hover { background: rgba(255,255,255,0.8); }
.home-hero-today-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.home-clock {
  font-size: 0.9rem;
  font-weight: 600;
  color: #6b5a30;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
  margin-top: 14px;
}

.home-content { max-width: 640px; margin: -18px auto 0; padding: 0 16px 20px; position: relative; z-index: 2; }
.home-card {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.home-card-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin: 0 0 10px; }
.home-card-title svg { width: 18px; height: 18px; color: var(--gold-deep); }

.home-occasion-list { display: flex; flex-direction: column; }
.home-occasion-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.home-occasion-row:first-child { border-top: none; }
.home-occasion-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.home-occasion-text { flex: 1; font-size: 0.9rem; }

.home-event-list { display: flex; flex-direction: column; }
.home-event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.home-event-item:first-child { border-top: none; }
.home-event-item:hover .home-event-title { color: var(--primary); }
.home-event-time { font-weight: 600; color: var(--text-muted); flex-shrink: 0; font-size: 0.82rem; min-width: 46px; }
.home-event-title { color: var(--text); flex: 1; }
.home-event-bar { width: 3px; align-self: stretch; border-radius: 2px; background: var(--c); }

.empty-hint { color: var(--text-muted); font-size: 0.88rem; margin: 4px 0; }

.simple-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  text-align: center;
}
.simple-header .brand { font-weight: 700; font-size: 1.05rem; }
.simple-header-title { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

.home-content-single { max-width: 640px; margin: 20px auto 0; padding: 0 16px 20px; }
.task-row-time { font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; }

.report-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.report-placeholder svg { width: 46px; height: 46px; color: var(--gold-deep); margin-bottom: 14px; }

.report-month-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-month-title { font-weight: 700; }
.report-summary { display: flex; gap: 24px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.report-summary-item { display: flex; flex-direction: column; }
.report-summary-item strong { font-size: 1.4rem; color: var(--gold-deep); }
.report-summary-item span { font-size: 0.78rem; color: var(--text-muted); }

.report-table { display: flex; flex-direction: column; }
.report-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.report-row:first-child { border-top: none; }
.report-row-date {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 78px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.report-row-main { flex: 1; min-width: 0; }
.report-row-title { font-size: 0.9rem; font-weight: 600; }
.report-row-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 3px; font-size: 0.76rem; color: var(--text-muted); }
.report-sms-status { color: var(--gold-deep); }

/* ===== چک‌لیست روزانه (بخش کارها) ===== */
.todo-card { padding: 16px 0 18px; overflow: hidden; }
.todo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 14px;
}
.todo-day-title { text-align: center; flex: 1; min-width: 0; }
.todo-day-title-main { font-weight: 700; font-size: 1.02rem; }
.todo-today-link { display: inline-block; margin-top: 3px; font-size: 0.76rem; color: var(--primary); }

.todo-swipe { overflow: hidden; touch-action: pan-y; user-select: none; }
.todo-track { display: flex; align-items: stretch; will-change: transform; }

.todo-panel-label {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}
.todo-panel-label-main { color: var(--gold-deep); }

.todo-panel-side {
  flex: 0 0 46px;
  width: 46px;
  opacity: 0.42;
  padding-top: 2px;
}
.todo-panel-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 16px 0;
  border-inline-start: 1px solid var(--border);
  border-inline-end: 1px solid var(--border);
}

.todo-checks { display: flex; flex-direction: column; }
.todo-peek-row {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border);
}
.todo-peek-row:first-child { border-top: none; }
.todo-peek-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid var(--border);
  background: #fff;
  flex-shrink: 0;
  position: relative;
}
.todo-peek-box.checked {
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  border-color: var(--gold-deep);
}
.todo-peek-box.checked::after {
  content: '';
  position: absolute;
  top: 42%; left: 50%;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -55%) rotate(45deg);
}
.todo-peek-empty { text-align: center; color: var(--text-muted); font-size: 0.8rem; padding-top: 10px; }

.todo-list { display: flex; flex-direction: column; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  border-top: 1px solid var(--border);
}
.todo-item:first-child { border-top: none; }
.todo-item-title {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.todo-item.done .todo-item-title { color: var(--text-muted); text-decoration: line-through; }

.todo-check { position: relative; display: inline-flex; width: 26px; height: 26px; flex-shrink: 0; cursor: pointer; }
.todo-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.todo-check-box {
  position: absolute; inset: 0;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: #fff;
  transition: all .15s;
}
.todo-check input:checked + .todo-check-box {
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  border-color: var(--gold-deep);
}
.todo-check-box::after {
  content: '';
  position: absolute;
  top: 44%; left: 50%;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -58%) rotate(45deg);
  opacity: 0;
}
.todo-check input:checked + .todo-check-box::after { opacity: 1; }

.todo-manage-toggle { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.todo-manage-toggle .btn { font-size: 0.82rem; padding: 6px 12px; }

/* ===== مودال انتخاب تاریخ (صفحه امروز) ===== */
#homeDateForm select,
#homeDateForm input[type=number] {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
  background: #fff;
}
#homeDateForm label { display: block; font-size: 0.82rem; color: var(--text-muted); margin: 0 0 4px; }

/* ===== مودال مدیریت چک‌لیست ===== */
#todoItemForm label { display: block; font-size: 0.82rem; color: var(--text-muted); margin: 12px 0 4px; }
#todoItemForm label:first-of-type { margin-top: 0; }
#todoItemForm input[type=text],
#todoItemForm input[type=number],
#todoItemForm select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
  background: #fff;
}
.todo-endtype-row { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
#todoItemCancelEdit { font-size: 0.82rem; color: var(--text-muted); align-self: center; }
#todoItemCancelEdit:hover { color: var(--danger); }

.todo-manage-list { display: flex; flex-direction: column; margin-top: 4px; }
.todo-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.todo-manage-row:first-child { border-top: none; }
.todo-manage-row-info { min-width: 0; flex: 1; }
.todo-manage-row-title { font-size: 0.92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-manage-row-meta { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.todo-manage-row-actions { display: flex; gap: 6px; flex-shrink: 0; }
.todo-manage-row-actions .btn { padding: 6px 10px; font-size: 0.8rem; }

@media (max-width: 420px) {
  .todo-panel-side { flex-basis: 34px; width: 34px; }
  .todo-panel-main { padding: 2px 10px 0; }
}

/* ===== نوار پایین ناوبری ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; right: 0; left: 0;
  height: 68px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 8px;
  z-index: 50;
  box-shadow: 0 -2px 16px rgba(30,40,80,.06);
}
.bn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 0.68rem;
  flex: 1;
  min-width: 0;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--gold-deep); }
.bn-center { margin-top: -30px; color: var(--navy); font-weight: 600; }
.bn-center-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(169,130,46,.4);
  margin-bottom: 2px;
}
.bn-center-btn svg { width: 24px; height: 24px; }
.bn-center.active { color: var(--gold-deep); }

@media (min-width: 861px) {
  body.has-bottom-nav { padding-bottom: 0; padding-inline-start: 220px; }

  .bottom-nav {
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 220px;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 24px 12px;
    border-top: none;
    border-inline-end: 1px solid var(--border);
    box-shadow: -2px 0 16px rgba(30,40,80,.06);
  }
  .bn-item {
    flex-direction: row;
    justify-content: flex-start;
    flex: 0 0 auto;
    gap: 12px;
    font-size: 0.92rem;
    padding: 11px 14px;
    border-radius: 10px;
    transition: background .12s;
  }
  .bn-item:hover { background: var(--bg); }
  .bn-item.active { background: var(--today-bg); }
  .bn-item svg { width: 20px; height: 20px; }
  .bn-center { margin-top: 0; }
  .bn-center-btn {
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    box-shadow: none;
  }
  .bn-center-btn svg { width: 18px; height: 18px; }

  .home-hero { padding: 36px 24px 30px; }
  .home-date-block { width: 160px; height: 160px; }
  .home-date-circle { width: 112px; height: 112px; }
  .home-date-day { font-size: 2.7rem; }
  .home-hero-weekday, .home-hero-jmonth { font-size: 1.3rem; }
  .home-clock { font-size: 1rem; }
  .home-content:not(.home-content-single) {
    max-width: 900px;
    margin-top: -22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .home-content-single { margin-top: 20px; }
}

.day-cell {
  border-bottom: 1px solid var(--border);
  border-inline-start: 1px solid var(--border);
  padding: 6px;
  cursor: pointer;
  transition: background .1s;
  display: flex;
  flex-direction: column;
  height: 120px;
  min-width: 0;
  overflow: hidden;
}
.day-cell:nth-child(7n) { border-inline-start: none; }
.day-cell:hover { background: #f8f9fd; }
.day-cell.other-month { background: #fbfbfd; color: #c3c8d6; }
.day-cell.other-month .day-num { color: #c3c8d6; }
.day-cell.today { background: var(--today-bg); }
.day-cell.today .day-num {
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.day-num { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; flex-shrink: 0; }
.day-tasks { display: flex; flex-direction: column; gap: 3px; overflow: hidden; min-width: 0; }

.task-chip {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--c) 15%, white);
  color: var(--c);
  border-inline-start: 3px solid var(--c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-more { font-size: 0.7rem; color: var(--text-muted); padding: 0 4px; flex-shrink: 0; }

/* ===== Agenda list ===== */
.agenda-day-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 14px 0 6px;
}
.agenda-day-header:first-child { margin-top: 0; }
.agenda-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border-inline-start: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 8%, white);
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.88rem;
}
.agenda-item:hover { filter: brightness(0.97); }
.agenda-time { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; min-width: 44px; }
.agenda-title-text { font-weight: 500; }
.empty-hint { color: var(--text-muted); font-size: 0.88rem; text-align: center; padding: 20px 0; }

/* ===== Modals ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 40, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface);
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.modal.small { max-width: 420px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 1.05rem; }
.close-btn {
  background: none; border: none; font-size: 1.4rem; cursor: pointer;
  color: var(--text-muted); line-height: 1; padding: 4px;
}
.close-btn:hover { color: var(--text); }
.modal-body { padding: 16px 20px; overflow-y: auto; }

/* All-day + timeline */
.all-day-tasks { margin-bottom: 10px; }
.all-day-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.task-row {
  padding: 8px 10px;
  border-radius: 8px;
  border-inline-start: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 10%, white);
  margin-bottom: 6px;
  cursor: pointer;
  font-size: 0.88rem;
}
.task-row:hover { filter: brightness(0.97); }

.timeline { border-top: 1px solid var(--border); margin-top: 8px; }
.hour-row { display: flex; border-bottom: 1px solid var(--border); min-height: 46px; }
.hour-label {
  width: 56px;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 6px 8px 0 0;
  text-align: left;
}
.hour-slot { flex: 1; padding: 4px 6px; cursor: pointer; }
.hour-slot:hover { background: #fafbfd; }

/* Task form */
#taskForm label { display: block; font-size: 0.82rem; color: var(--text-muted); margin: 12px 0 4px; }
#taskForm label:first-of-type { margin-top: 0; }
#taskForm input[type=text],
#taskForm input[type=number],
#taskForm input[type=time],
#taskForm textarea,
#taskForm select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.92rem;
  background: #fff;
}
#taskForm textarea { resize: vertical; }
.checkbox-label { display: flex !important; align-items: center; gap: 6px; font-size: 0.88rem !important; color: var(--text) !important; }
.checkbox-label input { width: auto; }

.date-row { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 8px; }

.form-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.sms-fields { background: #f8f9fd; border-radius: 8px; padding: 10px 12px; margin-top: 4px; }

.color-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.color-opt {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
  border: 2px solid transparent;
}
.color-opt input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.color-opt:has(input:checked) { border-color: #1f2430; box-shadow: 0 0 0 2px #fff inset; }

.modal-actions { display: flex; justify-content: space-between; margin-top: 18px; gap: 10px; }

/* ===== Login page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, #eef2ff, #f4f6fb);
}
.login-box {
  background: var(--surface);
  padding: 32px 28px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 360px;
}
.login-box h1 { font-size: 1.2rem; margin: 0 0 18px; text-align: center; }
.login-box label { display: block; font-size: 0.85rem; color: var(--text-muted); margin: 12px 0 4px; }
.login-box input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}
.login-box button { margin-top: 18px; }
.error-msg { background: #fef2f2; color: var(--danger); padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; }
.info-msg { background: #ecfdf5; color: #16a34a; padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; }
.back-link { display: block; text-align: center; margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }
.back-link:hover { color: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content { flex-direction: column; }
  .agenda { width: 100%; position: static; max-height: none; }
}
@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .month-title { min-width: 0; }
  .grid { grid-auto-rows: 70px; }
  .day-cell { height: 70px; padding: 4px; }
  .task-chip { font-size: 0.62rem; }
  .weekday-cell { font-size: 0.72rem; padding: 6px 2px; }
  .date-row { grid-template-columns: 1fr 1fr 1fr; }
}
