:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #d9e1ea;
  --primary: #21865f;
  --primary-dark: #176b4b;
  --accent: #2457a6;
  --warn: #b7791f;
  --danger: #c24137;
  --ok-bg: #eaf7ef;
  --ok-text: #176b4b;
  --err-bg: #fff0ed;
  --err-text: #9f3029;
  --shadow: 0 14px 34px rgba(21, 35, 56, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

.public-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.public-shell {
  width: 100%;
  max-width: 520px;
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-weight: 800;
}

.brand-copy strong {
  display: block;
  font-size: 18px;
}

.brand-copy span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-panel {
  padding: 20px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.section-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: var(--muted);
  font-weight: 500;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(36, 87, 166, 0.12);
}

.input[readonly],
.input:disabled,
.textarea:disabled,
.select:disabled {
  background: #eef2f6;
  color: #697586;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 15px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.button:hover {
  background: var(--primary-dark);
}

.button:disabled {
  cursor: not-allowed;
  background: #aab4c0;
  transform: none;
}

.button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.button.secondary:hover {
  background: #f7f9fc;
}

.button.danger {
  background: var(--danger);
}

.button.danger:hover {
  background: #9f3029;
}

.button.full {
  width: 100%;
}

.status-box {
  display: none;
  margin: 12px 0;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.status-box.show {
  display: block;
}

.status-box.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.status-box.err {
  background: var(--err-bg);
  color: var(--err-text);
}

.status-box.info {
  background: #edf4ff;
  color: #244d84;
}

.item-list {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.item-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcfe;
}

.item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.item-head strong {
  display: block;
  line-height: 1.3;
}

.item-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6f1;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.blue {
  background: #edf4ff;
  color: #2457a6;
}

.badge.warn {
  background: #fff5df;
  color: var(--warn);
}

.kvkk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 13px;
  line-height: 1.4;
}

.kvkk input {
  width: 19px;
  height: 19px;
  margin-top: 1px;
}

.promo {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
}

.promo strong {
  color: var(--text);
  font-size: 13px;
}

.admin-body {
  min-height: 100vh;
  background: #f4f6f8;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.admin-topbar h1 {
  margin: 0;
  font-size: 18px;
}

.admin-topbar p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 18px auto 40px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
}

.admin-nav {
  align-self: start;
  padding: 10px;
}

.admin-nav a {
  display: block;
  padding: 10px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: #eef6f1;
  color: var(--primary-dark);
}

.content-panel {
  padding: 18px;
}

.content-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.content-head h2 {
  margin: 0;
  font-size: 20px;
}

