/*
 * Naz Mekanik — Yönetici Paneli 2.0 tasarım sistemi
 * Panel kabuğu (üst bar, sekmeler, mobil alt menü), Dashboard, Takvim, Raporlar, Ayarlar, maliyet analizi,
 * PDF / WhatsApp gönderim pencereleri. Tüm sınıflar "nz-" önekiyle ayrılır; derlenmiş Tailwind sınıflarıyla çakışmaz.
 * Renkler mevcut paletle uyumludur: brand-600 #1d4ed8, slate ölçeği; endüstriyel vurgu için grafit + amber.
 */
:root {
  --nz-ink: #0b1220;
  --nz-graphite: #111827;
  --nz-graphite-2: #1f2937;
  --nz-steel: #334155;
  --nz-text: #0f172a;
  --nz-text-2: #334155;
  --nz-muted: #64748b;
  --nz-faint: #94a3b8;
  --nz-line: #e2e8f0;
  --nz-line-2: #cbd5e1;
  --nz-bg: #f4f6f9;
  --nz-card: #ffffff;
  --nz-brand: #1d4ed8;
  --nz-brand-2: #1e40af;
  --nz-brand-soft: #eff6ff;
  --nz-amber: #f59e0b;
  --nz-amber-soft: #fffbeb;
  --nz-red: #dc2626;
  --nz-red-soft: #fef2f2;
  --nz-green: #059669;
  --nz-green-soft: #ecfdf5;
  --nz-violet: #7c3aed;
  --nz-violet-soft: #f5f3ff;
  --nz-wa: #25d366;
  --nz-wa-2: #1ebe5b;
  --nz-radius: 18px;
  --nz-radius-sm: 12px;
  --nz-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --nz-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .28);
  --nz-num: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
  --nz-safe-b: env(safe-area-inset-bottom, 0px);
}

/* ======================================================================================
   Panel kabuğu
   ====================================================================================== */
body.nz-shell { background: var(--nz-bg); }
.nz-app { min-height: 100dvh; padding-bottom: calc(5.25rem + var(--nz-safe-b)); }
@media (min-width: 900px) { .nz-app { padding-bottom: 3rem; } }

