:root {
  --bg0: #f4f6fb;
  --bg1: #eef1f7;
  --ink: #102033;
  --muted: #5b7084;
  --line: rgba(16, 32, 51, 0.1);
  --accent: #00205B;
  --yellow: #FFED00;
  --yellow-ink: #00205B;
  --accent-ink: #FFED00;
  --danger: #00205B;
  --panel: rgba(255, 255, 255, 0.78);
  --radius: 18px;
  --shadow: 0 14px 40px rgba(16, 32, 51, 0.08);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  /* Font: Plus Jakarta Sans */
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 100% -10%, rgba(0, 32, 91, 0.16), transparent 55%),
    radial-gradient(700px 420px at -10% 20%, rgba(255, 237, 0, 0.14), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  line-height: 1.45;
}

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

.bg-glow {
  position: fixed;
  inset: auto -15% 8% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 237, 0, 0.28), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
  animation: drift 12s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-36px, -24px, 0) scale(1.12); }
}

.topbar,
.shell,
.flash-wrap {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-t)) 18px 10px;
  max-width: 720px;
  margin: 0 auto;
}

.brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.ghost-link {
  color: var(--muted);
  font-size: 0.92rem;
}

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 8px 18px calc(36px + var(--safe-b));
}

.display {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: clamp(1.75rem, 6.5vw, 2.4rem);
  line-height: 1.1;
  margin: 0 0 10px;
}

.display.tight {
  font-size: clamp(1.55rem, 6.2vw, 2.1rem);
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  max-width: 36ch;
}

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

.page-head {
  margin: 10px 0 22px;
  animation: rise 0.45s ease both;
}

.page-head.compact { margin-bottom: 16px; }

