/* Protein Yumurta — Aurora Enterprise UI */
:root {
  --bg: #eef1f8;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-2: #f8fafc;
  --text: #0c1222;
  --text-secondary: #475569;
  --muted: #64748b;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);

  --accent: #eab308;
  --accent-2: #f59e0b;
  --accent-glow: rgba(234, 179, 8, 0.35);
  --primary: #3b5bdb;
  --primary-2: #5c7cfa;
  --primary-hover: #364fc7;
  --primary-glow: rgba(59, 91, 219, 0.28);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);

  --sidebar-bg: #080b12;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: linear-gradient(135deg, rgba(234, 179, 8, 0.22) 0%, rgba(59, 91, 219, 0.18) 100%);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 2px rgba(12, 18, 34, 0.04);
  --shadow: 0 4px 24px rgba(12, 18, 34, 0.06), 0 1px 3px rgba(12, 18, 34, 0.04);
  --shadow-lg: 0 24px 48px rgba(12, 18, 34, 0.1), 0 8px 16px rgba(12, 18, 34, 0.04);
  --shadow-glow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset;

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 0.22s var(--ease-out);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

/* Layout shell */
.app {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
  isolation: isolate;
}

/* ─── Sidebar ─── */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0.9rem;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  z-index: 40;
  overflow: hidden;
}

.sidebar-glow {
  position: absolute;
  top: -120px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem 1.35rem;
  margin-bottom: 0.5rem;
}

.sidebar-close-btn {
  display: none;
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  pointer-events: none;
}

body.nav-open .sidebar-backdrop {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-top-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 22;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: rgba(238, 241, 248, 0.92);
  backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid var(--border);
}

.mobile-top-nav__back {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.55rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(59, 91, 219, 0.35);
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.12), rgba(59, 91, 219, 0.06));
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.mobile-top-nav__back-icon {
  flex-shrink: 0;
}

.mobile-top-nav__back-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-home-bar {
  display: none;
}

.mobile-home-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #4f6fe8);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(59, 91, 219, 0.35);
}

.mobile-home-bar__btn svg {
  flex-shrink: 0;
}

.topbar-menu-btn {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 3.25rem;
  height: 2.85rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-solid);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.topbar-menu-btn__label {
  display: none;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.topbar-menu-btn__bar {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}

body.nav-open .topbar-menu-btn__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.nav-open .topbar-menu-btn__bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .topbar-menu-btn__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(234, 179, 8, 0.2), rgba(59, 91, 219, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.brand-mark img { display: block; }

.brand-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-copy small {
  color: var(--sidebar-text);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.nav-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #475569;
  margin: 1.15rem 0.65rem 0.4rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.8rem;
  margin-bottom: 2px;
  border-radius: 12px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition), transform 0.15s;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: var(--sidebar-hover);
  color: #e2e8f0;
}

.nav-link.active {
  background: var(--sidebar-active);
  color: #fefce8;
  border-color: rgba(234, 179, 8, 0.25);
  box-shadow: 0 4px 20px rgba(234, 179, 8, 0.12);
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.85;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.nav-link.active .nav-icon { opacity: 1; color: var(--accent); }

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.75rem 0.25rem;
  font-size: 0.75rem;
  color: #64748b;
  border-top: 1px solid var(--sidebar-border);
  margin-top: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.92); }
}

/* ─── Main area ─── */
.main-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.ambient {
  position: fixed;
  inset: 272px 0 0 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: float-orb 18s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  top: -80px;
  right: -60px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.22), transparent 70%);
}

.orb-2 {
  width: 360px;
  height: 360px;
  bottom: 10%;
  left: 10%;
  background: radial-gradient(circle, rgba(59, 91, 219, 0.15), transparent 70%);
  animation-delay: -6s;
}

.orb-3 {
  width: 280px;
  height: 280px;
  top: 40%;
  right: 25%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
  animation-delay: -12s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -15px) scale(1.05); }
  66% { transform: translate(-15px, 10px) scale(0.95); }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1.5rem 2.25rem 1.25rem;
  background: rgba(238, 241, 248, 0.75);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
}

.topbar-kicker {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-family: var(--font-display);
}

.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.page-sub {
  margin: 0.35rem 0 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 52ch;
}

.topbar-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-secondary);
}

.meta-chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.meta-chip--unit {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.12), rgba(59, 91, 219, 0.08));
  border-color: rgba(234, 179, 8, 0.2);
  color: var(--text);
}

.content {
  position: relative;
  z-index: 1;
  padding: 0 2.25rem 3rem;
  max-width: 1320px;
}

/* ─── Dashboard hero ─── */
.dash-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  margin-bottom: 1.75rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0c1222 0%, #1a2236 50%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.dash-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 120% at 100% 0%, rgba(234, 179, 8, 0.2), transparent 55%),
              radial-gradient(ellipse 60% 80% at 0% 100%, rgba(59, 91, 219, 0.15), transparent 50%);
  pointer-events: none;
}

