/* ═══════════════════════════════════════════════════════════
   Fiscal Laundry — Dizayn sistemi
   ═══════════════════════════════════════════════════════════ */
:root {
  --blue: #0090bb;
  --blue-600: #0090bb;
  --blue-500: #33a6c6;
  --blue-50: #e6f4fa;
  --blue-100: #bfe4f0;
  --green: #16a34a;
  --green-500: #22c55e;
  --green-50: #ecfdf5;
  --red: #ef4444;
  --red-50: #fef2f2;
  --amber: #f59e0b;
  --amber-50: #fffbeb;
  --purple: #7c3aed;
  --purple-50: #f5f3ff;

  --ink: #1e293b;
  --ink-2: #334155;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: #eef1f6;
  --line-2: #e2e8f0;
  --bg: #f6f8fb;
  --card: #ffffff;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 22px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 4px 16px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .12);
  --sidebar-w: 264px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Inter", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5dce6; border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #c2cbd8; }

.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── App layout ─── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 22px; }
.brand-logo {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e8f0ff, #eafaf1);
  color: var(--blue);
}
.brand-name { font-weight: 700; font-size: 20px; line-height: 1.05; letter-spacing: -.3px; }
.brand-name b { color: var(--blue); font-weight: 700; display: block; }
.brand-name span { color: var(--green); }
.brand-img { width: 100%; height: 56px; object-fit: cover; border-radius: 12px; display: block; }
.login-logo { width: 220px; max-width: 82%; border-radius: 18px; display: block; box-shadow: var(--shadow); }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 12px;
  color: var(--muted); font-weight: 600; font-size: 15px;
  border: none; background: transparent; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav-item svg { width: 21px; height: 21px; flex: none; }