.nz-top {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(180deg, var(--nz-ink) 0%, var(--nz-graphite) 100%);
  color: #e5e7eb;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 8px 24px -18px rgba(0, 0, 0, .6);
}
.nz-top::after { /* ince "çelik" çizgi */
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, .55) 20%, rgba(148, 163, 184, .35) 60%, transparent);
}
.nz-top-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: .5rem; height: 60px; padding: 0 16px; }
.nz-brand { display: flex; align-items: center; gap: .65rem; min-width: 0; color: #fff; text-decoration: none; }
.nz-brand-mark {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(145deg, #2563eb, #1e3a8a); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 6px 16px -6px rgba(37, 99, 235, .7);
}
.nz-brand-mark svg { width: 22px; height: 22px; }
.nz-brand-text { min-width: 0; line-height: 1.1; }
.nz-brand-name { display: block; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
.nz-brand-sub { display: block; font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #94a3b8; }
.nz-top-spacer { flex: 1; }
.nz-icon-btn {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-width: 44px; height: 44px; padding: 0 .7rem; border-radius: 12px; border: 0; background: transparent;
  color: #cbd5e1; font: inherit; font-size: .9rem; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.nz-icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nz-icon-btn.is-active { background: rgba(255, 255, 255, .12); color: #fff; }
.nz-icon-btn svg { width: 21px; height: 21px; flex: none; }
.nz-icon-btn .nz-lbl { display: none; }
@media (min-width: 1100px) { .nz-icon-btn .nz-lbl { display: inline; } }
.nz-dot {
  position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--nz-red); color: #fff; font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--nz-graphite);
}
.nz-user { display: none; align-items: center; gap: .5rem; padding-left: .5rem; margin-left: .25rem; border-left: 1px solid rgba(255, 255, 255, .1); }
@media (min-width: 720px) { .nz-user { display: flex; } }
.nz-avatar {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: #334155; color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .02em;
}

/* Sekme şeridi: yatay kaydırılabilir, kenarlarda solma, aktif sekme görünür alana kayar */
.nz-tabs-wrap { position: relative; background: var(--nz-graphite); border-top: 1px solid rgba(255, 255, 255, .05); }
.nz-tabs {
  max-width: 1180px; margin: 0 auto; display: flex; gap: .15rem; overflow-x: auto; padding: .45rem 16px .55rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 28px), transparent 100%);
}
.nz-tabs::-webkit-scrollbar { display: none; }
.nz-tab {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .75rem;
  border-radius: 10px; color: #94a3b8; font-size: .92rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nz-tab svg { width: 18px; height: 18px; }
.nz-tab:hover { color: #e2e8f0; background: rgba(255, 255, 255, .06); }
.nz-tab.is-active { color: #0b1220; background: #f8fafc; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .6); }
.nz-tab.is-active svg { color: var(--nz-brand); }
.nz-tab .nz-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--nz-red); color: #fff; font-size: .7rem; line-height: 20px; text-align: center; }
@media (max-width: 899px) { .nz-tabs-wrap { display: none; } }

.nz-main { max-width: 768px; margin: 0 auto; padding: 1.25rem 16px 1.5rem; }
.nz-main.is-wide { max-width: 1180px; }
@media (min-width: 900px) { .nz-main { padding-top: 1.75rem; } }

/* Mobil alt menü: 4 ana modül + Menü */
.nz-bottom {
  position: fixed; inset: auto 0 0 0; z-index: 45; background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--nz-line); padding-bottom: var(--nz-safe-b);
}
.nz-bottom ul { display: grid; grid-template-columns: repeat(5, 1fr); margin: 0; padding: 0; list-style: none; }
.nz-bottom a, .nz-bottom button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%;
  height: 64px; border: 0; background: none; color: var(--nz-muted); font: inherit; font-size: .7rem; font-weight: 700; text-decoration: none; cursor: pointer;
}
.nz-bottom svg { width: 24px; height: 24px; }
.nz-bottom .is-active { color: var(--nz-brand); }
.nz-bottom .is-active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 4px 4px; background: var(--nz-brand); }
.nz-bottom .nz-dot { top: 8px; right: calc(50% - 22px); box-shadow: 0 0 0 2px #fff; }
@media (min-width: 900px) { .nz-bottom { display: none; } }
@media print { .nz-top, .nz-bottom, .nz-tabs-wrap, .nz-noprint { display: none !important; } .nz-main { max-width: none; padding: 0; } body.nz-shell { background: #fff; } }

/* Menü (bottom sheet) */
.nz-sheet-bg { position: fixed; inset: 0; z-index: 60; background: rgba(2, 6, 23, .55); animation: nz-fade .18s ease; }
.nz-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 88dvh; overflow-y: auto; background: #fff;
  border-radius: 24px 24px 0 0; padding: .5rem 16px calc(1rem + var(--nz-safe-b)); animation: nz-up .22s cubic-bezier(.2, .8, .2, 1);
  box-shadow: var(--nz-shadow-lg);
}
.nz-sheet-grip { width: 44px; height: 5px; border-radius: 99px; background: var(--nz-line-2); margin: .35rem auto .9rem; }
.nz-sheet h3 { margin: .25rem 0 .6rem; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--nz-faint); }
.nz-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.nz-sheet-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 86px; padding: .5rem;
  border-radius: 16px; background: #f8fafc; border: 1px solid var(--nz-line); color: var(--nz-text-2); font-size: .82rem; font-weight: 700; text-align: center; text-decoration: none;
}
.nz-sheet-item svg { width: 26px; height: 26px; color: var(--nz-steel); }
.nz-sheet-item.is-active { background: var(--nz-brand-soft); border-color: #bfdbfe; color: var(--nz-brand-2); }
.nz-sheet-item.is-active svg { color: var(--nz-brand); }
.nz-sheet-item .nz-dot { top: 8px; right: 10px; box-shadow: 0 0 0 2px #f8fafc; }
.nz-sheet-foot { display: flex; align-items: center; gap: .75rem; padding: .85rem; border-radius: 16px; background: #f8fafc; border: 1px solid var(--nz-line); }
.nz-sheet-foot .nz-avatar { background: var(--nz-graphite-2); }
.nz-sheet-foot b { display: block; font-size: .95rem; }
.nz-sheet-foot small { color: var(--nz-muted); }

@keyframes nz-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nz-up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes nz-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nz-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@media (prefers-reduced-motion: reduce) { .nz-sheet, .nz-sheet-bg, .nz-modal, .nz-toast { animation: none !important; } }

.nz-license {
  display: flex; align-items: flex-start; gap: .6rem; margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 14px;
  background: var(--nz-amber-soft); border: 1px solid #fde68a; color: #78350f; font-weight: 600; text-decoration: none;
}
.nz-license svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }

/* Hatırlatmalar yalnız ikon: rozet ikonun köşesinde durur */
.nz-icon-only { padding: 0; width: 44px; }
.nz-icon-only .nz-dot { top: 4px; right: 2px; }
/* Mobil üst bar: Hatırlatmalar · Takvim · Raporlar · Panel · Ayarlar sığsın */
@media (max-width: 559px) {
  .nz-top-in { gap: 2px; padding: 0 10px; }
  .nz-brand { gap: .5rem; margin-right: .25rem; }
  .nz-brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .nz-brand-sub { display: none; }
  .nz-brand-name { font-size: .92rem; max-width: 28vw; }
  .nz-icon-btn { min-width: 40px; width: 40px; padding: 0; }
}
@media (max-width: 359px) { .nz-brand-text { display: none; } }
/* Sekme şeridi: 1280px altında ikonlar gizlenir, etiketler sığar; taşarsa yatay kaydırılır */
@media (max-width: 1279px) { .nz-tab { padding: 0 .7rem; gap: .35rem; font-size: .88rem; } .nz-tab > svg { display: none; } }

/* ======================================================================================
   Ortak bileşenler
   ====================================================================================== */
.nz { color: var(--nz-text); }
.nz *, .nz *::before, .nz *::after { box-sizing: border-box; }
/* Tailwind preflight svg'yi blok yapar: metin içindeki ikonlar satır sonuna düşmesin */
.nz svg { display: inline-block; flex: none; }
.nz-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1.25rem; }
.nz-eyebrow { margin: 0 0 .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--nz-brand); }
.nz-title { margin: 0; font-size: clamp(1.6rem, 4.5vw, 2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.nz-sub { margin: .35rem 0 0; color: var(--nz-muted); font-size: 1rem; }
.nz-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 639px) {
  .nz-head-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .nz-head-actions > .nz-btn { min-height: 46px; padding: 0 .75rem; font-size: .94rem; }
  .nz-head-actions > .nz-seg { grid-column: 1 / -1; }
}

.nz-card { background: var(--nz-card); border: 1px solid var(--nz-line); border-radius: var(--nz-radius); box-shadow: var(--nz-shadow); padding: 1.1rem; }
@media (min-width: 640px) { .nz-card { padding: 1.35rem; } }
.nz-card + .nz-card { margin-top: 1rem; }
.nz-card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem .75rem; margin: 0 0 .9rem; }
.nz-card-h > div:first-child { flex: 1 1 220px; min-width: 0; }
.nz-card-h h2, .nz-card-h h3 { margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: .5rem; }
.nz-card-h h2 svg, .nz-card-h h3 svg { width: 20px; height: 20px; color: var(--nz-steel); }
.nz-card-h small, .nz-hint { color: var(--nz-muted); font-size: .86rem; }
.nz-link { color: var(--nz-brand); font-weight: 700; text-decoration: none; font-size: .9rem; display: inline-flex; align-items: center; gap: .25rem; }
.nz-link:hover { text-decoration: underline; }

.nz-grid { display: grid; gap: 1rem; }
.nz-grid-2 { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 900px) { .nz-grid-2 { grid-template-columns: 1fr 1fr; } .nz-grid-2-1 { grid-template-columns: 1.65fr 1fr; } }

/* KPI kartları */
.nz-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 900px) { .nz-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.nz-kpi {
  position: relative; overflow: hidden; display: block; padding: 1rem; border-radius: var(--nz-radius); background: #fff; border: 1px solid var(--nz-line);
  box-shadow: var(--nz-shadow); color: inherit; text-decoration: none; transition: border-color .15s, transform .15s;
}
a.nz-kpi:hover { border-color: var(--nz-line-2); }
a.nz-kpi:active { transform: scale(.99); }
.nz-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nz-kpi-label { font-size: .8rem; font-weight: 700; color: var(--nz-muted); line-height: 1.25; }
@media (max-width: 639px) { .nz-kpi { padding: .85rem; } .nz-kpi-label { font-size: .74rem; } .nz-kpi-ico { width: 30px; height: 30px; } .nz-kpi-foot { font-size: .74rem; } }
.nz-kpi-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #f1f5f9; color: var(--nz-steel); }
.nz-kpi-ico svg { width: 19px; height: 19px; }
.nz-kpi-val { margin-top: .55rem; font-family: var(--nz-num); font-size: clamp(1.75rem, 6vw, 2.3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.nz-kpi-val small { font-size: .5em; font-weight: 600; color: var(--nz-muted); letter-spacing: 0; margin-left: .2rem; }
.nz-kpi-foot { margin-top: .45rem; font-size: .8rem; color: var(--nz-muted); display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.nz-kpi.tone-blue .nz-kpi-ico { background: var(--nz-brand-soft); color: var(--nz-brand); }
.nz-kpi.tone-red .nz-kpi-ico { background: var(--nz-red-soft); color: var(--nz-red); }
.nz-kpi.tone-green .nz-kpi-ico { background: var(--nz-green-soft); color: var(--nz-green); }
.nz-kpi.tone-amber .nz-kpi-ico { background: var(--nz-amber-soft); color: #b45309; }
.nz-kpi.tone-wa .nz-kpi-ico { background: #e8faef; color: #128c4b; }
.nz-kpi.tone-violet .nz-kpi-ico { background: var(--nz-violet-soft); color: var(--nz-violet); }
.nz-kpi.is-alert { border-color: #fecaca; box-shadow: 0 0 0 3px rgba(220, 38, 38, .08); }
.nz-kpi.is-dark { background: linear-gradient(160deg, #111827, #1f2937); border-color: #111827; color: #f8fafc; }
.nz-kpi.is-dark .nz-kpi-label, .nz-kpi.is-dark .nz-kpi-foot { color: #9ca3af; }
.nz-kpi.is-dark .nz-kpi-ico { background: rgba(255, 255, 255, .08); color: #fbbf24; }
.nz-trend { display: inline-flex; align-items: center; gap: 2px; padding: 1px 7px; border-radius: 999px; font-weight: 800; font-size: .72rem; }
.nz-trend.up { background: var(--nz-green-soft); color: var(--nz-green); }
.nz-trend.down { background: var(--nz-red-soft); color: var(--nz-red); }
.nz-trend.flat { background: #f1f5f9; color: var(--nz-muted); }
.nz-meter { margin-top: .6rem; height: 6px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.nz-meter > i { display: block; height: 100%; border-radius: inherit; background: var(--nz-brand); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.nz-kpi.is-dark .nz-meter { background: rgba(255, 255, 255, .1); }
.nz-kpi.is-dark .nz-meter > i { background: #fbbf24; }

/* Rozetler */
.nz-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 800; white-space: nowrap; background: #f1f5f9; color: var(--nz-text-2); }
.nz-badge svg { width: 14px; height: 14px; }
.nz-badge.red { background: var(--nz-red-soft); color: #b91c1c; }
.nz-badge.amber { background: var(--nz-amber-soft); color: #92400e; }
.nz-badge.green { background: var(--nz-green-soft); color: #047857; }
.nz-badge.blue { background: var(--nz-brand-soft); color: var(--nz-brand-2); }
.nz-badge.violet { background: var(--nz-violet-soft); color: #6d28d9; }
.nz-badge.dark { background: var(--nz-graphite); color: #f8fafc; }
.nz-pulse { width: 8px; height: 8px; border-radius: 99px; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: nz-ping 1.6s infinite; }
@keyframes nz-ping { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 100% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); } }

/* Butonlar */
.nz-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.15rem; border-radius: 14px; border: 0;
  font: inherit; font-size: 1rem; font-weight: 800; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .1s;
  background: var(--nz-brand); color: #fff; box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .8);
}
.nz-btn:hover { background: var(--nz-brand-2); }
.nz-btn:active { transform: scale(.98); }
.nz-btn:disabled, .nz-btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.nz-btn svg { width: 20px; height: 20px; flex: none; }
.nz-btn.sm { min-height: 40px; padding: 0 .85rem; font-size: .9rem; border-radius: 12px; }
.nz-btn.lg { min-height: 56px; font-size: 1.08rem; }
.nz-btn.block { width: 100%; }
.nz-btn.ghost { background: transparent; color: var(--nz-text-2); box-shadow: none; }
.nz-btn.ghost:hover { background: #f1f5f9; }
.nz-btn.light { background: #fff; color: var(--nz-text); box-shadow: inset 0 0 0 1.5px var(--nz-line-2); }
.nz-btn.light:hover { background: #f8fafc; }
.nz-btn.dark { background: var(--nz-graphite); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .7); }
.nz-btn.dark:hover { background: #000; }
.nz-btn.danger { background: #fff; color: var(--nz-red); box-shadow: inset 0 0 0 1.5px #fecaca; }
.nz-btn.danger:hover { background: var(--nz-red-soft); }
.nz-btn.wa { background: var(--nz-wa); color: #fff; box-shadow: 0 8px 18px -10px rgba(37, 211, 102, .9); }
.nz-btn.wa:hover { background: var(--nz-wa-2); }
.nz-btn.is-loading { pointer-events: none; opacity: .85; }
.nz-spin { width: 18px; height: 18px; border-radius: 99px; border: 2.5px solid currentColor; border-right-color: transparent; animation: nz-rot .7s linear infinite; flex: none; }
@keyframes nz-rot { to { transform: rotate(360deg); } }
.nz-btn:focus-visible, .nz-tab:focus-visible, .nz-icon-btn:focus-visible, .nz-switch:focus-visible, .nz-seg button:focus-visible,
.nz-bottom a:focus-visible, .nz-bottom button:focus-visible, .nz-acc-h:focus-visible, .nz-cal-day:focus-visible, .nz-chip:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Form */
.nz-field { display: block; margin-bottom: .9rem; }
.nz-field > span { display: block; margin-bottom: .4rem; font-size: .92rem; font-weight: 700; color: var(--nz-text-2); }
.nz-field > small { display: block; margin-top: .35rem; color: var(--nz-muted); font-size: .82rem; }
.nz-input, .nz-select, .nz-textarea {
  display: block; width: 100%; min-height: 50px; padding: .7rem .95rem; border-radius: 13px; border: 1.5px solid var(--nz-line-2); background: #fff;
  color: var(--nz-text); font: inherit; font-size: 1rem; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
.nz-select { padding-right: 2.5rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; }
.nz-textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.nz-input:focus, .nz-select:focus, .nz-textarea:focus { outline: none; border-color: var(--nz-brand); box-shadow: 0 0 0 4px rgba(29, 78, 216, .12); }
.nz-row { display: grid; gap: .75rem; }
@media (min-width: 560px) { .nz-row.c2 { grid-template-columns: 1fr 1fr; } .nz-row.c3 { grid-template-columns: repeat(3, 1fr); } }
.nz-search { position: relative; }
.nz-search svg { position: absolute; left: .9rem; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--nz-faint); pointer-events: none; }
.nz-search .nz-input { padding-left: 2.7rem; }

/* Aç / kapat anahtarı */
.nz-switch {
  position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: #cbd5e1; transition: background .2s;
}
.nz-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 999px; background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .25); transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}
.nz-switch[aria-checked="true"] { background: var(--nz-green); }
.nz-switch[aria-checked="true"]::after { transform: translateX(22px); }
.nz-switch:disabled { opacity: .45; cursor: not-allowed; }
.nz-switch.is-busy::after { background: #e2e8f0; }

.nz-opt { display: flex; align-items: center; gap: 1rem; padding: .95rem 0; border-top: 1px solid var(--nz-line); }
.nz-opt:first-child { border-top: 0; padding-top: .25rem; }
.nz-opt-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f1f5f9; color: var(--nz-steel); }
.nz-opt-ico svg { width: 20px; height: 20px; }
.nz-opt-txt { flex: 1; min-width: 0; }
.nz-opt-txt b { display: block; font-size: .98rem; font-weight: 750; }
.nz-opt-txt small { display: block; margin-top: .15rem; color: var(--nz-muted); font-size: .84rem; line-height: 1.4; }

/* Akordeon */
.nz-acc { border: 1px solid var(--nz-line); border-radius: var(--nz-radius); background: #fff; box-shadow: var(--nz-shadow); overflow: hidden; }
.nz-acc + .nz-acc { margin-top: .75rem; }
.nz-acc-h {
  width: 100%; display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border: 0; background: none; cursor: pointer; text-align: left; font: inherit; color: inherit;
}
.nz-acc-h .nz-opt-ico { background: var(--nz-brand-soft); color: var(--nz-brand); }
.nz-acc-h b { display: block; font-size: 1.02rem; font-weight: 800; }
.nz-acc-h small { display: block; color: var(--nz-muted); font-size: .84rem; margin-top: .1rem; }
.nz-acc-h .nz-chev { margin-left: auto; width: 22px; height: 22px; color: var(--nz-faint); transition: transform .2s; flex: none; }
.nz-acc.is-open .nz-chev { transform: rotate(180deg); }
.nz-acc-b { padding: 0 1.1rem 1.1rem; }
.nz-acc-b > :first-child { margin-top: 0; }

/* Segment / sekme */
.nz-seg { display: flex; gap: .25rem; padding: .25rem; border-radius: 14px; background: #e9edf3; overflow-x: auto; scrollbar-width: none; }
.nz-seg::-webkit-scrollbar { display: none; }
.nz-seg button {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 42px; padding: 0 .9rem; border: 0; border-radius: 11px;
  background: none; color: var(--nz-muted); font: inherit; font-size: .92rem; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.nz-seg button svg { width: 18px; height: 18px; }
.nz-seg button[aria-selected="true"] { background: #fff; color: var(--nz-text); box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .18); }
.nz-settings { display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .nz-settings { grid-template-columns: 260px 1fr; align-items: start; }
  .nz-settings > .nz-seg { flex-direction: column; position: sticky; top: 132px; background: transparent; padding: 0; }
  .nz-settings > .nz-seg button { justify-content: flex-start; min-height: 46px; padding: 0 1rem; }
  .nz-settings > .nz-seg button[aria-selected="true"] { background: #fff; box-shadow: inset 0 0 0 1px var(--nz-line), var(--nz-shadow); }
  .nz-settings > div { min-width: 0; }
}

/* Listeler */
.nz-list { list-style: none; margin: 0; padding: 0; }
.nz-li { display: flex; align-items: center; gap: .85rem; padding: .85rem 0; border-top: 1px solid var(--nz-line); color: inherit; text-decoration: none; }
.nz-li:first-child { border-top: 0; padding-top: .15rem; }
a.nz-li:hover .nz-li-t { color: var(--nz-brand); }
.nz-li-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #f1f5f9; color: var(--nz-steel); }
.nz-li-ico svg { width: 20px; height: 20px; }
.nz-li-ico.red { background: var(--nz-red-soft); color: var(--nz-red); }
.nz-li-ico.amber { background: var(--nz-amber-soft); color: #b45309; }
.nz-li-ico.green { background: var(--nz-green-soft); color: var(--nz-green); }
.nz-li-ico.blue { background: var(--nz-brand-soft); color: var(--nz-brand); }
.nz-li-ico.violet { background: var(--nz-violet-soft); color: var(--nz-violet); }
.nz-li-b { flex: 1; min-width: 0; }
.nz-li-t { display: block; font-weight: 750; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nz-li-s { display: block; margin-top: .1rem; font-size: .84rem; color: var(--nz-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nz-li-e { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.nz-empty { padding: 1.6rem 1rem; border: 1.5px dashed var(--nz-line-2); border-radius: 16px; text-align: center; color: var(--nz-muted); }
.nz-empty svg { width: 34px; height: 34px; color: var(--nz-faint); margin-bottom: .4rem; }
.nz-empty b { display: block; color: var(--nz-text-2); }

/* Tablo */
.nz-table-wrap { overflow-x: auto; margin: 0 -1.1rem; padding: 0 1.1rem; }
.nz-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.nz-table th { text-align: left; padding: .6rem .5rem; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--nz-faint); border-bottom: 1px solid var(--nz-line); white-space: nowrap; }
.nz-table td { padding: .75rem .5rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.nz-table .num { text-align: right; font-family: var(--nz-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.nz-table tr:last-child td { border-bottom: 0; }

/* Grafik */
.nz-chart { position: relative; }
.nz-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.nz-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin: 0 0 .75rem; padding: 0; list-style: none; font-size: .84rem; color: var(--nz-muted); }
.nz-legend li { display: flex; align-items: center; gap: .4rem; }
.nz-legend i { width: 10px; height: 10px; border-radius: 3px; }
.nz-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: .6rem .75rem; border-radius: 12px; background: var(--nz-graphite); color: #f8fafc;
  font-size: .82rem; box-shadow: var(--nz-shadow-lg); transform: translate(-50%, -100%); white-space: nowrap;
}
.nz-tip b { display: block; margin-bottom: .25rem; }
.nz-tip p { margin: .1rem 0; display: flex; justify-content: space-between; gap: 1rem; }
.nz-donut-wrap { display: flex; align-items: center; gap: 1.25rem; }
.nz-donut-wrap svg { width: 132px; height: 132px; flex: none; }
.nz-bars-h { display: grid; gap: .6rem; }
.nz-bar-h { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: .6rem; font-size: .88rem; }
.nz-bar-h span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--nz-text-2); font-weight: 600; }
.nz-bar-h div { height: 10px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.nz-bar-h div i { display: block; height: 100%; border-radius: inherit; background: var(--nz-brand); }
.nz-bar-h b { font-family: var(--nz-num); font-variant-numeric: tabular-nums; font-size: .86rem; }

/* Takvim */
.nz-cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.nz-cal-head h2 { margin: 0; font-size: 1.15rem; font-weight: 800; text-transform: capitalize; }
.nz-cal-nav { display: flex; gap: .35rem; }
.nz-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.nz-cal-dow { padding: .35rem 0; text-align: center; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--nz-faint); }
.nz-cal-day {
  position: relative; min-height: 64px; padding: .4rem; border-radius: 12px; border: 1px solid var(--nz-line); background: #fff; text-align: left; cursor: pointer;
  font: inherit; color: inherit; display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
@media (min-width: 900px) { .nz-cal-day { min-height: 96px; } }
.nz-cal-day.is-out { background: #f8fafc; color: var(--nz-faint); }
.nz-cal-day.is-today { border-color: var(--nz-brand); box-shadow: inset 0 0 0 1px var(--nz-brand); }
.nz-cal-day.is-sel { background: var(--nz-brand-soft); border-color: #93c5fd; }
.nz-cal-num { font-family: var(--nz-num); font-size: .86rem; font-weight: 700; }
.nz-cal-day.is-today .nz-cal-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--nz-brand); color: #fff; }
.nz-cal-pills { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nz-cal-pill { display: block; padding: 1px 5px; border-radius: 5px; font-size: .68rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--nz-brand-soft); color: var(--nz-brand-2); }
.nz-cal-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.nz-cal-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--nz-brand); }
@media (max-width: 899px) { .nz-cal-pills { display: none; } }
@media (min-width: 900px) { .nz-cal-dots { display: none; } }
.c-blue { --c: #1d4ed8; --cs: #eff6ff; } .c-green { --c: #059669; --cs: #ecfdf5; } .c-amber { --c: #b45309; --cs: #fffbeb; }
.c-red { --c: #dc2626; --cs: #fef2f2; } .c-violet { --c: #7c3aed; --cs: #f5f3ff; } .c-slate { --c: #475569; --cs: #f1f5f9; }
.nz-cal-pill[class*="c-"] { background: var(--cs); color: var(--c); }
.nz-cal-dots i[class*="c-"] { background: var(--c); }
.nz-cal-pill.is-sys { background: #f1f5f9; color: var(--nz-muted); }
.nz-ev { display: flex; gap: .85rem; padding: .9rem; border-radius: 14px; border: 1px solid var(--nz-line); background: #fff; }
.nz-ev + .nz-ev { margin-top: .6rem; }
.nz-ev-bar { flex: none; width: 4px; border-radius: 99px; background: var(--c, var(--nz-brand)); }
.nz-ev-b { flex: 1; min-width: 0; }
.nz-ev-t { margin: 0; font-weight: 800; font-size: 1rem; }
.nz-ev-m { margin: .2rem 0 0; color: var(--nz-muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; }
.nz-ev-m svg { width: 15px; height: 15px; vertical-align: -2px; }
.nz-ev-d { margin: .5rem 0 0; color: var(--nz-text-2); font-size: .92rem; white-space: pre-wrap; }
.nz-ev-a { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.nz-people { display: grid; gap: .5rem; max-height: 320px; overflow-y: auto; padding: .15rem; }
.nz-person { display: flex; align-items: center; gap: .75rem; padding: .7rem .8rem; border-radius: 13px; border: 1.5px solid var(--nz-line); cursor: pointer; background: #fff; }
.nz-person.is-on { border-color: var(--nz-brand); background: var(--nz-brand-soft); }
.nz-person.is-off { opacity: .65; }
.nz-person input { width: 22px; height: 22px; accent-color: var(--nz-brand); flex: none; }
.nz-person b { display: block; font-size: .95rem; }
.nz-person small { color: var(--nz-muted); font-size: .8rem; }
.nz-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.nz-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: 0 .8rem; border-radius: 999px; border: 1.5px solid var(--nz-line-2); background: #fff; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; color: var(--nz-text-2); }
.nz-chip[aria-pressed="true"] { border-color: var(--nz-brand); background: var(--nz-brand); color: #fff; }
.nz-colors { display: flex; gap: .5rem; }
.nz-color { width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.nz-color[aria-pressed="true"] { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c); }

/* Modal */
.nz-modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 23, .55); display: flex; align-items: flex-end; justify-content: center; animation: nz-fade .15s ease; }
@media (min-width: 640px) { .nz-modal-bg { align-items: center; padding: 1.5rem; } }
.nz-modal {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 24px 24px 0 0; box-shadow: var(--nz-shadow-lg);
  animation: nz-up .22s cubic-bezier(.2, .8, .2, 1); color: var(--nz-text); font-family: inherit;
}
@media (min-width: 640px) { .nz-modal { border-radius: 24px; animation-name: nz-pop; } }
.nz-modal-h { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; background: #fff; border-bottom: 1px solid var(--nz-line); }
.nz-modal-h h2 { margin: 0; flex: 1; font-size: 1.15rem; font-weight: 800; }
.nz-modal-b { padding: 1.1rem; }
.nz-modal-f { position: sticky; bottom: 0; display: flex; gap: .6rem; padding: .9rem 1.1rem calc(.9rem + var(--nz-safe-b)); background: #fff; border-top: 1px solid var(--nz-line); }
.nz-modal-f .nz-btn { flex: 1; }
.nz-x { width: 42px; height: 42px; border-radius: 12px; border: 0; background: #f1f5f9; color: var(--nz-text-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.nz-x svg { width: 20px; height: 20px; }

/* Bildirim (toast) */
.nz-toasts { position: fixed; left: 50%; bottom: calc(5.5rem + var(--nz-safe-b)); z-index: 120; display: grid; gap: .5rem; width: min(92vw, 420px); transform: translateX(-50%); pointer-events: none; }
@media (min-width: 900px) { .nz-toasts { bottom: 1.5rem; } }
.nz-toast { display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1rem; border-radius: 14px; background: var(--nz-graphite); color: #f8fafc; font-size: .95rem; font-weight: 600; box-shadow: var(--nz-shadow-lg); animation: nz-pop .2s ease; pointer-events: auto; }
.nz-toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.nz-toast.ok svg { color: #34d399; } .nz-toast.err svg { color: #f87171; }

/* Uyarı kutuları */
.nz-note { display: flex; gap: .65rem; padding: .85rem 1rem; border-radius: 14px; background: #f8fafc; border: 1px solid var(--nz-line); color: var(--nz-text-2); font-size: .9rem; line-height: 1.45; }
.nz-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--nz-muted); }
.nz-note.amber { background: var(--nz-amber-soft); border-color: #fde68a; color: #78350f; } .nz-note.amber svg { color: #d97706; }
.nz-note.red { background: var(--nz-red-soft); border-color: #fecaca; color: #7f1d1d; } .nz-note.red svg { color: var(--nz-red); }
.nz-note.green { background: var(--nz-green-soft); border-color: #a7f3d0; color: #064e3b; } .nz-note.green svg { color: var(--nz-green); }
.nz-note.blue { background: var(--nz-brand-soft); border-color: #bfdbfe; color: #1e3a8a; } .nz-note.blue svg { color: var(--nz-brand); }
.nz-mb { margin-bottom: 1rem; } .nz-mt { margin-top: 1rem; }

.nz-skel { border-radius: 12px; background: linear-gradient(90deg, #eef2f7 0, #f8fafc 40%, #eef2f7 80%); background-size: 800px 100%; animation: nz-shimmer 1.2s infinite linear; }
.nz-loading { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 40vh; color: var(--nz-muted); font-weight: 600; }

/* Maliyet analizi */
.nz-cost { margin-top: 1.25rem; }
.nz-cost-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 720px) { .nz-cost-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nz-cost-kpis .nz-kpi { box-shadow: none; }
.nz-money { font-family: var(--nz-num); font-variant-numeric: tabular-nums; }

/* ======================================================================================
   Belge ekranları — PDF / WhatsApp gönderim penceresi
   ====================================================================================== */
.nz-doc-busy { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; background: rgba(2, 6, 23, .45); }
.nz-doc-busy div { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem; border-radius: 16px; background: #fff; font-weight: 700; color: var(--nz-text); box-shadow: var(--nz-shadow-lg); }
.nz-wa-head { display: flex; align-items: center; gap: .75rem; padding: .9rem; margin-bottom: 1rem; border-radius: 16px; background: #e8faef; border: 1px solid #b7ebcb; }
.nz-wa-head .nz-li-ico { background: var(--nz-wa); color: #fff; }
.nz-wa-head b { display: block; }
.nz-wa-head small { color: #166534; }
.nz-wa-actions { display: grid; gap: .55rem; }
.nz-pdf-render { position: fixed !important; left: -10000px !important; top: 0 !important; width: 794px !important; background: #fff !important; }
.nz-pdf-render .print\:hidden { display: none !important; }