.dash-hero__copy { position: relative; max-width: 520px; }
.dash-hero__kicker {
  margin: 0 0 0.35rem;
  color: #f8fafc;
  opacity: 0.82;
  font-size: 0.73rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.dash-hero__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.dash-hero__text {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.dash-hero__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.dash-section {
  margin-bottom: 1.35rem;
}

.dash-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 0.65rem;
  padding: 0 0.2rem;
}

.dash-section__title {
  margin: 0;
  font-size: 0.96rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
}

.dash-section__sub {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

.dash-section .erp-alerts-card {
  margin-bottom: 0;
}

/* Dashboard modernizasyonu - daha belirgin premium görünüm */
.dash-enterprise {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.15rem;
  align-items: start;
}

.dash-enterprise__main {
  min-width: 0;
}

.dash-enterprise__rail {
  position: sticky;
  top: 1rem;
}

.dash-section--full {
  margin-top: 0.25rem;
}

.dash-section__head {
  border-left: 4px solid rgba(59, 91, 219, 0.5);
  padding-left: 0.7rem;
}

.dash-section__title {
  font-size: 1.02rem;
  color: #1e293b;
}

.stat-grid--dash {
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.9rem;
}

.stat-grid--dash .stat-card {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.stat-grid--dash .stat-card__label {
  font-size: 0.67rem;
  letter-spacing: 0.07em;
}

.stat-grid--dash .stat-card__value {
  font-size: 1.45rem;
}

#dashboard-alerts-card {
  border-radius: 18px;
  border: 1px solid rgba(59, 91, 219, 0.18);
  box-shadow: 0 12px 34px rgba(30, 41, 59, 0.08);
}

.dash-grid-secondary > .card {
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dash-grid-secondary > .card .card-head {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.dash-grid-ops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.dash-grid-ops > .card {
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.dash-grid-ops > .card .card-head {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.dash-checklist-card .list-modern {
  padding-bottom: 0.8rem;
}

.dash-checklist-card .list-modern li {
  align-items: center;
}

.dash-checklist-card .list-modern li span {
  min-width: 0;
}

.quick-grid--dense {
  gap: 0.65rem;
}

.quick-grid--dense .quick-tile {
  border-radius: 14px;
  border: 1px solid rgba(59, 91, 219, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 5px 14px rgba(148, 163, 184, 0.16);
}

.quick-grid--dense .quick-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(59, 91, 219, 0.18);
}

.dash-rail-card {
  border-radius: 20px;
  border: 1px solid rgba(59, 91, 219, 0.2);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.dash-rail-kpis {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  padding: 0.95rem 1.1rem 0.2rem;
}

.dash-rail-kpi {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.55rem 0.75rem;
}

.dash-rail-kpi span {
  display: block;
  color: #64748b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dash-rail-kpi strong {
  display: block;
  margin-top: 0.15rem;
  color: #0f172a;
  font-size: 0.9rem;
}

.dash-rail-card .quick-grid--dense {
  padding-top: 0.7rem;
}

/* Stat cards */
.stat-grid,
.widgets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.stat-card,
.widget {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.2rem 1.25rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-glow);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}

.stat-card::after,
.widget::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-accent, linear-gradient(90deg, var(--primary), var(--primary-2)));
  opacity: 0.85;
}

.stat-card:hover,
.widget:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.stat-card--gold { --stat-accent: linear-gradient(90deg, #eab308, #fbbf24); }
.stat-card--blue { --stat-accent: linear-gradient(90deg, #3b5bdb, #748ffc); }
.stat-card--green { --stat-accent: linear-gradient(90deg, #10b981, #34d399); }
.stat-card--violet { --stat-accent: linear-gradient(90deg, #7c3aed, #a78bfa); }
.stat-card--rose { --stat-accent: linear-gradient(90deg, #f43f5e, #fb7185); }
.stat-card--slate { --stat-accent: linear-gradient(90deg, #64748b, #94a3b8); }

.stat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: var(--stat-icon-bg, rgba(59, 91, 219, 0.1));
}

.stat-card--gold .stat-card__icon { --stat-icon-bg: rgba(234, 179, 8, 0.15); }
.stat-card--blue .stat-card__icon { --stat-icon-bg: rgba(59, 91, 219, 0.12); }
.stat-card--green .stat-card__icon { --stat-icon-bg: rgba(16, 185, 129, 0.12); }
.stat-card--violet .stat-card__icon { --stat-icon-bg: rgba(124, 58, 237, 0.12); }
.stat-card--rose .stat-card__icon { --stat-icon-bg: rgba(244, 63, 94, 0.1); }
.stat-card--slate .stat-card__icon { --stat-icon-bg: rgba(100, 116, 139, 0.12); }

.stat-card__body { min-width: 0; flex: 1; }

.stat-card__label,
.widget .label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.stat-card__value,
.widget .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 0.2rem;
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
}

.stat-card--skeleton {
  min-height: 96px;
  pointer-events: none;
}

.stat-card__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ─── Cards ─── */
.card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.card-elevated:hover { box-shadow: var(--shadow-lg); }

.card-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-solid) 100%);
}

.card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-head p {
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.card-form .form-modern { padding: 1.5rem; }

/* Quick grid */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 0.75rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: transform var(--transition), border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.quick-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 91, 219, 0.25);
  background: #fff;
  box-shadow: 0 8px 24px rgba(59, 91, 219, 0.1);
}

.quick-tile__icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.1), rgba(234, 179, 8, 0.12));
  color: var(--primary);
}

.quick-tile__icon svg { width: 20px; height: 20px; }

.quick-tile__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  padding: 1rem 1.25rem 1.25rem;
}

.quick-btn {
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.quick-btn:hover {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* Lists */
.list-modern {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.list-modern--rich li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  transition: background var(--transition);
}

.list-modern--rich li:hover { background: var(--surface-2); }
.list-modern--rich li:last-child { border-bottom: none; }

.list-empty { color: var(--muted); font-style: italic; }

.list-modern li {
  padding: 0.65rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

/* Grid */
.grid-page { display: grid; gap: 1.25rem; }
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Forms */
.form-modern { display: flex; flex-direction: column; gap: 1.15rem; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.15rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field > span {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea,
.search-input {
  padding: 0.72rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.12s;
}

.field input:hover,
.field select:hover,
.search-input:hover {
  border-color: rgba(59, 91, 219, 0.25);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.checkbox-field input { width: auto; accent-color: var(--primary); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 0.35rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow var(--transition), background var(--transition), filter var(--transition);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 28px var(--primary-glow);
}

/* Yarı saydam — yalnızca koyu zeminlerde (ör. dash-hero). Açık kartlarda btn-export kullanın. */
.btn-glass {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Excel / dışa aktarma — açık arka planda belirgin */
.btn-export {
  background: linear-gradient(135deg, #047857 0%, #059669 55%, #10b981 100%);
  color: #fff;
  border: 1px solid #065f46;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-export:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(5, 150, 105, 0.45);
  color: #fff;
}

.btn-export .btn-icon {
  font-size: 1rem;
  line-height: 1;
}

.btn-pdf {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 58%, #ef4444 100%);
  color: #fff;
  border: 1px solid #991b1b;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.btn-pdf:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 22px rgba(220, 38, 38, 0.45);
  color: #fff;
}

.btn-pdf .btn-icon {
  font-size: 1rem;
  line-height: 1;
}

/* Yanlışlıkla açık zeminde btn-glass kullanılırsa okunabilir kalsın */
.card-elevated .btn-glass,
.cari-page-toolbar .btn-glass,
.reports-toolbar .btn-glass,
.page-toolbar .btn-glass {
  background: linear-gradient(135deg, #047857 0%, #059669 55%, #10b981 100%);
  color: #fff;
  border: 1px solid #065f46;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  backdrop-filter: none;
}

.card-elevated .btn-glass:hover,
.cari-page-toolbar .btn-glass:hover,
.reports-toolbar .btn-glass:hover,
.page-toolbar .btn-glass:hover {
  filter: brightness(1.08);
  background: linear-gradient(135deg, #047857 0%, #059669 55%, #10b981 100%);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover { background: #fff; border-color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  background: rgba(59, 91, 219, 0.06);
  border-color: rgba(59, 91, 219, 0.3);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.8rem; }

.btn-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: #fff;
  color: var(--text);
}

/* Toolbar & tables */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.search-input { flex: 1; min-width: 220px; }

.table-wrap {
  overflow-x: auto;
  padding: 0.25rem 0.5rem 0.5rem;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 0.85rem 1.1rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.data-table th:first-child { border-radius: 10px 0 0 0; }
.data-table th:last-child { border-radius: 0 10px 0 0; }

.data-table td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.data-table tbody tr:hover td {
  background: rgba(59, 91, 219, 0.04);
}

.data-table tbody tr:last-child td:first-child { border-radius: 0 0 0 10px; }
.data-table tbody tr:last-child td:last-child { border-radius: 0 0 10px 0; }

.data-table code {
  font-size: 0.8rem;
  padding: 0.2rem 0.45rem;
  background: var(--surface-2);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-ok {
  background: var(--success-bg);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-off {
  background: var(--danger-bg);
  color: #b91c1c;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Stock & panels */
.stock-panel {
  background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.panel-title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.stock-list .stock-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.stock-list .stock-item:last-child { border-bottom: none; }
.stock-item strong { color: var(--primary); font-weight: 700; }
.stock-item .meta { font-size: 0.75rem; color: var(--muted); text-align: right; }

.panel-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Lot picker */
.lot-pick-list { display: flex; flex-direction: column; gap: 0.6rem; }

.lot-pick-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  transition: all var(--transition);
}

.lot-pick-row:hover { border-color: rgba(59, 91, 219, 0.2); }

.lot-pick-row:has(.lot-check:checked) {
  border-color: rgba(59, 91, 219, 0.4);
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.06), rgba(234, 179, 8, 0.04));
  box-shadow: 0 4px 16px rgba(59, 91, 219, 0.08);
}

.lot-pick-row .lot-check {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.lot-pick-info { display: flex; flex-direction: column; gap: 0.15rem; }
.lot-pick-meta { font-size: 0.75rem; color: var(--muted); text-align: right; }

.lot-pick-row .lot-qty {
  width: 100px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: inherit;
}

.lot-pick-disabled .lot-pick-row { opacity: 0.5; pointer-events: none; }

/* Borsa hint */
.borsa-hint {
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.08), rgba(234, 179, 8, 0.08));
  border: 1px solid rgba(59, 91, 219, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.15rem;
  font-size: 0.875rem;
  color: #3730a3;
}

.borsa-hint strong { color: var(--primary); }

/* History */
.history-card {
  margin-bottom: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.history-head {
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 1.35rem;
  font-size: 0.875rem;
  font-weight: 700;
}

.history-lines {
  margin: 0;
  padding: 0.85rem 1.35rem 1.1rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.history-lines li { margin-bottom: 0.35rem; }

/* Registry (alım/satış geçmişi, banka ekstresi) */
.registry-toolbar {
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.registry-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.registry-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.registry-doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.registry-doc-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.25rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.registry-doc-card:hover {
  border-color: rgba(180, 140, 50, 0.35);
  box-shadow: var(--shadow);
}

.registry-doc-card__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.registry-doc-card__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.registry-doc-card__no {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.registry-doc-card__meta {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 600;
}

.registry-doc-card__party {
  font-weight: 700;
  font-size: 0.95rem;
  text-align: right;
}

.registry-doc-card__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
}

.registry-doc-card__stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.registry-doc-card__total {
  color: var(--primary-dark, #1e3a5f);
}

.registry-doc-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.registry-doc-card__note {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
}

.registry-empty {
  padding: 2rem;
  text-align: center;
}

.registry-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.registry-kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.registry-kpi__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.registry-kpi strong {
  font-size: 1.05rem;
}

.registry-table-card {
  overflow: hidden;
}

.data-table--registry thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.settings-egg-type-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.settings-egg-type-item + .settings-egg-type-item {
  border-top: 1px dashed var(--border);
}

@media (max-width: 720px) {
  .registry-doc-card__party {
    text-align: left;
    width: 100%;
  }

  .registry-doc-card__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  font-weight: 600;
}

.alert-success {
  background: var(--success-bg);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.preview-box {
  margin-top: 0.85rem;
  padding: 1rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  font-size: 0.85rem;
}

.muted { color: var(--muted); font-size: 0.85rem; }
.muted.small { font-size: 0.78rem; margin-top: 0.35rem; }
.hidden { display: none !important; }

.toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.input-sm {
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.check-fields {
  padding: 0.75rem 0;
  border-top: 1px dashed var(--border);
  margin: 0.5rem 0;
}

.party-balance-hint {
  margin: -0.35rem 0 0.85rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.line-items-block {
  margin: 1.25rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.line-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.line-items-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.purchase-line-card {
  /* sale-line-card ile aynı */
}

.recent-list {
  padding: 0.75rem 1.25rem 1.25rem;
}

.stock-card-filters {
  padding: 1.25rem 1.5rem;
}

.stock-card-body {
  padding: 1.25rem 1.5rem 0.5rem;
}

.chart-panel {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.chart-wrap {
  position: relative;
  height: 280px;
  width: 100%;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

.line-items-table input,
.line-items-table select {
  width: 100%;
  min-width: 0;
}

.line-items-table .line-remove {
  margin-left: 0.25rem;
}

.optional-block {
  margin-top: 1rem;
  padding-top: 0.5rem;
}

.sale-line-card {
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.sale-line-head {
  align-items: flex-end;
}

.sale-line-head .flex-2 {
  flex: 2;
  min-width: 180px;
}

.sale-line-actions {
  display: flex;
  gap: 0.35rem;
  padding-bottom: 0.35rem;
}

.sale-line-auto-wrap {
  margin-top: 0.35rem;
}

.sale-line-lots {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  border-top: 1px dashed var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.lot-pick-readonly .lot-pick-row {
  opacity: 0.92;
  cursor: default;
}

.stock-panel.compact {
  padding: 0.75rem 1rem;
  margin-top: 0.35rem;
}

.purchase-line-detail td {
  padding-top: 0 !important;
  border-top: none !important;
  background: var(--surface-2);
}

.line-stock-hint .panel-title {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

/* Depo stoğu */
.ws-filter-field {
  margin: 0;
  min-width: 220px;
  flex: 1;
  max-width: 320px;
}

.ws-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.ws-summary-grid .stat-card {
  padding: 1.1rem 1.25rem;
}

.ws-summary-grid .stat-card__value {
  font-size: 1.35rem;
}

.ws-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.ws-warehouse-head {
  padding: 1.25rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ws-warehouse-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.ws-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.ws-product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(12, 18, 34, 0.04);
}

.ws-product-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}

.ws-product-cat {
  grid-column: 1 / -1;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.ws-product-head strong {
  font-size: 0.95rem;
}

.ws-product-qty {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

.ws-lot-table {
  width: 100%;
  font-size: 0.8rem;
  border-collapse: collapse;
}

.ws-lot-table th,
.ws-lot-table td {
  padding: 0.45rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.ws-lot-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-2);
}

.ws-lot-table tr:last-child td {
  border-bottom: none;
}

.ws-empty,
.ws-empty-msg {
  padding: 2rem;
  text-align: center;
}

/* Depo stoğu — kategori akordeon */
.ws-board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.06) 0%, transparent 70%);
}

.ws-board-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.ws-board-total {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}

.ws-accordion {
  padding: 0.75rem 1rem 1.25rem;
}

.ws-acc-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0.65rem;
  background: var(--surface);
  overflow: hidden;
}

.ws-acc-item[open] {
  box-shadow: 0 4px 16px rgba(12, 18, 34, 0.06);
}

.ws-acc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  background: var(--surface-2);
}

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

.ws-acc-cat {
  font-size: 0.95rem;
}

.ws-acc-meta {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.ws-acc-body {
  padding: 0.5rem 0.75rem 0.75rem;
}

.ws-product-row {
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.ws-product-row:last-child {
  border-bottom: none;
}

.ws-product-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
}

.ws-category-average {
  display: block;
  margin-top: 0.2rem;
  color: var(--accent);
  font-weight: 700;
}
.ws-product-row-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  text-align: right;
}
.ws-product-row-cost {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}
.ws-product-row-qty {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.88rem;
}

.ws-lot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ws-lot-item {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.9fr 0.9fr 0.8fr;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  padding: 0.4rem 0.55rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.ws-lot-supplier {
  font-weight: 600;
}

.ws-lot-code {
  font-size: 0.72rem;
}

.ws-lot-price {
  color: var(--primary);
  font-weight: 600;
}

.ws-lot-date {
  color: var(--muted);
  text-align: right;
}

@media (max-width: 900px) {
  .ws-lot-item {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem;
  }
  .ws-lot-date {
    text-align: left;
  }
}

.pagination-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  background: var(--surface-2);
}

.pagination-bar .btn { min-width: 36px; }

/* Exchange rows */
.warehouse-block { margin-bottom: 1.75rem; }

.warehouse-block h3 {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.exchange-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 1rem;
  align-items: end;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.exchange-row:last-child { border-bottom: none; }

/* Cari */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  text-align: left;
}

.link-btn:hover { text-decoration: underline; }

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  white-space: nowrap;
}

.actions-cell .btn,
.actions-cell a.btn { margin-right: 0; margin-bottom: 0; display: inline-block; }

.actions-cell .check-undo-endorse-btn { white-space: nowrap; }

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--surface-solid);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.login-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-brand h1 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.35rem;
}

.login-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-hint {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.topbar-logout-form {
  display: inline;
  margin: 0;
}

.expense-list-item .meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.stat-grid--dash {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.stat-card__value--sm {
  font-size: 0.95rem;
  line-height: 1.25;
}

.dash-grid-secondary {
  margin-bottom: 1.25rem;
}

.quick-grid--dense {
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
}

.settings-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.settings-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.settings-users-hint {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.cari-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.vat-totals-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(59, 91, 219, 0.06), rgba(16, 185, 129, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.vat-totals-panel strong {
  color: var(--text);
  font-weight: 700;
}

.trade-finance-fields {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
}

.flow-pill--gider {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.sale-economics-panel {
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.sale-line-profit {
  margin: 0.35rem 0 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

.profit-positive,
.profit-positive strong {
  color: #047857;
}

.profit-negative,
.profit-negative strong {
  color: #b91c1c;
}

.cari-page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.cari-kind {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.cari-kind--sale { background: rgba(59, 91, 219, 0.12); color: #4f6fd8; }
.cari-kind--tahsilat { background: rgba(5, 150, 105, 0.14); color: #047857; }
.cari-kind--purchase { background: rgba(124, 58, 237, 0.12); color: #6d28d9; }
.cari-kind--odeme { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }
.cari-kind--opening { background: rgba(100, 116, 139, 0.14); color: #475569; }

.cari-ledger-card { overflow: hidden; }

.cari-page-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.85rem 1.25rem 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface-solid));
}

.cari-page-tabs .cari-tab { margin-bottom: -1px; border-radius: 10px 10px 0 0; }

.cari-tab-panel-content { padding: 0 0 0.25rem; }

.cari-panel-note {
  padding: 0.75rem 1.25rem 1rem;
  margin: 0;
  font-size: 0.85rem;
}

.cari-info-banner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1rem 1.25rem 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(59, 91, 219, 0.08);
  border: 1px solid rgba(59, 91, 219, 0.18);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.cari-info-banner__icon {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cari-date-cell { display: flex; flex-direction: column; gap: 0.12rem; min-width: 6.5rem; }
.cari-date-main { font-weight: 600; color: var(--text); white-space: nowrap; }
.cari-date-age { font-size: 0.76rem; color: #94a3b8; font-weight: 500; }
.cari-date-age--empty { opacity: 0.5; }

.cari-desc-cell { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start; }
.cari-desc-text { font-size: 0.88rem; line-height: 1.35; }

.cari-running-balance,
.cari-fifo-remaining { color: var(--text); font-weight: 800; }
.cari-fifo-remaining { color: #b91c1c; }

.cari-balance-cell { min-width: 6.5rem; }

.cari-aging {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cari-aging--current { background: rgba(5, 150, 105, 0.12); color: #047857; }
.cari-aging--warning { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.cari-aging--overdue { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.cari-aging--unknown { background: rgba(148, 163, 184, 0.2); color: #64748b; }

.data-table--cari-detail thead th {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
}

.cari-row-muted td { opacity: 0.72; }
.cari-row-detail {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.cari-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.cari-tab {
  padding: 0.55rem 1.1rem;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.cari-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.cari-tab-panel { padding: 1.35rem 1.5rem; }

.cari-pricing-desc {
  padding: 0 1.5rem 0.65rem;
  margin: 0;
  font-size: 0.85rem;
}

#cari-pricing-table input {
  width: 100%;
  max-width: 120px;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: inherit;
}

/* Modals */
.page-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.page-toolbar .search-input {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
}

.page-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.data-table--cari .cari-name-cell strong {
  display: block;
  font-size: 0.95rem;
}

.cari-code {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

.col-actions { width: 1%; white-space: nowrap; }

.action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.field-inline {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.field-inline select { flex: 1; }

.category-add {
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
}

.modal-cari {
  max-width: 520px;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-xl);
}

.modal-cari .modal-body {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-cari .modal-form {
  padding: 0 1.5rem 1rem;
  overflow-y: auto;
  flex: 1;
}

.modal-cari .modal-foot {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.modal-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.form-section {
  margin-bottom: 1.25rem;
}

.form-section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.65rem;
}

.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: 0 32px 64px rgba(12, 18, 34, 0.2);
  background: var(--surface-solid);
}

.modal::backdrop {
  background: rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(6px);
}

.modal-wide { max-width: 640px; }
.modal-tall {
  max-width: min(960px, calc(100vw - 1.5rem));
  width: calc(100vw - 1.5rem);
  max-height: min(92vh, 900px);
}
.modal-tall .table-wrap { max-height: 55vh; overflow: auto; }

.modal-bulk-accrual {
  max-width: min(920px, calc(100vw - 1rem));
}

.modal-bulk-accrual__body {
  display: flex;
  flex-direction: column;
  max-height: min(92vh, 880px);
}

.modal-bulk-accrual__content {
  padding: 1rem 1.5rem 0.5rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-bulk-accrual__hint {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.modal-bulk-accrual__content .field--period {
  max-width: 280px;
}

.modal-bulk-accrual__table-wrap {
  flex: 1;
  min-height: 220px;
  max-height: min(52vh, 480px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
}

.data-table--bulk-accrual {
  min-width: 520px;
}

.data-table--bulk-accrual th,
.data-table--bulk-accrual td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
}

.data-table--bulk-accrual td:first-child {
  min-width: 12rem;
  font-weight: 600;
}

.data-table--bulk-accrual .bulk-accrual-input {
  width: 100%;
  min-width: 7.5rem;
  max-width: 11rem;
  padding: 0.55rem 0.65rem;
  font-size: 1rem;
  text-align: right;
}

@media (max-width: 600px) {
  .modal-bulk-accrual {
    width: calc(100vw - 0.75rem);
    max-width: none;
  }

  .modal-bulk-accrual__content {
    padding: 0.85rem 1rem;
  }

  .data-table--bulk-accrual .bulk-accrual-input {
    max-width: none;
  }
}

.modal-body { padding: 0; }

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), #fff);
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal .form-modern { padding: 1.5rem; }

.modal-endorse {
  max-width: 34rem;
}

.modal-endorse__form {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.modal-endorse__body {
  padding: 1.5rem 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.modal-endorse__fields {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.check-endorse-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.4;
}

.check-endorse-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.check-endorse-summary__item--wide {
  grid-column: 1 / -1;
}

.check-endorse-summary__label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.check-endorse-summary__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.check-endorse-summary__value--amount {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.check-endorse-hint {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(59, 91, 219, 0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59, 91, 219, 0.12);
}

.modal-endorse__foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1.15rem 1.75rem 1.35rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.modal-endorse .modal-head h2 {
  margin-top: 0.15rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 1rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  max-width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: toast-in 0.35s var(--ease-out);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.error {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.toast.success {
  background: linear-gradient(135deg, #047857, #10b981);
}

/* Responsive */
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }

  .mobile-top-nav {
    display: flex;
  }

  .mobile-top-nav--dashboard .topbar-menu-btn {
    margin-left: auto;
    margin-right: auto;
  }

  .topbar-menu-btn {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .topbar-menu-btn__label {
    display: block;
  }

  body.app-subpage .content {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  }

  .sidebar-close-btn { display: block; }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: min(292px, 88vw);
    height: 100vh;
    height: 100dvh;
    padding: 1rem 0.85rem 1.25rem;
    flex-direction: column;
    flex-wrap: nowrap;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease-out);
    z-index: 50;
    box-shadow: 12px 0 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .nav {
    display: block;
    flex: 1;
    width: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-label { display: block; }
  .nav-link {
    padding: 0.62rem 0.8rem;
    font-size: 0.875rem;
  }

  .sidebar-foot { display: flex; }
  .ambient { inset: 0; }
  .content, .topbar { padding-left: 1rem; padding-right: 1rem; }
  .topbar-main { flex: 1; min-width: 0; }
  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .meta-chip { font-size: 0.72rem; }
  .dash-enterprise { grid-template-columns: 1fr; }
  .dash-enterprise__rail { position: static; }
  .dash-hero { padding: 1.35rem; }
  .dash-hero__actions { flex-wrap: wrap; }
  .dash-section__head { flex-direction: column; align-items: flex-start; }
  .history-hero { flex-direction: column; align-items: flex-start; }
  .subpage-shell__hero { flex-direction: column; align-items: flex-start; }
  .quick-grid, .quick-grid--dense { grid-template-columns: repeat(3, 1fr); }
  .dash-grid-ops { grid-template-columns: 1fr; }
  .finance-shell { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 640px; }
  .cari-page-toolbar, .toolbar-head { flex-direction: column; align-items: stretch; }
  .cari-page-actions { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  body.app-subpage .mobile-home-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 28;
    padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
    background: rgba(238, 241, 248, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.08);
  }
}

@media (max-width: 600px) {
  .page-title { font-size: 1.35rem; }
  .page-sub { font-size: 0.82rem; }
  .stat-grid, .widgets, .stat-grid--dash { grid-template-columns: 1fr; }
  .quick-grid, .quick-grid--dense { grid-template-columns: repeat(2, 1fr); }
  .lot-pick-row {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .lot-pick-meta { grid-column: 1 / -1; text-align: left; }
  .topbar-logout-form .btn { padding: 0.45rem 0.65rem; font-size: 0.78rem; }
}

/* Cari bakiye */
.balance-cell { min-width: 110px; }
.balance-badge {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.4rem 0.65rem;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.balance-badge strong { font-size: 0.85rem; font-family: var(--font-display); }
.balance-badge__type { text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.62rem; }
.balance-alacak { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.25); color: #047857; }
.balance-borc { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.2); color: #b91c1c; }
.balance-neutral { color: var(--muted); }

/* Faturalar */
.invoice-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.invoice-toolbar__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.invoice-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.invoice-kpi {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}
.invoice-kpi__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.invoice-kpi__value {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
}

.invoice-doc { padding: 0; }
.invoice-doc__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), #fff);
}
.invoice-doc__type {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.invoice-doc__no {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.invoice-doc__meta {
  display: flex;
  gap: 2rem;
  text-align: right;
  font-size: 0.875rem;
}
.invoice-party {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}
.invoice-party__label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.invoice-party__name {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.invoice-supplier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.supplier-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.invoice-totals {
  margin: 0;
  padding: 1.25rem 1.75rem 1.5rem;
  max-width: 320px;
  margin-left: auto;
}
.invoice-totals__row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}
.invoice-totals__grand {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}
.invoice-totals__grand span:last-child { color: var(--primary); font-size: 1.35rem; }
.invoice-notes { padding: 0 1.75rem 1.5rem; }
.history-lines--internal { color: var(--muted); }

.history-shell {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.history-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(59, 91, 219, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.history-hero__copy h2 {
  margin: 0;
  font-size: 1.15rem;
}

.history-hero__copy p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.history-hero__meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.history-pill {
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 91, 219, 0.22);
  color: #1e40af;
  background: rgba(59, 91, 219, 0.08);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-toolbar {
  margin-bottom: 0;
}

.subpage-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subpage-shell__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(59, 91, 219, 0.2);
  background: linear-gradient(130deg, #f7faff 0%, #ffffff 100%);
}

.subpage-shell__hero-copy h2 {
  margin: 0;
  font-size: 1.2rem;
}

.subpage-shell__hero-copy p {
  margin: 0.32rem 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.subpage-shell__kicker {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #1e3a8a;
  font-weight: 700;
}

.subpage-shell__hero-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.subpage-shell > .card,
.subpage-shell > .grid-2 > .card,
.subpage-shell > .grid-3 > .card {
  border-radius: 16px;
}

.subpage-shell .page-toolbar,
.subpage-shell .cari-page-toolbar,
.subpage-shell .toolbar-head {
  margin-bottom: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.page-toolbar--card {
  margin-bottom: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.finance-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
}

.finance-shell--single,
.checks-page {
  display: block;
  width: 100%;
  max-width: 100%;
}

.checks-portfolio-card {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.checks-portfolio-card .toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.checks-portfolio-card .toolbar-head {
  align-items: flex-start;
  gap: 1rem;
}

.table-wrap--checks {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0.75rem 0.75rem;
  max-width: 100%;
}

.table-wrap--checks .checks-data-table {
  width: 100%;
  table-layout: auto;
  min-width: 720px;
}

.table-wrap--checks .checks-data-table th,
.table-wrap--checks .checks-data-table td {
  padding: 0.75rem 0.65rem;
  vertical-align: top;
}

.table-wrap--checks .checks-data-table td:not(.actions-cell) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-wrap--checks .checks-data-table .actions-cell {
  overflow: visible;
  min-width: 9.5rem;
  width: 9.5rem;
}

.check-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 8.5rem;
}

.check-actions__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.check-actions .check-status-select {
  width: 100%;
  min-width: 0;
}

.checks-cards-mobile {
  display: none;
  padding: 0 0.75rem 0.75rem;
  gap: 0.75rem;
}

.check-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.check-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.check-card__no {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.95rem;
}

.check-card__amount {
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.check-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  font-size: 0.84rem;
}

.check-card__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.1rem;
}

.check-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.check-card__actions .check-status-select,
.check-card__actions .btn {
  width: 100%;
}

.check-card__actions .check-actions__buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.check-card__actions .check-actions__buttons .btn:only-child {
  grid-column: 1 / -1;
}

.checks-cards-mobile__empty {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}

#check-manual-modal.modal-endorse {
  max-width: min(44rem, calc(100vw - 1.5rem));
  width: calc(100vw - 1.5rem);
}

#check-manual-modal .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.85rem;
}

@media (max-width: 900px) {
  .checks-table-desktop {
    display: none;
  }

  .checks-cards-mobile {
    display: flex;
    flex-direction: column;
  }

  .checks-portfolio-card .toolbar-head {
    flex-direction: column;
    align-items: stretch;
  }

  .checks-portfolio-card .toolbar {
    justify-content: flex-start;
  }

  .check-card__actions .check-actions__buttons {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  .checks-cards-mobile {
    display: none !important;
  }
}

.finance-shell .card {
  border-radius: 16px;
}

.settings-danger { border-color: rgba(239, 68, 68, 0.25); }
.settings-danger .card-head { background: linear-gradient(180deg, #fef2f2, #fff); }
.settings-warning {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: #fef2f2;
  border: 1px solid rgba(239, 68, 68, 0.2);
  font-size: 0.875rem;
  color: #991b1b;
  line-height: 1.5;
}
.settings-warning code {
  background: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-weight: 700;
}
.settings-reset-status {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.55;
}
.settings-reset-status--ok {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #065f46;
}
.settings-reset-status--blocked {
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #92400e;
}
.settings-danger .btn-danger:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* —— Raporlama —— */
.reports-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reports-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
}

.reports-toolbar__dates {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.reports-toolbar__dates.is-hidden {
  display: none;
}

.field--compact {
  min-width: 10rem;
}

.reports-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.25rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.reports-tab {
  flex: 1 1 auto;
  min-width: 8.5rem;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: #94a3b8;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.reports-tab:hover {
  color: #e2e8f0;
  background: rgba(59, 91, 219, 0.08);
}

.reports-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 14px rgba(59, 91, 219, 0.35);
}

.reports-panels {
  min-height: 12rem;
}

.reports-panel[hidden] {
  display: none !important;
}

.reports-split .table-wrap--scroll {
  max-height: 420px;
  overflow: auto;
}

.reports-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.reports-balance-col--receivable .card-head h2 {
  color: #34d399;
}

.reports-balance-col--payable .card-head h2 {
  color: #f87171;
}

.reports-accounts {
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reports-account-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid var(--border);
}

.reports-account-row__tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(5, 150, 105, 0.15);
  color: #6ee7b7;
}

.reports-account-row__tag--bank {
  background: rgba(59, 91, 219, 0.15);
  color: #93c5fd;
}

.flow-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.flow-pill.flow-in,
td.flow-in,
.num.flow-in {
  color: #34d399;
}

.flow-pill.flow-out,
td.flow-out,
.num.flow-out {
  color: #f87171;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.reports-loading {
  text-align: center;
  padding: 0.5rem;
}

@media (max-width: 960px) {
  .reports-balance-grid {
    grid-template-columns: 1fr;
  }
  .reports-tab {
    min-width: calc(50% - 0.5rem);
  }
}

.list-modern--actions li a {
  display: block;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  transition: background 0.15s ease;
}

.list-modern--actions li a:hover {
  background: rgba(59, 91, 219, 0.12);
}

.form-hint {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: var(--text-muted);
}

.form-hint a {
  color: #a78bfa;
  font-weight: 600;
}

.vehicle-date-cell {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.82rem;
}

.vehicle-date-cell .badge {
  width: fit-content;
}

.table-wrap--scroll {
  overflow-x: auto;
}

.list-modern--actions li a strong {
  display: block;
  margin-bottom: 0.15rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.ws-print-heading { display: none; }
@media print {
  body.warehouse-print { background: #fff !important; color: #111 !important; }
  body.warehouse-print .sidebar,
  body.warehouse-print .sidebar-backdrop,
  body.warehouse-print .topbar,
  body.warehouse-print .page-toolbar,
  body.warehouse-print .ambient { display: none !important; }
  body.warehouse-print .app { display: block !important; }
  body.warehouse-print .subpage-shell { display: block !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  body.warehouse-print .main-wrap,
  body.warehouse-print .content,
  body.warehouse-print .ws-content { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body.warehouse-print .ws-print-heading { display: flex !important; justify-content: space-between; align-items: baseline; font-size: 17pt; font-weight: 700; margin: 0 0 14mm; }
  body.warehouse-print .ws-print-heading small { font-size: 9pt; font-weight: 400; }
  body.warehouse-print .ws-board { box-shadow: none !important; border: 1px solid #ccc; margin-bottom: 8mm; }
  body.warehouse-print .ws-acc-item,
  body.warehouse-print .ws-product-row { break-inside: avoid; }
}
@media print { body.warehouse-print .mobile-top-nav, body.warehouse-print .subpage-shell__hero { display: none !important; } body.warehouse-print .ws-acc-item { break-inside: auto !important; page-break-inside: auto !important; } }
@media print { html body.warehouse-print .main-wrap nav.mobile-top-nav, html body.warehouse-print .content .subpage-shell > .subpage-shell__hero { display: none !important; visibility: hidden !important; position: absolute !important; height: 0 !important; overflow: hidden !important; } }
@media print { .mobile-top-nav, .subpage-shell__hero { display: none !important; visibility: hidden !important; } }
