/* Modern dark + orange theme, responsive, Windows11-like soft UI */
:root {
  /* Base palette (deepened for premium depth) */
  --bg: #0b1118;
  --bg-2: #0f1720;
  --panel: #111a24;
  --panel-2: #0d141d;
  --muted: #9aa4b2;
  --muted-2: #6b7686;
  --text: #e6eef6;
  --text-soft: #c3cdd9;
  --accent: #ff8a00;
  --accent-2: #ffb46b;
  --accent-3: #ffd9a8;
  --success: #3bd671;
  --danger: #ff6b6b;
  --warning: #ffb400;
  --info: #5d9cff;

  /* Glass & elevation system */
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(255, 138, 0, 0.35);
  --blur: 18px;
  --card-shadow: 0 10px 30px rgba(2, 6, 23, 0.55);
  --elevation-1: 0 2px 8px rgba(2, 6, 23, 0.4);
  --elevation-2: 0 8px 24px rgba(2, 6, 23, 0.5);
  --elevation-3: 0 18px 50px rgba(2, 6, 23, 0.6);
  --accent-glow: 0 8px 28px rgba(255, 138, 0, 0.28);
  --ring: 0 0 0 3px rgba(255, 138, 0, 0.25);

  /* Radii */
  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* Typography */
  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --max-width: 1180px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.16s;
  --dur: 0.28s;
  --dur-slow: 0.5s;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 138, 0, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(93, 156, 255, 0.06), transparent 55%),
    linear-gradient(180deg, var(--bg), #070d14);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
}

/* Typography scale */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0 0 var(--space-3);
  color: var(--text);
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

.text-sm { font-size: 0.82rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.35rem; }
.text-display {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-muted-2 { color: var(--muted-2); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--elevation-3);
  border-right: 1px solid var(--border-soft);
  position: fixed;
  height: 100%;
  overflow: auto;
  border-radius: 0 20px 20px 0
}

/* Glass surface with top highlight line */
.glass {
  position: relative;
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border-soft);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px
}

.brand-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.15)
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 14px 0
}

nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600
}

nav a .fa {
  width: 18px;
  text-align: center
}

nav a:hover,
nav a.active {
  background: rgba(255, 255, 255, 0.02);
  color: #fff
}

nav .has-children>a {
  justify-content: space-between
}

nav ul ul {
  margin-top: 6px;
  margin-left: 6px
}

.sidebar-footer {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px
}

/* main */
.main {
  margin-left: 260px;
  flex: 1;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch
}

.main-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--bg), rgba(11, 17, 24, 0.85));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0;
  margin-top: -18px
}

.icon-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 16px
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12)
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--ring)
}

.search-wrap {
  flex: 1;
  position: relative
}

.search-wrap input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.03);
  color: #fff
}

.search-wrap .fa {
  position: absolute;
  right: 12px;
  top: 10px;
  color: var(--muted)
}

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

.avatar {
  background: linear-gradient(135deg, #1f2937, #2b3440);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted)
}

/* content */
.main-content {
  width: 100%;
  max-width: var(--max-width);
  margin: 0
}

.grid {
  display: grid
}

.grid-2 {
  grid-template-columns: 1fr 420px
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr)
}

.gap {
  gap: 18px
}

.gap-sm {
  gap: 12px
}

.card {
  position: relative;
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  box-shadow: var(--elevation-2);
  margin-bottom: 18px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease)
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--elevation-3);
  border-color: rgba(255, 255, 255, 0.1)
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.table-wrap {
  overflow: auto
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px
}

.table th,
.table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03)
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  border: 1px solid var(--border-soft);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  -webkit-tap-highlight-color: transparent
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  background: var(--glass-strong);
  color: #fff
}

.btn:active {
  transform: translateY(0)
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring)
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #081018;
  border: none;
  box-shadow: var(--accent-glow);
  font-weight: 700
}

.btn.primary:hover {
  box-shadow: 0 12px 34px rgba(255, 138, 0, 0.4);
  color: #081018
}

