/* ===================== Inter (yerel) ===================== */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../lib/inter/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../lib/inter/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../lib/inter/inter-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../lib/inter/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../lib/inter/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../lib/inter/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../lib/inter/inter-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../lib/inter/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===================== Tasarım değişkenleri ===================== */
:root {
  --aresto: #1f5f40;
  --aresto-dark: #174a31;
  --aresto-accent: #22c55e;
  --aresto-accent-dark: #16a34a;
  --aresto-soft: #ebf4ef;
  --surface: #f4f6f8;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --border-color: #e2e8f0;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .06);
}

/* ===================== Bootstrap 5.2 uyumluluk (yerel sürüm 5.1.0) ===================== */
/* 5.1.0'da bulunmayan 5.2 yardımcı sınıfları; rozetler beyaz yazıyla görünmez olmasın diye. */
.text-bg-primary {
  color: #fff !important;
  background-color: #0d6efd !important;
}

.text-bg-secondary {
  color: #fff !important;
  background-color: #6c757d !important;
}

.text-bg-success {
  color: #fff !important;
  background-color: #198754 !important;
}

.text-bg-danger {
  color: #fff !important;
  background-color: #dc3545 !important;
}

.text-bg-warning {
  color: #000 !important;
  background-color: #ffc107 !important;
}

.text-bg-info {
  color: #000 !important;
  background-color: #0dcaf0 !important;
}

.text-bg-light {
  color: #000 !important;
  background-color: #f8f9fa !important;
}

.text-bg-dark {
  color: #fff !important;
  background-color: #212529 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--surface);
  color: var(--text-dark);
  font-family: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a {
  color: var(--aresto);
}

a:hover {
  color: var(--aresto-accent-dark);
}

.bg-aresto {
  background: var(--aresto);
}

/* ===================== Kartlar, butonlar, formlar ===================== */
.card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.card-header {
  background: #fff;
  border-bottom-color: var(--border-color);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.btn-primary {
  background: var(--aresto-accent);
  border-color: var(--aresto-accent);
  font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--aresto-accent-dark);
  border-color: var(--aresto-accent-dark);
}

.btn-outline-primary {
  color: var(--aresto);
  border-color: var(--aresto);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--aresto);
  border-color: var(--aresto);
}

.btn-link {
  color: var(--aresto);
}

.badge-aresto {
  color: #fff;
  background: var(--aresto);
}

.form-control,
.form-select {
  border-color: var(--border-color);
  border-radius: var(--radius-md);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--aresto-accent);
  box-shadow: 0 0 0 .2rem rgba(34, 197, 94, .15);
}

