:root {
  --bg: #f4f5f7;
  --surface: #fff;
  --surface2: #f0f1f4;
  --surface3: #e8eaef;
  --border: #e2e4ea;
  --border2: #d0d3dd;
  --accent: #ff6b35;
  --accent2: #ffb347;
  --accent-light: rgba(255, 107, 53, .09);
  --text: #1a1d27;
  --text2: #3d4155;
  --muted: #8b90a8;
  --success: #0fa46e;
  --success-bg: rgba(15, 164, 110, .09);
  --warning: #d4920a;
  --warning-bg: rgba(212, 146, 10, .09);
  --danger: #e03258;
  --danger-bg: rgba(224, 50, 88, .09);
  --blue: #2b7fff;
  --blue-bg: rgba(43, 127, 255, .09);
  --purple: #7c5cfc;
  --purple-bg: rgba(124, 92, 252, .09);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .08), 0 2px 4px rgba(0, 0, 0, .05);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .12), 0 4px 8px rgba(0, 0, 0, .06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html {
  -webkit-tap-highlight-color: transparent
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font-family: 'DM Sans', sans-serif;
  cursor: pointer
}

input,
select,
textarea {
  font-family: 'DM Sans', sans-serif;
  color: var(--text)
}

/* ── LOGIN ── */
#loginScreen {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #f8f9fc 0%, #eef0f7 100%);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  flex-direction: column
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 92%;
  max-width: 420px;
  box-shadow: var(--shadow-lg)
}

.login-logo {
  text-align: center;
  margin-bottom: 28px
}

.login-logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--text)
}

.login-logo-text span {
  color: var(--accent)
}

/* ── SIDEBAR ── */
.sidebar {
  width: 248px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 300;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: var(--shadow-sm)
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 299;
  backdrop-filter: blur(2px)
}

.sidebar-overlay.open {
  display: block
}

.logo {
  padding: 20px 18px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
  color: var(--text)
}

.logo-text span {
  color: var(--accent)
}

.logo-sub {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center
}

.user-badge {
  margin: 14px 12px 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px
}

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text)
}

.user-role {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: .5px
}

/* ROLE SWITCHER (Admin) */
.role-switch {
  padding: 10px 12px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px
}

.role-btn {
  width: 100%;
  padding: 5px 4px;
  font-size: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  transition: all .2s;
  white-space: nowrap;
  font-weight: 500
}

.role-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600
}

.nav {
  flex: 1;
  padding: 6px 10px;
  overflow-y: auto;
  margin-top: 8px
}

.nav-section {
  margin-bottom: 16px
}

.nav-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 5px;
  font-weight: 600
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
  margin-bottom: 1px;
  border: 1px solid transparent;
  font-weight: 500
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--text2)
}

.nav-item.active {
  background: var(--accent-light);
  color: var(--accent);
  border-color: rgba(255, 107, 53, .18);
  font-weight: 600
}

.nav-icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px
}

.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
  text-align: center
}

/* ── TOPBAR ── */
.main {
  margin-left: 248px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
}

.topbar {
  height: 58px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm)
}

.topbar-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text)
}

.topbar-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  flex-shrink: 0
}

.breadcrumb {
  font-size: 12px;
  color: var(--muted)
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 17px;
  cursor: pointer;
  color: var(--text2);
  flex-shrink: 0
}

.content {
  padding: 22px;
  flex: 1
}

/* ── BELL ── */
.bell-btn {
  position: relative;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 16px;
  cursor: pointer;
  transition: all .15s;
  color: var(--text2)
}

.bell-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent)
}

.bell-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  line-height: 1
}

/* ── NOTIFICATION PANEL ── */
#notifOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600
}

#notifPanel {
  display: none;
  position: fixed;
  top: 62px;
  right: 16px;
  width: 340px;
  max-width: 94vw;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 601;
  max-height: 460px;
  flex-direction: column;
  overflow: hidden
}

#notifPanel.open {
  display: flex
}

.notif-head {
  padding: 13px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
  display: flex;
  gap: 10px
}

.notif-item:last-child {
  border-bottom: none
}

.notif-item:hover {
  background: var(--surface2)
}

.notif-item.unread {
  background: var(--blue-bg)
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
  margin-top: 5px
}