.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted)
}

.btn.ghost:hover {
  background: var(--glass);
  color: #fff
}

.btn.danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.25)
}

.btn.danger:hover {
  background: rgba(255, 107, 107, 0.12);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ffd9d9
}

.btn-sm {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  margin-right: 6px
}

.btn-sm.danger {
  background: transparent;
  color: var(--danger)
}

/* Ripple element injected by JS */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255, 255, 255, 0.35);
  animation: ripple 0.6s var(--ease-out);
  pointer-events: none
}

.btn.primary .ripple {
  background: rgba(8, 16, 24, 0.25)
}

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700
}

.tag.success {
  background: linear-gradient(90deg, #12d68b, #03b86a);
  color: #012a14
}

.tag.danger {
  background: linear-gradient(90deg, #ff6b6b, #ff3b3b);
  color: #2a0505
}

.tag.primary {
  background: linear-gradient(90deg, #5d9cff, #3b6fff);
  color: #04203b
}

/* stat cards */
.stats .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px
}

.stat-card {
  flex: 1;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px
}



/* Search Results in Palette */
.search-res {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-res:hover {
  background: rgba(255, 255, 255, 0.03);
}

.search-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

/* Refined Animations */
.cmd-modal {
  animation: fadeIn 0.2s ease-out;
  transform: scale(0.98);
  transition: transform 0.2s;
}

.cmd-overlay[style*="flex"] .cmd-modal {
  transform: scale(1);
}

/* Customer Avatar */
.cust-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #333;
}

.cust-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #000;
  font-size: 20px;
}

.recent-list {
  list-style: none;
  padding: 0;
  margin: 0
}

.recent-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-radius: 10px;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  margin-bottom: 8px
}

.r-title {
  font-weight: 700
}

.r-sub {
  font-size: 13px;
  color: var(--muted)
}

.tag {
  font-size: 12px;
  padding: 6px 8px
}

/* forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px
}

.form-grid label {
  display: block
}

.form-grid .full {
  grid-column: 1/-1
}

/* Barcode preview (SKU -> PNG) */
.barcode-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 16px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.barcode-preview {
  flex: 0 0 auto;
  padding: 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  line-height: 0;
}

.barcode-preview img {
  display: block;
  max-width: 100%;
  height: auto;
}

.barcode-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.barcode-hint {
  font-size: 12px;
  color: var(--muted, #9aa4b2);
}

.form-inline {
  display: flex;
  gap: 8px;
  align-items: center
}

.simple-list {
  list-style: none;
  padding: 0;
  margin: 0
}

.simple-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02)
}

/* Inputs consistent with theme */
input,
textarea {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  outline: none;
}

input:focus,
textarea:focus {
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.12);
  border-color: var(--accent);
}



/* Temaya uygun select stili */
select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 10px;
  border-radius: 10px;
  outline: none;
  appearance: none;
  /* default ok simgesini kaldırmak */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

select:focus {
  box-shadow: 0 6px 18px rgba(255, 138, 0, 0.12);
  border-color: var(--accent);
}

/* Option stili */
select option {
  background: var(--panel);
  color: #fff;
}

/* Eğer ok simgesi eklemek istersen pseudo-element ile ekleyebilirsin */
select-wrapper {
  position: relative;
}

select-wrapper::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

/* Quick links */
.quick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 138, 0, 0.06), transparent);
  color: var(--accent);
  text-decoration: none;
  font-weight: 700
}

.quick .fa {
  width: 26px
}

/* Sidebar collapsed for mobile */
.sidebar.collapsed {
  transform: translateX(-110%);
  transition: transform .28s ease;
  position: fixed;
  z-index: 9999
}

@media (max-width:900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 280px;
    z-index: 10001;
    transform: translateX(-110%);
    transition: transform .28s ease;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5)
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .main {
    margin-left: 0
  }

  #sidebarToggle {
    display: inline-flex !important
  }

  /* Mobile overlay backdrop when sidebar open */
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 10000;
  }
}