.content-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.flash {
  margin-bottom: 14px;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.flash.success {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.flash.error {
  background: var(--err-bg);
  color: var(--err-text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  margin-top: 7px;
  font-size: 24px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #f7f9fc;
  color: #495567;
  font-size: 12px;
}

tr:last-child td {
  border-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-form {
  display: inline;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.login-wrap {
  width: min(430px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.login-panel {
  width: 100%;
  padding: 22px;
}

.muted {
  color: var(--muted);
}

.order-media {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.thumb {
  width: 104px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  background: #fff;
  position: relative;
}

/* Fazla/yanlis gorseli silme (x) butonu - thumb sag ust kosesi */
.thumb-del { position: absolute; top: 2px; right: 2px; margin: 0; z-index: 2; }
.thumb-del-btn {
  width: 22px; height: 22px; padding: 0; line-height: 1;
  border: none; border-radius: 999px; cursor: pointer;
  background: rgba(192,57,43,0.92); color: #fff;
  font-size: 16px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.thumb-del-btn:hover { background: #a5281d; }

/* "Tümünü sil" - kisisellestirme baslik satirinda */
.personal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.personal-clear { margin: 0; }
.personal-clear .button.small { width: auto; min-height: 26px; padding: 3px 10px; font-size: 11px; }

.thumb img {
  width: 100%;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.thumb a {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.note-box {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #fff8e7;
  border: 1px solid #f0d696;
  color: #775b1a;
  font-size: 13px;
}

.label-page {
  margin: 0;
  background: #fff;
}

.thermal-label {
  width: 100mm;
  height: 100mm;
  padding: 5mm;
  background: #fff;
  color: #000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 3mm;
  font-family: Arial, sans-serif;
}

.label-head {
  text-align: center;
}

.label-head strong {
  display: block;
  font-size: 18pt;
  line-height: 1;
}

.label-head span {
  display: block;
  margin-top: 2mm;
  font-size: 9pt;
  font-weight: 700;
}

.label-main {
  display: grid;
  grid-template-columns: 38mm 1fr;
  gap: 4mm;
  align-items: center;
}

.qr-box {
  width: 38mm;
  height: 38mm;
  display: grid;
  place-items: center;
  border: 1px solid #000;
}

.label-info {
  font-size: 8pt;
  line-height: 1.35;
}

.label-info strong {
  display: block;
  font-size: 12pt;
  margin-bottom: 2mm;
}

.barcode-wrap {
  text-align: center;
}

.barcode-text {
  margin-top: 1mm;
  font-size: 8pt;
  font-weight: 700;
  word-break: break-all;
}

.shipping-label {
  width: 100mm;
  height: 100mm;
  box-sizing: border-box;
  padding: 2.2mm;
  background: #fff;
  color: #263244;
  display: grid;
  grid-template-rows: 24mm 1fr;
  gap: 1.8mm;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

.shipping-label * {
  box-sizing: border-box;
  letter-spacing: 0;
}

.ship-top {
  display: grid;
  grid-template-rows: 18mm 5mm;
  align-items: center;
  justify-items: center;
}

.ship-top svg {
  width: 78mm;
  max-height: 18mm;
}

.ship-top-code {
  color: #000;
  font-size: 10pt;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.ship-body {
  display: grid;
  grid-template-columns: minmax(0, 75mm) 17mm;
  gap: 1.6mm;
  min-height: 0;
}

.ship-left {
  min-width: 0;
  display: grid;
  grid-template-rows: 35mm 11.5mm 1fr;
  gap: 1.7mm;
}

.address-box,
.recipient-box {
  border: 0.55mm solid #1f2937;
  overflow: hidden;
}

.address-box {
  padding: 2mm 2.2mm;
}

.address-box strong {
  display: block;
  max-height: 18mm;
  overflow: hidden;
  color: #263244;
  font-size: 10.2pt;
  line-height: 1.08;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.address-box span,
.address-box b {
  display: block;
  margin-top: 3mm;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #263244;
  font-size: 9.8pt;
  line-height: 1;
  font-weight: 900;
}

.recipient-box {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 2.2mm;
  color: #263244;
  font-size: 10.2pt;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ship-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21mm;
  gap: 1.6mm;
  align-items: start;
}

.ship-bottom strong,
.ship-bottom span,
.ship-bottom b,
.ship-bottom em {
  display: block;
  overflow: hidden;
  color: #263244;
  font-size: 9.4pt;
  line-height: 1.18;
  font-weight: 900;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ship-bottom b {
  margin-top: 1mm;
}

.ship-bottom em {
  margin-top: 1.6mm;
  font-size: 8.2pt;
}

.ship-branch {
  text-align: right;
  align-self: start;
}

.ship-side {
  min-width: 0;
  overflow: hidden;
  display: grid;
  align-items: center;
  justify-items: center;
}

.ship-side svg {
  width: 65mm;
  height: 16mm;
  transform: rotate(90deg);
  transform-origin: center;
}

@page {
  size: 100mm 100mm;
  margin: 0;
}

@media print {
  body {
    background: #fff;
  }

  .no-print {
    display: none !important;
  }
}

@media (max-width: 820px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  .admin-nav a {
    white-space: nowrap;
  }

  .stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .content-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .public-page {
    align-items: flex-start;
    padding: 12px;
  }

  .public-panel {
    padding: 16px;
  }

  .section-title {
    font-size: 20px;
  }

  .input,
  .textarea,
  .select,
  .button {
    min-height: 50px;
    font-size: 16px;
  }

  .item-head {
    flex-direction: column;
  }
}

/* Refined product UI */
:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d7e0ea;
  --primary: #157456;
  --primary-dark: #0f5d45;
  --accent: #234f91;
  --ink: #111827;
  --warn: #9a6b14;
  --danger: #b9382f;
  --success: #13724f;
  --shadow: 0 18px 42px rgba(24, 39, 75, 0.12);
  --soft-shadow: 0 8px 20px rgba(24, 39, 75, 0.08);
}

body {
  background:
    linear-gradient(180deg, #eef3f8 0%, #f7f9fc 46%, #eef3f8 100%);
}

.public-page {
  align-items: flex-start;
  padding: 18px 14px 30px;
}

.public-shell {
  max-width: 540px;
}

.mobile-hero {
  padding: 18px 2px 14px;
}

.brand-mark {
  margin-bottom: 18px;
}

.brand-logo {
  border-radius: 8px;
  background: #172033;
  box-shadow: var(--soft-shadow);
}

.brand-copy strong {
  font-size: 19px;
}

.hero-copy {
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.08;
}

.hero-copy p {
  margin: 10px 0 0;
  color: #4b5565;
  font-size: 15px;
  line-height: 1.45;
}

.step-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.step-strip span {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.step-strip b {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #172033;
  color: #fff;
  font-size: 12px;
}

.panel {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-panel {
  padding: 18px;
  border: 0;
}

.field {
  margin-bottom: 16px;
}

.field label {
  color: #243044;
  font-size: 13px;
}

.input,
.textarea,
.select {
  min-height: 52px;
  border-color: #cad5e2;
  border-radius: 8px;
  background: #fbfdff;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(21, 116, 86, 0.12);
}

.button {
  min-height: 46px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(21, 116, 86, 0.16);
}

.button.secondary {
  box-shadow: none;
}

.button.danger {
  box-shadow: none;
}

.status-box {
  border-radius: 8px;
}

.item-card {
  border-radius: 8px;
  background: #f8fbff;
}

.promo {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--soft-shadow);
}

.admin-body {
  background: #eef2f6;
}

.admin-topbar {
  padding: 16px 24px;
  background: #172033;
  color: #fff;
  border-bottom: 0;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.16);
}

.admin-topbar p {
  color: #c7d2e1;
}

.admin-topbar .button.secondary {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.admin-wrap {
  width: min(1320px, calc(100% - 32px));
  margin-top: 20px;
}

.admin-grid {
  grid-template-columns: 250px 1fr;
}

.admin-nav {
  position: sticky;
  top: 84px;
  border: 0;
  background: #172033;
  color: #fff;
}

.admin-nav a {
  color: #c7d2e1;
}

.admin-nav a.active,
.admin-nav a:hover {
  background: #ffffff;
  color: #172033;
}

.content-panel {
  border: 0;
  box-shadow: var(--shadow);
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-stats .stat {
  display: block;
  text-decoration: none;
  border-left: 7px solid #9aa8b6;
}

.status-stats .stat-waiting {
  border-left-color: #9aa8b6;
}

.status-stats .stat-processing {
  border-left-color: #2563eb;
}

.status-stats .stat-printed {
  border-left-color: #159a63;
}

.status-stats .stat-trash {
  border-left-color: #b9382f;
}

.stat {
  border: 0;
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
}

.stat strong {
  color: #172033;
}

.hero-head {
  padding: 2px 2px 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px auto;
  gap: 10px;
  width: min(620px, 100%);
}

.filter-bar.single {
  grid-template-columns: minmax(220px, 1fr) auto;
  width: min(520px, 100%);
}

.order-stack {
  display: grid;
  gap: 14px;
}

.order-card-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  padding: 16px;
  border: 1px solid #dde6ef;
  border-left: 7px solid #9aa8b6;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.order-card-row.state-waiting {
  border-left-color: #9aa8b6;
}

.order-card-row.state-picking {
  border-left-color: #2563eb;
  background: #fbfdff;
}

.order-card-row.state-printed {
  border-left-color: #159a63;
  background: #fbfffd;
}

.order-card-row.state-trash {
  border-left-color: #b9382f;
  background: #fffafa;
}

.order-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.order-number {
  font-size: 22px;
  font-weight: 900;
  color: #172033;
}

.order-subline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.badge.success {
  background: #e8f6ef;
  color: var(--success);
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 4px;
}

.meta-strip span {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f0f4f8;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.product-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff !important;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  font-style: normal;
}

.chip-kt {
  background: #7c3aed !important;
}

.chip-ivedik {
  background: #e06c00 !important;
}

.chip-other {
  background: #334155 !important;
}

.submission-time {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.submission-item {
  margin: 8px 0 12px;
}

.upload-item-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 230px);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid #e1e9f2;
  border-radius: 8px;
  background: #fbfdff;
}

.upload-item-copy {
  min-width: 0;
}

.upload-item-copy > strong {
  display: block;
  color: #172033;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.upload-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-media {
  justify-content: flex-end;
  margin-top: 0;
}

.upload-empty-image {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 1px dashed #bdc8d5;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ty-product-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.ty-product {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e3eaf2;
  border-radius: 8px;
  background: #fff;
}

.ty-product-image {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf2f7;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.ty-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ty-product-image.placeholder {
  border: 1px dashed #bdc8d5;
}

.ty-product-info strong {
  display: block;
  color: #172033;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ty-product-info span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legend-card {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #dbe5f1;
  font-size: 12px;
}

.legend-card strong {
  display: block;
  margin: 8px 0 7px;
  color: #fff;
  font-size: 12px;
}

.legend-card strong:first-child {
  margin-top: 0;
}

.legend-card span {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
}

.dot-waiting {
  background: #9aa8b6;
}

.dot-picking {
  background: #2563eb;
}

.dot-printed {
  background: #159a63;
}

.order-actions-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #f7f9fc;
}

.mini-label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.switch-grid {
  display: grid;
  gap: 8px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  font-size: 13px;
}

.switch-row input {
  width: 18px;
  height: 18px;
}

.sync-panel {
  position: fixed;
  top: 72px;
  left: 12px;
  z-index: 30;
  width: min(420px, calc(100% - 24px));
}

@media (max-width: 980px) {
  .order-card-row {
    grid-template-columns: 1fr;
  }

  .upload-item-card {
    grid-template-columns: 1fr;
  }

  .upload-media {
    justify-content: flex-start;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .admin-nav {
    position: static;
    background: #fff;
    color: var(--text);
  }

  .admin-nav a {
    color: var(--muted);
  }

  .admin-nav a.active,
  .admin-nav a:hover {
    background: #edf4ff;
    color: var(--accent);
  }
}

@media (max-width: 560px) {
  .hero-copy h1 {
    font-size: 26px;
  }

  .step-strip {
    grid-template-columns: 1fr;
  }

  .step-strip span {
    min-height: 36px;
  }

  .public-panel {
    padding: 15px;
  }

  .order-title-row {
    flex-direction: column;
  }

  .badge-row {
    justify-content: flex-start;
  }

  .admin-wrap {
    width: min(100% - 20px, 1320px);
  }
}

/* ============================================================
   v2 - Genis Trendyol benzeri panel, anlik yenileme ve
   belirgin UDF reklam bandi. (Onceki tum stilleri ezer.)
   ============================================================ */

/* --- Genislik: gercek bir admin paneli kadar genis --- */
.admin-wrap {
  width: min(1840px, calc(100% - 28px));
  margin: 16px auto 48px;
}

.admin-topbar {
  padding: 14px 30px;
}

/* --- Sabit senkron arac cubugu: belirgin Yenile butonu --- */
.sync-toolbar {
  position: sticky;
  top: 64px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  box-shadow: var(--soft-shadow);
}

.sync-toolbar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sync-toolbar-info strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.sync-toolbar-info small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.sync-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: syncPulse 2s infinite;
  flex: 0 0 auto;
}

@keyframes syncPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.sync-toolbar-action {
  margin: 0;
}

.refresh-button {
  min-height: 46px;
  padding: 10px 22px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.2px;
  background: linear-gradient(135deg, #1f6feb 0%, #155fc7 100%);
  border: 0;
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.32);
}

.refresh-button:hover {
  background: linear-gradient(135deg, #1a63d6 0%, #114fa8 100%);
  transform: translateY(-1px);
}

.refresh-icon {
  font-size: 19px;
  line-height: 1;
  display: inline-block;
  transition: transform 0.5s ease;
}

.refresh-button:hover .refresh-icon {
  transform: rotate(180deg);
}

/* --- Yatay sekme cubugu (1. gorseldeki konsept) --- */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
  padding: 6px;
  border-radius: 10px;
  background: #172033;
  box-shadow: var(--soft-shadow);
}

.tab-bar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  color: #c7d2e1;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab-bar a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.tab-bar a.active {
  background: #ffffff;
  color: #172033;
}

.tab-bar a b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.tab-bar a.active b {
  background: #1f6feb;
  color: #fff;
}

/* --- Renk aciklamasi seridi (yatay, acik) --- */
.legend-strip {
  margin-bottom: 12px;
}

.legend-strip .legend-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e9f1;
  color: var(--muted);
  box-shadow: var(--soft-shadow);
}

.legend-strip .legend-card strong {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.legend-strip .legend-card span {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #475467;
}

/* --- Ozet kartlari (kompakt) --- */
.status-stats {
  margin-bottom: 12px;
}

/* --- Genis veri tablosu --- */
.content-panel {
  padding: 16px;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e3e9f1;
  border-radius: 10px;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.orders-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 11px 14px;
  background: #f4f7fb;
  border-bottom: 1px solid #e3e9f1;
  color: #475467;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.orders-table tbody td {
  padding: 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.orders-table tbody tr:last-child td {
  border-bottom: 0;
}

.orders-table .col-order { width: 200px; }
.orders-table .col-recipient { width: 160px; }
.orders-table .col-cargo { width: 170px; }
.orders-table .col-status { width: 170px; }
.orders-table .col-actions { width: 190px; }
.orders-table .col-info { min-width: 320px; }

.order-row {
  border-left: 6px solid #9aa8b6;
  transition: background 0.12s;
}

.order-row:hover {
  background: #fafcff;
}

.order-row.state-waiting { border-left-color: #9aa8b6; }
.order-row.state-picking { border-left-color: #2563eb; }
.order-row.state-printed { border-left-color: #159a63; }
.order-row.state-trash { border-left-color: #b9382f; }

.cell-order-no {
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.2px;
}

.cell-line {
  margin-top: 4px;
  font-size: 12.5px;
  color: #344054;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.cell-line.muted { color: var(--muted); font-weight: 700; }
.cell-line.danger-text { color: var(--danger); font-weight: 800; }

.cell-recipient-name {
  font-weight: 800;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.cargo-provider {
  font-weight: 800;
  color: var(--ink);
}

.col-info .meta-strip {
  margin: 0 0 8px;
}

.col-info .ty-product-list,
.col-info .submission-time,
.col-info .submission-item {
  margin-top: 8px;
}

/* tablo icindeki gorseller kompakt */
.orders-table .thumb { width: 92px; padding: 4px; }
.orders-table .thumb img { height: 72px; }
.orders-table .upload-item-card { grid-template-columns: minmax(0, 1fr) minmax(110px, 200px); }

/* islem butonlari kompakt sutun */
.col-actions {
  white-space: normal;
}

.col-actions form {
  margin: 0 0 8px;
}

.col-actions form:last-child {
  margin-bottom: 0;
}

.col-actions .button {
  width: 100%;
  min-height: 38px;
  margin-bottom: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.col-actions .button:last-child {
  margin-bottom: 0;
}

/* --- Mobil: tabloyu kart yiginina cevir --- */
@media (max-width: 1100px) {
  .orders-table thead { display: none; }
  .orders-table,
  .orders-table tbody,
  .orders-table tr,
  .orders-table td { display: block; width: 100% !important; }

  .orders-table tr {
    margin: 0 0 12px;
    border: 1px solid #e3e9f1;
    border-left-width: 6px;
    border-radius: 10px;
    overflow: hidden;
  }

  .orders-table tbody td {
    border-bottom: 1px solid #f0f3f8;
    padding: 12px 14px;
  }

  .orders-table tbody td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.4px;
  }

  .orders-table .col-info { min-width: 0; }
}

@media (max-width: 720px) {
  .sync-toolbar { position: static; }
  .sync-toolbar-action,
  .refresh-button { width: 100%; }
  .tab-bar { overflow-x: auto; flex-wrap: nowrap; }
}

/* ============================================================
   Belirgin, dikkat cekici UDF reklam bandi (musteri sayfasi)
   ============================================================ */
.promo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(120deg, #7c3aed 0%, #4f46e5 52%, #2563eb 100%);
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(79, 70, 229, 0.34);
  transition: transform 0.18s, box-shadow 0.18s;
}

.promo::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 68%);
  pointer-events: none;
}

.promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(79, 70, 229, 0.42);
}

.promo > div {
  position: relative;
  z-index: 1;
}

.promo strong {
  display: block;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.promo > div span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
  font-weight: 600;
}

.promo > span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-size: 12.5px;
  font-weight: 900;
  white-space: nowrap;
  animation: promoGlow 2.6s ease-in-out infinite;
}

.promo > span::after {
  content: "\2197";
  font-size: 14px;
  font-weight: 900;
}

@keyframes promoGlow {
  0%, 100% { background: rgba(255, 255, 255, 0.18); }
  50% { background: rgba(255, 255, 255, 0.34); }
}

@media (max-width: 480px) {
  .promo { flex-direction: column; align-items: flex-start; gap: 12px; }
  .promo > span { align-self: stretch; justify-content: center; }
}

/* ============================================================
   v3 - Kopyala butonu, gercek urun gorseli, Tamamlananlar,
   sadelestirme ve daha belirgin UDF DOSYA ACMA bandi.
   ============================================================ */

/* --- Aciklama/Isim not kutusu + Kopyala butonu --- */
.note-box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.note-box-text {
  min-width: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #e0c878;
  border-radius: 999px;
  background: #fff;
  color: #8a6d1f;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.copy-btn::before {
  content: "\29C9";
  font-size: 13px;
}

.copy-btn:hover {
  background: #8a6d1f;
  border-color: #8a6d1f;
  color: #fff;
}

.copy-btn.copied {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.copy-btn.copied::before {
  content: "\2713";
}

/* --- Gercek urun gorseli (placeholder yerine) --- */
.orders-table .ty-product {
  grid-template-columns: 64px 1fr;
}

.orders-table .ty-product-image {
  width: 64px;
  height: 64px;
  border: 1px solid #e3eaf2;
}

.ty-product-image.placeholder {
  background: #f1f5f9;
  color: #7c8aa0;
  font-weight: 900;
}

/* --- Tamamlananlar rozeti --- */
.badge.success {
  background: #e7f7ee;
  color: #157347;
}

/* --- Sadelestirme: ferah tablo, daha az gurultu --- */
.legend-strip .legend-card {
  padding: 8px 14px;
  gap: 6px 16px;
  font-size: 11.5px;
  background: #f8fafc;
  box-shadow: none;
}

.legend-strip .legend-card .product-chip {
  min-width: 26px;
  min-height: 22px;
  padding: 3px 6px;
}

/* --- Acilir renk & varyant rehberi (varsayilan kapali, profesyonel) --- */
.legend-strip .legend-card.legend-collapsible {
  display: block;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.legend-collapsible > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #475467;
  transition: background .14s ease;
}
.legend-collapsible > summary::-webkit-details-marker { display: none; }
.legend-collapsible > summary:hover { background: #f1f5f9; }
.legend-dots { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.legend-dots .legend-dot { width: 11px; height: 11px; }
.legend-summary-text { color: var(--ink); }
.legend-count-pill {
  background: #eef2f7;
  color: #475467;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
}
.legend-chevron { margin-left: auto; color: #98a2b3; transition: transform .18s ease; }
.legend-collapsible[open] > summary .legend-chevron { transform: rotate(180deg); }
.legend-body {
  padding: 6px 14px 13px;
  border-top: 1px solid #eef2f7;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.legend-group-title {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #98a2b3;
  margin-bottom: 8px;
}
.legend-items { display: flex; flex-wrap: wrap; gap: 7px 18px; }
.legend-items span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #475467; }
.legend-variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 132px;
  overflow-y: auto;
}
.legend-var {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e8eef4;
  border-radius: 8px;
  padding: 4px 9px 4px 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475467;
}
.legend-var-code { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend-empty { color: #98a2b3; font-size: 12px; }

.orders-table tbody td { padding: 13px 14px; }
.content-head.hero-head { margin-bottom: 12px; }

/* tablo icindeki kisisellestirme kartlari biraz daha sik */
.orders-table .upload-item-card { padding: 9px; gap: 10px; }
.orders-table .submission-time { margin-top: 6px; }

/* --- UDF DOSYA ACMA bandi: daha belirgin --- */
.promo {
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(120deg, #7c3aed 0%, #4f46e5 50%, #2563eb 100%);
  box-shadow: 0 18px 38px rgba(79, 70, 229, 0.4);
}

.promo::after {
  content: "";
  position: absolute;
  left: -30px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

.promo strong {
  font-size: 20px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.promo > div span {
  font-size: 14px;
  font-weight: 700;
}

.promo > span {
  padding: 11px 20px;
  font-size: 13.5px;
  letter-spacing: 0.3px;
}

/* ============================================================
   v4 - Gercek Trendyol panel hissi: acik sekme cubugu, toplu
   secim, urun gorseli+adet rozeti, kargo/fiyat/fatura kolonlari.
   ============================================================ */

/* --- Acik sekme cubugu (Trendyol stili, turuncu aktif alt cizgi) --- */
.tab-bar {
  background: #ffffff;
  border: 1px solid #e3e9f1;
  border-radius: 10px;
  padding: 0 8px;
  gap: 2px;
  box-shadow: var(--soft-shadow);
}
.tab-bar a {
  color: #5b6675;
  border-radius: 0;
  padding: 14px 16px;
  border-bottom: 3px solid transparent;
}
.tab-bar a:hover { background: transparent; color: #172033; }
.tab-bar a.active { background: transparent; color: #e8742c; border-bottom-color: #e8742c; }
.tab-bar a b { background: #eef2f7; color: #5b6675; }
.tab-bar a.active b { background: #e8742c; color: #fff; }

/* --- Toplu islem cubugu --- */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e3e9f1;
  border-radius: 10px;
  box-shadow: var(--soft-shadow);
}
.bulk-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13px;
  color: #344054;
  cursor: pointer;
}
.bulk-count { font-size: 12px; font-weight: 800; color: #667085; }
.bulk-spacer { flex: 1 1 auto; }
.bulk-bar .button { min-height: 38px; padding: 8px 14px; }
.bulk-bar input[type="checkbox"],
.row-check,
.col-check input,
.select-all { width: 18px; height: 18px; cursor: pointer; accent-color: #1f6feb; }

/* --- Genis Trendyol tablosu --- */
.ty-table { min-width: 1180px; }
.ty-table thead th { background: #f6f8fb; }
.ty-table .col-check { width: 42px; text-align: center; }
.ty-table .col-order { width: 212px; }
.ty-table .col-recipient { width: 150px; }
.ty-table .col-info { min-width: 300px; }
.ty-table .col-price { width: 102px; }
.ty-table .col-cargo { width: 172px; }
.ty-table .col-invoice { width: 132px; }
.ty-table .col-status { width: 206px; }
.ty-table tbody td { vertical-align: top; }
.ty-table .col-check { text-align: center; }

/* --- Siparis bilgileri hucresi --- */
.cell-order-no {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 900;
  color: #1f2a44;
}
.pkg-ico { font-size: 14px; }
.copy-icon {
  min-height: 22px;
  width: 24px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #e3e9f1;
  background: #fff;
  color: #667085;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.copy-icon::before { content: none; }
.copy-icon:hover { background: #eef2f7; color: #1f2a44; }
.copy-icon.copied { background: #16a34a; border-color: #16a34a; color: #fff; }

/* --- Alici hucresi --- */
.cell-recipient-name {
  display: flex;
  align-items: center;
  font-weight: 800;
  color: #1f2a44;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.star-ico { color: #f4b740; margin-right: 5px; flex: 0 0 auto; }

/* --- Bilgiler hucresi: urun + adet rozeti --- */
.ty-info-list { display: grid; gap: 10px; }
.ty-info-row { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: start; }
.ty-info-thumb {
  position: relative;
  width: 62px;
  height: 62px;
  border: 1px solid #e3eaf2;
  border-radius: 8px;
  overflow: visible;
  background: #f1f5f9;
}
.ty-info-thumb a, .ty-info-thumb img {
  width: 62px;
  height: 62px;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}
.ty-info-thumb-ph {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  font-weight: 900; color: #7c8aa0; font-size: 13px;
}
.qty-badge {
  position: absolute;
  top: -7px;
  left: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  z-index: 2;
}
.ty-info-name {
  font-weight: 800;
  color: #1f6feb;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.ty-info-line { margin-top: 3px; font-size: 12px; color: #475467; }

/* --- Birim fiyat --- */
.cell-price { font-weight: 800; color: #1f2a44; font-size: 14px; margin-bottom: 4px; }

/* --- Kargo bloku (Trendyol Express gorunumu) --- */
.cargo-box { display: grid; gap: 3px; }
.cargo-logo { font-weight: 900; font-size: 15px; color: #f27a1a; line-height: 1.05; letter-spacing: -0.3px; }
.cargo-logo b { color: #1f2a44; font-weight: 800; }
.cargo-track { font-size: 12.5px; font-weight: 800; color: #1f2a44; overflow-wrap: anywhere; }
.cargo-provider-sub { font-size: 11.5px; color: #8a93a3; }

/* --- Fatura --- */
.invoice-label { font-size: 11px; color: #8a93a3; font-weight: 700; }
.invoice-amount { font-weight: 900; color: #1f2a44; font-size: 14px; margin-top: 2px; }

/* --- Durum kolonu: rozetler + islem butonlari --- */
.ty-table .col-status .badge-row { margin-bottom: 8px; }
.ty-table .col-status form { margin: 0; }
.ty-table .col-status .button {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.ty-table .col-status .button:last-child { margin-bottom: 0; }

/* --- Musteri kisisellestirme bloku (Bilgiler icinde) --- */
.personal-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #dbe4ee; }
.personal-head {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #8a93a3;
  margin-bottom: 7px;
}
.personal-item { margin-bottom: 8px; }
.personal-item:last-child { margin-bottom: 0; }
.ty-table .thumb { width: 84px; padding: 4px; }
.ty-table .thumb img { height: 66px; }

/* --- Mobil: tabloyu kart yiginina cevir (min-width sifirla) --- */
@media (max-width: 1100px) {
  .ty-table { min-width: 0; }
  .ty-table .col-check { text-align: left; }
}

/* ============================================================
   v5 - Profesyonel Trendyol panel kalitesi (referansa birebir)
   Tipografi, renk uyumu, ikonlar ve bosluklar netlestirildi.
   ============================================================ */

:root {
  --ty-orange: #f27a1a;
  --ty-blue: #1c7ad4;
  --ty-text: #2b2f36;
  --ty-muted: #7a828d;
  --ty-line: #e9edf2;
  --ty-head: #f6f7f9;
}

body, .admin-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Tablo cercevesi --- */
.table-scroll { border: 1px solid var(--ty-line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,0.04); }
.ty-table { font-size: 13px; color: var(--ty-text); }
.ty-table thead th {
  background: var(--ty-head);
  color: #4a515b;
  font-size: 12.5px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ty-line);
}
.ty-table tbody td { padding: 16px; border-bottom: 1px solid var(--ty-line); }
.ty-table tbody tr:hover { background: #fbfcfe; }
.ty-table .order-row { border-left: 0; }

/* --- Siparis Bilgileri --- */
.cell-order-no { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--ty-text); }
.pkg-ico { font-size: 15px; filter: saturate(1.3); }
.order-no-text { color: var(--ty-text); }
.copy-icon {
  width: 22px; height: 22px; min-height: 22px; padding: 0;
  border: 1px solid var(--ty-line); border-radius: 6px; background: #fff;
  color: #16a34a; font-size: 12px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.copy-icon:hover { background: #f0fdf4; border-color: #bbf7d0; }
.copy-icon.copied { background: #16a34a; border-color: #16a34a; color: #fff; }
.cell-line { margin-top: 5px; font-size: 12.5px; color: var(--ty-muted); line-height: 1.45; overflow-wrap: anywhere; }
.cell-line.muted { color: var(--ty-muted); font-weight: 500; }
.remaining-label { margin-top: 7px; color: var(--ty-muted); }
.remaining-value { font-size: 12.5px; font-weight: 800; color: var(--ty-blue); }

/* --- Alici --- */
.msg-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; margin-bottom: 7px;
  background: #e8f7ee; color: #137a43; border-radius: 6px;
  font-size: 12px; font-weight: 800;
}
.msg-ico { font-size: 12px; }
.cell-recipient-name { display: flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ty-text); font-size: 13px; }
.star-ico { color: #f5b513; }

/* --- Bilgiler: urun --- */
.ty-info-row { grid-template-columns: 66px 1fr; gap: 12px; }
.ty-info-thumb, .ty-info-thumb a, .ty-info-thumb img, .ty-info-thumb-ph { width: 66px; height: 66px; }
.ty-info-thumb { border: 1px solid #eceff3; border-radius: 6px; background: #f7f8fa; }
.ty-info-thumb img { object-fit: contain; background: #fff; }
.ty-info-thumb-ph { display: grid; place-items: center; font-weight: 800; color: #9aa3b0; font-size: 13px; }
.qty-badge { top: -8px; left: -8px; background: var(--ty-blue); box-shadow: 0 2px 5px rgba(28,122,212,0.4); }
.ty-info-name {
  font-weight: 700; color: var(--ty-blue); font-size: 13px; line-height: 1.35;
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
  cursor: default;
}
.ty-info-line { margin-top: 4px; font-size: 12.5px; color: var(--ty-muted); }

/* --- Birim Fiyat --- */
.cell-price { font-weight: 700; color: var(--ty-text); font-size: 14px; }

/* --- Kargo --- */
.cargo-box { display: grid; gap: 4px; line-height: 1.3; }
.cargo-logo { font-weight: 800; font-size: 15px; color: var(--ty-orange); letter-spacing: -0.4px; }
.cargo-logo b { color: var(--ty-orange); font-weight: 800; }
.cargo-track { font-size: 13px; font-weight: 800; color: var(--ty-text); }
.cargo-provider-sub { font-size: 12px; color: var(--ty-muted); }

/* --- Fatura --- */
.invoice-label { font-size: 12.5px; color: var(--ty-muted); }
.invoice-amount { font-weight: 800; color: var(--ty-text); font-size: 14px; margin: 2px 0 8px; }
.invoice-status { display: inline-flex; align-items: center; gap: 6px; color: #d92d20; font-size: 12.5px; font-weight: 700; }
.invoice-status .dot { width: 9px; height: 9px; border-radius: 999px; background: #d92d20; display: inline-block; }

/* --- Durum: islem butonlari (turuncu cizgili, referans gibi) --- */
.ty-table .col-status .badge-row { margin-bottom: 10px; }
.ty-table .col-status .button {
  width: 100%; min-height: 36px; padding: 8px 12px; font-size: 12.5px; font-weight: 800;
  margin-bottom: 8px; border-radius: 8px;
}
.ty-table .col-status .button:last-child { margin-bottom: 0; }
/* Ana etiket butonu: turuncu cizgili */
.ty-table .col-status .button:not(.secondary):not(.danger) {
  background: #fff; color: var(--ty-orange); border: 1px solid var(--ty-orange);
}
.ty-table .col-status .button:not(.secondary):not(.danger):hover {
  background: #fff6ef;
}
/* Isleme al: turuncu dolu */
.ty-table .col-status .button.secondary {
  background: var(--ty-orange); color: #fff; border: 1px solid var(--ty-orange);
}
.ty-table .col-status .button.secondary:hover { background: #e06f12; }
/* Sil: kirmizi cizgili sade */
.ty-table .col-status .button.danger {
  background: #fff; color: #d92d20; border: 1px solid #f3c6c2;
}
.ty-table .col-status .button.danger:hover { background: #fff5f4; border-color: #d92d20; }
/* PDF olustur: mavi cizgili sade */
.ty-table .col-status .button.pdf-download:not(.secondary):not(.danger) {
  background: #fff; color: var(--ty-blue); border: 1px solid #a7c7ed;
}
.ty-table .col-status .button.pdf-download:not(.secondary):not(.danger):hover { background: #f0f7ff; border-color: var(--ty-blue); }
.ty-table .col-status .button.pdf-download.pdf-created,
.button.pdf-download.pdf-created {
  background: #e8f7ee !important;
  color: #137a43 !important;
  border: 1px solid #16a34a !important;
}
.ty-table .col-status .button.pdf-download.pdf-created:hover,
.button.pdf-download.pdf-created:hover { background: #d8f1e3 !important; }

/* --- Badge sadelestirme --- */
.ty-table .badge {
  font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 6px;
  background: #eef1f5; color: #4a515b; border: 0;
}
.ty-table .badge.blue { background: #e7f1fb; color: #1c64ad; }
.ty-table .badge.success { background: #e8f7ee; color: #137a43; }
.ty-table .badge.warn { background: #fdf0e6; color: #b5630f; }

/* --- Musteri kisisellestirme bloku --- */
.personal-block { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--ty-line); }
.personal-head { font-size: 11px; font-weight: 800; letter-spacing: 0.4px; color: #137a43; text-transform: uppercase; margin-bottom: 8px; }

/* --- Toplu cubuk + sekme inceltme --- */
.bulk-bar { border-radius: 12px; }
.tab-bar { border-radius: 12px 12px 0 0; }

/* --- Icerik basligi --- */
.content-head h2 { font-size: 18px; font-weight: 800; color: var(--ty-text); }
.content-head.hero-head p { color: var(--ty-muted); font-size: 13px; }
.count-pill { background: #eef1f5; color: #4a515b; }

/* --- v5.1: Genel Bakis istatistik seridi --- */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--ty-line);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.stat-label { display: block; font-size: 12px; font-weight: 700; color: var(--ty-muted); }
.stat-value { display: block; margin-top: 4px; font-size: 20px; font-weight: 800; color: var(--ty-text); letter-spacing: -0.3px; }
.stat-value.blue { color: var(--ty-blue); }
.stat-value.green { color: #137a43; }
@media (max-width: 720px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }

/* --- v5.2: Basilan barkod etiketi YESIL gorunur --- */
.ty-table .col-status .button.label-printed,
.button.label-printed {
  background: #e8f7ee !important;
  color: #137a43 !important;
  border: 1px solid #16a34a !important;
  font-weight: 800;
}
.ty-table .col-status .button.label-printed:hover,
.button.label-printed:hover { background: #d8f1e3 !important; }

/* ============================================================
   v6 - Profesyonel cila + pembe durum satirlari + Mesajlar sekmesi
   (Tum onceki kurallari nazikce gozden gecirir; mantik degismez.)
   ============================================================ */

:root {
  --pink-soft: #fdeef5;       /* barkod basildi satir zemini */
  --pink-soft-2: #fbecf6;     /* (eski) pdf zemini */
  --pink-accent: #e07aae;     /* barkod kenar vurgusu */
  --pink-accent-2: #d36fb8;   /* (eski) pdf vurgusu */
  --pink-ink: #a83b78;        /* pembe metin tonu */
  --pink-line: #f4cfe2;
  /* PDF olusturuldu -> tatli yesil */
  --green-soft: #e9f8ef;      /* pdf olusturuldu satir zemini */
  --green-accent: #2bb673;    /* pdf kenar vurgusu */
  --green-ink: #137a43;       /* yesil metin tonu */
}

/* --- Barkod yazdirildiginda: siparis satiri yumusak pembe --- */
.ty-table tbody tr.order-row.state-printed > td {
  background: var(--pink-soft);
}
.ty-table tbody tr.order-row.state-printed > td.col-check {
  box-shadow: inset 4px 0 0 0 var(--pink-accent);
}
.ty-table tbody tr.order-row.state-printed:hover > td {
  background: #fbe3ee;
}

/* --- PDF olusturuldugunda: siparis satiri tatli yesil (pdf-done en son kazanir) --- */
.ty-table tbody tr.order-row.pdf-done > td {
  background: var(--green-soft);
}
.ty-table tbody tr.order-row.pdf-done > td.col-check {
  box-shadow: inset 4px 0 0 0 var(--green-accent);
}
.ty-table tbody tr.order-row.pdf-done:hover > td {
  background: #ddf3e6;
}

/* Barkod + PDF birlikte ise: PDF yesili kenar vurgusunu kazanir */
.ty-table tbody tr.order-row.state-printed.pdf-done > td.col-check {
  box-shadow: inset 4px 0 0 0 var(--green-accent);
}

/* --- MUSTERI IPTALI: satir sari, uzerinde seffaf "iptal edildi" yazisi --- */
/* Iptal her durumun (pembe/yesil) onunde gelir: tum hucreler sari boyanir. */
.ty-table tbody tr.order-row.state-cancelled > td,
.ty-table tbody tr.order-row.state-cancelled.pdf-done > td,
.ty-table tbody tr.order-row.state-cancelled.state-printed > td {
  background: #fff3bf !important;       /* sari zemin */
}
.ty-table tbody tr.order-row.state-cancelled:hover > td {
  background: #ffec99 !important;
}
.ty-table tbody tr.order-row.state-cancelled > td.col-check {
  box-shadow: inset 4px 0 0 0 #e0a800 !important;  /* koyu sari kenar vurgusu */
}
/* Seffaf uyari serdi TUM satiri kaplar: tr konumlandirma referansidir, sol
   hucredeki overlay inset:0 ile satir boyunca yayilir. (col-order'a position
   VERMIYORUZ; verirsek overlay yalnizca o hucreyle sinirli kalir.) */
.ty-table tbody tr.order-row.state-cancelled { position: relative; }
.cancel-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;            /* altindaki butonlar/linkler tiklanabilir kalir */
  background: rgba(255, 193, 7, 0.22);
  color: #8a5a00;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .4px;
  text-transform: uppercase;
  text-align: center;
  padding: 4px 10px;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
}

/* Durum hucresindeki net "Iptal edildi" rozeti */
.badge.cancel {
  background: #fff3bf;
  color: #8a5a00;
  border: 1px solid #e0a800;
  font-weight: 800;
}

/* Barkod basildi butonu da pembe (satirla uyumlu, goz yormayan) */
.ty-table .col-status .button.label-printed,
.button.label-printed {
  background: var(--pink-soft) !important;
  color: var(--pink-ink) !important;
  border: 1px solid var(--pink-accent) !important;
  font-weight: 800;
}
.ty-table .col-status .button.label-printed:hover,
.button.label-printed:hover { background: #fadbe9 !important; }

/* PDF olusturuldu butonu tatli yesil */
.ty-table .col-status .button.pdf-download.pdf-created,
.button.pdf-download.pdf-created {
  background: var(--green-soft) !important;
  color: var(--green-ink) !important;
  border: 1px solid var(--green-accent) !important;
}
.ty-table .col-status .button.pdf-download.pdf-created:hover,
.button.pdf-download.pdf-created:hover { background: #d4efdf !important; }

/* Lejant noktasi: barkod basildi -> pembe */
.legend-dot.dot-printed { background: var(--pink-accent) !important; }

/* --- Genel profesyonel cila --- */
.admin-wrap { padding-top: 18px; padding-bottom: 40px; }
.stat-card { transition: box-shadow .15s ease, transform .15s ease; }
.stat-card:hover { box-shadow: 0 6px 18px rgba(16,24,40,0.08); transform: translateY(-1px); }
.ty-table thead th { position: sticky; top: 0; z-index: 2; }
.ty-table tbody tr { transition: background .12s ease; }
.button { transition: background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .05s ease; }
.button:active { transform: translateY(1px); }
.count-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 800; vertical-align: middle;
}

/* Sekme cubugu: aktif sekme daha belirgin */
.tab-bar a { transition: color .14s ease, border-color .14s ease, background .14s ease; }
.tab-bar a.active { font-weight: 800; }

/* ============================================================
   Mesajlar sekmesi
   ============================================================ */
.msg-meta-row { margin: -4px 0 14px; font-size: 12.5px; }
.msg-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1000px) { .msg-grid { grid-template-columns: 1fr; } }

.msg-col { min-width: 0; }
.msg-col-title {
  font-size: 15px; font-weight: 800; color: var(--ty-text);
  margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
}
.msg-subhead {
  font-size: 11.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
  color: var(--ty-muted); margin: 16px 0 8px;
}
.msg-subhead:first-of-type { margin-top: 4px; }

.msg-card {
  background: #fff; border: 1px solid var(--ty-line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.question-card { border-left: 4px solid var(--ty-orange); }
.note-card { border-left: 4px solid var(--ty-blue); }
.msg-card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.msg-order-no { font-weight: 800; color: var(--ty-text); font-size: 14px; }
.msg-card-body { font-size: 13px; color: var(--ty-text); line-height: 1.5; }
.q-product {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  padding-bottom: 8px; border-bottom: 1px dashed var(--ty-line);
}
.q-product img { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--ty-line); border-radius: 6px; background: #fff; }
.q-product span { font-size: 12.5px; color: var(--ty-muted); font-weight: 600; }
.q-text { font-weight: 600; color: var(--ty-text); }
.q-answer {
  margin-top: 10px; padding: 10px 12px; border-radius: 8px;
  background: #f1f8f3; color: #137a43; font-size: 12.5px; line-height: 1.5;
}
/* Soru -> siparis gorsel kontrolu (yesil/kirmizi tik) */
.ord-checks { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.ord-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 8px; }
.ord-yes { background: #e8f7ee; color: #137a43; }
.ord-no { background: #fde7e6; color: #c0392b; }
.ord-none { background: #eef1f5; color: #5b6675; }

/* Abonelik ozet kutulari */
.sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sub-box { background: #f7f8fa; border: 1px solid var(--ty-line); border-radius: 10px; padding: 12px 14px; }
.sub-label { display: block; font-size: 11.5px; font-weight: 700; color: var(--ty-muted); }
.sub-value { display: block; margin-top: 4px; font-size: 18px; font-weight: 800; color: var(--ty-text); }
.sub-value.danger { color: #c0392b; }

/* Yukleme HATA uyarisi (musteri yuklemeye calisti, hata aldi) */
.upload-fail-notice {
  margin: 8px 0; padding: 8px 11px; border-radius: 8px;
  background: #fde7e6; color: #b42318; border-left: 3px solid #dc2626;
  font-size: 12px; font-weight: 700; line-height: 1.45;
}

.q-answer-form { margin-top: 12px; display: grid; gap: 8px; }
.q-answer-form textarea { width: 100%; resize: vertical; min-height: 64px; }
.note-line { margin-top: 4px; }
.note-line b { color: var(--ty-muted); font-weight: 700; }
.msg-card-foot { margin-top: 10px; }
.button.small { min-height: 30px; padding: 5px 12px; font-size: 12px; width: auto; display: inline-flex; align-items: center; }

/* ============================================================
   v7 - Profesyonel yan menulu (sidebar) yerlesim + ferah duzen
   Calisma mantigi degismez; yalnizca gorunum ve yerlesim.
   ============================================================ */

:root {
  --sb-bg: #15202b;
  --sb-bg-2: #1b2735;
  --sb-text: #aeb9c7;
  --sb-text-dim: #6b7785;
  --sb-active: #f27a1a;
  --shell-bg: #eef2f7;
  --card-radius: 14px;
}

.admin-body {
  margin: 0;
  background: var(--shell-bg);
  color: var(--ty-text);
}

/* --- Yerlesim iskeleti --- */
.admin-layout {
  display: grid;
  grid-template-columns: 252px 1fr;
  min-height: 100vh;
}

/* --- Yan menu --- */
.admin-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: linear-gradient(180deg, var(--sb-bg), var(--sb-bg-2));
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  gap: 8px;
  z-index: 40;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 6px;
}
.sidebar-logo {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--sb-active), #ff9f4d);
  color: #fff; font-weight: 900; font-size: 20px;
  box-shadow: 0 6px 16px rgba(242,122,26,0.35);
}
.sidebar-brand-text strong { display: block; color: #fff; font-size: 15px; font-weight: 800; letter-spacing: -0.2px; }
.sidebar-brand-text small { display: block; color: var(--sb-text-dim); font-size: 11.5px; margin-top: 1px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; }
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--sb-text);
  text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  transition: background .14s ease, color .14s ease;
}
.side-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-link.active { background: rgba(242,122,26,0.16); color: #fff; box-shadow: inset 3px 0 0 0 var(--sb-active); }
.side-ico { font-size: 16px; width: 20px; text-align: center; filter: grayscale(0.1); }
.side-text { flex: 1; }
.side-badge {
  background: var(--sb-active); color: #fff;
  font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}
.side-link.active .side-badge { background: #fff; color: var(--sb-active); }

/* İşleme Alınanlar rozeti: dikkat çeken yumuşak nabız animasyonu */
.side-badge-pulse { background: #f59e0b; animation: sideBadgePulse 1.8s ease-in-out infinite; }
.side-link.active .side-badge-pulse { background: #fff; color: #d97706; }
@keyframes sideBadgePulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,0.55); transform: scale(1); }
  70%  { box-shadow: 0 0 0 7px rgba(245,158,11,0); transform: scale(1.08); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .side-badge-pulse { animation: none; } }

/* Siparisler (yeni) rozeti: yesil nabiz — yeni siparis/para gelisini vurgular */
.side-badge-pulse-new { background: #21865f; animation: sideBadgePulseNew 1.8s ease-in-out infinite; }
.side-link.active .side-badge-pulse-new { background: #fff; color: #176b4b; }
@keyframes sideBadgePulseNew {
  0%   { box-shadow: 0 0 0 0 rgba(33,134,95,0.55); transform: scale(1); }
  70%  { box-shadow: 0 0 0 7px rgba(33,134,95,0); transform: scale(1.08); }
  100% { box-shadow: 0 0 0 0 rgba(33,134,95,0); transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .side-badge-pulse-new { animation: none; } }

.sidebar-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.07); display: flex; flex-direction: column; gap: 2px; }
.side-foot-link {
  padding: 9px 13px; border-radius: 9px;
  color: var(--sb-text); text-decoration: none; font-size: 12.5px; font-weight: 600;
  transition: background .14s ease, color .14s ease;
}
.side-foot-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-foot-link.logout:hover { background: rgba(217,45,32,0.2); color: #ffb4ad; }

/* --- Ana alan --- */
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.main-topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--ty-line);
}
.main-topbar-title h1 { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -0.3px; color: var(--ty-text); }
.main-topbar-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--ty-muted); }
.topbar-sync { margin: 0; }
.main-content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 18px; }
.main-content > * { margin: 0; }

/* --- Stat seridi: daha ferah --- */
.stats-strip { gap: 14px; margin: 0; }
.stat-card { padding: 16px 18px; border-radius: var(--card-radius); }
.stat-value { font-size: 22px; }

/* --- Icerik paneli: ferah beyaz kart --- */
.content-panel {
  background: #fff;
  border: 1px solid var(--ty-line);
  border-radius: var(--card-radius);
  padding: 24px;
  box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}
.content-head, .content-head.hero-head { margin-bottom: 18px; gap: 16px; }
.content-head h2 { font-size: 19px; }

/* --- Sidebar mobil --- */
.sidebar-toggle {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 60;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--ty-line); background: #fff; color: var(--ty-text);
  font-size: 18px; cursor: pointer; box-shadow: 0 4px 12px rgba(16,24,40,0.12);
}
.sidebar-backdrop { display: none; }

@media (max-width: 980px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar-toggle { display: block; }
  .admin-sidebar {
    position: fixed; top: 0; left: 0; width: 264px; height: 100vh;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.4);
  }
  body.sidebar-open .admin-sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(8,12,18,0.5);
  }
  .main-topbar { padding-left: 66px; }
  .main-content { padding: 18px 16px 40px; }
  .content-panel { padding: 16px; }
}

/* ============================================================
   Mesajlar: arac cubugu, sayfalama, kart kolonu
   ============================================================ */
.msg-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-sort-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.msg-sort-label { font-size: 12.5px; color: var(--ty-muted); font-weight: 600; }
.msg-sort-form .select { min-width: 190px; }
.msg-refresh-form { margin: 0; }

.msg-grid { gap: 22px; }
.msg-col.panel-card {
  background: #fff; border: 1px solid var(--ty-line); border-radius: var(--card-radius);
  padding: 20px; box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}
.msg-col-title { font-size: 14px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--ty-line); }
.msg-card { margin-bottom: 14px; }
.msg-card:last-of-type { margin-bottom: 0; }

/* Numarali sayfalama */
.msg-pager { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager-btn {
  min-width: 34px; height: 34px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--ty-line); border-radius: 9px; background: #fff;
  color: var(--ty-text); font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.pager-btn:hover { background: #fff6ef; border-color: var(--ty-orange); color: var(--ty-orange); }
.pager-btn.active { background: var(--ty-orange); border-color: var(--ty-orange); color: #fff; }
.pager-btn.disabled { opacity: .4; pointer-events: none; }

/* ============================================================
   Ayarlar: API karti + bolum baslyklari (ferah)
   ============================================================ */
.settings-card {
  border: 1px solid var(--ty-line); border-radius: var(--card-radius);
  padding: 20px 22px; margin-bottom: 22px; background: #fff;
}
.api-card { border-color: #ffd9b8; background: linear-gradient(180deg, #fff9f3, #ffffff); }
.settings-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.settings-card-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ty-text); }
.api-status { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.api-status.ok { background: #e8f7ee; color: #137a43; }
.api-status.off { background: #fdecea; color: #c0392b; }
.api-status.pending { background: #fef6e7; color: #b5630f; }
.lock-pill {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #eef1f5; color: #6b7785; font-size: 10.5px; font-weight: 800; vertical-align: middle;
}
.input:disabled { background: #f4f6f9; color: #8a93a0; cursor: not-allowed; }
.settings-card-lead { margin: 0 0 16px; font-size: 12.5px; color: var(--ty-muted); line-height: 1.6; }
.settings-section-title { font-size: 16px; font-weight: 800; color: var(--ty-text); margin: 6px 0 14px; }
.form-grid { gap: 16px; }
.field label { margin-bottom: 6px; }

/* ============================================================
   v8 - r00t super-admin paneli + kilit ekrani
   ============================================================ */

/* Root login rozeti */
.root-badge {
  display: inline-block; margin-bottom: 12px;
  padding: 4px 12px; border-radius: 999px;
  background: #2a1840; color: #c4b5fd; font-weight: 900; letter-spacing: 1px;
  font-size: 12px;
}

/* Root sidebar: saticidan ayirt etmek icin mor tema */
.root-sidebar { background: linear-gradient(180deg, #1a1230, #241a3d); }
.root-sidebar .side-link.active { background: rgba(139,92,246,0.22); box-shadow: inset 3px 0 0 0 #8b5cf6; }
.root-sidebar .side-badge { background: #8b5cf6; }
.root-sidebar .side-link.active .side-badge { background: #fff; color: #8b5cf6; }
.sidebar-logo.root-logo {
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
  box-shadow: 0 6px 16px rgba(139,92,246,0.4);
  font-size: 14px; letter-spacing: 0.5px;
}

/* Root dashboard */
.root-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.root-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .root-grid { grid-template-columns: 1fr; } }

.panel-card {
  background: #fff; border: 1px solid var(--ty-line); border-radius: var(--card-radius);
  padding: 20px; box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}

/* Mini tablo (dashboard listeleri) */
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table td { padding: 10px 8px; border-bottom: 1px solid var(--ty-line); font-size: 12.5px; vertical-align: middle; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table b { color: var(--ty-text); }

/* Satir aksiyonlari */
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-form { display: inline; margin: 0; }

/* Kilit ekrani */
.lock-panel { text-align: center; }
.lock-ico { font-size: 46px; margin-bottom: 6px; }

/* r00t form ust bolum basliklari */
.settings-card h4.settings-section-title { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--ty-line); }

/* Ozellik / modul secimi */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.feature-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--ty-line); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ty-text);
  transition: border-color .12s ease, background .12s ease;
}
.feature-toggle:hover { border-color: #b9a4e8; background: #faf7ff; }
.feature-toggle input { width: 17px; height: 17px; accent-color: #8b5cf6; flex: none; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.feature-chip {
  display: inline-block; padding: 3px 8px; border-radius: 6px;
  background: #f1ecfb; color: #6b4fc0; font-size: 11px; font-weight: 700;
}

/* ============================================================
   v9 - Kullanim gostergeleri (animasyonlu limit ibresi)
   ============================================================ */
.usage-strip {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) { .usage-strip { grid-template-columns: 1fr; } }

.usage-card {
  background: #fff; border: 1px solid var(--ty-line); border-radius: var(--card-radius);
  padding: 16px 18px; box-shadow: 0 1px 3px rgba(16,24,40,0.04);
}
.usage-card.primary { border-color: #d7e0ea; background: linear-gradient(180deg, #fbfdff, #ffffff); }
.usage-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.meter-title { font-size: 12.5px; font-weight: 700; color: var(--ty-muted); }
.meter-value { font-size: 22px; font-weight: 900; color: var(--ty-text); letter-spacing: -0.5px; margin-top: 2px; }
.meter-of { font-size: 14px; font-weight: 700; color: var(--ty-muted); }
.pkg-tag {
  flex: none; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px;
  background: #eef2ff; color: #4f46e5;
}

.meter-track {
  position: relative; height: 12px; margin-top: 12px;
  background: #eef1f5; border-radius: 999px; overflow: hidden;
}
.meter-fill {
  height: 100%; border-radius: 999px;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, #16a34a, #34d399);
  box-shadow: 0 0 8px rgba(34,197,94,0.35) inset;
  animation: meterFill 1.15s cubic-bezier(.22,1,.36,1) both;
  position: relative;
}
.meter-fill::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.45) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-100%);
  animation: meterShine 2.2s ease-in-out .9s infinite;
}
.meter-fill.warn { background: linear-gradient(90deg, #f59e0b, #fbbf24); box-shadow: 0 0 8px rgba(245,158,11,0.35) inset; }
.meter-fill.crit { background: linear-gradient(90deg, #dc2626, #f87171); box-shadow: 0 0 8px rgba(220,38,38,0.4) inset; }
.meter-fill.inf  { background: linear-gradient(90deg, #c7d2fe, #a5b4fc); opacity: .5; }
.meter-fill.inf::after { display: none; }

@keyframes meterFill { from { width: 0; } to { width: var(--pct, 0%); } }
@keyframes meterShine { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }

.meter-sub { margin-top: 8px; font-size: 11.5px; color: var(--ty-muted); }

.usage-cta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--ty-line);
}
.usage-cta-text { font-size: 12.5px; font-weight: 700; color: var(--ty-orange); }
.usage-cta.crit .usage-cta-text { color: #dc2626; }
.usage-cta .button.small { width: auto; }

/* ============================================================
   Odeme / fiyatlandirma kartlari (odeme.php)
   ============================================================ */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.pricing-card {
  background: #fff; border: 1px solid var(--ty-line); border-radius: 16px;
  padding: 22px 20px; box-shadow: 0 1px 3px rgba(16,24,40,0.05);
  display: flex; flex-direction: column; position: relative;
}
.pricing-card.current { border-color: var(--ty-orange); box-shadow: 0 8px 24px rgba(242,122,26,0.14); }
.pricing-flag {
  position: absolute; top: -11px; left: 20px;
  background: var(--ty-orange); color: #fff; font-size: 11px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px;
}
.pricing-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--ty-text); }
.pricing-price { font-size: 28px; font-weight: 900; color: var(--ty-text); letter-spacing: -1px; margin-bottom: 14px; }
.pricing-price small { font-size: 13px; font-weight: 600; color: var(--ty-muted); letter-spacing: 0; }
.pricing-feats { list-style: none; margin: 0 0 18px; padding: 0; flex: 1; }
.pricing-feats li { font-size: 12.5px; color: var(--ty-text); padding: 6px 0; border-bottom: 1px dashed var(--ty-line); }
.pricing-feats li:last-child { border-bottom: 0; }

/* ============================================================
   Yasal metin sayfasi (yasal.php)
   ============================================================ */
.legal-wrap { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: 230px 1fr; gap: 24px; padding: 28px 18px 60px; }
@media (max-width: 800px) {
  .legal-wrap { grid-template-columns: 1fr; gap: 14px; padding: 16px 12px 48px; }
  /* Mobilde menu, ust kisimda yatay kaydirilabilir cip seridine donusur */
  .legal-nav {
    position: static; flex-direction: row; flex-wrap: nowrap; gap: 8px;
    overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px;
    scrollbar-width: none;
  }
  .legal-nav::-webkit-scrollbar { display: none; }
  .legal-brand { display: none; }
  .legal-nav a {
    flex: 0 0 auto; white-space: nowrap; padding: 8px 14px;
    border: 1px solid var(--ty-line); background: #fff; font-size: 12.5px;
  }
  .legal-back { margin-top: 0; order: 99; }
  .legal-doc { padding: 18px 16px; border-radius: 12px; }
  .legal-doc h2 { font-size: 19px; }
  .legal-doc p, .legal-doc li { font-size: 14px; }
  .legal-doc .legal-info li { word-break: break-word; }
}
.legal-nav { position: sticky; top: 18px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.legal-brand { font-size: 16px; font-weight: 800; color: var(--ty-text); margin-bottom: 10px; }
.legal-nav a {
  padding: 10px 12px; border-radius: 9px; text-decoration: none;
  color: var(--ty-muted); font-size: 13px; font-weight: 600;
}
.legal-nav a:hover { background: #f1f4f8; color: var(--ty-text); }
.legal-nav a.active { background: var(--ty-orange); color: #fff; }
.legal-back { margin-top: 12px; color: var(--ty-blue) !important; }
.legal-doc {
  background: #fff; border: 1px solid var(--ty-line); border-radius: 14px;
  padding: 30px 34px; box-shadow: 0 1px 3px rgba(16,24,40,0.04); min-width: 0;
}
.legal-doc h2 { font-size: 22px; font-weight: 800; color: var(--ty-text); margin: 0 0 4px; }
.legal-doc h3 { font-size: 15px; font-weight: 800; color: var(--ty-text); margin: 22px 0 8px; }
.legal-doc p { font-size: 13.5px; line-height: 1.7; color: #333; margin: 8px 0; }
.legal-doc ul { margin: 8px 0; padding-left: 20px; }
.legal-doc li { font-size: 13.5px; line-height: 1.7; color: #333; margin: 4px 0; }
.legal-doc .legal-upd { font-size: 12px; color: var(--ty-muted); margin-top: 0; }
.legal-doc .legal-info { list-style: none; padding-left: 0; }
.legal-doc .legal-info li { background: #f7f8fa; border-radius: 6px; padding: 6px 10px; margin: 4px 0; }
.legal-doc .legal-note { background: #fff8ec; border-left: 3px solid var(--ty-orange); padding: 10px 14px; border-radius: 6px; font-size: 12.5px; }
.legal-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--ty-line); font-size: 12px; color: var(--ty-muted); }

/* ============================================================
   Gorsel Bekleyenler (hatirlatma) eskalasyon renkleri
   ============================================================ */
.age-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.age-ok   { background: #eef1f5; color: #4a515b; }
.age-soft { background: #fef6e7; color: #b5630f; }
.age-warn { background: #fdecdc; color: #c2410c; }
.age-crit { background: #fde7e6; color: #c0392b; }
.reminder-row.tier-crit > td:first-child { box-shadow: inset 4px 0 0 0 #dc2626; }
.reminder-row.tier-warn > td:first-child { box-shadow: inset 4px 0 0 0 #ea7317; }
.reminder-row.tier-soft > td:first-child { box-shadow: inset 4px 0 0 0 #eab308; }
.reminder-row.tier-crit > td { background: #fffafa; }

/* ============================================================
   Destek talepleri (ticket) konusma gorunumu
   ============================================================ */
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ticket-thread { display: flex; flex-direction: column; gap: 8px; }
.ticket-msg { max-width: 80%; padding: 9px 13px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.ticket-msg-by { font-size: 10.5px; font-weight: 700; opacity: .7; margin-bottom: 3px; }
.ticket-msg.from-seller { align-self: flex-start; background: #f1f4f8; color: var(--ty-text); border-bottom-left-radius: 4px; }
.ticket-msg.from-root { align-self: flex-end; background: #e7f1fb; color: #1c4ea8; border-bottom-right-radius: 4px; }
.ticket-reply { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; }
.ticket-reply textarea { flex: 1; resize: vertical; min-height: 40px; }
.ticket-reply .button { flex: none; }