.notif-dot.read {
  background: var(--border2)
}

.notif-text {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.5;
  flex: 1
}

.notif-time {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px
}

.notif-empty {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-size: 13px
}

/* ── BUTTONS ── */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  transition: all .18s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm)
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md)
}

.btn:active {
  transform: none;
  box-shadow: var(--shadow-sm)
}

.btn-primary {
  background: var(--accent);
  color: #fff
}

.btn-primary:hover {
  background: #ff7d4d
}

.btn-ghost {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border)
}

.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text2)
}

.btn-success {
  background: var(--success);
  color: #fff
}

.btn-success:hover {
  background: #0cbd80
}

.btn-danger {
  background: var(--danger);
  color: #fff
}

.btn-danger:hover {
  background: #f04d72
}

.btn-blue {
  background: var(--blue);
  color: #fff
}

.btn-blue:hover {
  background: #4090ff
}

.btn-warning {
  background: var(--warning);
  color: #fff
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11px
}

.btn-icon {
  padding: 7px;
  border-radius: 7px
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none
}

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm)
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text)
}

.card-title .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.card-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  margin-top: -10px
}

/* ── STATS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 22px
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  box-shadow: var(--shadow-sm)
}

.stat-card:hover {
  border-color: var(--ac, var(--accent));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px)
}

.stat-card-active {
  border-color: var(--ac, var(--accent)) !important;
  box-shadow: 0 0 0 2px var(--ac, var(--accent)), var(--shadow-md) !important;
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--ac, var(--accent)) 8%, var(--surface))
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ac, var(--accent))
}

.stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600
}

.stat-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin: 5px 0 2px;
  line-height: 1;
  color: var(--text)
}

.stat-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  color: var(--muted)
}

/* ── FORM ── */
.form-group {
  margin-bottom: 13px
}

.form-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
  display: block;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 13px;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, .12);
  background: #fff
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted)
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238b90a8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px
}

.form-select option {
  background: #fff;
  color: var(--text)
}

.form-textarea {
  resize: vertical;
  min-height: 70px
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px
}

.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 4px
}

/* ── SEARCH ── */
.search-wrap {
  position: relative
}

.search-wrap input {
  padding-left: 36px;
  background: #fff
}

.search-icon-abs {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none
}

.search-dropdown {
  position: absolute;
  top: calc(100%+4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 400;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  box-shadow: var(--shadow-lg)
}

.search-dropdown.open {
  display: block
}

.sd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  cursor: pointer;
  font-size: 13px;
  transition: background .12s;
  border-bottom: 1px solid var(--border)
}

.sd-item:last-child {
  border-bottom: none
}

.sd-item:hover {
  background: var(--accent-light)
}

.sd-item-icon {
  font-size: 20px;
  flex-shrink: 0
}

.sd-item-name {
  font-weight: 600;
  color: var(--text)
}

.sd-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px
}

.sd-empty {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px
}

/* ── CHIPS ── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px
}

.chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  font-weight: 500;
  box-shadow: var(--shadow-sm)
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.chip.sel {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 107, 53, .3)
}

/* ── QTY ── */
.qty-wrap {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm)
}

.qty-btn {
  width: 38px;
  height: 40px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center
}

.qty-btn:hover {
  background: var(--accent-light);
  color: var(--accent)
}

.qty-val {
  width: 52px;
  text-align: center;
  background: transparent;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  height: 40px
}

.qty-val:focus {
  outline: none
}

/* ── UPLOAD ── */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  color: var(--muted);
  font-size: 13px;
  background: var(--surface2)
}

.upload-zone:hover,
.upload-zone.drag {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 107, 53, .04)
}

.upload-icon {
  font-size: 26px;
  margin-bottom: 6px
}

.upload-filename {
  font-size: 12px;
  color: var(--accent);
  margin-top: 6px;
  word-break: break-all;
  font-weight: 500
}

/* ── CART ── */
.cart-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 7px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  animation: fadeSlide .25s ease
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.ci-icon {
  font-size: 20px;
  margin-top: 1px;
  flex-shrink: 0
}

.ci-info {
  flex: 1;
  min-width: 0
}

.ci-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text)
}

.ci-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.6
}

.ci-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  padding: 2px;
  transition: color .15s;
  flex-shrink: 0
}