/* auth */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: linear-gradient(180deg, #07101a, #07131a)
}

.auth-card {
  width: 360px;
  padding: 24px;
  border-radius: 14px;
  text-align: center
}

.auth-form input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #fff
}

.alert {
  padding: 10px;
  border-radius: 8px;
  margin: 8px 0
}

.alert.success {
  background: linear-gradient(90deg, #12d68b22, #03b86a11);
  color: #eafff0
}

.alert.error {
  background: linear-gradient(90deg, #ff6b6b22, #ff3b3b11);
  color: #ffecec
}

.small-link {
  color: var(--muted);
  text-decoration: none
}

.small-link.danger {
  color: var(--danger)
}

.note {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 13px;
  padding: 6px 0
}

/* helper */
.muted {
  color: var(--muted)
}

.center {
  text-align: center
}

.row-done {
  background: linear-gradient(90deg, #062b14, #072c16);
}

.row-pending {
  background: linear-gradient(90deg, #3b0f0f, #2a0b0b);
}

/* end */

.autocomplete-list {
  position: absolute;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  margin-top: 2px;
  border-radius: 10px;
  z-index: 999;
  display: none;
  list-style: none;
  padding: 0;
}

.autocomplete-list li {
  padding: 8px 12px;
  cursor: pointer;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.autocomplete-list li:hover {
  background: rgba(255, 138, 0, 0.2);
}

.stat-card {
  flex: 1;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.02);
  padding: 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--border-soft);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.stat-card .label {
  font-weight: 600;
  color: var(--muted);
  font-size: 0.82rem;
}

.stat-card .value {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stat-card .icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent);
}

.stat-card.primary .icon { background: rgba(93, 156, 255, 0.15); color: var(--info); }
.stat-card.accent .icon { background: rgba(255, 138, 0, 0.15); color: var(--accent); }
.stat-card.warn .icon { background: rgba(255, 180, 0, 0.15); color: var(--warning); }
.stat-card.success .icon { background: rgba(59, 214, 113, 0.15); color: var(--success); }
.stat-card.danger .icon { background: rgba(255, 107, 107, 0.15); color: var(--danger); }

.stat-card.primary {
  background: linear-gradient(90deg, #263bff12, #263bff05)
}

.stat-card.accent {
  background: linear-gradient(90deg, #ff8a0012, #ffb46b05)
}

.stat-card.warn {
  background: linear-gradient(90deg, #ffb40012, #ff8a0010)
}

.stat-card.success {
  background: linear-gradient(90deg, #12d68b12, #03b86a05)
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.6);
  transition: all 0.2s ease;
}

/* Command Palette */
.cmd-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
}

.cmd-modal {
  width: 600px;
  max-width: 90%;
  background: #161f2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cmd-modal input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 16px;
  font-size: 18px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
}

.cmd-modal input:focus {
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.1);
}

.cmd-list {
  max-height: 400px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cmd-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

.cmd-item:hover,
.cmd-item.selected {
  background: rgba(255, 138, 0, 0.1);
  color: #fff;
}

.cmd-item .icon {
  width: 24px;
  text-align: center;
  margin-right: 10px;
}

.cmd-key {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: #ccc;
}

.text-highlight {
  color: var(--accent);
  font-weight: bold;
}

/* KBD hints */
kbd {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 11px;
  font-family: inherit;
  color: #eee;
}

.nav-shortcut {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.6;
}

/* Mobile Optimization */
@media (max-width: 900px) {

  /* Global */
  body {
    font-size: 15px;
  }

  .main {
    padding: 14px 14px 80px 14px;
  }

  /* Bottom padding for scroll */

  /* Navigation & Typography */
  .brand-text strong {
    font-size: 1.1rem;
  }

  /* Touch Targets */
  nav a {
    padding: 14px;
    margin-bottom: 4px;
  }

  .btn,
  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
    /* prevent zoom */
  }

  /* Stack Grids */
  .grid-2,
  .grid-3,
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  .stats .row {
    gap: 10px;
  }

  .stat-card {
    min-width: 45%;
  }

  /* 2 per row on mobile */

  /* Card Tables (Responsive) */
  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
  }

  .table td {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  }

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

  .table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    font-size: 13px;
    margin-right: 10px;
  }

  .table td.ops {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }

  /* Scrollable Containers */
  .table-wrap {
    overflow: visible;
  }

  /* Hide search shortcut hint on mobile */
  .search-wrap input::placeholder {
    color: transparent;
  }

  .search-wrap input::placeholder {
    content: "Ara...";
    color: var(--muted);
  }

  /* Sidebar Overlay */
  .sidebar {
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
    width: 280px;
    z-index: 10001;
    /* Above modal overlay */
  }

  .sidebar.open+.cmd-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
  }

  /* Hack if using overlay later */
}

/* Fix chart height on mobile */
@media (max-width: 600px) {
  canvas {
    max-height: 250px;
  }

  .stat-card {
    min-width: 100%;
  }
}

.sidebar .brand-icon {
  box-shadow: 0 0 20px rgba(255, 138, 0, 0.3);
}

/* Table Polish & Mobile Fixes */
.table td,
.table th {
  white-space: nowrap;
  /* Prevent wrapping */
  vertical-align: middle;
}

.table td.job-title {
  white-space: normal;
  /* Title can wrap if needed, or use ellipsis below */
  min-width: 150px;
  text-overflow: ellipsis;
}

.table-wrap {
  overflow-x: auto;
  /* Scroll horizontally */
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
  /* spacing for scrollbar */
}

/* Scrollbar syling */
.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* Mobile Sidebar Fix */
@media (max-width: 900px) {
  .sidebar {
    z-index: 9999;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
  }

  .table th,
  .table td {
    padding: 8px;
    font-size: 13px;
  }

  .stat-card .value {
    font-size: 1.1rem;
  }
}

/* Stok Seçim Popup */
.stock-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stock-modal-overlay.open {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.stock-modal {
  width: 720px;
  max-width: 100%;
  max-height: 85vh;
  background: #161f2b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stock-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stock-modal-head h3 {
  margin: 0;
}

.stock-modal input#stockSearch {
  margin: 14px 16px 0;
  border-radius: 10px;
}

.stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.stock-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: all 0.18s;
}

