:root {
  --accent: #e11d48;
  --accent-600: #be123c;
  --accent-50: #fff1f2;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --card: #ffffff;
  --ok: #059669;
  --ok-50: #ecfdf5;
  --warn: #d97706;
  --warn-50: #fffbeb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .12);
}

html { font-size: 15px; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.link-accent { color: var(--accent); text-decoration: none; }
.link-accent:hover { color: var(--accent-600); text-decoration: underline; }
.link-muted { color: var(--muted); text-decoration: none; }
.link-muted:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-600); border-color: var(--accent-600); color: #fff; }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn:focus-visible, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .2rem rgba(225, 29, 72, .2);
  border-color: var(--accent);
}
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 500; letter-spacing: -.01em; }
.brand strong { font-weight: 800; }
.brand-logo { width: 34px; height: 34px; object-fit: contain; }
.brand-lg { font-size: 1.35rem; }
.brand-lg .brand-logo { width: 48px; height: 48px; }
.auth-logo { display: block; width: 120px; height: auto; margin: 0 auto 1.75rem; }

/* ---------- App header ---------- */
.app-header { background: #0f172a; position: sticky; top: 0; z-index: 1030; }
.app-header .navbar { padding: .7rem 0; }
.main-nav .nav-link { white-space: nowrap; color: rgba(255,255,255,.7); font-weight: 500; border-radius: 10px; padding: .45rem .8rem !important; display: flex; align-items: center; gap: .4rem; }
.main-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.main-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }

.app-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; padding: 1.25rem 0; margin-top: 2rem; background: #fff; }
.app-footer a { color: var(--ink-2); }

/* ---------- Page head ---------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.page-title { font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: 1.9rem; margin: 0; letter-spacing: -.01em; }
.page-title i { color: var(--accent); font-size: 1.4rem; vertical-align: .15em; }
.page-sub { color: var(--muted); margin: .25rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty-state > i { font-size: 3rem; color: #cbd5e1; display: block; margin-bottom: .5rem; }

/* ---------- Panels ---------- */
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-title { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--muted); font-weight: 700; margin-bottom: 1rem; }
/* Hata yokken boş özet kutusu görünmesin. */
.validation-summary-valid { display: none; }

/* ---------- Auth ---------- */
body.auth { background: #fff; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero {
  position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 3rem;
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(251,113,133,.45), transparent 60%),
    radial-gradient(800px 500px at 110% 110%, rgba(129,140,248,.35), transparent 60%),
    #0f172a;
}
.auth-hero-inner { max-width: 460px; margin: 0 auto; }
.auth-hero h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: 2.8rem; line-height: 1.1; margin: 2.5rem 0 1rem; }
.auth-hero p { color: rgba(255,255,255,.75); font-size: 1.05rem; line-height: 1.6; }
.auth-features { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.auth-features li { display: flex; gap: .7rem; align-items: center; color: rgba(255,255,255,.85); }
.auth-features i { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.1); color: #fda4af; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; }
.auth-card { width: 100%; max-width: 400px; }
.auth-title { font-weight: 700; font-size: 1.6rem; margin-bottom: .35rem; letter-spacing: -.01em; }
.auth-sub { color: var(--muted); margin-bottom: 1.75rem; }
.auth-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: var(--accent-50); color: var(--accent); margin-bottom: 1.25rem; }
.auth-icon.success { background: var(--ok-50); color: var(--ok); }
.auth .form-label { font-weight: 600; font-size: .88rem; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .form-control { padding: .7rem .9rem .7rem 2.5rem; border-radius: 10px; }
.btn-eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); padding: .25rem .5rem; }
.auth .btn { border-radius: 10px; }