.ci-remove:hover {
  color: var(--danger)
}

.cart-empty-msg {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted)
}

.cart-empty-msg .e-icon {
  font-size: 32px;
  opacity: .3;
  margin-bottom: 8px
}

/* ── STEP BAR ── */
.step-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm)
}

.step-item {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Syne', sans-serif;
  border: 2px solid var(--border2);
  color: var(--muted);
  flex-shrink: 0;
  transition: all .3s
}

.step-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 53, .35)
}

.step-num.done {
  background: var(--success);
  border-color: var(--success);
  color: #fff
}

.step-lbl {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 500
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 6px;
  transition: background .3s
}

.step-line.done {
  background: var(--success)
}

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

table.t {
  width: 100%;
  border-collapse: collapse;
  min-width: 500px
}

table.t th {
  text-align: left;
  padding: 9px 14px;
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface2)
}

table.t td {
  padding: 12px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text2)
}

table.t tr:last-child td {
  border-bottom: none
}

table.t tr:hover td {
  background: var(--surface2)
}

.order-no {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 13px
}

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%
}

.b-verildi {
  background: var(--blue-bg);
  color: var(--blue)
}

.b-verildi .badge-dot {
  background: var(--blue)
}

.b-uretiliyor {
  background: var(--warning-bg);
  color: var(--warning)
}

.b-uretiliyor .badge-dot {
  background: var(--warning)
}

.b-hazirlandi {
  background: var(--success-bg);
  color: var(--success)
}

.b-hazirlandi .badge-dot {
  background: var(--success)
}

.b-duzeltme {
  background: var(--danger-bg);
  color: var(--danger)
}

.b-duzeltme .badge-dot {
  background: var(--danger)
}

.b-faturaland {
  background: var(--accent-light);
  color: var(--accent)
}

.b-faturaland .badge-dot {
  background: var(--accent)
}

.b-faturakesildi {
  background: var(--purple-bg);
  color: var(--purple)
}

.b-faturakesildi .badge-dot {
  background: var(--purple)
}

/* ── TIMELINE ── */
.timeline {
  padding: 8px 0
}

.tl-item {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  position: relative
}

.tl-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
  flex-shrink: 0
}

.tl-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 2px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  z-index: 1
}

.tl-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin: 2px 0;
  min-height: 12px
}

.tl-body {
  padding-bottom: 16px;
  flex: 1;
  min-width: 0
}

.tl-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text)
}

.tl-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5
}

.tl-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px
}

/* ── MODAL ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 30, .5);
  z-index: 800;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px)
}

.overlay.open {
  display: flex
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  max-width: 500px;
  width: 94%;
  max-height: 92vh;
  overflow-y: auto;
  animation: mIn .22s ease;
  box-shadow: var(--shadow-lg)
}

.modal.modal-lg {
  max-width: 680px
}

.modal.modal-xl {
  max-width: 820px
}

@keyframes mIn {
  from {
    opacity: 0;
    transform: scale(.96) translateY(18px)
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0)
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text)
}

.modal-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 7px;
  transition: all .15s
}

.modal-close:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger)
}

.modal-body {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
  margin-bottom: 12px
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px
}

.highlight-code {
  background: var(--accent-light);
  border: 2px solid var(--accent);
  border-radius: 10px;
  padding: 12px 18px;
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 3px;
  margin: 12px 0
}

/* ── DETAIL VIEW ── */
.detail-row {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px
}

.detail-row:last-child {
  border-bottom: none
}

.detail-key {
  color: var(--muted);
  min-width: 130px;
  flex-shrink: 0;
  font-weight: 500
}

.detail-val {
  flex: 1;
  color: var(--text2)
}

/* ── TABS ── */
.tab-bar {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

.tab {
  padding: 9px 18px;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
  white-space: nowrap;
  font-weight: 500
}

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600
}

.tab-panel {
  display: none
}

.tab-panel.active {
  display: block
}

/* ── TOAST ── */
.toast-wrap {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  min-width: 250px;
  max-width: 340px;
  box-shadow: var(--shadow-lg);
  animation: tIn .28s ease;
  pointer-events: auto
}

.toast.out {
  animation: tOut .28s ease forwards
}