.nav-item:hover { background: #f7f9fc; color: var(--ink-2); }
.nav-item.active { background: var(--blue-50); color: var(--blue); }
.nav-sep { height: 1px; background: var(--line); margin: 12px 4px; }
.nav-bottom { display: flex; flex-direction: column; gap: 4px; }

/* ─── Main ─── */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 32px; position: sticky; top: 0; z-index: 20;
  background: var(--bg);
}
.page-title { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin: 0; }
.page-sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; font-weight: 500; }
.topbar-spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
  padding: 0 16px; height: 48px; width: min(440px, 38vw);
  color: var(--muted);
}
.search input { border: none; outline: none; flex: 1; background: transparent; color: var(--ink); }
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line-2);
  background: #fff; display: grid; place-items: center; color: var(--ink-2); position: relative;
}
.icon-btn .dot { position: absolute; top: 12px; right: 13px; width: 8px; height: 8px; background: var(--blue); border-radius: 50%; border: 2px solid #fff; }
.profile { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px 14px 6px 8px; height: 48px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.profile-name { font-weight: 700; font-size: 14px; line-height: 1.1; }
.profile-role { color: var(--muted); font-size: 12px; }

.content { padding: 6px 32px 40px; flex: 1; }

/* ─── Cards ─── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-sm); }
.card-pad { padding: 24px; }
.grid { display: grid; gap: 20px; }

.stat-card { border-radius: var(--r-xl); padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; border: 1px solid transparent; }
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; }
.stat-label { color: var(--muted); font-weight: 600; font-size: 14.5px; }
.stat-value { font-size: 34px; font-weight: 800; letter-spacing: -1px; margin-top: 2px; display: flex; align-items: baseline; gap: 6px; }
.stat-value .cur { font-size: 20px; font-weight: 700; }
.stat-link { color: var(--muted); font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.stat-blue { background: #eef4ff; } .stat-blue .stat-ico { background: #dbe6fe; color: var(--blue); } .stat-blue .stat-value { color: var(--blue); }
.stat-green { background: #eafaf1; } .stat-green .stat-ico { background: #d1f5e0; color: var(--green); } .stat-green .stat-value { color: var(--green); }
.stat-red { background: #fdeeee; } .stat-red .stat-ico { background: #fbd9d9; color: var(--red); } .stat-red .stat-value { color: var(--red); }
.stat-teal { background: #e9f8f4; } .stat-teal .stat-ico { background: #cdeee6; color: #0d9488; } .stat-teal .stat-value { color: #0d9488; }

/* action tiles */
.action-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: flex; align-items: center; gap: 16px; text-align: left; transition: box-shadow .15s, transform .1s, border-color .15s; }
.action-card:hover { box-shadow: var(--shadow); border-color: var(--blue-100); transform: translateY(-1px); }
.action-ico { width: 56px; height: 56px; border-radius: 15px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.action-title { font-weight: 700; font-size: 16px; }
.action-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ─── Section header ─── */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-title { font-size: 21px; font-weight: 700; letter-spacing: -.3px; }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 16px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fafbfd; }
.cell-strong { font-weight: 700; }
.cell-muted { color: var(--muted); font-size: 13px; }
.text-red { color: var(--red); } .text-green { color: var(--green); } .text-blue { color: var(--blue); }
.num { font-variant-numeric: tabular-nums; }

/* ─── Badges ─── */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.badge .bdot { width: 7px; height: 7px; border-radius: 50%; }
.badge-green { background: var(--green-50); color: var(--green); } .badge-green .bdot { background: var(--green-500); }
.badge-blue { background: var(--blue-50); color: var(--blue); } .badge-blue .bdot { background: var(--blue-500); }
.badge-indigo { background: #eef2ff; color: #4f46e5; } .badge-indigo .bdot { background: #6366f1; }
.badge-amber { background: var(--amber-50); color: #b45309; } .badge-amber .bdot { background: var(--amber); }
.badge-purple { background: var(--purple-50); color: var(--purple); } .badge-purple .bdot { background: var(--purple); }
.badge-gray { background: #f1f5f9; color: var(--muted); } .badge-gray .bdot { background: var(--muted-2); }
.badge-vip { background: #eef4ff; color: var(--blue); font-size: 11px; padding: 3px 8px; font-weight: 700; letter-spacing: .3px; }

.chip { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; background: #eef4ff; color: var(--blue); }
.chip-geyim { background: #eef4ff; color: var(--blue); }
.chip-ev_tekstili { background: var(--green-50); color: var(--green); }
.chip-aksesuar { background: var(--purple-50); color: var(--purple); }
.chip-diger { background: #f1f5f9; color: var(--muted); }

/* ─── Buttons ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 12px; padding: 0 18px; height: 46px; font-weight: 700; font-size: 14.5px; border: 1px solid transparent; transition: background .15s, box-shadow .15s, opacity .15s; }
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #0079a0; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--ink-2); border-color: var(--line-2); }
.btn-light:hover { background: #f8fafc; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue-50); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3caca; }
.btn-danger:hover { background: var(--red-50); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #128a3e; }
.btn-block { width: 100%; height: 54px; font-size: 16px; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }

/* ─── Filter pills ─── */
.pills { display: inline-flex; gap: 6px; background: #fff; padding: 6px; border-radius: 14px; border: 1px solid var(--line); }
.pill { border: none; background: transparent; padding: 9px 18px; border-radius: 10px; font-weight: 600; color: var(--muted); font-size: 14px; }
.pill.active { background: var(--blue-50); color: var(--blue); }
.pill:hover:not(.active) { background: #f7f9fc; }

/* ─── Forms ─── */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-weight: 600; color: var(--ink-2); font-size: 14px; }
.input, .select, .textarea {
  border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; height: 50px;
  background: #fff; color: var(--ink); outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-50); }
.textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 90px; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group .ig-ico { position: absolute; left: 14px; color: var(--muted-2); pointer-events: none; }
.input-group .input { padding-left: 42px; }
.note-box { background: #eff6ff; border: 1px solid #dbeafe; color: #1e40af; border-radius: 12px; padding: 14px 16px; display: flex; gap: 10px; font-size: 13.5px; font-weight: 500; }
.note-box.green { background: var(--green-50); border-color: #bbf7d0; color: #166534; }

/* qty stepper */
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-size: 18px; display: grid; place-items: center; }
.stepper button:hover { background: #f5f8fc; border-color: var(--blue-100); }
.stepper .qty { min-width: 30px; text-align: center; font-weight: 700; }

/* ─── Pagination ─── */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pager button { min-width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font-weight: 600; }
.pager button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.pager button:disabled { opacity: .45; }

/* ─── Modal ─── */
.modal-back { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 20px; }
.modal { background: #fff; border-radius: 20px; width: min(560px, 96vw); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-lg { width: min(880px, 96vw); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 20px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; gap: 12px; justify-content: flex-end; }

/* ─── Toast ─── */
.toasts { position: fixed; top: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #fff; border: 1px solid var(--line-2); border-left: 4px solid var(--blue); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow-lg); font-weight: 600; min-width: 260px; animation: slidein .2s ease; }
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }

/* ─── Login (split ekran) ─── */
.login-split { display: flex; min-height: 100vh; }
.login-hero {
  flex: 1.25; position: relative; color: #fff; padding: 48px;
  display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  background-color: #0e2233;
  background-image: linear-gradient(rgba(6, 12, 20, .32), rgba(6, 12, 20, .42)), url('/login-bg.jpg');
  background-size: cover; background-position: center;
}
.login-hero-content { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hero-title { font-family: Georgia, 'Times New Roman', serif; font-size: 52px; font-weight: 700; margin: 0; letter-spacing: .5px; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.hero-sub { font-size: 14px; letter-spacing: 6px; font-weight: 500; opacity: .92; }
.hero-divider { width: 60px; height: 2px; background: rgba(255, 255, 255, .5); margin: 24px 0; }
.hero-clock { font-size: 54px; font-weight: 300; letter-spacing: 8px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 24px rgba(0, 0, 0, .45); }
.hero-date { font-size: 16px; opacity: .9; margin-top: 4px; }
.login-hero-foot { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: 1.5px; opacity: .85; }
.login-hero-foot a { color: #fff; text-decoration: underline; font-weight: 600; display: inline-block; margin-top: 6px; }

.login-form-panel { width: 480px; max-width: 44vw; background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-form-inner { width: 100%; max-width: 340px; }
.login-form-logo { width: 150px; display: block; margin: 0 auto 10px; border-radius: 14px; }
.login-form-title { text-align: center; font-size: 22px; font-weight: 700; margin: 6px 0 0; }
.label-up { text-transform: uppercase; font-size: 12px; letter-spacing: .5px; color: var(--muted); }
.pass-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--blue); font-weight: 600; font-size: 13px; cursor: pointer; }

@media (max-width: 900px) {
  .login-hero { display: none; }
  .login-form-panel { width: 100%; max-width: 100%; }
}

/* ─── Misc ─── */
.muted { color: var(--muted); }
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.items-center { align-items: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .empty-ico { width: 56px; height: 56px; margin: 0 auto 14px; opacity: .5; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 50%, #eef1f6 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.list-avatar { width: 40px; height: 40px; border-radius: 11px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font-weight: 700; }

/* payment method cards */
.pay-method { position: relative; text-align: center; border: 1.5px solid var(--line-2); border-radius: 16px; padding: 22px 12px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; transition: border-color .15s, background .15s; }
.pay-method:hover { border-color: var(--blue-100); }
.pay-method .pm-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); color: transparent; display: grid; place-items: center; }
.pay-method .pm-ico { width: 66px; height: 66px; border-radius: 50%; background: #f5f8fc; display: grid; place-items: center; color: var(--muted); }
.pay-method .pm-label { font-weight: 700; font-size: 16px; }
.pay-method .pm-sub { color: var(--muted); font-size: 12.5px; }
.pay-method.sel { border-color: var(--green); background: #f0fdf4; }
.pay-method.sel .pm-check { background: var(--green); border-color: var(--green); color: #fff; }
.pay-method.sel .pm-ico { background: #dcfce7; color: var(--green); }

/* kpi trend */
.kpi-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; margin-top: 8px; }
.kpi-up { color: var(--green); } .kpi-down { color: var(--red); }

/* donut legend */
.legend-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 12px; background: #f8fafc; margin-bottom: 8px; }
.legend-left { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* summary metric card */
.metric { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.metric-ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; }

/* responsive */
@media (max-width: 1100px) {
  .sidebar { position: fixed; z-index: 60; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .content, .topbar { padding-left: 18px; padding-right: 18px; }
}