.stock-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(255, 138, 0, 0.12);
}

.stock-card.selected {
  border-color: var(--accent);
  background: rgba(255, 138, 0, 0.1);
}

.stock-card img,
.stock-noimg {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--muted);
}

.stock-card-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.stock-card-meta {
  font-size: 12px;
  color: var(--muted);
}

.stock-qty-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #081018;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.qty-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #081018;
  border-color: var(--accent);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-val {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.selected-stock-summary {
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 600;
}

/* Ranked product lists (stats) */
.rank-list {
  list-style: none;
  counter-reset: rank;
  padding: 0;
  margin: 8px 0 0;
}

.rank-list li {
  counter-increment: rank;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.rank-list li::before {
  content: counter(rank);
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  margin-right: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #081018;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-name {
  flex: 1;
  font-weight: 600;
}

.rank-val {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  margin-left: 10px;
}

.stock-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.selected-stock-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selected-stock-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.selected-stock-item .tag {
  cursor: pointer;
  border: none;
}

/* ============================================================
   ANIMATION SYSTEM — premium motion
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes ripple {
  to { transform: scale(2.6); opacity: 0; }
}

@keyframes shimmer {
  0% { background-position: -480px 0; }
  100% { background-position: 480px 0; }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 138, 0, 0.0); }
  50% { box-shadow: 0 0 22px 2px rgba(255, 138, 0, 0.35); }
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(40px) scale(0.96); }
}

@keyframes blobFloat {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 20px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Page enter transition */
body.page-enter .main-content {
  animation: fadeInUp var(--dur-slow) var(--ease-out) both;
}

/* Staggered reveal for cards / stat cards (index set via JS data-stagger) */
.stagger {
  opacity: 0;
  animation: fadeInUp var(--dur-slow) var(--ease-out) both;
  animation-delay: calc(var(--stagger, 0) * 70ms);
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 25%, rgba(255, 255, 255, 0.09) 37%, rgba(255, 255, 255, 0.04) 63%);
  background-size: 480px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}

/* Toast notifications */
.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10010;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border-soft);
  box-shadow: var(--elevation-3);
  color: var(--text);
  animation: toastIn 0.35s var(--ease-out) both;
  position: relative;
  overflow: hidden;
}