@keyframes tIn {
  from {
    opacity: 0;
    transform: translateX(36px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes tOut {
  to {
    opacity: 0;
    transform: translateX(36px)
  }
}

.toast-ico {
  font-size: 17px;
  flex-shrink: 0
}

.toast-txt {
  flex: 1;
  color: var(--text2);
  font-weight: 500
}

/* ── MISC ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 14px 0
}

.section-label {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: 600
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted)
}

.empty-state .es-icon {
  font-size: 44px;
  opacity: .25;
  margin-bottom: 12px
}

.empty-state .es-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted)
}

.info-box {
  background: var(--blue-bg);
  border: 1px solid rgba(43, 127, 255, .25);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--blue);
  margin-bottom: 12px;
  font-weight: 500
}

.warn-box {
  background: var(--warning-bg);
  border: 1px solid rgba(212, 146, 10, .25);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--warning);
  margin-bottom: 12px;
  font-weight: 500
}

.success-box {
  background: var(--success-bg);
  border: 1px solid rgba(15, 164, 110, .25);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--success);
  margin-bottom: 12px;
  font-weight: 500
}

.selected-product-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px
}

.sp-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--surface3), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0
}

.sp-info {
  flex: 1
}

.sp-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text)
}

.sp-desc {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px
}

.pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 500
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: start
}

.sticky-col {
  position: sticky;
  top: 76px
}

::-webkit-scrollbar {
  width: 5px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px
}

/* ── MOBILE ── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 250;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .08)
}

.mn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 4px 0;
  color: var(--muted);
  transition: color .15s;
  position: relative
}

.mn-item.active {
  color: var(--accent)
}

.mn-icon {
  font-size: 20px;
  line-height: 1
}

.mn-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px
}

.mn-dot {
  position: absolute;
  top: 2px;
  right: calc(50% - 14px);
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--surface)
}

@media(max-width:900px) {
  .sidebar {
    transform: translateX(-100%)
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .main {
    margin-left: 0
  }

  .hamburger {
    display: flex
  }

  .topbar-sep,
  .breadcrumb {
    display: none
  }

  .content {
    padding: 14px;
    padding-bottom: 80px
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px
  }

  .stat-value {
    font-size: 24px
  }

  .two-col {
    grid-template-columns: 1fr
  }

  .sticky-col {
    position: static
  }

  .step-bar {
    padding: 10px 12px
  }

  .step-lbl {
    display: none
  }

  .step-line {
    margin: 0 4px
  }

  .form-row {
    grid-template-columns: 1fr
  }

  .topbar {
    padding: 0 14px;
    gap: 8px
  }

  .topbar-title {
    font-size: 15px
  }

  .topbar-right .btn {
    padding: 6px 10px;
    font-size: 11.5px
  }

  .card {
    padding: 14px;
    border-radius: 12px
  }

  .card-title {
    font-size: 13px;
    margin-bottom: 12px
  }

  .modal {
    padding: 18px;
    border-radius: 14px;
    width: 97%
  }

  .modal-footer {
    flex-direction: column-reverse
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center
  }

  .toast-wrap {
    bottom: 80px;
    right: 10px;
    left: 10px
  }

  .toast {
    min-width: 0;
    max-width: 100%
  }

  .mobile-nav {
    display: flex
  }

  .role-btn {
    font-size: 9px;
    padding: 4px 3px
  }

  .hide-mobile {
    display: none !important
  }

  table.t {
    min-width: 100% !important;
    table-layout: auto;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }
  .admin-stats-grid .stat-card:nth-child(1),
  .admin-stats-grid .stat-card:nth-child(2),
  .admin-stats-grid .stat-card:nth-child(3) {
    grid-column: span 2;
  }
  .admin-stats-grid .stat-card:nth-child(4),
  .admin-stats-grid .stat-card:nth-child(5) {
    grid-column: span 3;
  }
}

@media(max-width:480px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px
  }

  .stat-card {
    padding: 12px 13px
  }

  .stat-value {
    font-size: 22px
  }

  .content {
    padding: 10px;
    padding-bottom: 80px
  }

  .card {
    padding: 12px
  }

  table.t {
    min-width: 100% !important;
    font-size: 12px;
  }

  .chip {
    padding: 6px 10px;
    font-size: 12px
  }
}