/* ---------- Forms ---------- */
.app .form-control, .app .form-select { border-radius: 10px; }
.app .form-label { font-weight: 600; font-size: .88rem; }
.form-layout { max-width: 680px; }
.btn-soft { background: #fff; border: 1px solid var(--line); color: var(--ink-2); border-radius: 10px; font-weight: 500; }
.btn-soft:hover, .btn-soft:focus, .btn-soft.show { background: #f8fafc; border-color: #cbd5e1; color: var(--ink); }
.text-accent { color: var(--accent); }
.min-w-0 { min-width: 0; }
.search-box { position: relative; }
.search-box i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-box input { padding-left: 2.3rem; min-width: 280px; border-radius: 10px; }
.pagination .page-link { color: var(--ink-2); border-radius: 10px !important; margin: 0 .15rem; border: 1px solid var(--line); }
.pagination .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Month navigation ---------- */
.month-nav { display: flex; align-items: center; gap: .6rem; }
.btn-nav { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; color: var(--ink-2); text-decoration: none; flex-shrink: 0; }
.btn-nav:hover { border-color: var(--accent); color: var(--accent); }
.month-strip { display: flex; gap: .65rem; overflow-x: auto; padding: .15rem .1rem .5rem; margin-bottom: 1.25rem; scrollbar-width: thin; }
.month-chip {
  flex: 1 0 128px; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: .7rem .95rem;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: .05rem; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.month-chip:hover { border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--shadow); }
.month-chip.active { border-color: var(--accent); background: var(--accent-50); }
.month-chip-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.month-chip-name { font-weight: 700; font-size: 1.05rem; }
.month-chip-count { font-size: .8rem; color: var(--muted); }
.month-chip-count strong { color: var(--accent); }

.month-progress { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.25rem; margin-bottom: 1.75rem; }
.progress-track { flex: 1; height: 8px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s; }
.progress-text { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.progress-text strong { color: var(--ink); }

/* ---------- Sections ---------- */
.section-head { display: flex; align-items: center; gap: .5rem; margin: 0 0 .9rem; font-weight: 700; font-size: 1.05rem; }
.section-head > i { color: var(--accent); }
.section-head .count { background: #eef0f4; color: var(--ink-2); font-size: .75rem; padding: .1rem .55rem; border-radius: 999px; font-weight: 600; }
.section-head.warn > i { color: var(--warn); }
.section-head.warn .count { background: var(--warn-50); color: #b45309; }
.section-head.ok > i { color: var(--ok); }
.section-head.ok .count { background: var(--ok-50); color: var(--ok); }

/* ---------- Order card ---------- */
.order-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.order-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.2rem 1.15rem;
  display: flex; flex-direction: column; gap: .65rem; border-top: 3px solid var(--accent); transition: box-shadow .15s, transform .15s;
}
.order-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.order-card.overdue { border-top-color: var(--warn); }
.order-card-head { display: flex; justify-content: space-between; gap: .5rem; align-items: start; }
.order-card-title { font-weight: 700; font-size: 1.05rem; line-height: 1.35; margin: 0; overflow-wrap: anywhere; }
.order-card-desc {
  color: var(--ink-2); font-size: .9rem; line-height: 1.5; white-space: pre-line; margin: 0; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.order-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .22rem .6rem; border-radius: 999px; background: #f1f5f9; color: var(--ink-2); text-decoration: none; max-width: 100%; }
.tag.link { background: #eef2ff; color: #4f46e5; }
.tag.link:hover { background: #e0e7ff; }
.tag.warn { background: var(--warn-50); color: #b45309; }
.order-card-actions { margin-top: auto; display: flex; gap: .5rem; padding-top: .2rem; }
.btn-done { background: var(--ok-50); color: var(--ok); border: 1px solid transparent; font-weight: 600; border-radius: 10px; }
.btn-done:hover, .btn-done:focus { background: var(--ok); color: #fff; }
.btn-icon-sm { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 8px; border: 0; background: transparent; color: var(--muted); flex-shrink: 0; }
.btn-icon-sm:hover, .btn-icon-sm.show { background: #f1f5f9; color: var(--ink); }

/* ---------- Done list ---------- */
.done-list { list-style: none; margin: 0; padding: 0; }
.done-item { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.done-item:first-child { border-top: 0; }
.done-check { width: 30px; height: 30px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; flex-shrink: 0; }
.done-title { font-weight: 600; overflow-wrap: anywhere; }
.done-sub { font-size: .8rem; color: var(--muted); }

/* ---------- Toast ---------- */
#appToast { background: #0f172a; color: #fff; border-radius: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { padding: 2rem 1.5rem; }
  .auth-hero h1 { font-size: 2rem; margin-top: 1.5rem; }
}
@media (max-width: 575.98px) {
  .page-title { font-size: 1.5rem; }
  .search-box, .search-box input { min-width: 0; width: 100%; }
  .page-actions { width: 100%; }
  .page-actions > * { flex: 1; }
}