.toast.leaving {
  animation: toastOut 0.3s var(--ease) both;
}

.toast .toast-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.toast.success .toast-icon { background: rgba(59, 214, 113, 0.18); color: var(--success); }
.toast.error .toast-icon { background: rgba(255, 107, 107, 0.18); color: var(--danger); }
.toast.info .toast-icon { background: rgba(93, 156, 255, 0.18); color: var(--info); }

.toast .toast-body { flex: 1; font-size: 0.9rem; line-height: 1.4; }
.toast .toast-title { font-weight: 700; margin-bottom: 2px; }
.toast .toast-msg { color: var(--muted); }

.toast .toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  background: var(--accent);
  animation: toastProgress linear forwards;
}

.toast.success .toast-progress { background: var(--success); }
.toast.error .toast-progress { background: var(--danger); }
.toast.info .toast-progress { background: var(--info); }

@keyframes toastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Empty state component */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  background: var(--glass);
  border: 1px solid var(--border-soft);
  color: var(--accent);
}

.empty-state h4 { color: var(--text); margin-bottom: 6px; }
.empty-state p { margin: 0 0 16px; }

/* Toolbar for list pages */
.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.toolbar .toolbar-spacer { flex: 1; }

/* Sticky table header */
.table thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 2;
  backdrop-filter: blur(6px);
}

/* Row hover highlight */
.table tbody tr {
  transition: background var(--dur-fast) var(--ease);
  animation: fadeInUp 0.4s var(--ease-out) both;
}

.table tbody tr:hover {
  background: rgba(255, 138, 0, 0.06);
}

/* Premium badge */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, rgba(255, 138, 0, 0.18), rgba(255, 180, 107, 0.1));
  border: 1px solid var(--border-glow);
  color: var(--accent-2);
}

/* Reduced motion: disable all non-essential animation */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .stagger { opacity: 1 !important; }
}

/* ============================================================
   LOGIN — premium aurora experience
   ============================================================ */
.auth-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, #07101a, #060c12);
  font-family: var(--font);
}

.auth-body::before,
.auth-body::after,
.auth-aurora {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.auth-body::before {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.55), transparent 70%);
  top: -120px;
  left: -80px;
  animation: blobFloat 18s ease-in-out infinite;
}

.auth-body::after {
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(93, 156, 255, 0.4), transparent 70%);
  bottom: -140px;
  right: -60px;
  animation: blobFloat 22s ease-in-out infinite reverse;
}

.auth-aurora {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(255, 180, 107, 0.35), transparent 70%);
  top: 40%;
  left: 55%;
  animation: blobFloat 26s ease-in-out infinite;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 400px;
  max-width: 92vw;
  padding: 40px 34px;
  border-radius: var(--radius-lg);
  text-align: center;
  background: linear-gradient(180deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(calc(var(--blur) + 6px));
  -webkit-backdrop-filter: blur(calc(var(--blur) + 6px));
  border: 1px solid var(--border-soft);
  box-shadow: var(--elevation-3);
  animation: scaleIn 0.5s var(--ease-out) both;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.auth-card .logo-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--accent-glow);
  animation: pulseGlow 4s ease-in-out infinite;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.auth-card .muted {
  margin-bottom: 22px;
}

.auth-form {
  text-align: left;
}

.auth-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin: 12px 0 6px;
}

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-soft);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
  outline: none;
}

.auth-form .btn.primary {
  width: 100%;
  justify-content: center;
  margin-top: 22px;
  padding: 12px;
  font-size: 1rem;
}

.auth-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted-2);
}