.table thead th {
  white-space: nowrap;
  background: #f8fafc;
  color: var(--text-gray);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.table > :not(caption) > * > * {
  padding: .7rem .75rem;
}

.pagination .page-link {
  color: var(--aresto);
}

.pagination .active .page-link {
  background: var(--aresto);
  border-color: var(--aresto);
}

.form-check-list {
  max-height: 13rem;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: .75rem;
  background: #fff;
}

.empty-state {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.required-label::after {
  content: " *";
  color: #b42318;
}

.text-prewrap {
  white-space: pre-wrap;
}

.business-card-reader {
  background: #f8fbfa;
}

.business-card-preview {
  width: min(240px, 100%);
  max-height: 150px;
  object-fit: contain;
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  background: #fff;
}

/* ===================== Uygulama kabuğu ===================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--border-color);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 1045;
  transition: transform .2s ease;
}

.app-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}

.app-logo {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--aresto);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  flex-shrink: 0;
}

.app-sidebar-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--aresto);
  margin: 0;
}

.app-sidebar nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.app-menu-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #94a3b8;
  margin: 18px 12px 8px;
}

.app-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 4px;
  transition: background-color .15s, color .15s;
}

.app-menu-item i {
  font-size: 17px;
  width: 20px;
  text-align: center;
}

.app-menu-item:hover {
  background: #f1f5f9;
  color: var(--aresto);
}

.app-menu-item.active {
  background: var(--aresto-soft);
  color: var(--aresto);
  font-weight: 600;
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
}

.app-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  width: min(380px, 100%);
  transition: border-color .15s, background-color .15s;
}

.app-search:focus-within {
  border-color: var(--aresto-accent);
  background: #fff;
}

.app-search i {
  color: var(--text-gray);
}

.app-search input {
  border: 0;
  background: transparent;
  outline: 0;
  width: 100%;
  font-size: 14px;
  color: var(--text-dark);
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-rate-board {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-rate-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  white-space: nowrap;
}

.app-rate-symbol {
  font-weight: 600;
}

.app-rate-value {
  font-variant-numeric: tabular-nums;
}

.form-actions-sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 0;
  background: var(--surface);
  border-top: 1px solid var(--border-color);
}

.param-menu {
  position: sticky;
  top: 88px;
}

.param-pane {
  text-align: left;
}

.param-pane .form-label {
  padding-left: .5rem;
}

@media (max-width: 991.98px) {
  .param-menu {
    position: static;
  }
}

.app-icon-btn {
  position: relative;
  background: none;
  border: 0;
  color: var(--text-gray);
  font-size: 20px;
  text-decoration: none;
}

.app-icon-btn:hover {
  color: var(--aresto);
}

.app-icon-btn .badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: #ef4444;
  font-size: 10px;
}

.app-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--aresto);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.app-profile-text {
  line-height: 1.2;
}

.app-profile-text .name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.app-profile-text .role {
  display: block;
  font-size: 12px;
  color: var(--text-gray);
}

.app-content {
  flex: 1;
  padding: 32px;
}

.app-footer {
  border-top: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-gray);
  font-size: 12px;
  padding: 14px 32px;
}

.app-sidebar-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 22px;
  color: var(--text-dark);
}

.app-backdrop {
  display: none;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.open {
    transform: none;
  }

  .app-main {
    margin-left: 0;
  }

  .app-sidebar-toggle {
    display: inline-flex;
  }

  .app-topbar {
    padding: 0 16px;
  }

  .app-content {
    padding: 20px 16px;
  }

  .app-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .4);
    z-index: 1040;
  }

  .app-profile-text {
    display: none;
  }
}

/* ===================== Genel Bakış ===================== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-title h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.page-title p {
  color: var(--text-gray);
  font-size: 14px;
  margin: 4px 0 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.metric-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
}

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

.metric-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-gray);
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.metric-icon-blue { background: #e0f2fe; color: #0284c7; }
.metric-icon-green { background: #dcfce7; color: #16a34a; }
.metric-icon-yellow { background: #fef9c3; color: #ca8a04; }
.metric-icon-purple { background: #f3e8ff; color: #9333ea; }

.metric-value {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 6px;
}

.metric-note {
  font-size: 13px;
  color: var(--text-gray);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 230px;
  padding-top: 16px;
  border-bottom: 1px solid var(--border-color);
}

.chart-bar-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.chart-bar {
  width: 100%;
  max-width: 38px;
  min-height: 2px;
  background: var(--aresto);
  opacity: .85;
  border-radius: 4px 4px 0 0;
  transition: opacity .15s, background-color .15s;
}

.chart-bar:hover {
  opacity: 1;
  background: var(--aresto-accent);
}

.chart-bar-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-gray);
}

.chart-bar-value {
  font-size: 11px;
  color: var(--text-gray);
  margin-bottom: 4px;
}

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

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-text {
  font-size: 14px;
  line-height: 1.45;
}

.activity-time {
  font-size: 12px;
  color: var(--text-gray);
}

@media (max-width: 1199.98px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .metric-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================== Giriş ekranları ===================== */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--surface);
}

.auth-shell {
  width: min(1020px, 100%);
}

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
}

.auth-left {
  padding: 48px;
  display: flex;
  flex-direction: column;
}

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

.auth-brand .app-logo {
  width: 36px;
  height: 36px;
}

