/* Univers Parallèle — şafak paleti, sakin tipografi, mobil öncelikli */

:root {
  --sky-top: #d9d4f3;
  --sky-mid: #f1e3ea;
  --sky-bottom: #fbe0cb;
  --ink: #3a384f;
  --ink-soft: #6e6b85;
  --card: rgba(255, 255, 255, 0.62);
  --card-border: rgba(255, 255, 255, 0.8);
  --accent: #6f67b0;
  --accent-dark: #5a528f;
  --ok: #4f8a6a;
  --err: #b5524f;
  --radius: 24px;
  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Nunito', -apple-system, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-bottom) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Arka plan: yumuşak güneş */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.sun {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 60vmin;
  height: 60vmin;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 247, 220, 0.85) 0%, rgba(255, 247, 220, 0.35) 40%, rgba(255, 247, 220, 0) 70%);
}

/* ---------- Düzen ---------- */
.screen {
  max-width: 520px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: 100dvh;
}
.screen[hidden] { display: none; }

.brand { text-align: center; }
.brand h1 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 2.6rem);
  letter-spacing: 0.01em;
  margin: 0 0 0.35rem;
}
.tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(90, 82, 143, 0.12);
}

/* ---------- Günün sözü ---------- */
.quote-card {
  text-align: center;
  padding: 2.25rem 1.5rem 1.75rem;
  animation: belir 600ms ease-out both;
}
.quote-date {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.quote-text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(1.45rem, 5.6vw, 1.85rem);
  line-height: 1.45;
  margin: 0;
  text-wrap: balance;
}
.quote-text::before { content: '“'; opacity: 0.45; }
.quote-text::after { content: '”'; opacity: 0.45; }
.greeting {
  margin: 1.5rem 0 0;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--font-serif);
}

@keyframes belir {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Form & butonlar ---------- */
label {
  display: block;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
input[type="password"], input[type="text"], input[type="date"], input[type="time"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(111, 103, 176, 0.25);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  outline: none;
  margin-bottom: 1rem;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(111, 103, 176, 0.15);
}

.btn {
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 120ms ease, background 160ms ease, opacity 160ms ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: rgba(255, 255, 255, 0.7); color: var(--accent-dark); }

.link {
  background: none;
  border: none;
  color: var(--ink-soft);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.5rem;
}

.actions { display: flex; flex-direction: column; gap: 0.75rem; }
.actions[hidden] { display: none; }

/* Bildirimler açıkken sağ üstte küçük zil rozeti */
.screen { position: relative; }
.bell {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(90, 82, 143, 0.12);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  transition: transform 120ms ease, opacity 120ms ease;
}
.bell:hover { opacity: 1; }
.bell:active { transform: scale(0.94); }
.bell[hidden] { display: none; }
.status { margin: 0; text-align: center; color: var(--ink-soft); font-size: 0.95rem; min-height: 1.4em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--err); }

.error { margin: 0.75rem 0 0; color: var(--err); font-size: 0.95rem; min-height: 1.4em; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.85rem; margin: 0.75rem 0 0; text-align: center; }

.hint {
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(111, 103, 176, 0.35);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hint[hidden] { display: none; }
.hint ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.hint li { margin: 0.2rem 0; }

.foot { margin-top: auto; text-align: center; }

/* ---------- Admin paneli ---------- */
.admin { max-width: 760px; }
.admin h1 { font-size: 1.8rem; }
.admin .brand { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.admin h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.35rem;
  margin: 0 0 1rem;
}
.admin-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.admin-nav a {
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: background 120ms ease, color 120ms ease;
}
.admin-nav a.active { background: var(--accent); color: #fff; }
/* Sekmeler: yalnızca seçili bölüm görünür */
.admin .panel { display: none; }
.admin .panel.active { display: block; animation: belir 200ms ease-out both; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.row > * { margin-bottom: 0 !important; }
.row .grow { flex: 1 1 200px; }
.row .btn { width: auto; padding: 0.7rem 1.1rem; font-size: 0.95rem; }
textarea { min-height: 80px; resize: vertical; }

.list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 0.85rem 1rem;
}
.item .text { flex: 1; }
.item .meta { display: block; font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.35rem; line-height: 1.9; }
.item .tools { display: flex; gap: 0.25rem; flex-shrink: 0; }
.icon-btn {
  background: rgba(111, 103, 176, 0.1);
  border: none;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--accent-dark);
}
.icon-btn:hover { background: rgba(111, 103, 176, 0.2); }
.icon-btn.danger { color: var(--err); }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(111, 103, 176, 0.12);
  color: var(--accent-dark);
}
.badge.assigned { background: rgba(79, 138, 106, 0.15); color: var(--ok); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.stat { background: rgba(255, 255, 255, 0.55); border-radius: 16px; padding: 0.9rem 1rem; }
.stat b { display: block; font-size: 1.4rem; font-family: var(--font-serif); font-weight: 400; }
.stat span { font-size: 0.8rem; color: var(--ink-soft); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; }

/* ---------- Yıl takvimi ---------- */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.cal-nav b { font-family: var(--font-serif); font-weight: 400; font-size: 1.6rem; min-width: 4ch; text-align: center; }
.cal-nav .icon-btn { font-size: 1.4rem; }
.legend {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 6px;
  font-weight: 600;
}
.legend.assigned { background: #cfe9d6; color: #2f6b47; }
.legend.unassigned { background: #f5cfcb; color: #8a3a36; }
.month-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.month-jump[hidden] { display: none; }
.month-jump button {
  border: none;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}
.month-jump button.current { background: var(--accent); color: #fff; }
.month-jump button.has-assigned:not(.current) { background: #cfe9d6; color: #2f6b47; }
.calendar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
/* Tek ay modu: daha büyük, ferah gün kutuları */
.calendar.single { grid-template-columns: 1fr; }
.calendar.single .month { padding: 1rem 0.4rem; }
.calendar.single .month h4 { font-size: 1.35rem; }
.calendar.single .days { gap: 6px; }
.calendar.single .day { font-size: 1.2rem; }
.month {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  padding: 0.9rem 0.75rem 0.75rem;
}
.month h4 {
  margin: 0 0 0.6rem;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.15rem;
}
.month.current h4 { color: var(--accent-dark); }
.weekdays, .days {
  display: grid;
  /* minmax(0, 1fr): kare gün kutuları sütunları genişletip taşma yapmasın */
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.weekdays span {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding-bottom: 0.25rem;
}
.day {
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 100ms ease, background 120ms ease;
}
.day:hover { background: rgba(111, 103, 176, 0.18); }
.day:active { transform: scale(0.94); }
.day.empty { background: transparent; cursor: default; }
/* Söz atanmamış günler: kırmızı */
.day.unassigned { background: #f2c4c0; color: #7a2e2a; }
.day.unassigned:hover { background: #ecb0aa; }
.day.past { opacity: 0.45; }
.day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.day.assigned {
  background: #8fd1a8;
  color: #1f4d33;
  opacity: 1;
}
.day.assigned:hover { background: #7cc497; }
.day.assigned.today { box-shadow: inset 0 0 0 2px #2f6b47; }
.sub-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(58, 56, 79, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  overflow-y: auto;
  background: #faf7fb;
  border-radius: 24px;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 20px 60px rgba(58, 56, 79, 0.3);
  animation: belir 220ms ease-out both;
}
.modal-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.4rem;
}
@media (min-width: 600px) {
  .modal { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  .quote-card { animation: none; }
}