.back {
  display: inline-block;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.login-panel {
  padding-top: 28px;
  animation: rise 0.5s ease both;
}

.stack { display: grid; gap: 12px; }
.gap-sm { gap: 10px; }

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

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

input:focus,
textarea:focus {
  border-color: rgba(0, 32, 91, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 32, 91, 0.12);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
  min-height: 44px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }

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

.btn-yellow {
  background: var(--yellow);
  color: var(--yellow-ink);
}

.btn-secondary {
  background: #102033;
  color: #fff;
}

.btn-ai {
  background: linear-gradient(135deg, #00205B, #0a3a8c);
  color: #fff;
}

.btn-ai[disabled] {
  opacity: 0.55;
  cursor: wait;
}

.btn-ghost,
.btn-danger-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn-quiet {
  background: rgba(16, 32, 51, 0.05);
  color: var(--muted);
  border: 1px solid transparent;
}

.btn-quiet.danger {
  color: #00205B;
  background: #FFED00;
}

.btn-danger {
  margin-top: 12px;
  background: #FFED00;
  color: #00205B;
}

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

.btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-row.wrap {
  flex-wrap: wrap;
  margin-top: 8px;
}

.task-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  margin-top: 10px;
}

.task-actions .btn-sm {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 6px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  white-space: normal;
  text-align: center;
}

.task-actions.secondary {
  margin-top: 6px;
}

.task-actions form {
  margin: 0;
}

/* Üst satır */
.btn-act-save {
  background: #00205B;
  color: #fff;
}

.btn-act-ai {
  background: #FFED00;
  color: #00205B;
}

.btn-act-cal {
  background: #00205B;
  color: #FFED00;
}

/* Alt satır */
.btn-act-done {
  background: #FFED00;
  color: #00205B;
  border: 1px solid rgba(0, 32, 91, 0.2);
}

.btn-act-del {
  background: #00205B;
  color: #FFED00;
  border: 1px solid rgba(0, 32, 91, 0.3);
}

.btn-act-uncal {
  background: #fff;
  color: #00205B;
  border: 1.5px solid #00205B;
}

.btn-sm:disabled,
.btn-sm[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.project-tools {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 12px;
}

.btn-project-delete {
  appearance: none;
  border: 0;
  background: #FFED00;
  color: #00205B;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  min-height: 34px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 32, 91, 0.2);
}

.btn-project-delete:active {
  transform: scale(0.98);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.head-row .back {
  margin-bottom: 0;
}

.add-panel {
  margin-bottom: 18px;
  border-radius: var(--radius);
  border: 1.5px dashed rgba(0, 32, 91, 0.4);
  background: rgba(255, 237, 0, 0.12);
  box-shadow: none;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.add-panel[open] {
  border-style: solid;
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.add-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 16px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.add-summary::-webkit-details-marker { display: none; }

.add-plus {
  position: relative;
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #FFED00;
  color: transparent;
  font-size: 0;
  line-height: 0;
  flex-shrink: 0;
  overflow: hidden;
}

/* Metin yerine çizgi — her ekranda ortalı */
.add-plus::before,
.add-plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #00205B;
  border-radius: 1px;
  transform: translate(-50%, -50%);
}

.add-plus::before {
  width: 12px;
  height: 2px;
}

.add-plus::after {
  width: 2px;
  height: 12px;
}

.add-label {
  font-weight: 600;
  font-size: 1rem;
  color: #00205B;
  letter-spacing: -0.01em;
}

.add-panel[open] .add-label {
  color: var(--ink);
}

.add-panel[open] .add-summary {
  justify-content: flex-start;
  border-bottom: 1px solid var(--line);
}

.add-panel-body {
  padding: 14px;
}

.composer,
.composer-block,
.form-card,
.soft-panel,
.task,
.project-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.composer {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-bottom: 18px;
}

.composer-block {
  padding: 16px;
  margin-bottom: 22px;
}

.form-card {
  padding: 16px;
  margin-top: 22px;
}

.soft-panel {
  padding: 12px 14px;
  margin-bottom: 16px;
}

.soft-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 500;
  list-style: none;
}

.soft-panel summary::-webkit-details-marker { display: none; }

.soft-panel[open] summary {
  margin-bottom: 12px;
  color: var(--ink);
}

.soft-panel form { margin-top: 8px; }

.section-title {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 600;
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  transition: transform 0.15s ease;
  animation: rise 0.45s ease both;
}

.project-row:active { transform: scale(0.99); }

.project-row strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.meta {
  color: var(--muted);
  font-size: 0.88rem;
  display: block;
  margin-top: 2px;
}

.meta.clip {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 4px 0 6px;
}

.stack-composer {
  display: grid;
  gap: 10px;
}

.chev {
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}

.task-stack { display: grid; gap: 12px; }

.task {
  padding: 0;
  animation: rise 0.4s ease both;
  overflow: hidden;
}

.task-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  min-height: 48px;
  font-weight: 600;
  user-select: none;
}

.task-summary::-webkit-details-marker { display: none; }

.remind-chip {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #00205B;
  background: #FFED00;
  border: 1px solid rgba(0, 32, 91, 0.2);
  border-radius: 999px;
  padding: 4px 8px;
  font-variant-numeric: tabular-nums;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.task-title-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.02rem;
}

.task-chev {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.task[open] .task-chev {
  transform: rotate(45deg);
}

.task-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  animation: rise 0.25s ease both;
}

.task.done { opacity: 0.78; }

.task .desc {
  color: var(--muted);
  white-space: pre-wrap;
  margin: 8px 0 12px;
  font-size: 0.95rem;
}

.done-section { margin-top: 28px; }

.empty {
  color: var(--muted);
  padding: 8px 2px 20px;
}

.form-error,
.ai-status {
  color: #00205B;
  margin: 0;
  font-size: 0.9rem;
}

.ai-status.is-ok { color: var(--accent); }
.ai-status.is-err { color: var(--danger); }

.flash-wrap {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 0 18px;
}

.flash {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 0.92rem;
}

.flash-ok {
  background: #FFED00;
  color: #00205B;
}

.flash-error {
  background: #FFED00;
  color: #00205B;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 5.6rem 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise 0.35s ease both;
}

.timeline-row.is-undated {
  opacity: 0.72;
}

.timeline-when {
  min-width: 0;
}

.timeline-date {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #00205B;
  background: #FFED00;
  border-radius: 10px;
  padding: 8px 6px;
  text-align: center;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.timeline-date.muted {
  color: var(--muted);
  background: rgba(16, 32, 51, 0.06);
  font-weight: 500;
}

.timeline-main {
  min-width: 0;
}

.timeline-task {
  display: block;
  font-size: 0.98rem;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-project {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.font-lab {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}

.font-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 14px 12px;
}

.font-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #00205B;
  background: #FFED00;
  border-radius: 999px;
  padding: 4px 9px;
  margin-bottom: 10px;
}

.font-sample-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #00205B;
}

.font-sample-body {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.4;
}

.font-sample-mono {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: #00205B;
}

@media (min-width: 720px) {
  .composer:not(.stack-composer) {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}