.auth-brand span {
  font-weight: 700;
  color: var(--aresto);
  font-size: 18px;
}

.auth-right {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(155deg, #0b3b2e 0%, #14532d 55%, #1f5f40 100%);
}

.auth-right::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, .35), transparent 65%);
  top: -140px;
  right: -140px;
}

.auth-right::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, .22), transparent 65%);
  bottom: -120px;
  left: -100px;
}

.auth-right-content {
  position: relative;
  z-index: 1;
}

.auth-right h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 24px 0 12px;
}

.auth-right p {
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  line-height: 1.6;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
}

.auth-feature i {
  font-size: 18px;
  color: var(--aresto-accent);
}

.auth-input {
  position: relative;
}

.auth-input > i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}

.auth-input .form-control {
  padding-left: 42px;
  padding-right: 42px;
  height: 46px;
  background: #f8fafc;
}

.auth-input .form-control:focus {
  background: #fff;
}

.auth-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #94a3b8;
  padding: 8px 10px;
}

.auth-password-toggle:hover {
  color: var(--aresto);
}

.auth-submit {
  height: 46px;
  font-weight: 600;
}

.auth-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-gray);
}

.auth-footer-note {
  text-align: center;
  color: var(--text-gray);
  font-size: 12px;
  margin-top: 18px;
}

@media (max-width: 991.98px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-right {
    display: none;
  }

  .auth-left {
    padding: 32px 24px;
  }
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

[data-live-results].is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.15s ease-in-out;
}

.business-card-video {
  display: block;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #111;
  border-radius: 0.5rem;
}

/* Stok arama paneli: dar tablo hücresinde geniş ve okunaklı görünür */
[data-source="stok"] .rota-combo-list {
  right: auto;
  width: min(30rem, 90vw);
  z-index: 1080;
}

[data-source="stok"] .rota-combo-item strong {
  white-space: normal;
  line-height: 1.3;
}


/* ===================== �r�n listesi kolon geni�likleri ===================== */
.table-fixed-list {
  table-layout: fixed;
}

.table-fixed-list th,
.table-fixed-list td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-fixed-list > :not(caption) > * > * {
  padding: .22rem .5rem;
  line-height: 1.25;
}

tbody tr[data-detail-url] {
  cursor: pointer;
}

.table-fixed-list th {
  position: relative;
  padding-right: 14px;
}

.table-fixed-list th .sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.table-fixed-list th .sort-link:hover,
.table-fixed-list th .sort-link:focus-visible {
  color: var(--aresto);
}

.table-fixed-list th .sort-link .bi {
  font-size: .72rem;
  opacity: .85;
}

.table-fixed-list .btn-list-action {
  padding: .1rem .45rem;
  font-size: .78rem;
  line-height: 1.2;
}

.table-fixed-list .badge {
  padding: .2em .45em;
  font-size: .7em;
}

.col-resize {
  position: absolute;
  top: 0;
  right: -1px;
  width: 9px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
}

.col-resize:hover,
.col-resize.is-active {
  background: rgba(15, 23, 42, .08);
}

body.col-resizing {
  cursor: col-resize !important;
  user-select: none;
}

/* Tedarikçi teklifi üst alanı: sol teklif bilgileri ve sağ ürün kartı eşit yükseklik */
.supplier-quote-top > [class*="col-"] {
  display: flex;
}

.supplier-quote-top .card {
  width: 100%;
}

.supplier-product-summary {
  font-size: .82rem;
  line-height: 1.25;
}

.supplier-product-summary h3 {
  margin: .45rem 0 .3rem;
  font-size: .82rem;
}

.supplier-product-summary dl {
  margin-bottom: 0;
}

.supplier-product-summary dt,
.supplier-product-summary dd {
  padding-top: .08rem;
  padding-bottom: .08rem;
}

.supplier-product-summary .badge {
  padding: .18em .42em;
  font-size: .68rem;
}

@media (max-width: 991.98px) {
  .supplier-quote-top > [class*="col-"] {
    display: block;
  }
}
