:root {
  /* Ürün ağacı / kategori listesi kolon genişliği — tüm sayfalarda ortak */
  --product-tree-width: 320px;
  /* Design System (DESIGN.md) — tek teal-slate iskelet + tek camgöbeği aksan */
  --sidebar-bg: #0E2A30;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --page-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --line: #e2e8f0;
  --blue: #0e7490;
  --blue-soft: #ecfeff;
  --green: #15803d;
  --green-soft: #dcfce7;
  --gold: #b45309;
  --gold-soft: #fef3c7;
  --pink: #0369a1;
  --pink-soft: #e0f2fe;
  --nav-hover: #e8f1f0;
  --nav-active: #d8ecea;
  --teal-dark: #165d63;
  --teal-mid: #1d6c72;
  --teal-soft: #edf7f6;
  --shadow: 0 14px 34px rgba(17, 25, 40, 0.08);
  --ui-radius: 16px;
  --color-background-primary: #ffffff;
  --color-background-secondary: #f5f8fd;
  --color-border-tertiary: #dde6f0;
}

/* ── ERP Genel Panel Sistemi ─────────────────────────────────────────
   İki sütunlu sol-dar / sağ-geniş panel çerçevesi.
   Sayfa-özel genişlikler ve override'lar aşağıda scope'lu olarak tanımlıdır.
─────────────────────────────────────────────────────────────────── */
.erp-panel-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.erp-panel-left {
  background: #f0f4fa;
  border-right: 1px solid #dde4f0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.erp-panel-right {
  background: #ffffff;
  min-width: 0;
}

/* Products screen: ERP-style variant price workspace */
.products-workspace {
  gap: 12px;
  color: #10204a;
}

.products-page-hero {
  padding: 0 4px 4px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.products-page-hero h1 {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  color: #0d1b47;
  text-transform: uppercase;
}

.products-page-hero p {
  margin-top: 7px;
  font-size: 13px;
  color: #18315f;
}

.products-hero-actions {
  display: none;
}

.products-method-strip {
  border-radius: 8px;
  padding: 14px 18px;
  gap: 0;
  box-shadow: none;
}

.products-method-strip::before {
  content: "4 FARKLI KOLAY YONTEM";
  grid-column: 1 / -1;
  margin-bottom: 12px;
  color: #0f2457;
  font-size: 14px;
  font-weight: 800;
}

.products-method-card {
  border-right: 1px solid #dce4f0;
  border-radius: 0;
  padding: 6px 18px;
  background: #fff;
}

.products-method-card:last-child {
  border-right: 0;
}

.products-method-card h3 {
  font-size: 13px;
  text-transform: uppercase;
}

.products-method-card p {
  font-size: 11px;
  line-height: 1.45;
  color: #172b5a;
}

.products-shell {
  grid-template-columns: 190px minmax(660px, 1fr) 320px;
  gap: 14px;
}

.products-left-card,
.products-side-panel-card,
.products-main-stage,
.products-form-card,
.products-list-shell-head-modern {
  border-radius: 8px;
  border-color: #d9e2ee;
  box-shadow: none;
}

.products-left-card {
  padding: 14px 12px;
  background: #fff;
}

.products-rail-title h2 {
  font-size: 12px;
  text-transform: uppercase;
  color: #162858;
}

.products-rail-title p {
  font-size: 10px;
  color: #4d5f82;
}

.products-main-stage {
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
}

.products-list-stage-head {
  align-items: center;
}

.products-list-stage-head h2 {
  font-size: 18px;
  color: #10245a;
}

.products-breadcrumb {
  text-transform: none;
  color: #1d63d8;
  font-size: 11px;
  letter-spacing: 0;
}

.products-list-stage-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.products-unit-select,
.products-search {
  height: 30px;
  border-radius: 6px;
  border: 1px solid #d9e2ee;
  background: #fbfdff;
  font-size: 11px;
}

.products-tab-strip {
  gap: 18px;
  border-bottom: 1px solid #e7edf5;
  margin-bottom: 12px;
}

.products-tab-pill {
  height: 31px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1c2c5c;
  font-size: 11px;
}

.products-tab-pill.active {
  color: #085be8;
  background: transparent;
  box-shadow: inset 0 -2px 0 #085be8;
}

.products-list-shell-head-modern {
  padding: 10px 0;
  border: 0;
  background: transparent;
}

.products-list-shell-head-modern h3,
.products-list-shell-head-modern p {
  display: none;
}

.products-inline-methods {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.products-mini-pill {
  min-width: 86px;
  height: 30px;
  border-radius: 5px;
  font-size: 11px;
  background: #fff;
}

.products-node-card {
  border-radius: 8px;
  box-shadow: none;
}

.products-node-head {
  padding: 10px 14px;
  border-bottom: 1px solid #e7edf5;
  background: #fff;
}

.products-node-meta strong {
  font-size: 14px;
  color: #11265a;
}

.products-node-meta span {
  font-size: 11px;
}

.products-node-actions {
  display: none;
}

.products-node-variant-head,
.products-node-variant-row {
  grid-template-columns: 34px minmax(150px, 1.4fr) minmax(90px, 0.8fr) minmax(95px, 0.85fr) minmax(72px, 0.65fr) minmax(95px, 0.85fr) 56px 116px 130px;
  min-width: 980px;
}

.products-node-variant-head span,
.products-node-variant-row > span {
  padding: 8px 10px;
  font-size: 11px;
}

.products-node-variant-head span {
  color: #122655;
  background: #f7f9fc;
  text-transform: none;
  font-size: 10px;
}

.products-node-variant-row {
  min-height: 39px;
  align-items: center;
}

.products-node-variant-row.is-active {
  background: #eef6ff;
}

.products-node-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-node-check input {
  width: 14px;
  height: 14px;
  accent-color: #0b66f0;
}

.products-node-variant-image {
  display: none;
}

.products-node-variant-name {
  gap: 0;
}

.products-node-variant-name strong {
  color: #12306a;
  font-size: 11px;
}

.products-node-variant-name small,
.products-node-variant-row > span:last-child {
  display: none;
}

.products-price-input {
  width: 100px;
  height: 26px;
  border: 1px solid #d6e0eb;
  border-radius: 5px;
  padding: 0 8px;
  color: #10245a;
  text-align: right;
  font: inherit;
  font-size: 11px;
  background: #fff;
}

.products-node-variant-row.is-active .products-price-input {
  border-color: #0b66f0;
  box-shadow: 0 0 0 2px rgba(11, 102, 240, 0.12);
}

.products-tree-group,
.products-tree-product {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.products-tree-category,
.products-tree-product-head {
  grid-template-columns: minmax(0, 1fr) 22px;
  border: 0;
}

.products-tree-main,
.products-tree-product-main {
  padding: 5px 4px;
}

.products-tree-main strong,
.products-tree-product-main strong {
  font-size: 11px;
  color: #162858;
}

.products-tree-main span,
.products-tree-product-main span {
  display: none;
}

.products-tree-toggle,
.products-tree-product-toggle {
  border: 0;
  color: #0b63df;
  font-size: 13px;
}

.products-tree-children,
.products-tree-variants {
  gap: 0;
  padding: 0 0 0 10px;
  background: transparent;
}

.products-tree-level {
  position: relative;
  display: grid;
  gap: 3px;
  margin-left: 7px;
  padding-left: 13px;
  border-left: 1px dotted #aab8cc;
}

.products-tree-folder {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 10px;
  font-weight: 700;
  color: #173061;
}

.products-tree-folder::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 8px;
  border: 1px solid #6d86b5;
  border-radius: 2px;
  background: #f9fbff;
}

.products-tree-variant {
  position: relative;
  border: 0;
  border-radius: 4px;
  padding: 4px 6px 4px 18px;
  background: transparent;
}

.products-tree-variant::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 1px;
  background: #9eabc0;
}

.products-tree-variant strong {
  font-size: 10px;
  color: #192d5c;
  font-weight: 600;
}

.products-tree-variant span {
  display: none;
}

.products-tree-variant.active {
  border: 1px solid #77a8ff;
  background: #edf5ff;
}

.products-side-panel-card {
  padding: 14px 16px;
  border-radius: 8px;
}

.products-side-title {
  margin-bottom: 10px;
}

.products-side-title h3 {
  font-size: 13px;
  text-transform: uppercase;
}

.products-side-title strong {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.products-side-table header,
.products-side-table div {
  grid-template-columns: minmax(0, 1fr) 44px 90px;
  min-height: 32px;
}

.products-side-table span,
.products-side-table strong {
  font-size: 10px;
}

.products-price-option-form .products-clean-form-grid {
  align-items: end;
}

.products-bulk-builder {
  background: #f8fbff;
  border-color: #dbe7f5;
}

.products-bulk-groups {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.products-bulk-groups fieldset {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 10px;
  margin: 0;
  background: #ffffff;
}

.products-bulk-groups legend {
  padding: 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: #0f2a55;
}

.products-bulk-groups label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  color: #243b63;
}

.product-bulk-table .product-variant-table-head,
.product-bulk-table .product-variant-table-row {
  grid-template-columns: 2.2fr 1fr 1fr .8fr .9fr .9fr 1fr;
}

.products-tree-empty {
  padding: 10px 12px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .products-bulk-groups {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

/* Clean rebuilt Products section */
.products-clean-workspace {
  display: grid;
  gap: 14px;
}

.products-clean-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 0;
}

.products-hint-cards {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.products-hint-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  color: #3b5a8a;
  font-size: 12px;
  line-height: 1.4;
  font-family: 'Geist', sans-serif;
}

.products-clean-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.products-page-title h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #10245a;
  line-height: 1.3;
}

.products-page-title p {
  margin: 3px 0 0;
  font-size: 12px;
  color: #6b7f99;
  line-height: 1.4;
}

.products-clean-panel {
  padding: 0;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-background-secondary);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

/* erp-panel-layout kullanan section'larda outer panel çift border oluşturmasın */
#productFormSection.products-clean-panel,
#productsListSection.products-clean-panel {
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}

.products-clean-grid,
.products-clean-list-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 620px;
}

/* Yeni Ürün Ekle – KATEGORİ SEÇ panelini genişlet (ürün isimleri tam görünsün) */
#productFormSection .products-clean-grid {
  grid-template-columns: var(--product-tree-width) minmax(0, 1fr);
}

.products-clean-tree {
  padding: 0;
  border-right: 1px solid #dde4f0;
  background: #f0f4fa;
  border-radius: 12px 0 0 12px;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
}

.products-form-cat-panel {
  display: flex;
  flex-direction: column;
}

.products-form-cat-panel .cat-nav-header {
  padding: 10px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #1e3a6e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #dde4f0;
  background: #e2eaf5;
}

.products-form-cat-panel .cat-nav-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 4px;
}

.products-clean-title h2 {
  margin: 0;
  color: #10245a;
  font-size: 13px;
  text-transform: uppercase;
}

.products-clean-title p {
  margin: 5px 0 14px;
  color: #697993;
  font-size: 11px;
}

.products-clean-help {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px dashed #bdd0ea;
  border-radius: 9px;
  background: #f4f8ff;
}

.products-clean-help strong {
  color: #12306a;
  font-size: 12px;
}

.products-clean-help span {
  color: #65748c;
  font-size: 11px;
  line-height: 1.45;
}

.products-clean-form,
.products-clean-list {
  display: grid;
  gap: 12px;
  padding: 14px 18px;
  min-width: 0;
  max-width: 860px;
}

.products-clean-form {
  background: #ffffff;
  border-radius: 0 12px 12px 0;
}

.products-clean-card {
  border: 1px solid #dce6f0;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.products-clean-card-head,
.products-clean-list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fbff;
}

.products-clean-card-head h2,
.products-clean-list-head h2 {
  margin: 0;
  color: #10245a;
  font-size: 16px;
}

.products-clean-card-head p,
.products-clean-list-head p {
  margin: 5px 0 0;
  color: #697993;
  font-size: 11px;
}

.products-clean-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.products-clean-form-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.products-clean-form-grid label span {
  color: #4f6078;
  font-size: 11px;
  font-weight: 700;
}

.products-clean-form-grid input,
.products-clean-form-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
}

.products-clean-form-grid input:focus,
.products-clean-form-grid select:focus,
.products-price-input:focus {
  outline: none;
  border-color: #0969da;
  box-shadow: 0 0 0 2px rgba(9, 105, 218, 0.12);
}

.products-clean-span {
  grid-column: span 2;
}

.products-clean-check {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  background: #fbfdff;
}

.products-clean-check input {
  width: 16px !important;
  height: 16px !important;
}

.products-clean-preview {
  min-height: 34px;
  border-radius: 7px;
  font-size: 11px;
}

.products-clean-row-actions,
.products-clean-footer {
  padding: 0 14px 14px;
}

.products-clean-footer {
  display: flex;
  justify-content: flex-end;
}

.products-clean-list-head {
  padding: 0 0 12px;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
}

.products-clean-list-head .products-search {
  width: min(320px, 100%);
  max-width: none;
}

.products-clean-list .products-card-list {
  min-width: 0;
}

.products-clean-list .products-grid-toolbar {
  margin: 0 0 8px;
}

.products-clean-list .products-node-card {
  border-radius: 9px;
  box-shadow: none;
}

.products-clean-list .products-node-variant-head,
.products-clean-list .products-node-variant-row {
  grid-template-columns: 34px minmax(170px, 1.4fr) minmax(92px, 0.8fr) minmax(92px, 0.8fr) minmax(76px, 0.65fr) minmax(110px, 0.9fr) 58px 120px 130px;
}

@media (max-width: 1180px) {
  .products-clean-grid,
  .products-clean-list-layout {
    grid-template-columns: 1fr;
  }

  .products-clean-tree {
    border-right: 0;
    border-bottom: 1px solid #e2e9f2;
  }

  .products-clean-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .products-clean-header,
  .products-clean-card-head,
  .products-clean-list-head {
    display: grid;
  }

  .products-clean-form-grid {
    grid-template-columns: 1fr;
  }

  .products-clean-span {
    grid-column: span 1;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--text-main);
  background:
    radial-gradient(circle at 1px 1px, rgba(22, 93, 99, 0.05) 1px, transparent 0) 0 0 / 26px 26px,
    var(--page-bg);
}

body.auth-locked .layout {
  display: none;
}

.auth-screen {
  min-height: 100vh;
  display: none;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef4ff, #f9fbfe);
}

body.auth-locked .auth-screen {
  display: grid;
}

.auth-card {
  width: min(440px, 100%);
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(17, 25, 40, 0.08);
  border: 1px solid var(--line);
}

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

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand span,
.auth-help,
.auth-error {
  color: var(--text-muted);
  font-size: 14px;
}

.auth-info {
  margin-bottom: 12px;
}

.auth-error {
  min-height: 20px;
  color: #d14343;
  font-size: 12.5px;
  text-align: center;
  margin: 10px 0 0;
}

/* ── Login Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field > span {
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.auth-field input {
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid #d6dee8;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: #1a2332;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  outline: 0;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.auth-field input::placeholder {
  color: #cbd5e1;
}

.auth-password-wrap {
  position: relative;
}

.auth-password-wrap input {
  width: 100%;
  padding-right: 44px;
}

.auth-password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  border-radius: 6px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-password-toggle:hover {
  background: #f1f5f9;
  color: #0d6efd;
}

.auth-submit {
  height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #0d6efd, #0756c7);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
  transition: transform 0.1s, filter 0.15s, box-shadow 0.15s;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.auth-submit:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
}

.auth-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-submit-spinner {
  animation: authSpin 1s linear infinite;
}

@keyframes authSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Demo hesap kutusu */
.auth-demo-info {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-demo-info strong {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.auth-demo-btn {
  display: flex;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.auth-demo-btn:hover {
  background: #eff6ff;
  border-color: #0d6efd;
  color: #0d6efd;
  transform: translateX(2px);
}

.auth-demo-info small {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 4px;
}

.auth-demo-info code {
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #1a2332;
  font-family: 'Courier New', monospace;
}

.auth-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.auth-footer small {
  font-size: 10.5px;
  color: #94a3b8;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 196px 1fr;
  transition: grid-template-columns 0.2s ease;
}

body.sidebar-collapsed .layout {
  grid-template-columns: 74px 1fr;
}

.sidebar {
  background: var(--sidebar-bg);
  color: #dbeafe;
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: width 0.2s ease, transform 0.2s ease;
}

.sidebar-top {
  border-bottom: 1px solid var(--sidebar-border);
  padding: 22px 16px 16px;
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #0e7490, #0b5566);
  color: #fff;
  font-weight: 800;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
}

.workspace-label {
  margin: 16px 0 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93a1a9;
}

.sidebar-nav {
  padding: 12px 10px;
  display: grid;
  gap: 5px;
}

.nav-link {
  border: 0;
  min-height: 32px;
  border-radius: calc(var(--ui-radius) - 8px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 12px;
  background: transparent;
  color: #d9e7ff;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  position: relative;
}

.nav-link::before {
  display: none;
}

.nav-link::after {
  content: "";
  margin-left: auto;
  color: #7c9196;
  font-size: 14px;
}

.nav-group-toggle::after {
  content: "▾";
  font-size: 11px;
}

.nav-group-static:not(.open) .nav-group-toggle::after {
  content: "▸";
}

.nav-label {
  white-space: nowrap;
}

.nav-icon {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d9e7ff;
  font-size: 12px;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.nav-link.active {
  background: linear-gradient(90deg, #0d6efd, #0b5ed7);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(13, 110, 253, 0.24);
  font-weight: 700;
}

.nav-link.active .nav-icon {
  color: #ffffff;
}

.nav-link-root {
  margin-bottom: 0;
}

.nav-group-static {
  display: grid;
  gap: 3px;
}

.nav-submenu-static {
  display: grid;
  gap: 2px;
  padding-left: 14px;
}

.nav-group-static:not(.open) .nav-submenu-static {
  display: none;
}

.nav-sublink {
  min-height: 26px;
  padding-left: 18px;
  font-size: 11px;
  color: #a8c4e8;
}

.nav-submenu-static .nav-group-toggle.nav-sublink {
  width: 100%;
  justify-content: flex-start;
}

.nav-submenu-static .nav-group-static {
  gap: 2px;
}

.nav-submenu-static .nav-submenu-static {
  padding-left: 16px;
}

.nav-sublink .nav-label {
  position: relative;
}

.nav-sublink .nav-label::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7f959b;
  transform: translateY(-50%);
}

body.sidebar-collapsed .logo-text,
body.sidebar-collapsed .workspace-label,
body.sidebar-collapsed .profile-card div,
body.sidebar-collapsed .logout-btn {
  display: none;
}

body.sidebar-collapsed .sidebar-top,
body.sidebar-collapsed .sidebar-bottom {
  padding-left: 10px;
  padding-right: 10px;
}

body.sidebar-collapsed .logo-row,
body.sidebar-collapsed .profile-card {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-nav {
  padding-left: 8px;
  padding-right: 8px;
}

body.sidebar-collapsed .nav-link,
body.sidebar-collapsed .nav-submenu-static .nav-link {
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .nav-label {
  display: none;
}

body.sidebar-collapsed .nav-link::after {
  display: none;
}

body.sidebar-collapsed .nav-group-static {
  display: none;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ffbf33;
  color: #5c4100;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--sidebar-border);
  background: #fbfdfd;
}

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

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dceceb;
  color: var(--teal-dark);
  font-weight: 700;
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card strong {
  font-size: 13px;
}

.profile-card span {
  font-size: 12px;
  color: #8da0a5;
}

.logout-btn {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--teal-dark);
  color: #f4fffe;
  cursor: pointer;
}

.main-content {
  padding: 0 24px 24px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 -24px 20px;
  padding: 14px 24px;
  background: linear-gradient(180deg, #0e2a30, #103f49);
  box-shadow: 0 10px 24px rgba(14, 42, 48, 0.18);
}

.main-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #f7fffe;
}

.main-header p {
  margin: 0;
  color: rgba(235, 249, 248, 0.78);
}

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

.session-user {
  color: rgba(244, 255, 254, 0.78);
  font-size: 13px;
}

.session-role {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f6fffe;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.primary-btn,
.menu-toggle {
  height: 40px;
  border-radius: 10px;
  border: 0;
  padding: 0 16px;
  cursor: pointer;
}

.primary-btn {
  background: linear-gradient(180deg, #0d6efd, #0756c7);
  color: #fff;
  box-shadow: var(--shadow);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fffe;
  font-size: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.summary-card,
.panel {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--ui-radius);
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 96px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-card span {
  display: block;
  margin-bottom: 8px;
  color: #687588;
  font-size: 13px;
}

.summary-card strong {
  font-size: 20px;
}

.summary-icon,
.quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.blue {
  background: var(--blue-soft);
  color: var(--blue);
}

.green {
  background: var(--green-soft);
  color: var(--green);
}

.summary-icon.amber {
  background: #fff5dc;
  color: #bb8500;
}

.summary-icon.indigo {
  background: #eef2ff;
  color: #4f46e5;
}

.summary-icon.red {
  background: #fff2f2;
  color: #c23b3b;
}

.gold {
  background: var(--gold-soft);
  color: var(--gold);
}

.pink,
.purple {
  background: var(--pink-soft);
  color: var(--pink);
}

.text-gold {
  color: #f0a000;
}

.text-green {
  color: var(--green);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 22px;
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 15px;
}

.chart-card-bars {
  min-height: 330px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: 22px;
  padding: 32px 6px 8px;
  border-radius: 14px;
  background:
    linear-gradient(to top, transparent 0%, transparent calc(20% - 1px), #eef2f8 calc(20% - 1px), #eef2f8 20%, transparent 20%, transparent calc(40% - 1px), #eef2f8 calc(40% - 1px), #eef2f8 40%, transparent 40%, transparent calc(60% - 1px), #eef2f8 calc(60% - 1px), #eef2f8 60%, transparent 60%, transparent calc(80% - 1px), #eef2f8 calc(80% - 1px), #eef2f8 80%, transparent 80%);
}

.chart-column {
  display: flex;
  flex-direction: column;
  justify-content: end;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.chart-bar-wrap {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: end;
}

.chart-bar {
  width: 100%;
  border-radius: 14px 14px 6px 6px;
  min-height: 12px;
  background: linear-gradient(180deg, #2f6fed, #6aa8ff);
  transition: height 0.25s ease;
}

.chart-column label {
  font-size: 13px;
  color: #7f8b9c;
}

.chart-column strong {
  font-size: 13px;
  color: #5b6780;
}

.quick-panel {
  min-height: 398px;
}

.quick-links {
  display: grid;
  gap: 14px;
}

.quick-link {
  border: 0;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
}

.quick-link strong,
.quick-link span {
  display: block;
}

.quick-link span {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.reports-grid {
  align-items: stretch;
}

.reports-panel {
  min-height: 360px;
}

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

.reports-panel-head h2 {
  margin-bottom: 6px;
}

.reports-panel-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.report-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-chip {
  border: 1px solid var(--line);
  background: #f7f9fc;
  color: var(--text-main);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.report-chip.active {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: rgba(47, 111, 237, 0.22);
}

.report-bars {
  min-height: 250px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  padding-top: 12px;
}

.report-bar-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
}

.report-bar-column span,
.report-bar-column small {
  color: var(--text-muted);
}

.report-bar-column span {
  font-size: 12px;
  text-transform: uppercase;
}

.report-bar-column strong {
  font-size: 15px;
}

.report-bar-column small {
  font-size: 11px;
}

.report-bar-track {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: end;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7f9fc, #eef3f9);
  padding: 8px;
}

.report-bar-fill {
  width: 100%;
  border-radius: 10px;
  min-height: 4px;
  background: linear-gradient(180deg, #2f6fed, #7eb2ff);
}

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

.report-mini-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #f2f6fb);
}

.report-mini-card strong,
.report-mini-card span {
  display: block;
}

.report-mini-card strong {
  margin-bottom: 8px;
}

.report-mini-card span {
  color: var(--text-muted);
  font-size: 13px;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

#offersListSection.table-panel {
  overflow: visible;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.panel-header-row.compact {
  padding-bottom: 10px;
  border-bottom: 0;
}

.panel-header-row h2 {
  margin: 0;
}

.panel-header-row a {
  color: var(--blue);
  font-size: 14px;
}

.inline-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  cursor: pointer;
}

.offer-builder-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 14px;
}

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

#offerFormSection,
#offersListSection,
#offersPrintSection {
  border-radius: 8px;
  border: 1px solid #cfd9e4;
  box-shadow: 0 6px 16px rgba(17, 25, 40, 0.04);
}

#offerFormSection > .panel-header-row,
#offersPrintSection > .panel-header-row {
  margin: -18px -18px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #d8e1eb;
  background: linear-gradient(180deg, #f5f8fb, #e9eef5);
}

#offerFormSection > .panel-header-row h2,
#offersPrintSection > .panel-header-row h2 {
  margin: 0;
  font-size: 14px;
}

.offers-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid #d4deea;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #eef4f9);
  color: #4d6378;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.offers-toolbar {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #d8e1eb;
  background: linear-gradient(180deg, #f6f9fd, #edf3f8);
}

.offers-toolbar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.offers-toolbar-title {
  min-width: 0;
}

.offers-toolbar-title h2 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
  color: #223648;
}

.offers-toolbar-title p {
  margin: 4px 0 0;
  color: #6d7d8f;
  font-size: 10px;
  line-height: 1.35;
}

.offer-products-panel {
  border: 1px solid #c5cfdb;
  border-radius: 4px;
  background: linear-gradient(180deg, #f4f6f9, #e8edf3);
  padding: 10px;
  align-self: start;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.offer-products-head h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.offer-products-head p {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 10px;
}

.offer-products-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 10px;
}

.offer-products-filter input {
  width: 14px;
  height: 14px;
}

.offer-product-search {
  margin-bottom: 6px;
}

.offer-products-list {
  display: grid;
  gap: 4px;
  max-height: 700px;
  overflow: auto;
  border: 1px solid #cfd8e3;
  background: #fff;
}

.offer-product-category {
  border-bottom: 1px solid #d8e0ea;
  background: #fff;
}

.offer-product-category-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border: 0;
  border-bottom: 1px solid #d8e0ea;
  background: linear-gradient(180deg, #f3f6fa, #e6ebf2);
  text-align: left;
  cursor: pointer;
}

.offer-product-category-text strong,
.offer-product-category-text small,
.offer-product-category-arrow {
  display: block;
}

.offer-product-category-text {
  display: grid;
  gap: 1px;
}

.offer-product-category-text strong {
  font-size: 11px;
  font-weight: 700;
  color: #1f3144;
}

.offer-product-category-text small {
  font-size: 9px;
  color: var(--text-muted);
}

.offer-product-category-arrow {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  border: 1px solid #c8d3df;
  background: #fff;
  color: #49627c;
  font-size: 11px;
  font-weight: 700;
}

.offer-product-category.is-open .offer-product-category-toggle {
  border-bottom-color: #ccd6e1;
}

.offer-product-category-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  background: #fbfcfd;
}

.offer-product-category-items[hidden] {
  display: none !important;
}

.offer-product-item {
  border: 0;
  border-top: 1px solid #e3e8ef;
  border-radius: 0;
  padding: 7px 8px 7px 18px;
  background: #fbfcfd;
  text-align: left;
  cursor: pointer;
  min-height: auto;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.offer-product-item:hover {
  background: #f3f7fb;
}

.offer-product-item.active {
  background: linear-gradient(180deg, #dfe8f3, #d6e1ed);
  box-shadow: inset 3px 0 0 #7894b3;
}

.offer-product-item strong,
.offer-product-item span,
.offer-product-item small {
  display: block;
}

.offer-product-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: #90a3b8;
}

.offer-product-item strong {
  margin-bottom: 2px;
  font-size: 11px;
  line-height: 1.35;
  color: #203246;
}

.offer-product-item span,
.offer-product-item small {
  color: var(--text-muted);
  font-size: 9px;
  line-height: 1.35;
}

.cari-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.42fr);
  gap: 14px;
  margin-bottom: 16px;
}

.cari-list-panel,
.cari-form-panel,
.cari-detail-shell {
  padding: 14px;
}

.cari-form-panel {
  max-width: 860px;
  margin: 0 auto 16px;
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(18, 42, 74, 0.08);
}

.cari-list-page {
  display: grid;
  gap: 18px;
}

.cari-toolbar-panel {
  padding: 12px 14px;
  border: 1px solid #dbe5ee;
  border-radius: 16px;
  background:
    radial-gradient(circle at top left, rgba(26, 126, 117, 0.08), transparent 34%),
    linear-gradient(180deg, #fdfefe 0%, #f6f9fb 100%);
  box-shadow: 0 12px 26px rgba(16, 37, 63, 0.06);
}

.cari-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.65fr) repeat(3, minmax(132px, 0.82fr));
  gap: 8px;
  margin-top: 10px;
}

.cari-filter-field {
  display: grid;
  gap: 4px;
}

.cari-filter-field span {
  font-size: 8px;
  font-weight: 700;
  color: #617489;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cari-filter-field input,
.cari-filter-field select {
  width: 100%;
  height: 32px;
  border: 1px solid #d7e2ec;
  border-radius: 9px;
  background: #ffffff;
  padding: 0 10px;
  color: #22364d;
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.cari-overview-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 2.1fr);
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
}

.cari-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(272px, 0.6fr);
  gap: 16px;
}

.cari-insight-column {
  display: grid;
  gap: 14px;
}

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

.panel-hint {
  color: var(--text-muted);
  font-size: 10px;
}

.cari-list-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cari-list-panel {
  min-height: 0;
}

.cari-summary-panel {
  flex: 0 0 auto;
}

.cari-records-panel {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.cari-records-shell {
  padding: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dbe5ee;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(16, 37, 63, 0.06);
}

.cari-table-shell {
  overflow: auto;
  border-top: 1px solid #ebf0f5;
}

.cari-table-head,
.cari-table-row {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: 86px minmax(150px, 1.12fr) 102px 112px 92px 104px 98px 102px 92px 160px;
  gap: 0;
  align-items: center;
  min-width: 1102px;
}

.cari-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-right: 10px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef4f7 100%);
  border-bottom: 1px solid #d8e3eb;
}

.cari-table-head span {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: #5f7488;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-right: 1px solid #dfe7ee;
}

.cari-table-head span:last-child {
  border-right: 0;
}

.cari-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 12px;
  border-top: 1px solid #ebf0f5;
  background: #f8fbfd;
  flex-wrap: wrap;
}
.cari-page-btn {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid #d0dbe6;
  border-radius: 5px;
  background: #fff;
  color: #2d5a8e;
  cursor: pointer;
  transition: background 0.15s;
}
.cari-page-btn:hover:not(:disabled) { background: #e8f4ff; }
.cari-page-btn.is-active { background: #2d5a8e; color: #fff; border-color: #2d5a8e; font-weight: 700; }
.cari-page-btn:disabled { opacity: 0.4; cursor: default; }
.cari-page-ellipsis { font-size: 11px; color: #8aa0b8; padding: 0 4px; }
.cari-page-info { font-size: 10.5px; color: #6b8299; margin-left: auto; }

.cari-table-body {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  background: #fff;
}

.cari-table-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.cari-table-body::-webkit-scrollbar-track {
  background: #eef2f7;
}

.cari-table-body::-webkit-scrollbar-thumb {
  background: #c5d3e3;
  border-radius: 999px;
  border: 2px solid #eef2f7;
}

.cari-table-row {
  min-height: 32px;
  border-bottom: 1px solid #ebf0f5;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.cari-table-row:nth-child(even) {
  background: #fbfdff;
}

.cari-table-row:nth-child(odd) {
  background: #ffffff;
}

.cari-table-row:hover {
  background: #f5fbf9;
}

.cari-table-row.is-selected {
  background: #114d4c;
  box-shadow: inset 0 0 0 1px #0c3837;
  transform: translateY(-1px);
}

.cari-table-row.is-risk {
  background: #fff7f4;
}

.cari-table-row.is-selected.is-risk {
  background: #5b2f2a;
  box-shadow: inset 0 0 0 1px #3f1f1b;
}

.cari-cell {
  display: flex;
  box-sizing: border-box;
  min-width: 0;
  min-height: 100%;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 2px 7px;
  font-size: 10px;
  color: #24384f;
  border-right: 1px solid #edf2f7;
}

.cari-cell:last-child {
  border-right: 0;
}

.cari-cell.cell-code {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.cari-cell.cell-code strong {
  font-size: 9.5px;
  line-height: 1.1;
  text-align: center;
}

.cari-cell.cell-code small {
  color: #7a8c9e;
  font-size: 7.5px;
  text-align: center;
}

/* Aksiyon ikonları */
.cari-cell.cell-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 2px 6px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.cari-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.cari-icon-btn:hover { background: #e8f0f8; border-color: #c5d5e8; }
.cari-icon-btn.btn-view:hover { background: #e6f4ea; border-color: #a8d5b0; }
.cari-icon-btn.btn-edit:hover { background: #fff4e0; border-color: #f0c060; }
.cari-icon-btn.btn-move:hover { background: #e8f0fb; border-color: #a0bce0; }
.cari-icon-btn.btn-offer:hover { background: #f0e8ff; border-color: #c0a0e0; }
.cari-icon-btn.btn-delete:hover { background: #fdecea; border-color: #e8a0a0; color: #c0392b; }

.cari-cell.cell-name {
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  text-align: left;
  gap: 2px;
}

.cari-cell.cell-name strong,
.cari-cell.cell-name small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cari-cell.cell-name strong {
  font-size: 10.75px;
  line-height: 1.1;
  font-weight: 700;
}

.cari-cell.cell-name small {
  color: #718397;
  font-size: 8px;
  margin-top: 0;
}

.cari-cell.cell-money {
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  color: inherit;
  font-weight: 700;
  font-size: 9.5px;
}

.cari-cell.cell-type {
  font-size: 10px;
  color: #4d6277;
  white-space: nowrap;
}

.cari-table-row.is-selected .cari-cell:not(.cell-money),
.cari-table-row.is-selected .cari-cell.cell-name small,
.cari-table-row.is-selected .cari-cell.cell-code small,
.cari-table-row.is-selected .cari-row-status {
  color: #ffffff;
}

.cari-table-row.is-selected .cari-cell.cell-money {
  color: #ffffff;
}

.cari-table-row.is-selected.is-risk .cari-cell:not(.cell-money),
.cari-table-row.is-selected.is-risk .cari-cell.cell-name small,
.cari-table-row.is-selected.is-risk .cari-cell.cell-code small {
  color: #fff4f1;
}

.cari-table-row.is-selected.is-risk .cari-cell.cell-money {
  color: #fff4f1;
}

.cari-table-row.is-selected .cari-row-status {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.cari-table-row.is-selected .cari-row-status.is-debt {
  color: #ffd4cc;
  background: rgba(191, 61, 43, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 212, 204, 0.28);
}

.cari-table-row.is-selected .cari-row-status.is-credit {
  color: #bdf5dc;
  background: rgba(21, 130, 92, 0.18);
  box-shadow: inset 0 0 0 1px rgba(189, 245, 220, 0.28);
}

.cari-table-row.is-selected .ghost-action {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.cari-table-row.is-selected.is-risk .ghost-action {
  color: #fff4f1;
  border-color: rgba(255, 212, 204, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

.cari-row-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5a677d;
  font-size: 7.5px;
  font-weight: 700;
  white-space: nowrap;
}

.cari-status-stack {
  display: grid;
  gap: 2px;
  justify-items: flex-start;
}

.cari-status-stack small {
  color: #718397;
  font-size: 8px;
  line-height: 1.2;
}

.cari-row-status.is-active {
  background: #ecf8f2;
  color: #1b8d63;
}

.cari-row-status.is-passive {
  background: #eef2f6;
  color: #6b7b8d;
}

.cari-row-status.is-risk {
  background: #fff1ef;
  color: #c24c33;
  box-shadow: inset 0 0 0 1px rgba(209, 67, 67, 0.22);
}

.cari-cell.cell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: center;
  gap: 5px 4px;
}

.cari-cell.cell-actions .ghost-action {
  min-width: 68px;
  height: 24px;
  padding: 0 10px;
  font-size: 8.5px;
  border-radius: 999px;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  font-weight: 700;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}

.cari-cell.cell-actions .ghost-action:hover {
  border-color: #9cc0f7;
  background: #eef5ff;
  color: #1f5fd1;
}

.cari-cell.cell-actions .ghost-action:focus-visible,
.cari-cell.cell-actions .ghost-action:active {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(47, 111, 237, 0.24);
  transform: translateY(-1px);
}

.cari-cell.cell-actions .ghost-action.delete-btn:hover {
  border-color: #efb1b1;
  background: #fff1f1;
  color: #c43d3d;
}

.cari-cell.cell-actions .ghost-action.delete-btn:focus-visible,
.cari-cell.cell-actions .ghost-action.delete-btn:active {
  border-color: #d14343;
  background: #d14343;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(209, 67, 67, 0.24);
}

.cari-table-row.is-selected .cari-status-stack small,
.cari-table-row.is-selected.is-risk .cari-status-stack small {
  color: rgba(255, 255, 255, 0.78);
}

.cari-sticky-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d8e6e3;
  border-radius: 14px;
  background: linear-gradient(135deg, #123d45 0%, #1d6b62 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(17, 79, 83, 0.18);
  box-sizing: border-box;
  height: 100%;
  min-height: 60px;
}

.cari-sticky-bar strong {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.cari-sticky-bar span {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.8);
}

.cari-sticky-bar b {
  font-size: 16px;
  white-space: nowrap;
}

.cari-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.cari-stat-card {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(16, 37, 63, 0.04);
}

.cari-stat-card span {
  font-size: 8px;
  font-weight: 700;
  color: #6b7e92;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cari-stat-card strong {
  font-size: 16px;
  color: #1e334a;
  line-height: 1.1;
}

.cari-stat-card small {
  color: #718397;
  font-size: 9px;
}

.cari-detail-shell {
  padding: 8px;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 10px 22px rgba(16, 37, 63, 0.045);
}

.cari-detail-panel {
  display: grid;
  gap: 7px;
}

.cari-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.cari-detail-head-main {
  min-width: 0;
}

.cari-detail-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.cari-detail-head h3 {
  margin: 0;
  font-size: 14px;
  color: #1f3348;
}

.cari-detail-head p {
  margin: 3px 0 0;
  color: #6c8094;
  font-size: 8px;
}

.cari-detail-summary-grid,
.cari-detail-general-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cari-detail-summary-grid article,
.cari-detail-general-grid article {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  border: 1px solid #e5edf4;
  border-radius: 10px;
  background: #ffffff;
}

.cari-detail-summary-grid small,
.cari-detail-general-grid small {
  color: #74889a;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cari-detail-summary-grid strong,
.cari-detail-general-grid strong {
  color: #203246;
  font-size: 10px;
  line-height: 1.3;
}

.cari-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cari-detail-tab {
  height: 27px;
  border: 1px solid #d7e2ec;
  border-radius: 999px;
  background: #ffffff;
  padding: 0 10px;
  color: #50667b;
  font-size: 8.5px;
  font-weight: 700;
  cursor: pointer;
}

.cari-detail-tab.is-active {
  border-color: #185f5b;
  background: #185f5b;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(24, 95, 91, 0.16);
}

.cari-detail-tab-content {
  min-height: 148px;
}

.cari-detail-stack {
  display: grid;
  gap: 7px;
}

.cari-detail-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.cari-detail-subhead strong {
  color: #203246;
  font-size: 11px;
}

.cari-detail-subhead span {
  color: #708396;
  font-size: 9px;
}

.cari-detail-list {
  display: grid;
  gap: 7px;
}

.cari-detail-list-item,
.cari-detail-notes-panel,
.cari-detail-empty {
  padding: 9px 10px;
  border: 1px solid #e5edf4;
  border-radius: 10px;
  background: #ffffff;
}

.cari-detail-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cari-detail-list-item strong,
.cari-detail-notes-panel strong {
  display: block;
  color: #203246;
}

.cari-detail-list-item span,
.cari-detail-list-item small,
.cari-detail-empty,
.cari-detail-notes-panel p {
  color: #708396;
  font-size: 9.5px;
}

.cari-detail-notes-panel p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.cari-detail-address-grid,
.cari-detail-finance-grid {
  display: grid;
  gap: 7px;
}

.cari-detail-address-card,
.cari-detail-finance-card {
  padding: 10px;
  border: 1px solid #e5edf4;
  border-radius: 10px;
  background: #ffffff;
}

.cari-detail-address-card strong,
.cari-detail-finance-card strong {
  display: block;
  color: #203246;
  font-size: 10.5px;
}

.cari-detail-address-card p,
.cari-detail-finance-card p {
  margin: 6px 0 0;
  color: #708396;
  font-size: 9.5px;
  line-height: 1.5;
}

.is-credit-text {
  color: #1a8d63;
}

.is-debt-text {
  color: #bf3d2b;
}

:root {
  --cari-statement-columns: 34px minmax(120px, 1fr) repeat(4, minmax(84px, 0.85fr)) 116px;
}

.cari-statement-table-shell {
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.cari-statement-table-head,
.cari-statement-row {
  display: grid;
  grid-template-columns: var(--cari-statement-columns);
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}

.cari-statement-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(180px, 0.9fr);
  gap: 12px;
  margin-bottom: 14px;
}

.cari-statement-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cari-statement-toolbar span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.cari-statement-toolbar input,
.cari-statement-toolbar select {
  height: 38px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #f9fbfd;
  padding: 0 12px;
  font-size: 12px;
}

.cari-statement-table-head {
  background: linear-gradient(180deg, #f8f8f8, #e7e7e7);
  border-top: 1px solid #c8c8c8;
  border-bottom: 1px solid #b9b9b9;
  padding-right: 10px;
}

.cari-statement-table-head span {
  display: flex;
  align-items: center;
  padding: 7px 6px;
  font-size: 9px;
  font-weight: 700;
  color: #394657;
  border-right: 1px solid #cfcfcf;
}

.cari-statement-table-head span.is-left {
  justify-content: flex-start;
  text-align: left;
}

.cari-statement-table-head span.is-center {
  justify-content: center;
  text-align: center;
}

.cari-statement-table-head span.is-right {
  justify-content: flex-end;
  text-align: right;
}

.cari-statement-table-head span:last-child {
  border-right: 0;
}

.cari-statement-table-body {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  background: #fff;
}

.cari-statement-row {
  min-height: 34px;
  border-bottom: 1px solid #d9d9d9;
}
.cari-statement-cell.cell-detail-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.cari-statement-cell.cell-detail-action .cari-icon-btn {
  width: 26px;
  height: 24px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.cari-statement-row:last-child {
  border-bottom: 0;
}

.cari-statement-row:nth-child(even) {
  background: #fbfbfb;
}

.cari-statement-row:nth-child(odd) {
  background: #fffef3;
}

.cari-statement-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-right: 1px solid #dcdcdc;
  font-size: 9px;
}

.cari-statement-cell:last-child {
  border-right: 0;
}

.cari-statement-cell.cell-name {
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 4px 8px;
  text-align: left;
  gap: 1px;
}

.cari-statement-cell.cell-name strong,
.cari-statement-cell.cell-name small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cari-statement-cell.cell-name strong {
  font-size: 10px;
  line-height: 1.2;
}

.cari-statement-cell.cell-name small {
  color: var(--text-muted);
  font-size: 7px;
  margin-top: 0;
}

.cari-statement-cell.cell-money {
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.cari-statement-cell.cell-money.is-debt {
  color: #bf3d2b;
  font-weight: 700;
}

.cari-statement-cell.cell-money.is-credit {
  color: #15825c;
  font-weight: 700;
}

.cari-statement-cell.cell-detail-action {
  justify-content: center;
}

.icon-action-btn {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 8px;
}

.icon-action-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.icon-action-btn.is-active {
  background: #0d5b5f;
  color: #ffffff;
  border-color: #083c3f;
}

.cari-statement-detail-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #edf2f7;
}

.cari-statement-output-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #d6dbe4;
  border-radius: 10px;
  background: #f8fafc;
}

.cari-statement-output-panel strong {
  display: block;
  font-size: 12px;
  margin-bottom: 3px;
}

.cari-statement-output-panel p {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.cari-statement-output-form {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d6dbe4;
  border-radius: 10px;
  background: #fcfdff;
}

.cari-statement-output-form input,
.cari-statement-output-form select,
.cari-statement-output-form textarea {
  width: 100%;
}

.cari-statement-output-form label {
  display: grid;
  gap: 6px;
}

.cari-statement-output-form span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.cari-statement-output-form textarea {
  min-height: 82px;
  resize: vertical;
}

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

.settings-style-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.settings-style-stack {
  display: grid;
  gap: 16px;
}

.settings-style-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  padding: 16px;
}

.settings-style-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.settings-style-preset {
  border: 1px solid #d6dce6;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.settings-style-preset:hover {
  border-color: #b9c7d7;
  transform: translateY(-1px);
}

.settings-style-preset.is-active {
  border-color: #7aa6ef;
  box-shadow: 0 0 0 1px rgba(47, 111, 237, 0.16);
  background: #f6f9ff;
}

.settings-style-preset-swatches {
  display: flex;
  gap: 8px;
}

.settings-style-preset-swatches span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.settings-style-preset strong,
.settings-style-preset small {
  display: block;
}

.settings-style-preset small {
  color: var(--text-muted);
}

.settings-style-form {
  margin-top: 14px;
}

.settings-style-form input[type="range"] {
  padding: 0;
}

.settings-style-preview-card {
  align-self: start;
}

.settings-style-preview {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 18px;
  box-shadow: 0 16px 36px rgba(17, 25, 40, 0.06);
}

.settings-style-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.settings-style-preview-head strong {
  font-size: 18px;
}

.settings-style-preview-head span {
  color: var(--text-muted);
  font-size: 12px;
}

.settings-style-preview-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.settings-style-preview-kpis article,
.settings-style-preview-side article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px;
}

.settings-style-preview-kpis span,
.settings-style-preview-side span {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.settings-style-preview-kpis strong,
.settings-style-preview-side strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

.settings-style-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 220px;
  gap: 12px;
}

.settings-style-preview-table {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.settings-style-preview-table header,
.settings-style-preview-table div {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.7fr;
  gap: 8px;
  padding: 10px 12px;
  align-items: center;
}

.settings-style-preview-table header {
  background: #f3f7fc;
  font-size: 11px;
  font-weight: 700;
  color: #4f6276;
}

.settings-style-preview-table div {
  border-top: 1px solid #edf2f7;
  font-size: 12px;
}

.settings-style-preview-side {
  display: grid;
  gap: 12px;
}

.settings-extre-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  margin-top: 16px;
}

.offer-form-preview-panel {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 0;
  overflow: hidden;
  border-color: #d7e0ea;
  background:
    linear-gradient(180deg, #f9fbfe 0%, #f3f7fb 100%);
  box-shadow:
    0 18px 42px rgba(17, 25, 40, 0.08),
    0 2px 6px rgba(17, 25, 40, 0.04);
}

.offer-form-preview-panel .panel-header-row {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid #dde6f0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.96));
  backdrop-filter: blur(8px);
}

.offer-form-preview-panel .panel-header-row h2 {
  font-size: 15px;
  letter-spacing: 0.01em;
}

.offer-form-preview-panel .panel-header-row p {
  margin: 4px 0 0;
  color: #66768a;
  font-size: 11px;
  line-height: 1.45;
}

.offer-form-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid #d7e4f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #496173;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(17, 25, 40, 0.05);
}

.offer-form-preview-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28a167;
  box-shadow: 0 0 0 3px rgba(40, 161, 103, 0.14);
}

.offer-form-preview-badge.is-dirty {
  border-color: #f0d2a6;
  background: rgba(255, 249, 238, 0.96);
  color: #8a5a16;
}

.offer-form-preview-badge.is-dirty::before {
  background: #e39b2d;
  box-shadow: 0 0 0 3px rgba(227, 155, 45, 0.18);
}

.offer-form-preview-badge.is-live::before {
  background: #28a167;
  box-shadow: 0 0 0 3px rgba(40, 161, 103, 0.14);
}

.offer-form-preview-shell {
  position: relative;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(236, 242, 248, 0.85));
}

.offer-form-preview-shell::-webkit-scrollbar {
  width: 10px;
}

.offer-form-preview-shell::-webkit-scrollbar-thumb {
  background: rgba(112, 132, 156, 0.35);
  border-radius: 999px;
  border: 2px solid rgba(245, 248, 252, 0.95);
}

.offer-form-preview-shell::-webkit-scrollbar-track {
  background: transparent;
}

.offer-form-preview-frame {
  display: block;
  min-height: clamp(640px, calc(100vh - 96px), 980px);
  height: calc(100vh - 96px);
  border-radius: 14px;
  border: 1px solid #cfdae6;
  background: #ffffff;
  box-shadow:
    0 12px 30px rgba(17, 25, 40, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.settings-form-list {
  display: grid;
  gap: 10px;
}

.settings-form-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.settings-form-name {
  display: grid;
  gap: 6px;
}

.settings-form-name span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.design-editor-subtitle {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px dashed var(--line-color);
  border-radius: 10px;
  background: rgba(93, 119, 146, 0.06);
}

.design-editor-subtitle strong {
  font-size: 12px;
  color: var(--text-color);
}

.design-editor-subtitle span {
  font-size: 11px;
  color: var(--text-muted);
}

.offer-design-sections-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fafcff;
}

.offer-design-sections-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.offer-design-sections-head h3 {
  margin: 0;
  font-size: 14px;
}

.offer-design-sections-head p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.offer-design-sections-list {
  display: grid;
  gap: 8px;
}

.offer-design-section-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  background: #ffffff;
}

.offer-design-section-card.is-active {
  border-color: #7db7b1;
  background: #edf7f6;
  box-shadow: 0 0 0 1px rgba(71, 146, 134, 0.16);
}

.offer-design-section-card.is-hidden {
  opacity: 0.72;
}

.offer-design-section-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.offer-design-section-meta strong {
  font-size: 12px;
}

.offer-design-section-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.offer-design-section-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.offer-design-section-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.offer-design-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.offer-design-section-btn {
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cfd8e2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-color);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.offer-design-section-btn:hover {
  border-color: #aebdce;
  background: #f8fbff;
}

.offer-design-section-btn.danger {
  border-color: #f0c6c1;
  color: #b94237;
}

.offer-design-section-editor {
  display: grid;
  gap: 10px;
}

.offer-design-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.offer-design-section-grid label {
  display: grid;
  gap: 6px;
}

.offer-design-section-grid span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.offer-design-section-grid input,
.offer-design-section-grid select,
.offer-design-section-grid textarea {
  width: 100%;
}

.offer-design-fields-list {
  display: grid;
  gap: 10px;
}

.offer-design-field-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dde5ee;
  border-radius: 12px;
  background: #f8fbff;
}

.offer-design-field-group-head {
  display: grid;
  gap: 4px;
}

.offer-design-field-group-head strong {
  font-size: 12px;
}

.offer-design-field-group-head span {
  font-size: 11px;
  color: var(--text-muted);
}

.offer-design-field-group-body {
  display: grid;
  gap: 8px;
  padding: 4px;
  border-radius: 10px;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}

.offer-design-field-group-body.is-drop-zone-active {
  background: rgba(93, 119, 146, 0.08);
  box-shadow: inset 0 0 0 1px rgba(93, 119, 146, 0.22);
}

.offer-design-field-card {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d9e1ea;
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, transform 0.16s ease;
  cursor: grab;
}

.offer-design-field-card.is-dragging {
  opacity: 0.45;
  border-style: dashed;
  transform: scale(0.985);
  cursor: grabbing;
}

.offer-design-field-card.is-drop-target {
  border-color: #6d92b0;
  box-shadow: 0 0 0 2px rgba(109, 146, 176, 0.18);
  background: #f6fbff;
}

.offer-design-field-card.is-selected {
  border-color: #7db7b1;
  background: #edf7f6;
  box-shadow: 0 0 0 2px rgba(71, 146, 134, 0.16);
}

.offer-design-field-handle {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 3px;
  align-content: center;
  justify-content: center;
  min-height: 34px;
  opacity: 0.7;
}

.offer-design-field-handle span {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #91a2b6;
}

.offer-design-field-card.is-drop-before::before,
.offer-design-field-card.is-drop-after::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 999px;
  background: #5d7792;
  box-shadow: 0 0 0 2px rgba(93, 119, 146, 0.12);
}

.offer-design-field-card.is-drop-before::before {
  top: -3px;
}

.offer-design-field-card.is-drop-after::after {
  bottom: -3px;
}

.offer-design-field-meta {
  display: grid;
  gap: 4px;
}

.offer-design-field-meta strong {
  font-size: 12px;
}

.offer-design-field-meta span {
  font-size: 11px;
  color: var(--text-muted);
}

.offer-design-field-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.offer-design-field-order-btn {
  min-width: 54px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #cfd8e2;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-color);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.offer-design-field-order-btn:hover {
  border-color: #adbdcf;
  background: #f7fbff;
}

.offer-design-field-order-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.offer-design-field-controls label {
  display: grid;
  gap: 4px;
}

.offer-design-field-controls label span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.offer-design-field-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding-top: 14px;
}

.offer-design-field-toggle span {
  font-size: 11px !important;
  color: var(--text-color) !important;
}

.offer-design-field-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.offer-design-field-empty {
  padding: 12px;
  border: 1px dashed #cad5e2;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-muted);
  font-size: 11px;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.offer-design-field-group-body.is-drop-zone-active .offer-design-field-empty {
  border-color: #6d92b0;
  background: #f6fbff;
  box-shadow: inset 0 0 0 1px rgba(109, 146, 176, 0.16);
}

.offer-design-field-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.offer-design-field-editor-grid label,
.offer-design-field-editor-actions {
  display: grid;
  gap: 6px;
}

.offer-design-field-editor-grid span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

.offer-design-field-editor-grid input,
.offer-design-field-editor-grid select {
  width: 100%;
}

.offer-design-field-editor-actions {
  align-content: end;
}

.offer-design-field-editor-actions .ghost-action {
  height: 34px;
}

#offerFormFieldEditorPanel.is-empty {
  opacity: 0.72;
}

.settings-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.settings-form-actions .ghost-action,
.settings-form-actions .primary-btn {
  height: 28px;
  min-width: 0;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.settings-save-btn {
  min-width: 150px;
}

.settings-save-btn:disabled {
  opacity: 0.68;
  cursor: default;
  box-shadow: none;
}

.settings-form-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d6dbe4;
  border-radius: 10px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.settings-form-card strong {
  font-size: 13px;
}

.settings-form-card span {
  font-size: 11px;
  color: var(--text-muted);
}

.settings-form-card.is-active {
  border-color: #7db7b1;
  background: #edf7f6;
  box-shadow: 0 0 0 1px rgba(71, 146, 134, 0.18);
}

.settings-form-card:hover {
  border-color: #b8c5d6;
}

.settings-form-subtitle {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e7edf5;
}

.settings-form-subtitle strong {
  font-size: 13px;
}

.settings-form-subtitle span {
  font-size: 11px;
  color: var(--text-muted);
}

.cari-statement-preview-frame {
  width: 100%;
  min-height: 900px;
  border: 1px solid #d6dbe4;
  border-radius: 10px;
  background: #ffffff;
}

.cari-statement-movement-head,
.cari-statement-movement-row {
  display: grid;
  grid-template-columns: 112px 168px minmax(160px, 0.82fr) 112px 84px;
  gap: 0;
}

.cari-statement-movement-head {
  background: #f7f9fc;
  border: 1px solid #edf2f7;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.cari-statement-movement-head span,
.cari-statement-movement-row span {
  padding: 10px 12px;
  font-size: 11px;
  border-right: 1px solid #edf2f7;
}

.cari-statement-movement-head span:last-child,
.cari-statement-movement-row span:last-child {
  border-right: 0;
}

.cari-statement-movement-head span {
  font-weight: 700;
  color: var(--text-muted);
}

.cari-statement-movement-body {
  border: 1px solid #edf2f7;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.cari-statement-movement-row {
  background: #fff;
  border-bottom: 1px solid #edf2f7;
}

.cari-statement-movement-row:last-child {
  border-bottom: 0;
}

.cari-statement-movement-row span:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cari-statement-movement-row .cell-movement-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 8px;
}

.cari-statement-movement-row .is-debt {
  color: #bf3d2b;
  font-weight: 700;
}

.cari-statement-movement-row .is-credit {
  color: #15825c;
  font-weight: 700;
}

@media (max-width: 980px) {
  .settings-extre-layout {
    grid-template-columns: 1fr;
  }

  .settings-style-layout,
  .settings-style-preview-grid {
    grid-template-columns: 1fr;
  }

  .offer-form-preview-panel {
    position: static;
  }

  .offer-form-preview-panel .panel-header-row {
    position: static;
  }

  .offer-form-preview-badge {
    align-self: flex-start;
  }

  .offer-form-preview-shell {
    max-height: none;
    overflow: visible;
    padding: 12px;
  }

  .offer-form-preview-frame {
    min-height: 720px;
    height: 720px;
  }

  .settings-form-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .settings-form-actions {
    justify-content: flex-start;
  }

  .settings-style-presets,
  .settings-style-preview-kpis {
    grid-template-columns: 1fr;
  }

  .offer-design-sections-head {
    flex-direction: column;
  }

  .offer-design-section-card {
    grid-template-columns: 1fr;
  }

  .offer-design-section-actions {
    justify-content: flex-start;
  }

  .offer-design-section-grid {
    grid-template-columns: 1fr;
  }

  .offer-design-field-card {
    grid-template-columns: 1fr;
  }

  .offer-design-field-controls {
    justify-content: flex-start;
  }

  .offer-design-field-editor-grid {
    grid-template-columns: 1fr;
  }
}

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

.cari-form-panel .cari-panel-head {
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid #edf2f7;
}

.cari-panel-head h2 {
  margin: 0 0 4px;
  font-size: 14px;
}

.cari-panel-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
}


.cari-mini-panel {
  margin-top: 10px;
}

.cari-mini-chart {
  display: grid;
  gap: 8px;
  min-height: 330px;
  max-height: 330px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfdff;
}

.cari-mini-row {
  display: grid;
  grid-template-columns: minmax(0, 74px) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.cari-mini-row span,
.cari-mini-row strong {
  font-size: 9px;
}

.cari-mini-row span {
  color: var(--text-muted);
}

.cari-mini-bar {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: #edf2f8;
  overflow: hidden;
}

.cari-mini-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.cari-mini-bar.is-debt i {
  background: linear-gradient(90deg, #ff9b7d 0%, #df5b38 100%);
}

.cari-mini-bar.is-credit i {
  background: linear-gradient(90deg, #7cc7ff 0%, #2f6fed 100%);
}

.cari-mini-empty {
  padding: 8px 10px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--text-muted);
  font-size: 10px;
}

.compact-card-list {
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 470px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
}

.compact-card-list::-webkit-scrollbar {
    width: 10px;
  }

.compact-card-list::-webkit-scrollbar-track {
    background: #eef2f7;
    border-radius: 999px;
  }

.compact-card-list::-webkit-scrollbar-thumb {
    background: #c5d3e3;
    border-radius: 999px;
    border: 2px solid #eef2f7;
  }

.compact-card-list::-webkit-scrollbar-thumb:hover {
    background: #9fb6d1;
  }

.compact-card-list .entity-card {
  grid-template-columns: 1.1fr 0.9fr 0.9fr auto;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.compact-card-list .entity-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: transparent;
}

.compact-card-list .entity-card:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 237, 0.18);
  box-shadow: 0 10px 22px rgba(17, 25, 40, 0.06);
}

.compact-card-list .entity-card strong {
  font-size: 11px;
}

.compact-card-list .entity-card span,
.compact-card-list .entity-card small {
  font-size: 9px;
}

.compact-card-list .entity-card.is-selected {
  border-color: rgba(47, 111, 237, 0.35);
  background: #eef5ff;
}

.compact-card-list .entity-card.is-selected::before {
  background: var(--blue);
}

.compact-card-list .entity-card.is-risk {
  border-color: rgba(209, 67, 67, 0.28);
  background: #fff5f5;
}

.compact-card-list .entity-card.is-risk::before {
  background: #d14343;
}

.compact-card-list .entity-card.is-risk strong,
.compact-card-list .entity-card.is-risk span:last-child {
  color: #bf2f2f;
}

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

#movementFormSection,
#cariStatementSection {
  margin-bottom: 0;
}

#movementsList {
  gap: 6px;
  max-height: 318px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scrollbar-gutter: stable;
}

#movementsList::-webkit-scrollbar {
  width: 12px;
}

#movementsList::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 999px;
}

#movementsList::-webkit-scrollbar-thumb {
  background: #c5d3e3;
  border-radius: 999px;
  border: 3px solid #eef2f7;
}

#movementsList::-webkit-scrollbar-thumb:hover {
  background: #9fb6d1;
}

#movementsList .entity-card {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fcfdff;
}

#movementsList .entity-card.is-selected {
  border-color: rgba(47, 111, 237, 0.38);
  background: #eef5ff;
  box-shadow: 0 8px 18px rgba(47, 111, 237, 0.12);
}

.movement-card-main,
.movement-card-side {
  min-width: 0;
}

.movement-card-main strong,
.movement-card-main span,
.movement-card-main small,
.movement-card-side strong {
  display: block;
}

.movement-card-main strong {
  font-size: 10px;
  margin-bottom: 2px;
}

.movement-card-main span,
.movement-card-main small {
  font-size: 9px;
  color: var(--text-muted);
}

.movement-card-main small {
  margin-top: 3px;
  line-height: 1.35;
}

.movement-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.movement-card-side strong {
  font-size: 10px;
  white-space: nowrap;
}

#movementsList .entity-card strong {
  font-size: 10px;
}

#movementsList .entity-card span,
#movementsList .entity-card small {
  font-size: 9px;
}

#movementsList .entity-actions {
  align-items: center;
  gap: 5px;
}

#movementsList .ghost-action {
  height: 24px;
  padding: 0 8px;
  font-size: 10px;
}

.compact-select {
  height: 28px;
  min-width: 138px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  font-size: 11px;
}

input[data-money="1"] {
  text-align: right;
  letter-spacing: 0.2px;
}

.inline-form-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    grid-column: 1 / -1;
  }

.inline-form-actions .ghost-action,
.inline-form-actions .primary-btn {
    height: 34px;
    min-width: 148px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 0 14px;
  }

.inline-form-actions .ghost-action.is-active,
.inline-form-actions .primary-btn.is-active {
    background: #eef5ff;
    border: 1px solid rgba(47, 111, 237, 0.3);
    color: var(--blue);
    box-shadow: none;
  }

.receipt-action-btn,
.receipt-copy-btn,
.receipt-whatsapp-btn {
  height: 34px;
  min-width: 160px;
  border-radius: 8px;
  border: 0;
  padding: 0 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.receipt-action-btn {
  background: #ffedd5;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.18);
}

.receipt-copy-btn {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid rgba(109, 40, 217, 0.18);
}

.receipt-whatsapp-btn {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid rgba(21, 128, 61, 0.18);
}

.receipt-builder-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fbfdff;
}

.receipt-builder-panel[hidden] {
  display: none;
}

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

.receipt-builder-panel textarea {
  min-height: 88px;
  resize: vertical;
}

.receipt-actions {
  justify-content: flex-end;
}

.receipt-print-btn {
  background: #1d4ed8;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.18);
}

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

.cari-detail-head h3 {
  margin: 0;
  font-size: 14px;
}

.cari-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef1f6;
  color: #66758b;
  font-size: 9px;
  font-weight: 700;
}

.cari-status-badge.is-debt {
  background: #fff2f2;
  color: #c23b3b;
}

.cari-status-badge.is-credit {
  background: #eaf8f0;
  color: #18945d;
}

.cari-status-badge.is-risk {
  box-shadow: inset 0 0 0 1px rgba(194, 59, 59, 0.22);
}

.cari-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.cari-detail-grid small,
.cari-detail-grid strong {
  display: block;
}

.cari-detail-grid small {
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 10px;
}

.cari-detail-grid strong {
  font-size: 12px;
}

.cari-detail-note {
  grid-column: 1 / -1;
}

.cari-detail-note strong {
  white-space: pre-wrap;
  line-height: 1.4;
}

.cari-form-panel {
  max-width: 1240px;
}

.cari-entry-shell {
  display: grid;
  gap: 18px;
}

.cari-form-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8eef5;
}

.cari-form-topbar h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.cari-form-topbar p {
  margin: 0;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.cari-form-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cari-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.cari-form-main,
.cari-summary-card {
  border: 1px solid #dbe5ee;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 16px 36px rgba(18, 42, 74, 0.07);
}

.cari-form-main {
  padding: 18px;
}

.cari-form-side {
  position: sticky;
  top: 20px;
}

.cari-form-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e8eef5;
}

.cari-form-tab {
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #f8fbff;
  color: #506177;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.cari-form-tab:hover {
  border-color: #bfd4e8;
  color: #213249;
  transform: translateY(-1px);
}

.cari-form-tab.is-active {
  background: rgba(52, 120, 246, 0.12);
  border-color: rgba(52, 120, 246, 0.22);
  color: #1d4ed8;
}

.cari-form-section {
  display: none;
  gap: 16px;
}

.cari-form-section.is-active {
  display: grid;
}

.cari-form-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cari-form-section-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.cari-form-section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.cari-form-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 11px;
  background: #f3f7fb;
  color: #5b6780;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.cari-entry-shell .cari-form-grid {
  display: grid;
  gap: 14px;
}

.cari-entry-shell .cari-form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cari-entry-shell .cari-form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cari-entry-shell .cari-field {
  display: grid;
  gap: 7px;
  color: #425163;
  font-size: 12px;
  font-weight: 700;
}

.cari-entry-shell .cari-field > span {
  line-height: 1.35;
}

.cari-entry-shell .cari-field input,
.cari-entry-shell .cari-field select,
.cari-entry-shell .cari-field textarea {
  width: 100%;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #ffffff;
  color: #182536;
  font: inherit;
  font-size: 13px;
  padding: 0 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.cari-entry-shell .cari-field input,
.cari-entry-shell .cari-field select {
  min-height: 42px;
}

.cari-entry-shell .cari-field textarea {
  min-height: 110px;
  padding: 12px 13px;
  resize: vertical;
}

.cari-entry-shell .cari-field input:focus,
.cari-entry-shell .cari-field select:focus,
.cari-entry-shell .cari-field textarea:focus {
  outline: none;
  border-color: rgba(52, 120, 246, 0.55);
  box-shadow: 0 0 0 4px rgba(52, 120, 246, 0.12);
}

.cari-entry-shell .cari-field input[readonly] {
  background: #f6f9fc;
  color: #607086;
}

.cari-field-error,
.cari-field-hint {
  font-size: 11px;
  line-height: 1.4;
}

.cari-field-error {
  display: none;
  color: #c23b3b;
}

.cari-field-hint {
  color: var(--text-muted);
}

.cari-field.has-error input,
.cari-field.has-error select,
.cari-field.has-error textarea {
  border-color: rgba(194, 59, 59, 0.75);
  box-shadow: 0 0 0 4px rgba(194, 59, 59, 0.08);
}

.cari-field.has-error .cari-field-error {
  display: block;
}

.cari-inline-warning {
  padding: 13px 14px;
  border: 1px solid #f3c5c5;
  border-radius: 14px;
  background: #fff4f4;
  color: #b24a4a;
  font-size: 12px;
  line-height: 1.55;
}

.cari-advanced-fields {
  margin-top: 8px;
  border: 1px dashed #d4dfeb;
  border-radius: 16px;
  background: #f9fbfd;
  padding: 12px 13px 13px;
}

.cari-advanced-fields summary {
  cursor: pointer;
  color: #47607b;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.cari-advanced-fields summary::-webkit-details-marker {
  display: none;
}

.cari-advanced-fields summary::before {
  content: "+";
  display: inline-flex;
  width: 16px;
  justify-content: center;
  margin-right: 6px;
  color: #1f5fd1;
}

.cari-advanced-fields[open] summary::before {
  content: "-";
}

.cari-advanced-fields > .cari-form-grid {
  margin-top: 12px;
}

.cari-address-list {
  display: grid;
  gap: 14px;
}

.cari-address-card {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px dashed #c7d5e4;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fbff 100%);
}

.cari-address-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cari-address-card-head strong {
  font-size: 14px;
}

.cari-summary-card {
  display: grid;
  gap: 0;
  padding: 18px;
}

.cari-summary-logo {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 18px;
  background: rgba(52, 120, 246, 0.12);
  color: #1d4ed8;
  font-size: 28px;
  font-weight: 900;
}

.cari-summary-title {
  margin: 0;
  font-size: 20px;
}

.cari-summary-subtitle {
  margin: 6px 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.cari-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #e8eef5;
  color: var(--text-muted);
  font-size: 12px;
}

.cari-summary-row strong {
  color: #172334;
  text-align: right;
  font-size: 13px;
}

.cari-summary-info {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  background: #fff7e9;
  color: #a26817;
  font-size: 12px;
  line-height: 1.6;
}

.cari-summary-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 1200px) {
  .cari-entry-layout {
    grid-template-columns: 1fr;
  }

  .cari-form-side {
    position: static;
  }
}

@media (max-width: 900px) {
  .cari-form-topbar {
    flex-direction: column;
  }

  .cari-form-top-actions {
    justify-content: flex-start;
  }

  .cari-entry-shell .cari-form-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .cari-form-panel {
    padding: 12px;
  }

  .cari-form-main,
  .cari-summary-card {
    padding: 14px;
    border-radius: 16px;
  }

  .cari-form-tabs {
    gap: 7px;
  }

  .cari-form-tab {
    flex: 1 1 calc(50% - 7px);
    text-align: center;
  }

  .cari-entry-shell .cari-form-grid-2,
  .cari-entry-shell .cari-form-grid-3 {
    grid-template-columns: 1fr;
  }

  .cari-form-section-head,
  .cari-address-card-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .cari-form-top-actions {
    width: 100%;
  }

  .cari-form-top-actions > button,
  .cari-summary-actions > button {
    width: 100%;
  }
}

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

.cari-form-grid label {
  display: grid;
  gap: 6px;
  color: #5b6780;
  font-size: 12px;
}

.cari-form-grid input,
.cari-form-grid select,
.cari-form-grid textarea {
  width: 100%;
  border: 1px solid #dde5f0;
  border-radius: 9px;
  padding: 0 10px;
  background: #fbfdff;
  font: inherit;
  font-size: 13px;
}

.cari-form-grid input,
.cari-form-grid select {
  height: 38px;
}

.cari-form-grid textarea {
  min-height: 94px;
  padding: 10px 12px;
  resize: vertical;
}

.cari-form-note {
  grid-column: 1 / -1;
}

.cari-form-grid .form-submit {
  height: 38px;
}

.form-panel,
.list-panel,
.settings-panel {
  margin-bottom: 18px;
}

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

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Ö2: Form içinde tam genişlik alan */
.form-grid label.form-col-full {
  grid-column: 1 / -1;
}

.form-grid label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #5b6780;
}

.form-grid input,
.form-grid select,
.table-search {
  width: 100%;
  height: 42px;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  padding: 0 12px;
  background: #fbfdff;
}

.form-submit {
  align-self: end;
}

.products-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.22fr);
  gap: 12px;
  align-items: start;
}

.categories-layout {
  display: grid;
  grid-template-columns: minmax(175px, 0.5fr) minmax(235px, 0.72fr);
  gap: 7px;
  align-items: start;
}

.categories-standalone-panel,
.categories-detail-panel {
  padding: 11px;
}

.products-side-panel,
.products-form-panel,
.products-list-panel,
.categories-detail-panel {
  min-height: 100%;
}

.products-list-panel.products-subview-panel:not([hidden]) {
  grid-column: 1 / -1;
  overflow-x: hidden;
  max-width: 100%;
}

/* ── Varyant Yönetimi ─────────────────────────────────── */
.variant-manager-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  height: 100%;
}
.variant-product-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #e4ecf2;
  padding-right: 16px;
}
.variant-product-list {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.variant-product-item {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e4ecf2;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #2d4a6b;
  background: #fff;
  transition: background 0.15s;
}
.variant-product-item:hover { background: #f0f7ff; }
.variant-product-item.is-selected { background: #1d6b62; color: #fff; border-color: #1d6b62; }
.variant-product-item small { display: block; font-size: 10px; font-weight: 400; opacity: 0.75; margin-top: 2px; }

.variant-detail-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.variant-form-box {
  background: #f8fbfd;
  border: 1px solid #d8e8f0;
  border-radius: 10px;
  padding: 14px 16px;
}
.variant-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.variant-form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: #4a6278; }
.variant-form-grid label input,
.variant-form-grid label select { padding: 6px 8px; border: 1px solid #c8d8e8; border-radius: 6px; font-size: 12px; }
.vm-full { grid-column: 1 / -1; }
.variant-form-actions { display: flex; gap: 8px; }

.variant-list-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.variant-row {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 80px 90px 90px 80px;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e4ecf2;
  border-radius: 8px;
  background: #fff;
  font-size: 11px;
}
.variant-row:hover { background: #f5faff; }
.variant-row-head {
  font-weight: 700;
  font-size: 10px;
  color: #5f7488;
  text-transform: uppercase;
  background: #f0f5fa;
  border-radius: 6px;
}
.variant-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant-row-actions { display: flex; gap: 4px; }
.variant-add-bar { padding-top: 4px; }

.vm-group-card {
  border: 1px solid #d8e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.vm-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: linear-gradient(135deg, #1d6b62, #2d8a7e);
  color: #fff;
  font-size: 12px;
}
.vm-group-header strong { font-size: 12px; }
.vm-group-options { padding: 6px 10px; }
.vm-option-head {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 80px;
  gap: 8px;
  padding: 4px 8px;
  font-size: 9.5px;
  font-weight: 700;
  color: #5f7488;
  text-transform: uppercase;
  border-bottom: 1px solid #edf2f7;
  margin-bottom: 4px;
}
.vm-option-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 80px;
  gap: 8px;
  padding: 5px 8px;
  font-size: 11px;
  border-radius: 6px;
  align-items: center;
}
.vm-option-row:hover { background: #f5faff; }

/* Sade VM sayfası */
.vm-simple-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 4px;
}
.vm-simple-card {
  border: 1px solid #d8e8f0;
  border-radius: 12px;
  overflow: hidden;
}
.vm-simple-card-head {
  padding: 10px 16px;
  background: linear-gradient(135deg, #1d6b62, #2d8a7e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.vm-simple-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 14px;
  min-height: 60px;
}
.vm-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #e8f4f0;
  border: 1px solid #b8ddd8;
  border-radius: 20px;
  font-size: 11.5px;
  color: #1d5c55;
  font-weight: 500;
}
.vm-tag-del {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.vm-tag-del:hover { color: #c0392b; }
.vm-simple-add-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #edf2f7;
  background: #f8fbfd;
}
.vm-simple-add-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #c8d8e8;
  border-radius: 6px;
  font-size: 12px;
}
.vm-simple-add-row input:focus { outline: none; border-color: #1d6b62; }

.products-side-panel .panel-header-row p,
.products-form-panel .panel-header-row p,
.products-list-panel .panel-header-row p,
.categories-detail-panel .panel-header-row p {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 8px;
  line-height: 1.2;
}

.products-side-panel .panel-header-row h2,
.products-form-panel .panel-header-row h2,
.products-list-panel .panel-header-row h2,
.categories-detail-panel .panel-header-row h2,
.products-filter-head h2 {
  font-size: 13px;
}

.categories-standalone-panel .panel-header-row h2,
.categories-detail-panel .panel-header-row h2 {
  font-size: 16px;
  font-weight: 700;
}

.category-detail-summary {
  display: grid;
  gap: 1px;
  margin-bottom: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  background: #f6fbfb;
  border: 1px solid #dce8e8;
}

.category-detail-summary strong {
  font-size: 10px;
  color: #12353b;
}

.category-detail-summary span {
  font-size: 7px;
  color: var(--text-muted);
}

.category-type-form {
  margin-bottom: 5px;
}

.categories-standalone-panel .products-category-form,
.categories-detail-panel .products-category-form {
  gap: 6px;
  margin-bottom: 7px;
}

.categories-standalone-panel .products-category-form label,
.categories-detail-panel .products-category-form label {
  gap: 3px;
  font-size: 8px;
}

.categories-standalone-panel .products-category-form input,
.categories-standalone-panel .products-category-form select,
.categories-detail-panel .products-category-form input,
.categories-detail-panel .products-category-form select {
  height: 32px;
  padding: 0 9px;
  font-size: 10px;
}

.category-type-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  gap: 4px;
  align-items: end;
}

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

.inline-form-actions > * {
  flex: 1;
}

.categories-standalone-panel .products-category-form > .primary-btn,
.categories-detail-panel .inline-form-actions > .primary-btn,
.categories-detail-panel .inline-form-actions > .ghost-action {
  flex: 0 0 auto;
  min-width: 92px;
  height: 30px;
  padding: 0 12px;
  font-size: 10px;
}

.categories-detail-panel .inline-form-actions {
  justify-content: flex-start;
}

.category-type-list {
  max-height: 560px;
  overflow: auto;
  padding-right: 3px;
}

.category-type-item {
  border: 1px solid #dde5f0;
  border-radius: 6px;
  background: #fff;
  padding: 3px 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}

.category-type-item + .category-type-item {
  margin-top: 3px;
}

.category-type-content {
  display: grid;
  gap: 1px;
}

.category-type-content strong {
  font-size: 9px;
  color: var(--text-main);
  line-height: 1.2;
}

.category-type-content span {
  font-size: 7px;
  color: var(--text-muted);
  line-height: 1.2;
}

.products-category-form {
  display: grid;
  gap: 4px;
  margin-bottom: 5px;
}

.products-category-form label {
  display: grid;
  gap: 2px;
  font-size: 7px;
  color: #5b6780;
}

.products-category-form input,
.products-category-form select {
  width: 100%;
  height: 27px;
  border: 1px solid #dde5f0;
  border-radius: 6px;
  padding: 0 6px;
  background: #fbfdff;
  font: inherit;
  font-size: 9px;
}

.products-subhead {
  margin-top: 0;
}

.products-category-list,
.products-card-list {
  max-height: 600px;
  overflow: auto;
  padding-right: 3px;
}

.product-category-item {
  border: 1px solid #dde5f0;
  border-radius: 6px;
  background: #fff;
  padding: 3px 4px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.product-category-item:hover {
  border-color: rgba(47, 111, 237, 0.24);
  background: #f8fbfb;
  box-shadow: 0 6px 14px rgba(17, 25, 40, 0.05);
}

.product-category-item.active {
  border-color: rgba(47, 111, 237, 0.32);
  background: #eef5ff;
}

.product-category-pick {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  min-width: 0;
}

.product-category-pick strong,
.product-category-pick span {
  display: block;
}

.product-category-pick strong {
  font-size: 9px;
  color: #264347;
  line-height: 1.2;
}

.product-category-pick span {
  margin-top: 1px;
  color: var(--text-muted);
  font-size: 7px;
  line-height: 1.2;
}

.product-category-actions {
  display: flex;
  gap: 2px;
  justify-content: flex-end;
}

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

.products-form-grid label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: #5b6780;
}

.products-form-grid input,
.products-form-grid select {
  width: 100%;
  height: 34px;
  border: 1px solid #dde5f0;
  border-radius: 8px;
  padding: 0 9px;
  background: #fbfdff;
  font: inherit;
  font-size: 12px;
}

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

.products-form-inline-check {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  background: #f7fbff;
}

.products-form-inline-check input {
  width: 18px !important;
  height: 18px !important;
}

.product-variants-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8e4ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfeff, #f3f8fd);
}

.product-variant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.product-variant-note {
  grid-column: 1 / -1;
}

.product-variant-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.product-variant-list {
  display: grid;
  gap: 8px;
}

.product-variant-table {
  border: 1px solid #d9e3ee;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.product-variant-table-head,
.product-variant-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.2fr) repeat(5, minmax(72px, 0.72fr)) minmax(92px, 0.82fr) minmax(190px, 1.35fr) minmax(220px, 1.25fr);
}

.product-variant-table-head {
  background: #edf4fa;
}

.product-variant-table-head span,
.product-variant-table-row span {
  min-width: 0;
  padding: 8px 9px;
  border-right: 1px solid #dde6ef;
  font-size: 11px;
}

.product-variant-table-head span {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #617288;
}

.product-variant-table-row {
  border-top: 1px solid #edf2f7;
}

.product-variant-table-row.is-default {
  background: #f2fbf6;
}

.product-variant-table-row span:last-child,
.product-variant-table-head span:last-child {
  border-right: 0;
}

.product-variant-table-row span strong,
.product-variant-table-row span small {
  display: block;
}

.product-variant-table-row span small {
  margin-top: 3px;
  color: #2f8f5c;
  font-size: 10px;
}

.product-variant-row-actions {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.product-variant-name-cell {
  min-width: 0;
}

.product-variant-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.product-variant-thumb {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #dbe4ec;
  background: linear-gradient(135deg, #eef4ff, #dfeafc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  font-size: 10px;
  font-weight: 800;
  color: #2f6fed;
}

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

.products-search {
  min-width: 220px;
  max-width: 280px;
}

.products-list-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  padding: 2px 2px 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e8eef5;
}

.products-list-hero h2 {
  margin: 0;
  font-size: 16px;
  color: #18353a;
}

.products-list-hero p {
  margin: 4px 0 0;
  max-width: 760px;
  color: #667488;
  font-size: 11px;
  line-height: 1.35;
}

.products-list-tools {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.products-list-tip {
  font-size: 10px;
  color: #6c7a8d;
}

.products-list-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(680px, 1fr);
  gap: 18px;
  align-items: start;
}

.products-filter-panel {
  grid-column: 1;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  padding: 11px;
  min-height: 100%;
  position: sticky;
  top: 18px;
}

.products-list-shell {
  grid-column: 2;
  display: grid;
  gap: 12px;
  width: 100%;
  max-width: none;
  min-width: 0;
  justify-self: end;
  align-self: start;
  position: sticky;
  top: 18px;
}

.products-list-shell-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid #dfe8f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff, #f4f8fb);
}

.products-list-shell,
.products-list-shell-head,
.products-stack-card {
  box-sizing: border-box;
}

.products-list-shell-head h3 {
  margin: 0;
  font-size: 14px;
  color: #18353a;
}

.products-list-shell-head p {
  margin: 4px 0 0;
  color: #6e7b8e;
  font-size: 10px;
}

.products-grid-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.products-grid-order {
  font-size: 10px;
  font-weight: 700;
  color: #5f6f83;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-stack-list {
  display: grid;
  gap: 10px;
}

.products-stack-card {
  display: grid;
  gap: 3px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.products-stack-head {
  display: grid;
  gap: 4px;
}

.products-stack-head strong {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.2;
}

.products-stack-head span {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

.products-stack-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #e7edf5;
}

.products-stack-actions .ghost-action {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.products-table-compact {
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
}

.products-table-head.products-table-head-simple,
.products-table-row.products-table-row-simple {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(160px, 1.2fr) 92px 74px 92px 118px 116px;
  min-width: 930px;
}

.products-table-head-simple {
  background: linear-gradient(180deg, #f6f9fc, #edf3f8);
}

.products-table-head-simple span {
  padding: 8px 10px;
  font-size: 9px;
  font-weight: 700;
  color: #607086;
  text-transform: uppercase;
  border-right: 1px solid #dfe6ee;
  white-space: nowrap;
}

.products-table-head-simple span:last-child {
  border-right: 0;
}

.products-table-row-simple {
  cursor: pointer;
  border-top: 1px solid #edf2f8;
  background: #fff;
  transition: background 0.15s ease;
}

.products-table-row-simple:hover {
  background: #f9fbff;
}

.products-table-row-simple.is-active {
  background: #edf7f6;
}

.products-table-row-simple .products-cell {
  padding: 8px 10px;
  border-right: 1px solid #edf2f8;
  font-size: 10px;
  min-width: 0;
  overflow: hidden;
}

.products-table-row-simple .products-cell:first-child strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.products-table-row-simple .products-cell:nth-child(2) {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-table-row-simple .products-cell:last-child {
  border-right: 0;
}

.products-table-row-simple .products-cell strong {
  font-size: 11px;
}

.products-table-row-simple .cell-price {
  text-align: right;
  font-weight: 700;
  color: var(--text-main);
}

.products-table-row-simple .cell-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.products-list-filters,
.products-price-test-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.products-list-filters label,
.products-price-test-grid label {
  display: grid;
  gap: 5px;
}

.products-list-filters span,
.products-price-test-grid span {
  color: #516278;
  font-size: 10px;
  font-weight: 700;
}

.products-list-filters select,
.products-price-test-grid input {
  height: 32px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  padding: 0 9px;
  background: #fff;
  color: #172b4d;
  font-size: 11px;
}

.products-price-test-result {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #e7edf5;
  background: #f8fbff;
}

.products-price-test-result span,
.products-price-test-result strong {
  display: grid;
  align-items: center;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid #dce7f4;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
}

.products-price-test-result strong {
  color: #0b5bd3;
  font-size: 13px;
}

.products-filter-chip {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: #1d3357;
  cursor: pointer;
}

.products-filter-chip.active {
  border-color: #80aef4;
  background: #edf5ff;
  box-shadow: inset 3px 0 0 #2f6fed;
}

.products-filter-group {
  display: grid;
  gap: 6px;
}

.products-filter-subchips {
  display: grid;
  gap: 4px;
  padding-left: 12px;
}

.products-filter-subchip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  border-left: 2px solid #d7e2ef;
  border-radius: 6px;
  padding: 6px 8px;
  background: #f8fbff;
  color: #40536c;
  text-align: left;
  cursor: pointer;
}

.products-filter-subchip.active {
  border-left-color: #2f6fed;
  background: #edf5ff;
  color: #123a7a;
  font-weight: 800;
}

.products-filter-subchip small {
  color: #748399;
}

.products-price-table {
  overflow-x: hidden;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  background: #fff;
}

.products-price-head,
.products-price-row {
  display: grid;
  grid-template-columns: 116px minmax(210px, 1.5fr) 116px 126px 82px 72px 108px 100px 62px 118px 98px 70px minmax(300px, 1.7fr);
  min-width: 1630px;
}

.products-price-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f7faff, #edf3f8);
}

.products-price-head span,
.products-price-row > span {
  padding: 9px 10px;
  border-right: 1px solid #e4ebf3;
  font-size: 10px;
  min-width: 0;
}

.products-price-head span {
  color: #5c6b80;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.products-price-row {
  border-top: 1px solid #edf2f8;
  cursor: pointer;
}

.products-price-row:hover {
  background: #f9fbff;
}

.products-price-row.is-passive {
  color: #7a8797;
  background: #fafafa;
}

.code-cell {
  font-weight: 800;
  color: #12306a;
}

.name-cell strong,
.name-cell small,
.m2-price-cell small {
  display: block;
}

.name-cell strong {
  font-size: 12px;
  color: #10245a;
}

.name-cell small,
.m2-price-cell small {
  margin-top: 3px;
  color: #6b7b90;
  font-size: 9px;
}

.m2-price-cell {
  color: #0b5bd3;
  font-size: 14px !important;
  font-weight: 900;
  text-align: right;
}

.status-active {
  color: #14804a;
}

.status-passive {
  color: #9b4d00;
}

.products-quick-cell {
  display: grid;
  gap: 7px;
}

.products-quick-calc,
.products-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.products-quick-calc input {
  width: 54px;
  height: 28px;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 10px;
}

.products-quick-calc output {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 126px;
  font-size: 10px;
}

.products-quick-calc output strong {
  color: #0b5bd3;
}

@media (max-width: 980px) {
  .products-list-filters,
  .products-price-test-grid,
  .products-price-test-result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.products-tree-table {
  display: grid;
  gap: 1px;
}

.products-node-card {
  border: 1px solid #dce6f0;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(17, 25, 40, 0.04);
}

.products-node-card.is-active {
  border-color: #bcd2f5;
  box-shadow: 0 14px 30px rgba(47, 111, 237, 0.08);
}

.products-node-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  background: linear-gradient(180deg, #fbfdff, #f6f9fc);
}

.products-node-meta {
  min-width: 0;
  cursor: pointer;
}

.products-node-meta strong,
.products-node-meta span {
  display: block;
}

.products-node-meta strong {
  font-size: 14px;
  color: #18353a;
}

.products-node-meta span {
  margin-top: 4px;
  font-size: 11px;
  color: #6c7a8d;
}

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

.products-node-variant-table {
  overflow-x: auto;
}

.products-node-variant-head,
.products-node-variant-row {
  display: grid;
  grid-template-columns: minmax(270px, 2.3fr) repeat(3, minmax(82px, 0.8fr)) minmax(120px, 1fr) 72px 120px minmax(220px, 1.6fr);
  min-width: 1120px;
}

.products-node-variant-head {
  background: #f2f6fb;
}

.products-node-variant-head span,
.products-node-variant-row > span {
  padding: 10px 12px;
  border-right: 1px solid #e4ebf3;
  min-width: 0;
}

.products-node-variant-head span:last-child,
.products-node-variant-row > span:last-child {
  border-right: 0;
}

.products-node-variant-head span {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  color: #627389;
}

.products-node-variant-row {
  border-top: 1px solid #edf2f7;
  cursor: pointer;
}

.products-node-variant-row:hover {
  background: #fbfdff;
}

.products-node-variant-row.is-active {
  background: #edf5ff;
}

.products-node-variant-row > span {
  font-size: 11px;
}

.products-node-variant-row > span strong,
.products-node-variant-row > span small {
  display: block;
}

.products-node-variant-row > span small {
  margin-top: 4px;
  font-size: 10px;
  color: #6c7a8d;
}

.products-node-variant-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.products-node-variant-image {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid #dce6f0;
  overflow: hidden;
  background: #eef4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  padding: 0;
  cursor: pointer;
}

.products-node-variant-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.products-node-variant-image.placeholder {
  font-size: 10px;
  font-weight: 800;
  color: #2f6fed;
}

.products-node-variant-row.empty {
  display: block;
  min-width: 0;
}

.products-node-variant-row.empty > span {
  display: block;
  padding: 12px;
  border-right: 0;
  font-size: 11px;
  color: #6c7a8d;
}

.products-selection-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.products-summary-card {
  border: 1px solid #dbe4ec;
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
}

.products-summary-card span {
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.products-summary-card strong {
  font-size: 12px;
  color: #18353a;
}

.products-summary-card small {
  font-size: 9px;
  color: var(--text-muted);
}

.products-filter-head {
  margin-bottom: 6px;
}

.products-hierarchy-tree {
  display: grid;
  gap: 5px;
  max-height: 500px;
  overflow: auto;
  padding-right: 2px;
}

.products-tree-group {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.products-tree-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  border: 0;
  border-radius: 3px;
}

.products-tree-category.active {
  background: #e4edfd;
}

.products-tree-group:has(.products-tree-category.active) {
  border-color: transparent;
  box-shadow: none;
}

.products-tree-main {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 4px 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.products-tree-main strong,
.products-tree-main span {
  display: block;
}

.products-tree-main strong {
  font-size: 12px;
  color: #18353a;
  font-weight: 600;
}

.products-tree-category.active .products-tree-main strong {
  color: #1a3a8f;
  font-weight: 700;
}

.products-tree-main span {
  display: none;
}

.products-tree-category.active .products-tree-main span {
  display: none;
}

.products-tree-toggle {
  border: 0;
  background: transparent;
  font-size: 9px;
  color: #8899aa;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.products-tree-category.active .products-tree-toggle {
  color: #2359c4;
}

.products-tree-main:hover,
.products-tree-toggle:hover {
  background: #edf2fa;
  border-radius: 3px;
}

.products-tree-children {
  display: grid;
  gap: 0;
  padding: 0 0 0 12px;
  background: transparent;
  border-left: 1px solid #dde5ef;
  margin-left: 9px;
}

.products-tree-product {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.products-tree-product.active {
  border: 0;
  box-shadow: none;
}

.products-tree-product-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  border: 0;
  border-radius: 3px;
}

.products-tree-product-main,
.products-tree-product-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.products-tree-product-main {
  text-align: left;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.products-tree-product.active .products-tree-product-head {
  background: #e4edfd;
  border-radius: 3px;
}

.products-tree-product-main strong,
.products-tree-product-main span {
  display: block;
}

.products-tree-product-main strong {
  font-size: 11px;
  color: #17324d;
  font-weight: 500;
}

.products-tree-product-main span {
  display: none;
}

.products-tree-product-toggle {
  border: 0;
  color: #8899aa;
  font-size: 9px;
  padding: 0 2px;
  line-height: 1;
}

.products-tree-variants {
  display: grid;
  gap: 0;
  padding: 0 0 0 12px;
  border-left: 1px dashed #cdd8e8;
  margin-left: 9px;
}

.products-tree-variant {
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: transparent;
  padding: 3px 5px;
  text-align: left;
  cursor: pointer;
}

.products-tree-variant strong,
.products-tree-variant span {
  display: block;
}

.products-tree-variant strong {
  font-size: 11px;
  color: #3a4f6a;
  font-weight: 400;
}

.products-tree-variant span {
  display: none;
}

.products-tree-variant.active {
  border: 0;
  background: #d8e7fc;
  border-radius: 3px;
}

.products-bulk-panel {
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.products-bulk-form {
  display: grid;
  gap: 6px;
}

.products-bulk-form label {
  display: grid;
  gap: 4px;
  font-size: 10px;
  color: #5b6780;
}

.products-bulk-form input,
.products-bulk-form select {
  width: 100%;
  height: 30px;
  border: 1px solid #dde5f0;
  border-radius: 7px;
  padding: 0 8px;
  background: #fbfdff;
  font: inherit;
  font-size: 10px;
}

.product-filter-item {
  width: 100%;
  border: 1px solid #dde5f0;
  border-radius: 9px;
  background: #fff;
  padding: 7px 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.compact-action {
  height: 22px;
  padding: 0 7px;
  font-size: 9px;
}

.danger-action {
  color: #c23b3b;
  border-color: #efd0d0;
}

.product-filter-item:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 111, 237, 0.22);
}

.product-filter-item.active {
  border-color: rgba(47, 111, 237, 0.34);
  background: #eef5ff;
}

.product-filter-item strong,
.product-filter-item span {
  display: block;
}

.product-filter-item strong {
  font-size: 11px;
}

.product-filter-item span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
}

.product-type-item.active {
  background: #eef8f7;
  border-color: rgba(18, 102, 107, 0.3);
}

.product-visual-wrap {
  display: flex;
  align-items: center;
}

.product-image-open {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.product-thumb {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #dde5f0;
  background: #eef3f8;
}

.product-thumb.placeholder {
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(180deg, #eef5ff, #dfeaff);
}

.products-image-preview {
  grid-column: 1 / -1;
  min-height: 62px;
  border: 1px dashed #cfd9e8;
  border-radius: 10px;
  background: #f8fbff;
  display: grid;
  place-items: center;
  padding: 8px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.products-image-preview.has-image {
  border-style: solid;
  background: #fff;
}

.products-image-preview img {
  max-width: 100%;
  max-height: 110px;
  border-radius: 8px;
  object-fit: contain;
}

.products-workspace {
  display: grid;
  gap: 14px;
}

.products-page-hero,
.products-method-strip,
.products-shell,
.products-list-shell-head-modern,
.products-form-card,
.products-side-panel-card {
  box-sizing: border-box;
}

.products-page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid #dbe6f1;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.products-page-hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  color: #16254c;
}

.products-page-hero p {
  margin: 8px 0 0;
  color: #61728b;
  font-size: 13px;
  max-width: 880px;
}

.products-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.products-method-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid #dfe8f0;
  background: #fff;
}

.products-method-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid #e6edf5;
  background: #fcfdff;
}

.products-method-card strong {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
}

.products-method-card h3 {
  margin: 1px 0 4px;
  font-size: 15px;
  color: #1d3160;
}

.products-method-card p {
  margin: 0;
  color: #66768e;
  font-size: 11px;
  line-height: 1.45;
}

.products-method-card.purple strong { background: #7c4dff; }
.products-method-card.blue strong { background: #2563eb; }
.products-method-card.green strong { background: #1f9d62; }
.products-method-card.orange strong { background: #f28b2f; }

.products-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.products-left-rail,
.products-right-rail,
.products-main-stage {
  min-width: 0;
}

.products-left-card,
.products-side-panel-card {
  border: 1px solid #dfe8f0;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}

.products-left-card {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
}

.products-right-rail {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.products-rail-title h2,
.products-form-topbar h2,
.products-list-stage-head h2 {
  margin: 0;
  font-size: 28px;
  color: #192957;
}

.products-rail-title p,
.products-form-topbar p,
.products-list-stage-head p {
  margin: 5px 0 0;
  color: #67788f;
  font-size: 12px;
}

.products-static-summary {
  display: grid;
  gap: 8px;
}

.products-static-summary article {
  border: 1px solid #e5ecf4;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f9fbfe;
}

.products-static-summary span,
.products-static-tree-sub,
.products-breadcrumb {
  font-size: 10px;
  color: #6b7a8d;
}

.products-static-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #18353a;
}

.products-static-tree {
  display: grid;
  gap: 8px;
}

.products-static-tree-item,
.products-static-tree-sub {
  width: 100%;
  border: 1px solid #dce6f0;
  border-radius: 12px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
}

.products-static-tree-item.active {
  border-color: rgba(37, 99, 235, 0.28);
  background: #eef5ff;
  color: #194aaf;
  font-weight: 700;
}

.products-static-tree-sub {
  padding-left: 18px;
}

.products-form-topbar,
.products-list-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.products-inline-badges,
.products-inline-methods {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.products-mini-badge,
.products-mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  background: #f2f6fb;
  color: #20406a;
}

.products-mini-badge.blue,
.products-mini-pill.blue { background: #eef5ff; color: #2563eb; border-color: #cfe0ff; }
.products-mini-badge.green,
.products-mini-pill.green { background: #ecfaf2; color: #15925b; border-color: #cdeedc; }
.products-mini-pill.orange { background: #fff4e8; color: #ee7c20; border-color: #ffd8b3; }

.products-modern-form {
  display: grid;
  gap: 14px;
}

.products-form-card {
  border: 1px solid #e1e9f2;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.products-form-card-head h3 {
  margin: 0;
  font-size: 17px;
  color: #1c2f56;
}

.products-form-card-head p {
  margin: 5px 0 0;
  color: #6b7a8d;
  font-size: 11px;
}

.products-form-grid-modern {
  margin-top: 14px;
}

.products-list-stage-head {
  margin-bottom: 10px;
}

.products-breadcrumb {
  margin-bottom: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.products-breadcrumb span {
  margin: 0 4px;
}

.products-list-stage-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.products-unit-select {
  height: 36px;
  min-width: 82px;
  border: 1px solid #dce6f0;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.products-tab-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.products-tab-pill {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #dce6f0;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
  color: #44566f;
}

.products-tab-pill.active {
  border-color: #cfe0ff;
  background: #eef5ff;
  color: #2563eb;
}

.products-list-shell-head-modern {
  margin-bottom: 12px;
}

.products-side-title {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.products-side-title strong {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
}

.products-side-title h3 {
  margin: 0;
  font-size: 15px;
}

.products-side-title.purple strong { background: #7c4dff; }
.products-side-title.blue strong { background: #2563eb; }
.products-side-title.green strong { background: #1f9d62; }
.products-side-title.orange strong { background: #f28b2f; }
.products-side-title.purple h3 { color: #6d43ec; }
.products-side-title.blue h3 { color: #2563eb; }
.products-side-title.green h3 { color: #16935b; }
.products-side-title.orange h3 { color: #eb7b1d; }

.products-side-panel-card p {
  margin: 0;
  color: #66768e;
  font-size: 11px;
  line-height: 1.45;
}

.products-side-table {
  display: grid;
  gap: 0;
  border: 1px solid #e5ecf4;
  border-radius: 12px;
  overflow: hidden;
}

.products-side-table header,
.products-side-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px 84px;
}

.products-side-table header {
  background: #f4f7fb;
}

.products-side-table header span,
.products-side-table div > * {
  padding: 8px 10px;
  border-right: 1px solid #e5ecf4;
  font-size: 10px;
}

.products-side-table header span:last-child,
.products-side-table div > *:last-child {
  border-right: 0;
}

.products-side-table div {
  border-top: 1px solid #eef3f8;
}

.products-side-table div strong {
  font-size: 11px;
  color: #17324d;
}

.products-form-actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

#productResetBtn.is-active,
#productSubmitBtn.is-active {
  border-color: rgba(47, 111, 237, 0.28);
  box-shadow: 0 8px 18px rgba(47, 111, 237, 0.12);
}

.product-image-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.product-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 30, 0.62);
}

.product-image-modal-dialog {
  position: relative;
  width: min(880px, calc(100vw - 32px));
  margin: 34px auto;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.25);
}

.product-image-close {
  margin-left: auto;
  display: flex;
}

.product-image-modal-dialog img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #f5f8fc;
}

.products-table {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 36px rgba(17, 25, 40, 0.06);
}

.products-table-head,
.products-table-row {
  display: grid;
  grid-template-columns: 56px minmax(150px, 1.25fr) minmax(120px, 0.95fr) 92px 104px 104px minmax(160px, 1.1fr) 126px;
  gap: 0;
  align-items: center;
}

.products-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #f6f9fc, #edf3f8);
  border-bottom: 1px solid var(--line);
}

.products-table-head span,
.products-table-head button {
  padding: 9px 8px;
  color: #607086;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.products-table-head button {
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.products-table-head button:hover {
  color: var(--blue);
}

.products-table-row {
  border-top: 1px solid #edf2f8;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.products-table-row:hover {
  background: #f9fbff;
}

.products-cell {
  min-width: 0;
  padding: 10px 8px;
  font-size: 11px;
  color: var(--text-main);
}

.products-export-cell {
  display: flex;
  justify-content: flex-end;
}

.products-cell strong {
  font-size: 12px;
}

.products-cell.note {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.products-cell.visual,
.products-cell.actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.offer-builder-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.offer-form-layout {
  display: grid;
  gap: 14px;
}

.offer-products-panel {
  padding: 9px;
  border: 1px solid #cfd8e2;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #f9fbfd 0%, #eff4f8 58%, #e8eef4 100%);
  box-shadow:
    0 10px 20px rgba(17, 25, 40, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.offer-products-head {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(140, 161, 184, 0.18);
}

.offer-products-head h3 {
  margin: 0 0 2px;
  font-size: 13px;
  color: #143641;
}

.offer-products-head p {
  margin: 0;
  color: #6a7989;
  font-size: 9px;
  line-height: 1.25;
}

.offer-products-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  font-size: 9px;
  color: #4e6074;
  padding: 5px 8px;
  border: 1px solid #d2dbe4;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.offer-products-category-filter {
  display: grid;
  gap: 4px;
  margin-bottom: 7px;
  color: #4e6074;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.offer-products-category-filter select {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d2dbe4;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffef9, #f7fbff);
  color: #25364a;
  font-size: 11px;
  font-weight: 700;
  padding: 0 9px;
}

.offer-product-search {
  margin-bottom: 7px;
  min-height: 32px;
  background: linear-gradient(180deg, #fffef9, #f7fbff);
  border-radius: 8px;
  font-size: 11px;
}

.offer-products-list {
  display: grid;
  gap: 5px;
  max-height: 920px;
  overflow: auto;
  padding-right: 2px;
}

.offer-product-category {
  border: 1px solid #d4dde7;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 8px rgba(17, 25, 40, 0.03);
}

.offer-product-category-toggle {
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, #edf4fa, #e1eaf3);
  padding: 7px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.offer-product-category-text {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
}

.offer-product-category-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #d8ebff, #b8d3ef);
  color: #234f79;
  font-size: 9px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.74);
}

.offer-product-category-copy {
  display: grid;
  gap: 1px;
}

.offer-product-category-copy strong {
  font-size: 10px;
  color: #17353d;
}

.offer-product-category-copy small {
  font-size: 8px;
  color: #66788d;
}

.offer-product-category-arrow {
  font-size: 14px;
  line-height: 1;
  color: #486884;
  font-weight: 700;
}

.offer-product-category-items {
  display: grid;
  gap: 1px;
  background: #dbe4ed;
}

.offer-product-category-items[hidden] {
  display: none;
}

.offer-product-item {
  position: relative;
  border: 0;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding: 5px 7px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  text-align: left;
  cursor: pointer;
}

.offer-product-item:hover {
  background: linear-gradient(180deg, #fdfefe, #f3f8ff);
}

.offer-product-item.active {
  background: linear-gradient(180deg, #edf6ff, #dcecff);
  box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.10);
}

.offer-product-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
}

.offer-product-item.active::before {
  background: #2f6fed;
}

.offer-product-item-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.offer-product-item-copy strong,
.offer-product-item-copy span,
.offer-product-item-copy small {
  display: block;
}

.offer-product-item-copy strong {
  font-size: 10px;
  color: #143740;
  line-height: 1.15;
}

.offer-product-item-copy span,
.offer-product-item-copy small {
  font-size: 8px;
  color: #687789;
  line-height: 1.15;
}

.offer-product-item-visual {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #eef7c8, #d5e6a2);
  color: #537319;
  font-size: 9px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.offer-product-item-pill {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef4fa;
  color: #546b82;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.offer-product-item.active .offer-product-item-pill {
  background: #2f6fed;
  color: #ffffff;
}

.offer-customer-shell,
.offer-entry-shell,
.offer-list-shell,
.offer-summary-grid,
.offer-bottom-grid {
  border: 1px solid #d4dde6;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(17, 25, 40, 0.04);
}

.offer-customer-shell,
.offer-entry-shell,
.offer-list-shell,
.offer-bottom-grid {
  padding: 14px;
}

.offer-customer-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
}

.offer-top-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 6px;
  border: 1px solid #d2dbe5;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdfb, #f0f6f0);
  align-content: start;
}

.offer-top-card-wide {
  grid-column: span 3;
}

.offer-customer-grid .offer-top-card-wide:first-child {
  grid-column: span 3;
}

.offer-customer-grid .offer-top-card-wide:nth-of-type(6) {
  grid-column: span 3;
}

.offer-top-card-offer-no {
  grid-column: 10 / span 3;
  grid-row: 1;
  order: 0;
  border-color: #e2ca79;
  background: linear-gradient(180deg, #fff5cf, #fbe39a);
}

.offer-customer-grid > .offer-top-card:not(.offer-top-card-wide):not(.offer-top-card-offer-no) {
  grid-column: span 2;
}

.offer-top-card span {
  min-height: 12px;
  font-size: 8px;
  font-weight: 700;
  color: #536577;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 1.15;
  white-space: nowrap;
}

.offer-top-card input,
.offer-top-card select {
  width: 100%;
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid #c7d2dc;
  border-radius: 6px;
  background: #ffffff;
  font-size: 10px;
  font-weight: 600;
}

.offer-top-card-offer-no input {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #172331;
}

.offer-no-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
}

.offer-no-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  width: 28px;
  height: 24px;
  padding: 0;
  border: 1px solid #cfd8e2;
  border-radius: 4px;
  background: #f7f9fc;
  color: #5c6f84;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.offer-no-toggle input {
  width: 10px;
  height: 10px;
  margin: 0;
}

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

.offer-entry-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.offer-entry-head p {
  margin: 0;
  color: #69798b;
  font-size: 11px;
  line-height: 1.45;
}

.offer-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.offer-entry-field {
  display: grid;
  gap: 5px;
}

.offer-entry-field-wide {
  grid-column: span 2;
}

.offer-entry-field span {
  font-size: 10px;
  font-weight: 700;
  color: #56687b;
  text-transform: uppercase;
}

.offer-entry-field input,
.offer-entry-field select {
  width: 100%;
  height: 36px;
  border: 1px solid #cad5df;
  border-radius: 8px;
  padding: 0 9px;
  background: linear-gradient(180deg, #fffefb, #f8fbfd);
  font-size: 11px;
  font-weight: 600;
}

.offer-entry-field input:disabled {
  background: #edf1f5;
  color: #8a97a7;
  cursor: not-allowed;
}

.offer-list-shell {
  padding: 0;
  overflow: hidden;
}

.offer-lines-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 8px 10px 6px;
  border-bottom: 1px solid #d4dde8;
  background: linear-gradient(180deg, #f6f9fc, #edf2f7);
}

.offer-lines-list-head h4 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.offer-lines-list-head span {
  color: #66788d;
  font-size: 10px;
}

.offer-lines-table-head,
.offer-line-row {
  display: grid;
  grid-template-columns: 42px 66px 66px 54px 76px 1fr 92px 1.05fr 86px 92px 92px 1fr 76px;
  align-items: stretch;
}

.offer-lines-table-head {
  background: #e8edf3;
  border-bottom: 1px solid #c8d3de;
}

.offer-lines-table-head span {
  padding: 6px 5px;
  border-right: 1px solid #d2dbe4;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  color: #4d6073;
  letter-spacing: 0.03em;
  line-height: 1.15;
}

.offer-lines-table-head span:last-child {
  border-right: 0;
}

.offer-lines-stack {
  display: grid;
  gap: 0;
}

.offer-line-row {
  border-bottom: 1px solid #d7e0e8;
  background: #fcfefe;
}

.offer-line-row:nth-child(odd) {
  background: #f5f9fc;
}

.offer-line-row > span {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 5px 6px;
  border-right: 1px solid #dce4eb;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  color: #223648;
  font-variant-numeric: tabular-nums;
}

.offer-line-row > span:last-of-type {
  border-right: 0;
}

.offer-line-row .is-money {
  justify-content: flex-end;
  background: #f7fafc;
}

.offer-line-row .is-note {
  background: #f7fafc;
  white-space: normal;
  line-height: 1.2;
}

.offer-line-row .is-type,
.offer-line-row .is-model,
.offer-line-row .is-color {
  background: #f9fbfd;
}

.offer-line-row .is-index {
  justify-content: center;
  background: #eef3f8;
}

.offer-line-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
}

.offer-line-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #d2dbe4;
  border-radius: 6px;
  background: #ffffff;
  color: #30485f;
  cursor: pointer;
}

.offer-line-action svg {
  width: 12px;
  height: 12px;
}

.offer-line-edit {
  background: #f3f8ff;
  color: #275ea8;
}

.offer-line-delete {
  background: #fff6f6;
  color: #b43f3f;
}

/* Dense accounting-table variant for the offer measurements list.
   Reverting is simple: remove `offer-list-shell-dense` from the section in index.html. */
.offer-list-shell.offer-list-shell-dense {
  border: 1px solid #cfd8e3;
  background: #fff;
  overflow-x: auto;
}

.offer-list-shell.offer-list-shell-dense .offer-lines-list-head {
  padding: 6px 8px 5px;
  border-bottom: 1px solid #cfd8e3;
  background: linear-gradient(180deg, #f9fbfd, #eef3f7);
}

.offer-list-shell.offer-list-shell-dense .offer-lines-list-head h4 {
  font-size: 11px;
  font-weight: 700;
}

.offer-list-shell.offer-list-shell-dense .offer-lines-list-head span {
  font-size: 9px;
}

.offer-list-shell.offer-list-shell-dense .offer-lines-table-head,
.offer-list-shell.offer-list-shell-dense .offer-line-row {
  min-width: 1180px;
  grid-template-columns: 34px 58px 58px 48px 66px 1fr 82px 1fr 72px 82px 82px 1fr 64px;
}

.offer-list-shell.offer-list-shell-dense .offer-lines-table-head {
  background: #e3e9f0;
  border-bottom: 1px solid #c2ccd7;
}

.offer-list-shell.offer-list-shell-dense .offer-lines-table-head span {
  padding: 4px 4px;
  font-size: 8px;
  letter-spacing: 0.04em;
  border-right-color: #c8d1db;
}

.offer-list-shell.offer-list-shell-dense .offer-line-row {
  border-bottom: 1px solid #d9e1e8;
  background: #ffffff;
}

.offer-list-shell.offer-list-shell-dense .offer-line-row:nth-child(odd) {
  background: #f7fafc;
}

.offer-list-shell.offer-list-shell-dense .offer-line-row > span {
  padding: 4px 4px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.1;
  border-right-color: #d8e0e8;
}

.offer-list-shell.offer-list-shell-dense .offer-line-row .is-type,
.offer-list-shell.offer-list-shell-dense .offer-line-row .is-model,
.offer-list-shell.offer-list-shell-dense .offer-line-row .is-color,
.offer-list-shell.offer-list-shell-dense .offer-line-row .is-note,
.offer-list-shell.offer-list-shell-dense .offer-line-row .is-money,
.offer-list-shell.offer-list-shell-dense .offer-line-row .is-index {
  background: transparent;
}

.offer-list-shell.offer-list-shell-dense .offer-line-row .is-index {
  justify-content: center;
  font-size: 8px;
  color: #53667a;
}

.offer-list-shell.offer-list-shell-dense .offer-line-actions {
  gap: 3px;
  padding: 3px;
}

.offer-list-shell.offer-list-shell-dense .offer-line-action {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.offer-list-shell.offer-list-shell-dense .offer-line-action svg {
  width: 10px;
  height: 10px;
}

.offer-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.offer-summary-card {
  padding: 14px;
  border-right: 1px solid #dde5ed;
  background: linear-gradient(180deg, #ffffff, #f5f8fb);
}

.offer-summary-card span,
.offer-summary-card strong {
  display: block;
}

.offer-summary-card span {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.offer-summary-card strong {
  font-size: 18px;
}

.offer-notes-field,
.offer-notes-field textarea {
  width: 100%;
}

.offer-notes-field {
  grid-column: 1 / -1;
}

.offer-notes-field textarea {
  min-height: 120px;
  border: 1px solid #d3dce7;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfcfe;
  font: inherit;
  resize: vertical;
}

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

  .offer-customer-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .offer-top-card-wide,
  .offer-top-card-offer-no {
    grid-column: span 3;
  }

  .offer-top-card-offer-no {
    grid-column: 4 / span 3;
    grid-row: 1;
  }

  .offer-customer-grid > .offer-top-card:not(.offer-top-card-wide):not(.offer-top-card-offer-no) {
    grid-column: span 2;
  }

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

  .offer-entry-field-wide {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .product-variant-grid,
  .product-variant-table-head,
  .product-variant-table-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-builder-layout {
    grid-template-columns: 1fr;
  }

  .offer-products-list {
    max-height: 360px;
  }

  .offer-customer-grid,
  .offer-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-top-card-wide,
  .offer-top-card-offer-no,
  .offer-entry-field-wide {
    grid-column: span 2;
  }

  .offer-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-lines-table-head {
    display: none;
  }

  .offer-line-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .offer-line-row > span,
  .offer-line-actions {
    min-height: 42px;
  }
}

.orders-table {
  display: grid;
}

.offers-table {
  display: grid;
}

.orders-head,
.orders-row,
.offers-head,
.offers-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.2fr 1fr 1.2fr 0.8fr;
  gap: 14px;
  align-items: center;
  padding: 14px 22px;
}

.orders-head,
.offers-head {
  font-size: 12px;
  color: #8090a3;
  font-weight: 700;
}

.orders-row,
.offers-row {
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.offers-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 0;
  background: #fff;
}

.offers-data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.offers-data-table thead th {
  height: 28px;
  padding: 4px 6px;
  border-bottom: 1px solid #d3dce6;
  border-right: 1px solid #d8e1ea;
  background: linear-gradient(180deg, #f4f7fb, #e8eef5);
  color: #5b6d81;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.05;
  text-align: left;
  vertical-align: middle;
}

.offers-data-table thead th:last-child {
  border-right: 0;
  text-align: right;
  padding-right: 12px;
}

.offers-data-table tbody td {
  padding: 1px 6px;
  border-bottom: 1px solid #e1e7ee;
  border-right: 1px solid #e1e7ee;
  vertical-align: middle;
  background: #ffffff;
  font-size: 10.5px;
  line-height: 1.15;
}

.offers-data-table tbody td strong {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.15;
  display: block;
}

.offers-data-table tbody td small {
  font-size: 8.5px;
  color: #8190a3;
  line-height: 1.1;
  margin-top: 0;
  display: block;
}

/* Pagination Bar */
.offers-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-radius: 0 0 10px 10px;
  gap: 14px;
  flex-wrap: wrap;
}

.offers-pagination-info {
  font-size: 11.5px;
  color: #64748b;
  padding: 12px 16px;
  text-align: right;
}

.offers-pagination-bar .offers-pagination-info {
  padding: 0;
  flex: 1;
}

.offers-pagination-info strong {
  color: #1a2332;
  font-weight: 700;
}

.offers-pagination-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.offers-pagination-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #d6dee8;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.offers-pagination-btn:hover:not(:disabled):not(.is-active) {
  background: #f1f5f9;
  border-color: #0d6efd;
  color: #0d6efd;
}

.offers-pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.offers-pagination-btn.is-active {
  background: linear-gradient(180deg, #0d6efd, #0756c7);
  border-color: #0756c7;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(13, 110, 253, 0.25);
}

.offers-pagination-ellipsis {
  color: #94a3b8;
  font-weight: 700;
  padding: 0 4px;
  font-size: 14px;
}

.offers-data-table tbody tr:nth-child(odd) td {
  background: #fbfcfe;
}

.offers-data-table tbody tr:hover td {
  background: #f5f8fc;
}

.offers-data-table tbody td:last-child {
  border-right: 0;
  padding-right: 12px;
}

.offers-data-table td strong,
.offers-data-table td small {
  display: block;
  line-height: 1.15;
  word-break: break-word;
}

.offers-data-table td strong {
  font-size: 10px;
  font-weight: 700;
  color: #203246;
}

.offers-data-table td small {
  margin-top: 2px;
  font-size: 8.5px;
  color: #6d7d8f;
}

.offers-col-offer-no {
  width: 92px;
  background: #f8fbff;
}

.offers-col-center {
  width: 74px;
  text-align: center;
}

.offers-col-summary {
  width: 122px;
}

.offers-col-money {
  width: 84px;
  text-align: right;
}

.offers-col-actions {
  width: 104px;
  text-align: right;
  background: linear-gradient(180deg, #fbfcfe, #f4f8fb);
}

.offers-empty-state {
  padding: 16px 18px;
  color: var(--text-muted);
}

.offers-grid-shell {
  width: max-content;
  min-width: 100%;
}

.offers-table::-webkit-scrollbar {
  height: 10px;
}

.offers-table::-webkit-scrollbar-thumb {
  background: rgba(109, 125, 143, 0.35);
  border-radius: 999px;
}

.offers-filter-bar {
  display: grid;
  grid-template-columns: 180px minmax(220px, 1fr) 180px 190px;
  gap: 8px;
  padding: 0;
}

#offersListSection {
  padding: 0;
  overflow: hidden;
}

.offers-filter-bar select,
.offers-filter-bar .table-search {
  width: 100%;
  height: 34px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 600;
  color: #284055;
}

.offers-head-dense,
.offers-row-dense {
  width: 100%;
  min-width: 0;
  grid-template-columns: 118px 96px 150px 160px 96px 110px 204px;
  gap: 0;
  padding: 0 !important;
  box-sizing: border-box;
}

.offers-head-dense {
  background: linear-gradient(180deg, #f4f7fb, #e8eef5);
  border-bottom: 1px solid #d3dce6;
}

.offers-head-dense span {
  padding: 8px 8px;
  border-right: 1px solid #d8e1ea;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.offers-head-dense span:last-child {
  justify-content: flex-end;
  text-align: right;
  justify-self: stretch;
  padding-right: 12px;
}

.offers-head-dense span:last-child {
  border-right: 0;
}

.offers-row-dense {
  min-height: 48px;
  padding: 0;
  border-top: 0;
  border-bottom: 1px solid #e1e7ee;
  font-size: 11px;
}

.offers-row-dense:nth-child(odd) {
  background: #fbfcfe;
}

.offers-row-dense:hover {
  background: #f5f8fc;
}

.offers-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: 6px 8px;
  border-right: 1px solid #e1e7ee;
  line-height: 1.2;
  text-align: left;
  box-sizing: border-box;
}

.offers-cell:last-child {
  border-right: 0;
}

.offers-cell strong,
.offers-cell small {
  display: block;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
}

.offers-cell strong {
  font-size: 10px;
  font-weight: 700;
  color: #203246;
  line-height: 1.25;
}

.offers-cell small {
  margin-top: 3px;
  font-size: 9px;
  color: #6d7d8f;
  line-height: 1.25;
}

.offers-cell-summary small {
  white-space: normal;
  line-height: 1.25;
}

.offers-cell-offer-no {
  background: #f8fbff;
}

.offers-cell-center {
  align-items: center;
  text-align: center;
}

.offers-cell-money {
  align-items: flex-end;
  text-align: right;
  background: #fbfcfd;
  justify-content: center;
}

.offers-actions-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  text-align: right;
  background: linear-gradient(180deg, #fbfcfe, #f4f8fb);
  justify-self: stretch;
  width: 100%;
  padding-right: 0;
}

.offers-actions-status,
.offers-actions-cell {
  display: flex;
  width: 100%;
  justify-content: flex-end;
}

.offers-actions-status {
  align-items: flex-end;
  gap: 4px;
  flex-direction: column;
}

.offers-actions-cell {
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.offers-actions-cell-compact {
  min-width: 0;
}

.offers-actions-status .status-pill {
  min-height: 20px;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 800;
}

.offer-status-select {
  width: 118px;
  height: 22px;
  border: 1px solid #d6dee8;
  border-radius: 5px;
  padding: 0 18px 0 6px;
  background: #ffffff;
  color: #30465b;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.offer-status-select:disabled {
  cursor: wait;
  opacity: 0.65;
}

.offers-status-transitions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 220px;
}

.offers-col-status {
  min-width: 120px;
  overflow: visible;
}

.offers-col-status .status-pill,
.offers-actions-status .status-pill {
  margin-bottom: 0;
  padding: 3px 8px;
  font-size: 10px;
}

.offers-col-status .offers-status-transitions {
  justify-content: center;
  max-width: 160px;
  margin: 0 auto;
}

.offers-col-status .offer-status-terminal {
  justify-content: center;
  width: 100%;
}

.offer-status-badge-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 20px;
  max-width: 116px;
  border: 1px solid transparent;
  padding: 0 8px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.offer-status-badge-btn span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.offer-status-badge-btn:disabled {
  cursor: default;
}

.offer-status-badge-btn:not(:disabled):hover {
  filter: saturate(1.08) brightness(0.98);
}

.offer-status-chevron {
  font-size: 8px;
  line-height: 1;
  opacity: 0.72;
}

.offer-status-floating-menu {
  position: fixed;
  z-index: 200;
  width: 168px;
  padding: 6px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 25, 40, 0.18);
}

.offer-status-menu-item {
  width: 100%;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 7px;
  padding: 0 8px;
  background: transparent;
  color: #24384e;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.offer-status-menu-item:hover {
  background: #f4f8fb;
}

.offer-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #65758b;
}

.offer-status-menu-item.status-sent .offer-status-dot {
  background: #2f6fed;
}

.offer-status-menu-item.status-pending .offer-status-dot {
  background: #bb8500;
}

.offer-status-menu-item.status-revised .offer-status-dot {
  background: #9356da;
}

.offer-status-menu-item.status-approved .offer-status-dot {
  background: #20a966;
}

.offer-status-menu-item.status-converted .offer-status-dot {
  background: #0f6f55;
}

.offer-status-menu-item.status-rejected .offer-status-dot {
  background: #c23b3b;
}

.offer-status-menu-item.status-expired .offer-status-dot {
  background: #cf5c24;
}

.offer-status-menu-item.status-cancelled .offer-status-dot {
  background: #3f4a57;
}

.offer-status-note-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 18px;
}

.offer-status-note-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.offer-status-note-dialog {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid #d7e0ea;
  border-radius: 16px;
  padding: 15px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 25, 40, 0.24);
}

.offer-status-note-head,
.offer-status-note-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.offer-status-note-head span {
  color: #5b6d81;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.offer-status-note-head button {
  width: 26px;
  height: 26px;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #f8fafc;
  color: #42566b;
  cursor: pointer;
}

.offer-status-note-dialog h3 {
  margin: 10px 0 12px;
  color: #1f3349;
  font-size: 15px;
}

.offer-status-note-dialog label,
.offer-status-note-dialog label span {
  display: block;
}

.offer-status-note-dialog label span {
  margin-bottom: 6px;
  color: #5b6d81;
  font-size: 11px;
  font-weight: 800;
}

.offer-status-note-dialog textarea {
  width: 100%;
  resize: vertical;
  min-height: 92px;
  border: 1px solid #d7e0ea;
  border-radius: 10px;
  padding: 10px;
  color: #24384e;
  font: inherit;
  font-size: 12px;
}

.offer-status-note-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.offer-status-transition-btn {
  min-height: 22px;
  border: 1px solid #d6dee8;
  border-radius: 6px;
  padding: 0 7px;
  background: #ffffff;
  color: #30465b;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.offer-status-transition-btn:hover {
  background: #f4f8fb;
  border-color: #bfcddd;
  transform: translateY(-1px);
}

.offer-status-transition-btn svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* ── Rapor Toolbar (Teklif + Sipariş) ────────────────────────────── */
.report-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

/* Hızlı dönem butonları — kompakt segmented group */
.report-quick-group {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.report-quick-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.report-quick-btn:hover {
  background: #e2e8f0;
  color: #334155;
}
.report-quick-btn.active {
  background: #fff;
  color: #0969da;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Tarih aralığı + filtre butonu — tek satır kompakt */
.report-date-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  padding: 4px 4px 4px 10px;
}
.report-date-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
}
.report-date-group input[type="date"] {
  height: 28px;
  border: 0;
  background: transparent;
  font-size: 12px;
  color: #1a2332;
  padding: 0 6px;
  outline: none;
  font-family: inherit;
  cursor: pointer;
  min-width: 110px;
}
.report-date-group input[type="date"]:focus {
  background: #f1f5f9;
  border-radius: 4px;
}
.report-date-group .report-date-separator {
  color: #cbd5e1;
  font-size: 14px;
  margin: 0 2px;
}
.report-date-apply {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, #0d6efd, #0756c7);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(13, 110, 253, 0.25);
  transition: filter 0.15s;
}
.report-date-apply:hover {
  filter: brightness(1.08);
}

/* Eski sınıfların geriye uyumluluğu (gerek kalmazsa kaldırılabilir) */
.quick-rpt-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.kpi-card {
  background: #fff;
  border: 1px solid #dfe7f1;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: #65758b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 800;
  color: #0f2340;
  margin-top: 6px;
  line-height: 1.1;
}
.kpi-sub {
  font-size: 11px;
  color: #8190a3;
  margin-top: 4px;
}
.kpi-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.kpi-delta-label { font-weight: 400; color: #8190a3; }
.kpi-delta-up   { color: #20a966; }
.kpi-delta-down { color: #c23b3b; }
.kpi-delta-flat { color: #8190a3; }

.erp-alert-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  transition: background 0.15s;
}
.erp-alert-warning:hover { background: #fef3c7; }

.offer-status-transition-btn:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.offer-status-transition-btn.approve-offer-btn {
  border-color: #bde0ca;
  background: #edf9f1;
  color: #1f8f54;
}

.offer-status-terminal {
  display: inline-flex;
  justify-content: flex-end;
  color: #8190a3;
  font-size: 9px;
  font-weight: 800;
}

.offer-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid #d7e0ea;
  border-radius: 5px;
  background: #ffffff;
  color: #42566b;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.offer-action-icon:hover {
  background: #f4f8fb;
  border-color: #bfcddd;
  transform: translateY(-1px);
}

.offer-action-icon svg {
  width: 13px;
  height: 13px;
}

.offer-action-primary:first-child {
  color: #2f6fed;
}

.offer-action-primary:nth-child(2) {
  color: #16836f;
}

.offer-actions-more-btn {
  color: #30465b;
}

.offer-actions-more-btn[aria-expanded="true"] {
  border-color: #9fb5ce;
  background: #eef5ff;
}

.offer-actions-mobile-trigger {
  display: none;
}

.offer-actions-floating-menu {
  position: fixed;
  z-index: 205;
  width: 178px;
  padding: 6px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(17, 25, 40, 0.18);
}

.offer-actions-menu-item {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  background: transparent;
  color: #24384e;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.offer-actions-menu-item:hover {
  background: #f4f8fb;
}

.offer-actions-menu-item svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.offer-actions-menu-item.is-danger {
  color: #b64040;
}

.offer-actions-menu-item.is-danger:hover {
  background: #fff2f2;
}

.offer-actions-mobile-only {
  display: none;
}

.offer-action-icon-delete {
  border-color: #ead0d0;
  background: #fff4f4;
  color: #b64040;
}

.offer-action-icon-delete:hover {
  background: #ffeaea;
  border-color: #ddb7b7;
}

#addOfferLineBtn.is-update-mode {
  background: linear-gradient(180deg, #f59e0b, #d97706);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.22);
}

.offer-line-row.is-editing {
  outline: 2px solid rgba(245, 158, 11, 0.45);
  outline-offset: -2px;
  background: #fff8e8;
}

.offer-submit-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.primary-btn.is-success {
  background: linear-gradient(180deg, #20a966, #16834f);
  border-color: #16834f;
}

.erp-offers-dashboard {
  display: grid;
  gap: 14px;
}

.erp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.erp-kpi-card,
.erp-info-card,
.erp-status-flow-card,
.erp-list-card {
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.erp-kpi-card {
  position: relative;
  min-height: 96px;
  padding: 15px 16px;
  overflow: hidden;
}

.erp-kpi-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: currentColor;
  opacity: 0.12;
}

.erp-kpi-card span,
.erp-kpi-card strong,
.erp-kpi-card small {
  display: block;
}

.erp-kpi-card span {
  color: #233a5a;
  font-size: 11px;
  font-weight: 800;
}

.erp-kpi-card strong {
  margin-top: 12px;
  color: #0f2340;
  font-size: 22px;
  font-weight: 800;
}

.erp-kpi-card small {
  margin-top: 9px;
  color: #65758b;
  font-size: 11px;
  font-weight: 600;
}

.erp-kpi-card.tone-blue { color: #0969da; }
.erp-kpi-card.tone-green { color: #20a966; }
.erp-kpi-card.tone-orange { color: #f08a24; }
.erp-kpi-card.tone-teal { color: #16836f; }
.erp-kpi-card.tone-red { color: #e03131; }
.erp-kpi-card.tone-purple { color: #7c3aed; }
.erp-kpi-card.tone-indigo { color: #4f46e5; }
.erp-kpi-card.tone-gray { color: #64748b; }

.erp-kpi-card[style*="cursor:pointer"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12) !important;
  transition: transform .15s, box-shadow .15s;
}

.erp-offers-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

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

.erp-filter-bar {
  grid-template-columns: 1.25fr 132px 132px 160px 150px 150px 130px 130px auto auto;
  align-items: end;
}

.orders-erp-filter-bar {
  grid-template-columns: 1fr 105px 105px 130px 110px 130px 115px 115px auto auto;
}

.production-filter-bar {
  grid-template-columns: minmax(150px, 220px) 130px 130px 115px 115px auto auto;
  align-items: end;
}

.shipment-filter-bar {
  grid-template-columns: minmax(150px, 220px) 130px 130px 115px 115px auto auto;
  align-items: end;
}

.crm-filter-bar {
  grid-template-columns: minmax(180px, 1fr) 160px 140px 160px auto;
  align-items: end;
}

/* ── CRM Akış Kılavuzu (durum seçili değilken) ── */
.crm-flow-guide {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.crm-flow-guide-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.crm-flow-guide-header strong {
  font-size: 13px;
  font-weight: 800;
  color: #1a2332;
}

.crm-flow-guide-header span {
  font-size: 11px;
  color: #64748b;
  flex: 1;
}

.crm-flow-guide-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.crm-flow-step {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1.5px solid var(--step-color, #e2e8f0);
  background: #fff;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.crm-flow-step:hover {
  background: var(--step-color, #e2e8f0);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
}

.crm-flow-step-icon {
  font-size: 13px;
}

.crm-flow-step-label {
  font-size: 10.5px;
  font-weight: 700;
}

.crm-flow-step-arrow {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}

/* ── CRM Durum İpucu Kartı (durum seçili iken) ── */
.crm-hint-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  background: linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--hint-color) 6%, #fff) 100%);
  border: 1.5px solid color-mix(in srgb, var(--hint-color) 30%, #e2e8f0);
  border-left: 4px solid var(--hint-color);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 14px;
  position: relative;
}

.crm-hint-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.crm-hint-content {
  min-width: 0;
}

.crm-hint-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.crm-hint-title strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--hint-color);
}

.crm-hint-count {
  background: color-mix(in srgb, var(--hint-color) 15%, #fff);
  color: var(--hint-color);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--hint-color) 30%, transparent);
}

.crm-hint-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 8px;
}

.crm-hint-action {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: #fff;
  border: 1px dashed color-mix(in srgb, var(--hint-color) 40%, #e2e8f0);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #1a2332;
  line-height: 1.5;
}

.crm-hint-action-label {
  font-weight: 800;
  color: var(--hint-color);
  white-space: nowrap;
  flex-shrink: 0;
}

.crm-hint-close {
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}

.crm-hint-close:hover {
  background: #f1f5f9;
  color: #475569;
}

/* Modern tarayıcılar için color-mix fallback */
@supports not (color: color-mix(in srgb, red, blue)) {
  .crm-hint-card { background: #fff; border-left-width: 4px; }
  .crm-hint-count { background: #f1f5f9; color: #1a2332; border: 1px solid #e2e8f0; }
  .crm-hint-action { border: 1px dashed #e2e8f0; }
}

/* ═══════════════════════════════════════════════════════════════════
   DASHBOARD — Zengin Ana Sayfa
═══════════════════════════════════════════════════════════════════ */

/* Hoşgeldin Banner */
.dash-welcome {
  background: linear-gradient(135deg, #0e2a30 0%, #105663 55%, #0e7490 100%);
  border-radius: 12px;
  padding: 22px 28px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  box-shadow: 0 4px 16px rgba(14, 116, 144, 0.18);
  position: relative;
  overflow: hidden;
}
.dash-welcome::before {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
  border-radius: 50%;
}
.dash-welcome-text { z-index: 1; position: relative; }
.dash-welcome-text h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.4px;
}
.dash-welcome-text p {
  font-size: 13px;
  opacity: 0.85;
  margin: 0;
}
.dash-welcome-date {
  text-align: right;
  z-index: 1;
  position: relative;
}
.dash-welcome-day {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dash-welcome-full {
  font-size: 18px;
  font-weight: 800;
  margin-top: 2px;
}

/* KPI Şeridi (8 kart) */
.dash-kpi-grid {
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  margin-bottom: 16px;
}
.dash-kpi-card[data-dash-link] {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.dash-kpi-card[data-dash-link]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

/* Section Header (ortak) */
.dash-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  gap: 12px;
}
.dash-section-header h2 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 2px;
  color: #1a2332;
}
.dash-section-header p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

/* Favori Menüler */
.dash-favorites-panel {
  padding: 16px 20px;
  margin-bottom: 16px;
}
.dash-favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.dash-favorite-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  text-align: left;
  font-family: inherit;
}
.dash-favorite-card:hover {
  background: #fff;
  border-color: #0d6efd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}
.dash-favorite-card .dash-fav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
  flex-shrink: 0;
}
.dash-favorite-card .dash-fav-label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-favorite-card .dash-fav-label strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-favorite-card .dash-fav-label small {
  font-size: 10px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-favorite-card .dash-fav-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
  border: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.dash-favorite-card:hover .dash-fav-remove {
  opacity: 1;
}
.dash-favorite-card .dash-fav-remove:hover {
  background: #dc2626;
  color: #fff;
}

.dash-favorites-empty {
  grid-column: 1 / -1;
  padding: 30px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
  background: #f8fafc;
  border: 1.5px dashed #e2e8f0;
  border-radius: 10px;
}
.dash-favorites-empty strong {
  display: block;
  color: #475569;
  font-size: 13px;
  margin-bottom: 4px;
}

/* Favori Picker */
.dash-favorites-picker {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}
.dash-favorites-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dash-favorites-picker-head strong {
  font-size: 12.5px;
  color: #1a2332;
}
.dash-favorites-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.dash-favorites-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: #334155;
  transition: all .15s;
  text-align: left;
  font-family: inherit;
}
.dash-favorites-picker-item:hover {
  border-color: #0d6efd;
  background: #f0f7ff;
}
.dash-favorites-picker-item.is-added {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
  cursor: default;
}
.dash-favorites-picker-item.is-added::after {
  content: "✓";
  margin-left: auto;
  font-weight: 800;
}
.dash-favorites-picker-item span {
  font-weight: 600;
}
.dash-favorites-picker-item small {
  color: #94a3b8;
  font-size: 10px;
}

/* Görevler + Uyarılar */
/* ── Dashboard Ürün Türüne Göre Siparişler ── */
.dash-producttype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.dash-pt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  border-left: 4px solid #cbd5e1;
  transition: transform .12s, box-shadow .12s;
}
.dash-pt-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.dash-pt-panjur { border-left-color: #a78bfa; }
.dash-pt-lake { border-left-color: #f59e0b; }
.dash-pt-other { border-left-color: #64748b; }
.dash-pt-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 24px; flex-shrink: 0;
  background: #f1f5f9;
}
.dash-pt-panjur .dash-pt-icon { background: #ede9fe; }
.dash-pt-lake .dash-pt-icon { background: #fef3c7; }
.dash-pt-body { display: flex; flex-direction: column; min-width: 0; }
.dash-pt-body span { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }
.dash-pt-body strong { font-size: 28px; font-weight: 800; color: #1a2332; line-height: 1.1; margin-top: 2px; }
.dash-pt-body small { font-size: 11.5px; font-weight: 600; color: #64748b; margin-top: 2px; }
@media (max-width: 1100px) { .dash-producttype-grid { grid-template-columns: 1fr; } }

/* ── Dashboard Analiz: Bu Ay / Geçen Ay karşılaştırma ── */
.dash-cmp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-cmp-cell { border: 1px solid #eef2f7; border-radius: 10px; padding: 9px 10px; }
.dash-cmp-cell span { display: block; font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }
.dash-cmp-cell strong { display: block; font-size: 15px; font-weight: 800; color: #1a2332; margin-top: 3px; }
.dash-cmp-cell small { display: block; font-size: 11px; margin-top: 2px; }

/* ── Dashboard Finans & Operasyon Özeti ── */
.dash-insight-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.dash-insight-panel { padding: 16px 18px; min-height: 220px; }
.dash-fin-kpis { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.dash-fin-kpi { border: 1px solid #eef2f7; border-radius: 10px; padding: 9px 10px; cursor: pointer; transition: background .15s; }
.dash-fin-kpi:hover { background: #f8fafc; }
.dash-fin-kpi span { display: block; font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }
.dash-fin-kpi strong { display: block; font-size: 16px; font-weight: 800; margin-top: 3px; }
.dash-fin-kpi small { display: block; font-size: 10px; font-weight: 600; margin-top: 2px; }
.dash-fin-kpi.is-receivable strong { color: #16a34a; }
.dash-fin-kpi.is-payable strong { color: #dc2626; }
.dash-fin-kpi.is-collection strong { color: #0d6efd; }
.dash-fin-subtitle { font-size: 12px; font-weight: 800; color: #1e3a6e; margin: 4px 0 6px; }
.dash-debtor-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.dash-debtor-row:hover { background: #f8fafc; }
.dash-debtor-row:nth-child(even) { background: #fafbfc; }
.dash-debtor-name { font-weight: 600; color: #1a2332; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-debtor-amount { font-weight: 800; color: #dc2626; white-space: nowrap; }
.dash-lowstock-amount { font-weight: 800; color: #d97706; white-space: nowrap; font-size: 12px; }
.dash-lowstock-more { font-size: 11px; color: #94a3b8; padding: 4px 8px; }
/* Teklif dönüşüm hunisi */
.dash-funnel-row { margin-bottom: 10px; }
.dash-funnel-head { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.dash-funnel-head span { color: #475569; font-weight: 600; }
.dash-funnel-head strong { color: #1a2332; font-weight: 800; }
.dash-funnel-bar { height: 9px; background: #eef2f7; border-radius: 6px; overflow: hidden; }
.dash-funnel-fill { height: 100%; border-radius: 6px; transition: width .4s ease; }
.dash-funnel-summary { margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef2f7; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #475569; }
.dash-upcoming-tag { font-size: 11px; font-weight: 800; color: #b45309; background: #fef3c7; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 1100px) { .dash-insight-grid { grid-template-columns: 1fr; } }

.dash-tasks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.dash-tasks-panel {
  padding: 16px 20px;
  min-height: 240px;
}
.dash-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .15s;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.dash-task-item:hover {
  background: #fff;
  border-color: #0d6efd;
  transform: translateX(2px);
}
.dash-task-item-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 16px;
  flex-shrink: 0;
}
.dash-task-item-content { flex: 1; min-width: 0; }
.dash-task-item-content strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 1px;
}
.dash-task-item-content small {
  display: block;
  font-size: 11px;
  color: #64748b;
}
.dash-task-item-arrow {
  color: #cbd5e1;
  font-size: 16px;
  flex-shrink: 0;
}

.dash-tasks-alerts .dash-task-item.alert-critical {
  background: #fef2f2;
  border-color: #fecaca;
}
.dash-tasks-alerts .dash-task-item.alert-critical .dash-task-item-icon {
  background: #dc2626;
  color: #fff;
}
.dash-tasks-alerts .dash-task-item.alert-warning {
  background: #fff7ed;
  border-color: #fed7aa;
}
.dash-tasks-alerts .dash-task-item.alert-warning .dash-task-item-icon {
  background: #f97316;
  color: #fff;
}

.dash-tasks-empty {
  padding: 30px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 12px;
}
.dash-tasks-empty .dash-tasks-empty-icon {
  font-size: 36px;
  margin-bottom: 6px;
  opacity: 0.6;
}

/* Grafik + Hızlı Erişim grid (3'lü düzen) */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.dash-chart, .dash-quick {
  padding: 16px 20px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}
.dash-quick .quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  flex: 1;
}

/* Doughnut Chart Wrapper */
.dash-doughnut-wrap {
  position: relative;
  height: 200px;
  margin: 8px 0 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.dash-doughnut-wrap canvas {
  max-height: 200px;
}
.dash-doughnut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.dash-doughnut-center strong {
  display: block;
  font-size: 26px;
  font-weight: 900;
  color: #1a2332;
  line-height: 1.1;
}
.dash-doughnut-center span {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Durum Legend */
.dash-status-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  font-size: 11px;
  margin-top: 4px;
}
.dash-status-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.dash-status-legend-item:hover {
  background: #f1f5f9;
  padding-left: 4px;
}
.dash-status-legend-item .legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-status-legend-item .legend-label {
  font-weight: 600;
  color: #334155;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-status-legend-item .legend-count {
  font-weight: 800;
  color: #1a2332;
}

/* Canvas wrap (line/bar chart) */
.dash-chart-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 220px;
  margin-top: 8px;
}
.dash-chart-canvas-wrap canvas {
  max-height: 100%;
}

/* Responsive */
@media (max-width: 1300px) {
  .dash-charts-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dash-quick {
    grid-column: 1 / -1;
  }
  .dash-quick .quick-links {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 900px) {
  .dash-charts-grid {
    grid-template-columns: 1fr;
  }
  .dash-quick {
    grid-column: auto;
  }
  .dash-quick .quick-links {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .dash-tasks-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dash-welcome {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  .dash-welcome-date {
    text-align: left;
  }
}

.erp-filter-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #53657c;
  font-size: 10px;
  font-weight: 800;
}

.erp-filter-bar input,
.erp-filter-bar select {
  width: 100%;
  height: 34px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #263c55;
  font-size: 11px;
  font-weight: 650;
}

.erp-status-flow-card {
  position: sticky;
  top: 14px;
  padding: 14px;
}

.erp-status-flow-card h3,
.erp-order-flow h3 {
  margin: 0 0 12px;
  color: #082f75;
  font-size: 13px;
  font-weight: 850;
}

.erp-flow-list {
  display: grid;
  gap: 6px;
}

.erp-flow-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  font-size: 10px;
  color: #607086;
}

.erp-flow-arrow {
  margin-left: 42px;
  color: #172033;
  font-size: 12px;
}

.erp-flow-side {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.erp-flow-note {
  margin: 12px 0 0;
  color: #53657c;
  font-size: 10px;
}

.erp-modern-table {
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

.erp-modern-table thead th {
  height: 38px;
  background: #f8fafc;
  color: #29415d;
  font-size: 10px;
}

.erp-modern-table tbody td {
  height: 42px;
  padding: 7px 9px;
}

.erp-modern-table .status-pill {
  min-height: 22px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 800;
}

.erp-modern-table .offer-status-badge-btn {
  min-height: 20px;
  padding: 0 8px;
  font-size: 9px;
}

.erp-info-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}

.erp-info-card {
  padding: 15px 16px;
}

.erp-info-card strong,
.erp-info-card span {
  display: block;
}

.erp-info-card strong {
  color: #17365d;
  font-size: 12px;
}

.erp-info-card span {
  margin-top: 6px;
  color: #65758b;
  font-size: 11px;
  line-height: 1.35;
}

.orders-data-table {
  width: 100%;
  min-width: 850px;
}

.erp-orders-head {
  align-items: center;
}

.erp-orders-head p {
  margin: 4px 0 0;
  color: #65758b;
  font-size: 12px;
}

.erp-order-flow {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #ffffff;
}

.erp-order-flow-track {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.erp-order-flow-track i {
  color: #8190a3;
  font-style: normal;
  font-size: 12px;
}

.order-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.order-row-actions-compact {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.order-actions-cell {
  width: 88px;
  text-align: right;
}

.order-actions-floating-menu {
  min-width: 210px;
}

.order-actions-menu-select {
  display: grid;
  gap: 5px;
  padding: 8px 10px 9px;
  border-bottom: 1px solid #e7edf4;
}

.order-actions-menu-select span {
  color: #65758b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-actions-menu-select select {
  width: 100%;
  min-height: 30px;
  border: 1px solid #d8e2ec;
  border-radius: 9px;
  background: #f8fbfe;
  color: #1f3349;
  font-size: 11px;
  font-weight: 700;
}

.order-status-select {
  height: 26px;
  border: 1px solid #d6dee8;
  border-radius: 7px;
  background: #fff;
  color: #30465b;
  font-size: 10px;
  font-weight: 700;
}

.order-detail-panel {
  margin-top: 14px;
}

.order-detail-tabs {
  display: flex;
  gap: 6px;
  margin: 12px 0 14px;
  padding: 6px;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fafc, #eef4f9);
  overflow-x: auto;
}

.order-detail-tab {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 12px;
  background: transparent;
  color: #53667c;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.order-detail-tab:hover,
.order-detail-tab.is-active {
  border-color: #cbd8e6;
  background: #ffffff;
  color: #1f3349;
  box-shadow: 0 8px 18px rgba(30, 53, 80, 0.08);
}

.order-detail-tab-panel {
  display: block;
}

.order-detail-top-actions,
.order-detail-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.order-summary-card {
  padding: 12px 14px;
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7fafc);
}

.order-summary-card span,
.order-summary-card strong {
  display: block;
}

.order-summary-card span {
  margin-bottom: 5px;
  color: #6d7d8f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-summary-card strong {
  font-size: 16px;
  color: #1f3349;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 16px;
}

.order-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.order-detail-info-grid article {
  border: 1px solid #e1e7ee;
  border-radius: 12px;
  padding: 11px 12px;
  background: #fbfcfe;
}

.order-detail-info-grid span,
.order-detail-info-grid strong {
  display: block;
}

.order-detail-info-grid span {
  margin-bottom: 5px;
  color: #6d7d8f;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.order-detail-info-grid strong {
  color: #1f3349;
  font-size: 13px;
}

.order-detail-card {
  border: 1px solid #e1e7ee;
  border-radius: 14px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 25, 40, 0.04);
}

.order-detail-card-wide {
  grid-column: 1 / -1;
}

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

.order-detail-card-head p {
  margin: 3px 0 0;
  color: #6d7d8f;
  font-size: 11px;
  line-height: 1.45;
}

.nav-subgroup-static {
  display: grid;
  gap: 2px;
  padding-top: 4px;
}

.nav-subgroup-toggle {
  margin-top: 2px;
  font-weight: 700;
}

.nav-subgroup-toggle::after {
  content: "▾";
  margin-left: auto;
  font-size: 11px;
  color: rgba(225, 233, 245, 0.72);
  transition: transform 0.18s ease;
}

.nav-subgroup-menu {
  display: grid;
  gap: 2px;
}

.nav-subgroup-static:not(.open) .nav-subgroup-menu {
  display: none;
}

.nav-subgroup-static:not(.open) .nav-subgroup-toggle::after {
  transform: rotate(-90deg);
}

.nav-sublink-deep {
  padding-left: 38px;
}

.order-detail-grid h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

.order-detail-subtitle {
  margin: 14px 0 8px;
  color: #1f3349;
  font-size: 12px;
  font-weight: 900;
}

.order-quick-panel {
  margin-bottom: 14px;
}

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

.quick-order-builder-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.quick-order-products-panel {
  position: sticky;
  top: 82px;
}

.quick-order-entry-panel {
  display: grid;
  gap: 12px;
}

.quick-order-selected-product {
  min-height: 38px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid #d8e2ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbfe, #eef5fb);
  color: #38516b;
  font-size: 12px;
  font-weight: 800;
}

.quick-order-line-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
}

.quick-order-line-grid label {
  display: grid;
  gap: 5px;
  color: #65758b;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-order-line-grid input {
  min-height: 36px;
  border: 1px solid #d8e2ec;
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
  color: #1f3349;
}

.quick-order-line-grid button {
  min-height: 36px;
}

.quick-order-items-table {
  overflow-x: auto;
}

@media (max-width: 860px) {
  .quick-order-builder-layout {
    grid-template-columns: 1fr;
  }

  .quick-order-products-panel {
    position: static;
  }

  .quick-order-line-grid {
    grid-template-columns: 1fr;
  }
}

.mini-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.mini-data-table th,
.mini-data-table td {
  border: 1px solid #e1e7ee;
  padding: 6px 8px;
  text-align: left;
}

.mini-data-table th {
  background: #f4f7fb;
  color: #5b6d81;
  font-size: 10px;
  font-weight: 800;
}

.mini-data-table td strong,
.mini-data-table td small {
  display: block;
}

.mini-data-table td small {
  margin-top: 2px;
  color: #6d7d8f;
  font-size: 10px;
  line-height: 1.35;
}

.mini-data-table-total td {
  background: #f1f5f9;
  border-top: 2px solid #1a2332 !important;
  font-weight: 800;
}

/* Üretim Fişi önizleme */
.order-print-preview {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px 18px;
  background: #fafbfc;
  margin-top: 8px;
}

.order-print-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid #1a2332;
}

.order-print-preview-header strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #1a2332;
}

.order-print-preview-header > div:first-child span {
  font-size: 10px;
  color: #64748b;
}

.order-print-preview-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.order-print-preview-meta span {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

.order-print-preview-footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 18px;
}

.order-print-preview-footer > div {
  border-top: 1px solid #94a3b8;
  padding-top: 6px;
}

.order-print-preview-footer span {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sign-line {
  height: 28px;
}

.work-order-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.work-order-summary article {
  border: 1px solid #e1e7ee;
  border-radius: 10px;
  padding: 10px 11px;
  background: #f9fbfd;
}

.work-order-summary span,
.work-order-summary strong {
  display: block;
}

.work-order-summary span {
  margin-bottom: 4px;
  color: #6d7d8f;
  font-size: 10px;
}

.work-order-control-bar {
  margin-bottom: 12px;
}

.work-order-control-bar label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  color: #4f6276;
}

.work-order-control-bar select,
.work-order-stage-status-select {
  height: 34px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  background: #fff;
  color: #30465b;
  font-size: 11px;
  font-weight: 700;
  padding: 0 10px;
}

.work-order-stage-list {
  display: grid;
  gap: 9px;
}

.work-order-stage-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border: 1px solid #e1e7ee;
  border-radius: 10px;
  background: #fbfcfe;
}

.work-order-stage-card strong,
.work-order-stage-card span {
  display: block;
}

.work-order-stage-card span {
  margin-top: 3px;
  color: #6d7d8f;
  font-size: 10px;
  line-height: 1.4;
}

.work-order-stage-card select {
  min-width: 148px;
}

.order-detail-empty {
  padding: 12px 13px;
  border: 1px dashed #d6dee8;
  border-radius: 10px;
  color: #6d7d8f;
  font-size: 11px;
  background: #fbfcfe;
}

.order-detail-empty strong,
.order-detail-empty span {
  display: block;
}

.order-detail-empty strong {
  color: #30465b;
  font-size: 12px;
}

.order-detail-empty span {
  margin-top: 4px;
  line-height: 1.45;
}

.status-history-list {
  display: grid;
  gap: 8px;
}

.status-history-list article {
  border: 1px solid #e1e7ee;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fbfcfe;
}

.status-history-list strong,
.status-history-list span {
  display: block;
}

.status-history-list span {
  margin-top: 3px;
  color: #6d7d8f;
  font-size: 10px;
}

.work-orders-head {
  margin-bottom: 12px;
}

.work-orders-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(160px, 0.7fr));
  gap: 10px;
  margin-bottom: 14px;
}

.work-orders-filter-field {
  display: grid;
  gap: 6px;
  color: #5b6d81;
  font-size: 11px;
  font-weight: 700;
}

.work-orders-filter-field select,
.work-orders-filter-field .table-search {
  width: 100%;
  height: 36px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: #30465b;
  font-size: 11px;
  font-weight: 600;
}

.work-orders-table {
  width: 100%;
}

.work-orders-data-table td strong,
.work-orders-data-table td small {
  display: block;
}

.work-orders-data-table td small {
  margin-top: 2px;
  color: #6d7d8f;
  font-size: 10px;
  line-height: 1.35;
}

.work-order-detail-panel {
  margin-top: 14px;
}

.work-order-priority-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 800;
  border: 1px solid #dbe3ed;
  background: #f7fafc;
  color: #42566b;
}

.work-order-priority-chip.priority-low {
  background: #f4f7fb;
  color: #607086;
}

.work-order-priority-chip.priority-normal {
  background: #eef6ff;
  color: #2f6fed;
}

.work-order-priority-chip.priority-high {
  background: #fff6e8;
  color: #bb8500;
}

.work-order-priority-chip.priority-urgent {
  background: #fff0f0;
  color: #c23b3b;
}

.panjur-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}

.panjur-form-panel,
.panjur-summary-panel,
.panjur-tabs-panel,
.panjur-list-panel {
  border-color: #dde6f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.panjur-summary-panel {
  position: sticky;
  top: 78px;
}

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

.panjur-form-grid .offer-notes-field {
  grid-column: span 2;
}

.panjur-item-editor {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  background: #f8fbff;
}

.panjur-line-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.panjur-line-grid label,
.panjur-check-field {
  display: grid;
  gap: 6px;
  color: #5b6d81;
  font-size: 11px;
  font-weight: 800;
}

.panjur-line-grid input {
  height: 34px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: #30465b;
  font-size: 12px;
}

.panjur-check-field {
  align-content: end;
}

.panjur-check-field input {
  width: 18px;
  height: 18px;
}

.panjur-summary-grid {
  display: grid;
  gap: 10px;
}

.panjur-summary-grid article {
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #f2f8ff);
}

.panjur-summary-grid span,
.panjur-summary-grid strong {
  display: block;
}

.panjur-summary-grid span {
  color: #607086;
  font-size: 11px;
  font-weight: 800;
}

.panjur-summary-grid strong {
  margin-top: 5px;
  color: #102a43;
  font-size: 22px;
}

.panjur-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.panjur-tabs-panel,
.panjur-list-panel {
  margin-top: 14px;
}

.panjur-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panjur-tabs button {
  min-height: 32px;
  border: 1px solid #d8e2ef;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: #4f6276;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.panjur-tabs button.active {
  border-color: #2f6fed;
  background: #eaf2ff;
  color: #2f6fed;
}

.panjur-data-table {
  min-width: 850px;
}

.panjur-data-table td small {
  display: block;
  margin-top: 2px;
  color: #6d7d8f;
  font-size: 10px;
}

.panjur-drawing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.panjur-cover-preview {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.panjur-cover-box {
  position: relative;
  display: grid;
  place-items: center;
  width: calc(92px * var(--cover-ratio, 0.75));
  min-width: 82px;
  height: 150px;
  border: 2px solid #17324d;
  border-radius: 8px;
  background:
    repeating-linear-gradient(0deg, rgba(47, 111, 237, 0.08) 0 9px, transparent 9px 18px),
    #fbfdff;
  color: #17324d;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.panjur-middle-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  background: #17324d;
}

.panjur-hole {
  position: absolute;
  right: 10px;
  width: 8px;
  height: 8px;
  border: 1.5px solid #17324d;
  border-radius: 50%;
  background: #fff;
}

.panjur-hole.top {
  top: 26px;
}

.panjur-hole.bottom {
  bottom: 26px;
}

.panjur-cover-preview small {
  color: #607086;
  font-size: 10px;
  font-weight: 800;
}

.offer-linked-order-meta {
  display: block;
  margin-top: 4px;
  color: #6d7d8f;
  font-size: 9px;
  line-height: 1.3;
}

.offer-linked-order-status-select {
  width: 100%;
  min-width: 118px;
  margin-top: 5px;
  height: 28px;
  border: 1px solid #d6dee8;
  border-radius: 7px;
  background: #fff;
  color: #30465b;
  font-size: 10px;
  font-weight: 700;
  padding: 0 8px;
}

@media (max-width: 980px) {
  .work-orders-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-detail-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-detail-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-detail-card-head,
  .work-order-stage-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .work-order-stage-card select {
    width: 100%;
    min-width: 0;
  }

  .panjur-layout {
    grid-template-columns: 1fr;
  }

  .panjur-summary-panel {
    position: static;
  }

  .panjur-form-grid,
  .panjur-line-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .work-orders-filter-bar {
    grid-template-columns: 1fr;
  }

  .order-detail-summary-grid,
  .order-detail-info-grid,
  .work-order-summary {
    grid-template-columns: 1fr;
  }

  .panjur-form-grid,
  .panjur-line-grid,
  .panjur-form-grid .offer-notes-field {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .order-detail-top-actions,
  .order-detail-inline-actions {
    width: 100%;
  }

  .order-detail-top-actions > button,
  .order-detail-inline-actions > button {
    width: 100%;
  }
}

.offers-row.empty {
  grid-template-columns: 1fr;
  padding: 16px 18px;
}

.orders-row.empty,
.empty-state {
  grid-template-columns: 1fr;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e8fbf0;
  color: #20a966;
  font-size: 12px;
}

.status-pill.status-Yeni {
  background: #eaf2ff;
  color: #2f6fed;
}

.status-pill.status-taslak {
  background: #edf1f7;
  color: #65758b;
}

.status-pill.status-draft {
  background: #edf1f7;
  color: #65758b;
}

.status-pill.status-sent {
  background: #eaf2ff;
  color: #2f6fed;
}

.status-pill.status-pending {
  background: #fff5dc;
  color: #bb8500;
}

.status-pill.status-revised {
  background: #f6ebff;
  color: #9356da;
}

.status-pill.status-approved {
  background: #e8fbf0;
  color: #20a966;
}

.status-pill.status-rejected {
  background: #fff2f2;
  color: #c23b3b;
}

.status-pill.status-expired {
  background: #fff0e8;
  color: #cf6c24;
}

.status-pill.status-converted {
  background: #e9fbf7;
  color: #0f6f55;
}

.status-pill.status-direct-order {
  background: #eef2ff;
  color: #3451b2;
}

.status-pill.status-crm-new { background: #f1f5f9; color: #475569; }
.status-pill.status-crm-called { background: #dbeafe; color: #2563eb; }
.status-pill.status-crm-meeting { background: #ede9fe; color: #7c3aed; }
.status-pill.status-crm-measurement_waiting,
.status-pill.status-crm-quote_required { background: #fff7ed; color: #d97706; }
.status-pill.status-crm-quote_sent,
.status-pill.status-crm-follow_up { background: #ecfeff; color: #0891b2; }
.status-pill.status-crm-won { background: #dcfce7; color: #16a34a; }
.status-pill.status-crm-lost { background: #fee2e2; color: #dc2626; }

.crm-follow-date {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 7px;
  font-weight: 800;
}

.crm-follow-date.is-overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.crm-follow-date.is-today {
  background: #ffedd5;
  color: #c2410c;
}

.crm-lead-form {
  display: grid;
  gap: 12px;
}

.crm-kpi-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.crm-summary-card {
  min-height: 82px;
  border: 1px solid #dfe7f0;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
}

.crm-summary-card strong {
  font-size: 24px;
}

.crm-summary-blue { background: linear-gradient(135deg, #ffffff, #eef7ff); }
.crm-summary-amber { background: linear-gradient(135deg, #ffffff, #fff6e6); }
.crm-summary-indigo { background: linear-gradient(135deg, #ffffff, #f0f3ff); }
.crm-summary-green { background: linear-gradient(135deg, #ffffff, #edfdf4); }
.crm-summary-red { background: linear-gradient(135deg, #ffffff, #fff0f1); }

.crm-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  gap: 14px;
  align-items: start;
}

.crm-opportunity-card,
.crm-form-panel,
.crm-dashboard-panel,
.crm-detail-panel {
  min-width: 0;
  border-color: #dde6f0;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.crm-breadcrumb {
  display: inline-flex;
  margin-bottom: 5px;
  color: #1e4fbf;
  font-size: 11px;
  font-weight: 900;
}

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

.crm-filter-strip {
  display: grid;
  grid-template-columns: minmax(240px, 420px);
  gap: 10px;
  padding: 0 14px 12px;
}

.crm-side-panel {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 14px;
  padding: 14px;
  background: #f8fbff;
}

.crm-side-head h3,
.crm-side-head p {
  margin: 0;
}

.crm-side-head h3 {
  color: #312e81;
  font-size: 15px;
  text-align: center;
  text-transform: uppercase;
}

.crm-side-head p {
  margin-top: 5px;
  color: #6d7d8f;
  font-size: 11px;
  text-align: center;
}

.crm-flow-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.crm-flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.crm-flow-step::after {
  content: "";
  position: absolute;
  left: 31px;
  bottom: -11px;
  width: 1px;
  height: 10px;
  background: #9aa8b8;
}

.crm-flow-step:last-child::after {
  display: none;
}

.crm-flow-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-flow-blue .crm-flow-icon { background: linear-gradient(135deg, #1d4ed8, #38bdf8); }
.crm-flow-green .crm-flow-icon { background: linear-gradient(135deg, #059669, #34d399); }
.crm-flow-amber .crm-flow-icon { background: linear-gradient(135deg, #f59e0b, #fb923c); }
.crm-flow-purple .crm-flow-icon { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.crm-flow-teal .crm-flow-icon { background: linear-gradient(135deg, #0e7490, #22d3ee); }

.crm-flow-step strong,
.crm-flow-step small {
  display: block;
}

.crm-flow-step strong {
  color: #17324d;
  font-size: 12px;
}

.crm-flow-step small {
  margin-top: 3px;
  color: #607086;
  font-size: 10px;
  line-height: 1.35;
}

.crm-legend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 10px;
}

.crm-legend-grid span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #34495e;
  font-size: 10px;
  font-weight: 700;
}

.crm-legend-grid i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}

.crm-side-note {
  margin: 12px 0 0;
  color: #607086;
  font-size: 10px;
  line-height: 1.45;
}

.crm-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.crm-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crm-metric-card,
.crm-conversion-card,
.crm-upcoming-card {
  border: 1px solid #e1e8f2;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.crm-metric-card span,
.crm-metric-card strong,
.crm-conversion-card span,
.crm-conversion-card strong,
.crm-conversion-card small,
.crm-upcoming-card strong,
.crm-upcoming-card span,
.crm-upcoming-card small {
  display: block;
}

.crm-metric-card span,
.crm-conversion-card span {
  color: #607086;
  font-size: 11px;
  font-weight: 800;
}

.crm-metric-card strong,
.crm-conversion-card strong {
  margin-top: 6px;
  font-size: 24px;
  color: #102a43;
}

.crm-metric-card.tone-green { background: #f0fdf4; color: #15803d; }
.crm-metric-card.tone-red { background: #fff1f2; color: #be123c; }
.crm-metric-card.tone-blue { background: #eff6ff; color: #1d4ed8; }

.crm-conversion-card {
  grid-column: span 1;
  background: linear-gradient(135deg, #fff, #f8f5ff);
}

.crm-conversion-card small {
  margin-top: 4px;
  color: #6d7d8f;
  font-size: 10px;
}

.crm-upcoming-card {
  grid-column: span 2;
}

.crm-upcoming-card > strong {
  margin-bottom: 9px;
  color: #17324d;
  font-size: 12px;
}

.crm-upcoming-card span {
  padding: 7px 0;
  border-top: 1px solid #edf2f8;
}

.crm-upcoming-card span:first-of-type {
  border-top: 0;
}

.crm-upcoming-card b {
  color: #20364f;
  font-size: 11px;
}

.crm-upcoming-card small,
.crm-upcoming-card em {
  margin-top: 2px;
  color: #6d7d8f;
  font-size: 10px;
}

.crm-data-table {
  min-width: 980px;
}

.crm-data-table th,
.crm-data-table td {
  white-space: nowrap;
}

.crm-data-table td:first-child small {
  display: block;
  margin-top: 2px;
  color: #6d7d8f;
  font-size: 10px;
}

@media (max-width: 1180px) {
  .crm-kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .crm-main-layout,
  .crm-lower-grid {
    grid-template-columns: 1fr;
  }

  .crm-side-panel {
    position: static;
  }
}

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

  .crm-toolbar-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .crm-toolbar-actions > button,
  .crm-filter-strip {
    width: 100%;
  }

  .crm-filter-strip {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }

  .crm-upcoming-card {
    grid-column: span 1;
  }
}

.status-pill.status-cancelled {
  background: #e9edf2;
  color: #3f4a57;
}

.status-pill.status-onaylandi,
.status-pill.status-teslim-edildi,
.status-pill.status-tamamlandi {
  background: #e8fbf0;
  color: #20a966;
}

.status-pill.status-olcu-alindi,
.status-pill.status-uretim-planlandi {
  background: #eaf2ff;
  color: #2f6fed;
}

.status-pill.status-uretimde,
.status-pill.status-kalite-kontrol {
  background: #f6ebff;
  color: #9356da;
}

.status-pill.status-sevkiyata-hazir,
.status-pill.status-sevk-edildi {
  background: #fff5dc;
  color: #bb8500;
}

.status-pill.status-gonderildi {
  background: #eaf2ff;
  color: #2f6fed;
}

.status-pill.status-beklemede {
  background: #fff5dc;
  color: #bb8500;
}

.status-pill.status-revize {
  background: #f6ebff;
  color: #9356da;
}

.status-pill.status-onaylandi {
  background: #e8fbf0;
  color: #20a966;
}

.status-pill.status-reddedildi {
  background: #fff2f2;
  color: #c23b3b;
}

.status-pill.status-suresi-gecti {
  background: #fff0e8;
  color: #cf6c24;
}

.status-pill.status-siparise-donustu {
  background: #e9fbf7;
  color: #0f6f55;
}

.status-pill.status-iptal {
  background: #e9edf2;
  color: #3f4a57;
}

.status-pill.status-Onayli {
  background: #fff5dc;
  color: #bb8500;
}

.status-pill.status-Uretim {
  background: #f6ebff;
  color: #9356da;
}

.status-pill.status-Tamamlandi,
.status-pill.status-Aktif {
  background: #e8fbf0;
  color: #20a966;
}

.status-pill.status-Izinli {
  background: #fff5dc;
  color: #bb8500;
}

.status-pill.status-Pasif {
  background: #edf1f7;
  color: #65758b;
}

.card-list {
  display: grid;
  gap: 14px;
}

.entity-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.entity-card strong,
.entity-card span,
.entity-card small {
  display: block;
}

.entity-card span,
.entity-card small {
  color: var(--text-muted);
}

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

.ghost-action {
  height: 34px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  cursor: pointer;
}

.settings-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

.finance-grid {
  margin-bottom: 18px;
}

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

.print-actions select {
  min-width: 260px;
  height: 40px;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  padding: 0 12px;
  background: #fbfdff;
}

.role-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .erp-offers-workspace {
    grid-template-columns: 1fr;
  }

  .erp-status-flow-card {
    position: static;
  }

  .erp-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .erp-info-cards {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .summary-grid,
  .content-grid {
    grid-template-columns: 1fr 1fr;
  }

  .chart-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .erp-kpi-grid,
  .erp-info-cards {
    grid-template-columns: 1fr;
  }

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

  .offers-toolbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 220px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    z-index: 20;
  }

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .main-content {
    padding: 18px;
  }

  .main-header,
  .header-actions,
  .print-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-grid,
  .content-grid,
  .products-layout,
  .categories-layout,
  .form-grid,
  .form-grid.two-col,
  .form-grid.three-col,
  .products-form-grid,
  .offer-top-shell,
  .offer-top-header,
  .offer-top-main,
  .offer-top-side,
  .offer-bottom-grid,
  .offer-summary-grid,
  .offer-line-entry,
  .offer-builder-layout,
  .cari-layout,
  .cari-workspace-grid,
  .cari-overview-grid,
  .cari-operations-grid,
  .cari-filter-bar,
  .cari-stats-grid,
  .cari-sticky-bar,
  .cari-detail-summary-grid,
  .cari-detail-general-grid,
  .cari-form-grid,
  .report-cards,
  .report-bars,
  .orders-head,
  .orders-row,
  .offers-head,
  .offers-row,
  .entity-card {
    grid-template-columns: 1fr;
  }

  .chart-card-bars {
    min-height: 260px;
  }

  .orders-head,
  .offers-head {
    display: none;
  }

  .offers-row-dense {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr;
  }

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

  .offers-toolbar-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .offers-count-badge {
    justify-self: start;
  }

  .offers-cell {
    border-right: 0;
    border-bottom: 1px solid #e1e7ee;
  }

  .offers-cell:last-child {
    border-bottom: 0;
  }

  .offers-cell-center,
  .offers-cell-money,
  .offers-cell-status,
  .offers-actions-cell {
    align-items: flex-start;
    justify-content: center;
    text-align: left;
  }

  .offers-head-dense,
  .offers-row-dense {
    min-width: 0;
  }

  .offers-grid-shell {
    width: 100%;
    min-width: 0;
  }

  .offers-data-table {
    min-width: 640px;
  }

  .offers-actions-cell {
    justify-content: flex-end;
  }

  .offer-action-primary {
    display: none;
  }

  .offer-actions-mobile-trigger,
  .offer-actions-more-btn {
    display: inline-flex;
  }

  .offer-actions-mobile-only {
    display: flex;
  }

  .cari-table-head,
  .cari-table-row {
    min-width: 920px;
  }

  .reports-panel-head,
  .report-chip-row {
    flex-direction: column;
    align-items: stretch;
  }

  .report-bar-track {
    height: 110px;
  }

  .offer-lines-grid-head {
    display: none;
  }

  .offer-line-row {
    grid-template-columns: 1fr;
  }

  .compact-card-list .entity-card {
    grid-template-columns: 1fr;
  }

  .product-entity-card {
    grid-template-columns: 1fr;
  }

  .products-list-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .products-list-tools {
    justify-items: stretch;
  }

  .products-search {
    min-width: 0;
    max-width: none;
  }

  .products-list-layout {
    grid-template-columns: 1fr;
  }

  .products-filter-panel,
  .products-list-shell {
    position: static;
  }

  .compact-card-list {
      max-height: none;
    }

  .cari-records-panel {
      min-height: auto;
    }
  }

.panjur-erp-shell {
  display: grid;
  gap: 14px;
}

.panjur-erp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid #dbe6f2;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.panjur-erp-hero-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panjur-erp-hero-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid #d7e3ef;
  background: linear-gradient(135deg, #ffffff, #eef4fc);
  color: #19376d;
  font-size: 0;
  font-weight: 900;
}

.panjur-erp-hero-icon::before {
  content: "PK";
  font-size: 22px;
  line-height: 1;
}

.panjur-erp-hero h2 {
  margin: 0;
  color: #16253a;
  font-size: 18px;
}

.panjur-erp-hero p {
  margin: 4px 0 0;
  color: #6b7d90;
  font-size: 13px;
}

.panjur-erp-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.panjur-erp-hero-actions .primary-btn,
.panjur-erp-hero-actions .ghost-action {
  min-width: 122px;
}

.panjur-erp-strip {
  padding: 10px 14px;
  border-radius: 20px;
  border: 1px solid #dbe6f2;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.panjur-erp-strip-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(6, minmax(120px, 1fr));
  gap: 0;
}

.panjur-erp-strip-grid > article,
.panjur-erp-strip-select {
  display: grid;
  gap: 6px;
  padding: 10px 14px;
  border-right: 1px solid #e3edf7;
}

.panjur-erp-strip-grid > article:last-child {
  border-right: 0;
}

.panjur-erp-strip-grid span {
  color: #6b7d90;
  font-size: 11px;
  font-weight: 800;
}

.panjur-erp-strip-grid strong {
  color: #17283c;
  font-size: 16px;
  font-weight: 800;
}

.panjur-erp-strip-select select {
  min-height: 40px;
  border: 1px solid #d7e3ee;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: #1e3650;
}

.panjur-erp-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid #bfe3c9;
  background: #eaf7ef;
  color: #1b8e51;
  font-size: 12px;
}

.panjur-erp-body {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.panjur-erp-sidebar {
  position: sticky;
  top: 78px;
  padding: 14px;
  border: 1px solid #dbe6f2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.panjur-erp-sidebar-title {
  margin-bottom: 10px;
  color: #183761;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panjur-erp-sidebar-nav {
  display: grid;
  gap: 6px;
}

.panjur-erp-sidebar-nav button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 0 12px;
  background: #f5f8fc;
  color: #314861;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.panjur-erp-sidebar-nav button:hover {
  border-color: #d6e1ee;
  background: #edf3f9;
}

.panjur-erp-sidebar-nav button.active {
  border-color: #bdd1f6;
  background: linear-gradient(90deg, #edf4ff, #dfeaff);
  color: #1848a3;
}

.panjur-project-compact-card {
  padding: 14px 16px;
}

.panjur-erp-main {
  display: grid;
  gap: 16px;
}

.panjur-template-layout {
  display: grid;
  gap: 16px;
}

.panjur-template-main,
.panjur-template-side,
.panjur-template-tabs-panel,
.panjur-template-list-panel,
.panjur-template-section,
.panjur-erp-card {
  border-color: #d9e3ef;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.05);
}

.panjur-template-form {
  display: grid;
  gap: 14px;
}

.panjur-template-section,
.panjur-erp-card {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f9fbfd);
}

.panjur-template-grid {
  display: grid;
  gap: 10px;
}

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

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

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

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

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

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

.panjur-template-grid label,
.panjur-template-checkbox {
  display: grid;
  gap: 6px;
  color: #566779;
  font-size: 11px;
  font-weight: 800;
}

.panjur-template-grid input,
.panjur-template-grid select,
.panjur-template-grid textarea {
  min-height: 38px;
  border: 1px solid #d6dee8;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  color: #25374a;
}

/* === Product Form Sectioned Layout (pf-*) === */
.pf-breadcrumb {
  font-size: 12px;
  color: #6b7f99;
  padding: 7px 12px;
  background: #f4f7fa;
  border-radius: 8px;
  margin-bottom: 14px;
  border: 1px solid #e3eaf2;
  font-weight: 600;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pf-section {
  margin-bottom: 12px;
  padding: 6px 8px 12px;
  margin-left: -8px;
  margin-right: -8px;
  border-bottom: 1px solid #edf1f6;
  border-radius: 8px;
  transition: background 150ms ease;
}

.pf-section:hover {
  background: var(--color-background-secondary);
}

.pf-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.pf-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a6e;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2eaf5;
}

.pf-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.pf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 160px));
  gap: 8px;
}

.pf-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 160px));
  gap: 8px;
}

.pf-grid-2 label,
.pf-grid-3 label,
.pf-grid-4 label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pf-grid-2 label > span,
.pf-grid-3 label > span,
.pf-grid-4 label > span {
  font-size: 11px;
  font-weight: 600;
  color: #6b7f99;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pf-grid-2 input,
.pf-grid-2 select,
.pf-grid-3 input,
.pf-grid-3 select,
.pf-grid-4 input,
.pf-grid-4 select,
.pf-full-input {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  background: #fff;
  color: #25374a;
  width: 100%;
  box-sizing: border-box;
  line-height: 1.4;
  font-family: inherit;
}

.pf-grid-2 input:focus,
.pf-grid-2 select:focus,
.pf-grid-3 input:focus,
.pf-grid-3 select:focus,
.pf-grid-4 input:focus,
.pf-grid-4 select:focus,
.pf-full-input:focus {
  outline: none;
  border-color: #4f87c7;
  box-shadow: 0 0 0 3px rgba(79, 135, 199, 0.12);
}

.pf-image-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pf-image-row .products-image-preview {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  border-radius: 10px;
  border: 1.5px dashed #c8d5e3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #aab8c8;
  background: #f8fafc;
  overflow: hidden;
  flex-shrink: 0;
  text-align: center;
}

.pf-image-row .products-image-preview.has-image {
  border-style: solid;
  border-color: #c8d5e3;
}

.pf-image-row .products-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
}

.pf-image-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.pf-image-inputs label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pf-image-inputs label > span {
  font-size: 11px;
  font-weight: 600;
  color: #6b7f99;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pf-image-inputs input[type="text"] {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  background: #fff;
  color: #25374a;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.pf-image-inputs input[type="text"]:focus {
  outline: none;
  border-color: #4f87c7;
  box-shadow: 0 0 0 3px rgba(79, 135, 199, 0.12);
}

.pf-full-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.pf-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
  font-size: 12px;
}

.panjur-template-grid textarea {
  min-height: 74px;
  resize: vertical;
}

.panjur-template-span-2 {
  grid-column: span 2;
}

.panjur-template-span-3 {
  grid-column: span 3;
}

.panjur-template-checkbox {
  align-content: end;
}

.panjur-template-checkbox input {
  width: 18px;
  height: 18px;
}

.panjur-template-inline-actions,
.panjur-template-output-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.panjur-template-form-actions {
  justify-content: flex-end;
}

.panjur-template-output-actions-inline {
  margin-bottom: 14px;
}

.panjur-template-side {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 14px;
  align-self: start;
}

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

.panjur-template-summary-grid article {
  border: 1px solid #dde6f0;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, #ffffff, #eef6ff);
}

.panjur-template-summary-grid article:nth-child(2) strong,
.panjur-template-summary-grid article:nth-child(4) strong,
.panjur-template-summary-grid article:nth-child(5) strong,
.panjur-template-summary-grid article:nth-child(6) strong {
  color: #14914d;
}

.panjur-template-summary-grid span,
.panjur-template-summary-grid strong {
  display: block;
}

.panjur-template-summary-grid span {
  color: #66788b;
  font-size: 11px;
  font-weight: 800;
}

.panjur-template-summary-grid strong {
  margin-top: 6px;
  color: #102a43;
  font-size: 18px;
}

.panjur-template-preview-box {
  border: 1px solid #e1e8f2;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.panjur-template-preview {
  border: 1px solid #e1e8f2;
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.panjur-template-preview svg {
  display: block;
  width: 100%;
  height: auto;
}

.panjur-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.panjur-preview-footer strong {
  color: #1b3251;
  font-size: 13px;
}

.panjur-preview-pager {
  display: flex;
  gap: 8px;
}

.panjur-preview-pager .compact-action {
  min-width: 38px;
}

.panjur-template-items-table,
.panjur-template-list-panel {
  overflow-x: auto;
}

.panjur-template-data-table {
  min-width: 980px;
}

.panjur-template-data-table td small {
  display: block;
  margin-top: 4px;
  color: #71839a;
  font-size: 10px;
}

.panjur-template-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.panjur-icon-btn {
  min-width: 34px;
  padding: 0 10px;
}

.panjur-template-data-table tr.is-selected td {
  background: #edf4ff;
}

.panjur-template-item-cards {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.panjur-item-card {
  border: 1px solid #dbe4ef;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.panjur-item-card.is-selected {
  border-color: #b7cef7;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.panjur-item-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
}

.panjur-item-card-head strong,
.panjur-item-card-head span {
  display: block;
}

.panjur-item-card-head strong {
  color: #1a2d43;
  font-size: 15px;
}

.panjur-item-card-head span {
  margin-top: 4px;
  color: #6f8196;
  font-size: 12px;
}

.panjur-item-card-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
  border-bottom: 1px solid #e7eef6;
}

.panjur-item-card-tabs button {
  min-height: 34px;
  border: 1px solid #dde6f2;
  border-radius: 10px;
  padding: 0 12px;
  background: #f5f7fb;
  color: #44586f;
  font-size: 12px;
  font-weight: 800;
}

.panjur-item-card-tabs button.active {
  border-color: #9ebdf6;
  background: #edf4ff;
  color: #1c57c8;
}

.panjur-item-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 16px;
  padding: 14px 16px 16px;
  align-items: start;
}

.panjur-item-card-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.panjur-item-card-fields label {
  display: grid;
  gap: 6px;
  color: #53677c;
  font-size: 11px;
  font-weight: 800;
}

.panjur-item-card-fields input,
.panjur-item-card-fields select,
.panjur-item-card-fields textarea {
  min-height: 38px;
  border: 1px solid #d9e3ee;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.panjur-item-card-fields textarea {
  min-height: 104px;
  resize: vertical;
}

.panjur-item-card-check {
  align-content: start;
}

.panjur-item-card-check input {
  width: 20px;
  min-height: 20px;
  padding: 0;
}

.panjur-item-card-span-2 {
  grid-column: span 2;
}

.panjur-item-direction-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid #d6e2f2;
  border-radius: 10px;
  overflow: hidden;
}

.panjur-item-direction-switch button {
  min-height: 38px;
  border: 0;
  background: #fff;
  color: #496078;
  font-weight: 800;
}

.panjur-item-direction-switch button.active {
  background: #e9f1ff;
  color: #215fd6;
}

.panjur-item-card-preview {
  border: 1px solid #e3ebf5;
  border-radius: 14px;
  padding: 8px;
  background: #fbfdff;
}

.panjur-item-card-preview svg {
  width: 100%;
  height: auto;
  display: block;
}

.panjur-item-card-note {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 120px;
}

.panjur-item-card-note strong {
  color: #1d3452;
}

.panjur-item-card-note p {
  margin: 0;
  color: #70839b;
  font-size: 13px;
}

.panjur-template-tabs-panel,
.panjur-template-list-panel {
  margin-top: 0;
}

.panjur-template-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panjur-template-tabs button {
  min-height: 34px;
  border: 1px solid #d8e2ef;
  border-radius: 999px;
  padding: 0 12px;
  background: #fff;
  color: #4f6276;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.panjur-template-tabs button.active {
  border-color: #2f6fed;
  background: #eaf2ff;
  color: #2f6fed;
}

.panjur-template-pdf-frame {
  width: 100%;
  min-height: 780px;
  border: 1px solid #dde6f0;
  border-radius: 16px;
  background: #fff;
}

@media (max-width: 1100px) {
  .panjur-erp-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .panjur-erp-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .panjur-erp-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panjur-erp-strip-grid > article,
  .panjur-erp-strip-select {
    border-right: 0;
    border-bottom: 1px solid #e3edf7;
  }

  .panjur-erp-strip-grid > article:last-child {
    border-bottom: 0;
  }

  .panjur-erp-body {
    grid-template-columns: 1fr;
  }

  .panjur-erp-sidebar,
  .panjur-template-side {
    position: static;
  }

  .panjur-erp-sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panjur-template-grid-5,
  .panjur-template-grid-6,
  .panjur-template-grid-7,
  .panjur-template-grid-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panjur-item-card-body,
  .panjur-item-card-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .panjur-erp-strip-grid,
  .panjur-erp-sidebar-nav,
  .panjur-template-grid-2,
  .panjur-template-grid-4,
  .panjur-template-grid-5,
  .panjur-template-grid-6,
  .panjur-template-grid-7,
  .panjur-template-grid-8,
  .panjur-template-summary-grid {
    grid-template-columns: 1fr;
  }

  .panjur-template-span-2,
  .panjur-template-span-3 {
    grid-column: span 1;
  }
}

/* Products screen final overrides: ERP-style variant price workspace */
.products-workspace {
  gap: 12px;
  color: #10204a;
}

.products-page-hero {
  padding: 0 4px 4px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.products-page-hero h1 {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0;
  color: #0d1b47;
  text-transform: uppercase;
}

.products-page-hero p {
  margin-top: 7px;
  font-size: 13px;
  color: #18315f;
}

.products-hero-actions {
  display: none;
}

.products-method-strip {
  border-radius: 8px;
  padding: 14px 18px;
  gap: 0;
  box-shadow: none;
}

.products-method-strip::before {
  content: "4 FARKLI KOLAY YONTEM";
  grid-column: 1 / -1;
  margin-bottom: 12px;
  color: #0f2457;
  font-size: 14px;
  font-weight: 800;
}

.products-method-card {
  border-right: 1px solid #dce4f0;
  border-radius: 0;
  padding: 6px 18px;
  background: #fff;
}

.products-method-card:last-child {
  border-right: 0;
}

.products-method-card h3 {
  font-size: 13px;
  text-transform: uppercase;
}

.products-method-card p {
  font-size: 11px;
  line-height: 1.45;
  color: #172b5a;
}

.products-shell {
  grid-template-columns: 190px minmax(660px, 1fr) 320px;
  gap: 14px;
}

.products-left-card,
.products-side-panel-card,
.products-main-stage,
.products-form-card,
.products-list-shell-head-modern {
  border-radius: 8px;
  border-color: #d9e2ee;
  box-shadow: none;
}

.products-left-card {
  padding: 14px 12px;
  background: #fff;
}

.products-rail-title h2 {
  font-size: 12px;
  text-transform: uppercase;
  color: #162858;
}

.products-rail-title p {
  font-size: 10px;
  color: #4d5f82;
}

.products-main-stage {
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #d9e2ee;
  border-radius: 8px;
}

.products-list-stage-head {
  align-items: center;
}

.products-list-stage-head h2 {
  font-size: 18px;
  color: #10245a;
}

.products-breadcrumb {
  text-transform: none;
  color: #1d63d8;
  font-size: 11px;
  letter-spacing: 0;
}

.products-list-stage-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}

.products-unit-select,
.products-search {
  height: 30px;
  border-radius: 6px;
  border: 1px solid #d9e2ee;
  background: #fbfdff;
  font-size: 11px;
}

.products-tab-strip {
  gap: 18px;
  border-bottom: 1px solid #e7edf5;
  margin-bottom: 12px;
}

.products-tab-pill {
  height: 31px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1c2c5c;
  font-size: 11px;
}

.products-tab-pill.active {
  color: #085be8;
  background: transparent;
  box-shadow: inset 0 -2px 0 #085be8;
}

.products-list-shell-head-modern {
  padding: 10px 0;
  border: 0;
  background: transparent;
}

.products-list-shell-head-modern h3,
.products-list-shell-head-modern p {
  display: none;
}

.products-inline-methods {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.products-mini-pill {
  min-width: 86px;
  height: 30px;
  border-radius: 5px;
  font-size: 11px;
  background: #fff;
}

.products-node-card {
  border-radius: 8px;
  box-shadow: none;
}

.products-node-head {
  padding: 10px 14px;
  border-bottom: 1px solid #e7edf5;
  background: #fff;
}

.products-node-meta strong {
  font-size: 14px;
  color: #11265a;
}

.products-node-meta span {
  font-size: 11px;
}

.products-node-actions {
  display: none;
}

.products-node-variant-head,
.products-node-variant-row {
  grid-template-columns: 34px minmax(150px, 1.4fr) minmax(90px, 0.8fr) minmax(95px, 0.85fr) minmax(72px, 0.65fr) minmax(95px, 0.85fr) 56px 116px 130px;
  min-width: 980px;
}

.products-node-variant-head span,
.products-node-variant-row > span {
  padding: 8px 10px;
  font-size: 11px;
}

.products-node-variant-head span {
  color: #122655;
  background: #f7f9fc;
  text-transform: none;
  font-size: 10px;
}

.products-node-variant-row {
  min-height: 39px;
  align-items: center;
}

.products-node-variant-row.is-active {
  background: #eef6ff;
}

.products-node-check {
  display: flex;
  align-items: center;
  justify-content: center;
}

.products-node-check input {
  width: 14px;
  height: 14px;
  accent-color: #0b66f0;
}

.products-node-variant-image {
  display: none;
}

.products-node-variant-name {
  gap: 0;
}

.products-node-variant-name strong {
  color: #12306a;
  font-size: 11px;
}

.products-node-variant-name small,
.products-node-variant-row > span:last-child {
  display: none;
}

.products-price-input {
  width: 100px;
  height: 26px;
  border: 1px solid #d6e0eb;
  border-radius: 5px;
  padding: 0 8px;
  color: #10245a;
  text-align: right;
  font: inherit;
  font-size: 11px;
  background: #fff;
}

.products-node-variant-row.is-active .products-price-input {
  border-color: #0b66f0;
  box-shadow: 0 0 0 2px rgba(11, 102, 240, 0.12);
}

.products-tree-group,
.products-tree-product {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.products-tree-category,
.products-tree-product-head {
  grid-template-columns: minmax(0, 1fr) 22px;
  border: 0;
}

.products-tree-main,
.products-tree-product-main {
  padding: 5px 4px;
}

.products-tree-main strong,
.products-tree-product-main strong {
  font-size: 11px;
  color: #162858;
}

.products-tree-main span,
.products-tree-product-main span {
  display: none;
}

.products-tree-toggle,
.products-tree-product-toggle {
  border: 0;
  color: #0b63df;
  font-size: 13px;
}

.products-tree-children,
.products-tree-variants {
  gap: 0;
  padding: 0 0 0 10px;
  background: transparent;
}

.products-tree-level {
  position: relative;
  display: grid;
  gap: 3px;
  margin-left: 7px;
  padding-left: 13px;
  border-left: 1px dotted #aab8cc;
}

.products-tree-folder {
  position: relative;
  padding: 4px 0 4px 16px;
  font-size: 10px;
  font-weight: 700;
  color: #173061;
}

.products-tree-folder::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 10px;
  height: 8px;
  border: 1px solid #6d86b5;
  border-radius: 2px;
  background: #f9fbff;
}

.products-tree-variant {
  position: relative;
  border: 0;
  border-radius: 4px;
  padding: 4px 6px 4px 18px;
  background: transparent;
}

.products-tree-variant::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 1px;
  background: #9eabc0;
}

.products-tree-variant strong {
  font-size: 10px;
  color: #192d5c;
  font-weight: 600;
}

.products-tree-variant span {
  display: none;
}

.products-tree-variant.active {
  border: 1px solid #77a8ff;
  background: #edf5ff;
}

.products-side-panel-card {
  padding: 14px 16px;
  border-radius: 8px;
}

.products-side-title {
  margin-bottom: 10px;
}

.products-side-title h3 {
  font-size: 13px;
  text-transform: uppercase;
}

.products-side-title strong {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.products-side-table header,
.products-side-table div {
  grid-template-columns: minmax(0, 1fr) 44px 90px;
  min-height: 32px;
}

.products-side-table span,
.products-side-table strong {
  font-size: 10px;
}

.category-tree-manager { display:flex; flex-direction:column; gap:2px; }
.category-tree-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.category-tree-add-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.category-tree-add-form input { min-width:220px; height:36px; border:1px solid #c9d8ef; border-radius:8px; padding:0 10px; background:#fff; }
.category-tree-status { border:1px solid #b9e3c1; border-radius:8px; padding:8px 10px; background:#edf9f0; color:#247237; font-size:12px; font-weight:700; }
.category-tree-status.is-error { border-color:#f1c4c4; background:#fff1f1; color:#b12a2a; }
.category-root-drop { flex:1; min-width:180px; padding:8px 12px; border:1px dashed #9eb4df; border-radius:8px; color:#4a628f; font-size:12px; text-align:center; }
.category-tree-list { display:flex; flex-direction:column; gap:2px; }
.category-tree-row { display:grid; grid-template-columns:20px 10px minmax(0,1fr) auto; gap:4px; align-items:center; padding:0 6px; height:36px; max-height:44px; margin-left:calc(var(--depth,0) * 14px); border:1px solid #dbe5f5; border-radius:6px; background:#fff; cursor:grab; overflow:hidden; }
.category-tree-row.is-active { border-color:#5f93e8; background:#edf5ff; }
.category-tree-toggle { width:20px; height:20px; min-width:20px; border:1px solid #c9d8ef; border-radius:4px; background:#f7faff; font-size:10px; padding:0; }
.category-tree-grip { color:#b0bcc8; font-size:10px; line-height:1; cursor:grab; user-select:none; }
.category-tree-label { display:flex; flex-direction:row; align-items:center; gap:7px; border:0; background:transparent; text-align:left; cursor:pointer; overflow:hidden; min-width:0; }
.category-tree-label strong { font-size:13px; color:#162c4a; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; letter-spacing:-0.01em; }
.cat-tree-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:16px; padding:0 5px; border-radius:8px; background:#deeafd; color:#1a4fa8; font-size:10px; font-weight:700; flex-shrink:0; line-height:1; }
.category-tree-path { display:none; }
.category-tree-actions { display:flex; flex-wrap:nowrap; gap:3px; align-items:center; flex-shrink:0; }
.category-tree-children { display:flex; flex-direction:column; gap:2px; margin-top:2px; }
.product-category-picker { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.product-category-picker-panel { margin-top:8px; padding:8px; border:1px solid #dbe5f5; border-radius:8px; background:#f9fbff; max-height:240px; overflow:auto; }
.product-category-pick-item { display:flex; flex-direction:column; align-items:flex-start; width:100%; border:0; background:transparent; padding:6px 8px; text-align:left; border-radius:6px; cursor:pointer; }
.product-category-pick-item:hover { background:#edf5ff; }

/* Compact product list category rail */
.products-clean-list-layout {
  grid-template-columns: 200px minmax(0, 1fr);
}

.products-list-sidebar {
  padding: 10px 9px;
  background: #f0f4fa;
  overflow-y: auto;
}

/* ── Fiyat Listesi toolbar (arama + filtreler tek satır) ──────────── */
.products-list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #edf2f7;
  flex-wrap: nowrap;
  overflow-x: auto;
  background: #f8fafc;
  min-width: 0;
}

.products-list-toolbar .products-search {
  height: 28px;
  font-size: 11px;
  padding: 0 8px;
  border: 1px solid #d6dee8;
  border-radius: 5px;
  min-width: 180px;
  max-width: 240px;
  flex-shrink: 0;
  background: #fff;
  color: #25374a;
  font-family: inherit;
}

.products-list-toolbar label {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.products-list-toolbar label > span {
  font-size: 10px;
  color: #6b7f99;
  font-weight: 600;
}

.products-list-toolbar select {
  height: 28px;
  font-size: 11px;
  padding: 0 7px;
  border: 1px solid #d6dee8;
  border-radius: 5px;
  background: #fff;
  color: #25374a;
  font-family: inherit;
  max-width: 120px;
}

.products-list-sidebar .products-clean-title {
  margin-bottom: 6px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e2e9f2;
}

.products-list-sidebar .products-clean-title h2 {
  font-size: 11px;
  letter-spacing: 0;
}

.products-list-sidebar .products-clean-title p {
  margin: 3px 0 0;
  font-size: 9px;
  line-height: 1.2;
}

.products-list-sidebar .products-selection-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 8px;
}

.products-list-sidebar .products-summary-card {
  padding: 6px 7px;
  border-radius: 7px;
  gap: 1px;
  background: #fff;
}

.products-list-sidebar .products-summary-card span,
.products-list-sidebar .products-summary-card small {
  font-size: 8px;
  letter-spacing: 0;
}

.products-list-sidebar .products-summary-card strong {
  max-width: 100%;
  overflow: hidden;
  color: #142b5c;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-summary-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border-bottom: 1px solid #dde4f0;
}

.psl-category {
  font-size: 11px;
  font-weight: 600;
  color: #1e3a6e;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.psl-stats {
  font-size: 11px;
  color: #64748b;
}

.products-list-export-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 5px 10px;
  border-bottom: 1px solid #edf2f7;
  background: #f8fafc;
}

.products-bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid #dde6f0;
  background: #f4f7fb;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.bulk-bar-label {
  font-size: 11px;
  font-weight: 600;
  color: #3a4d6a;
  white-space: nowrap;
}

.products-bulk-bar select {
  height: 28px;
  font-size: 11px;
  border: 1px solid #cdd8e8;
  border-radius: 5px;
  padding: 0 6px;
  background: #fff;
  color: #25374a;
}

.products-bulk-bar input[type="number"] {
  width: 80px;
  height: 28px;
  font-size: 11px;
  border: 1px solid #cdd8e8;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: #25374a;
}

.products-bulk-bar input[type="number"]:focus,
.products-bulk-bar select:focus {
  border-color: #4a8bd4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 139, 212, 0.15);
}

.products-list-sidebar .products-hierarchy-tree {
  gap: 2px;
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  padding-right: 3px;
}

/* ── Fiyat Listesi sol panel: esnek yerleşim (ağaç kaydırılır, bulk kart altta sabit) ── */
#productsListSection .products-list-sidebar {
  overflow: hidden;
  padding: 8px 6px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#productsListSection .products-clean-title,
#productsListSection .products-selection-summary {
  flex-shrink: 0;
}

#productsListSection .products-hierarchy-tree {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 2px 2px 6px 0;
}

#productsListSection .pl-bulk-card {
  flex-shrink: 0;
  margin: 0 -6px;
  border-top: 1px solid #dde4f0;
}

/* ── Kategori filtre ağacı satırları (pfl-*) ─────────────────────── */
.pfl-node {
  display: flex;
  flex-direction: column;
}

.pfl-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 24px;
  min-height: 24px;
  padding: 2px 6px;
  gap: 4px;
  border: none;
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.1s;
  box-sizing: border-box;
}

.pfl-row:hover { background: #eef4fc; }

.pfl-row.is-active {
  background: #1e3a6e !important;
}
.pfl-row.is-active .pfl-name,
.pfl-row.is-active .pfl-arrow { color: #fff !important; }
.pfl-row.is-active .pfl-badge {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

/* Kök kategoriler */
.pfl-row.pfl-root .pfl-name {
  font-size: 11px;
  font-weight: 600;
  color: #1e3a6e;
}

/* Alt kategoriler */
.pfl-row.pfl-sub .pfl-name {
  font-size: 10px;
  font-weight: 400;
  color: #374767;
}

.pfl-arrow {
  font-size: 8px;
  width: 12px;
  min-width: 12px;
  color: #64748b;
  flex-shrink: 0;
  text-align: center;
  user-select: none;
  line-height: 1;
}

.pfl-arrow-sp {
  width: 12px;
  min-width: 12px;
  flex-shrink: 0;
}

.pfl-name {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.pfl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 15px;
  border-radius: 8px;
  background: #edf2f8;
  color: #51637e;
  font-size: 8.5px;
  font-weight: 700;
  padding: 0 3px;
  flex-shrink: 0;
}

.pfl-children {
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pfl-empty {
  font-size: 11px;
  color: #94a3b8;
  padding: 8px 4px;
}

.products-list-sidebar .products-filter-group {
  gap: 2px;
}

.products-list-sidebar .products-filter-subchips {
  gap: 2px;
  padding-left: 0;
}

.products-list-sidebar .products-filter-chip {
  min-height: 26px;
  padding: 4px 5px 4px calc(6px + (var(--depth, 0) * 10px));
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #263a5f;
  font-size: 10px;
  line-height: 1.15;
  box-shadow: none;
}

.products-list-sidebar .products-filter-chip:hover {
  background: #eef4fc;
}

.products-list-sidebar .products-filter-chip.active {
  background: #e8f1ff;
  color: #0b55c6;
  box-shadow: inset 2px 0 0 #2f6fed;
}

.products-list-sidebar .products-filter-chip strong {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-list-sidebar .products-filter-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  border-radius: 999px;
  background: #edf2f8;
  color: #51637e;
  font-size: 9px;
  font-weight: 800;
}

.products-list-sidebar .products-filter-chip.active span {
  background: #d8e8ff;
  color: #0b55c6;
}

.products-list-sidebar .products-filter-all {
  margin-bottom: 4px;
  border-bottom: 1px solid #e2e9f2;
  border-radius: 6px 6px 0 0;
  font-weight: 800;
}

/* Compact product rows */
.products-price-table-compact {
  overflow-x: auto;
  border-radius: 8px;
}

.products-price-table-compact .products-price-head,
.products-price-table-compact .products-price-row {
  grid-template-columns: minmax(230px, 1.45fr) minmax(190px, 1fr) minmax(260px, 1.35fr) 72px 148px;
  min-width: 900px;
}

.products-price-table-compact .products-price-head span {
  padding: 7px 9px;
  font-size: 9px;
  letter-spacing: 0;
}

.products-price-table-compact .products-price-row {
  min-height: 58px;
  align-items: stretch;
}

.products-price-table-compact .products-price-row > span {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 7px 9px;
  font-size: 10px;
}

.products-price-table-compact .product-main-cell strong {
  overflow: hidden;
  color: #10245a;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-price-table-compact .product-main-cell small {
  overflow: hidden;
  color: #66768e;
  font-size: 9px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-price-table-compact .product-main-cell b {
  color: #19417c;
}

.products-price-table-compact .products-price-row > .product-spec-cell {
  display: flex;
  align-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.products-price-table-compact .product-spec-cell em {
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #dde7f1;
  border-radius: 999px;
  padding: 3px 7px;
  background: #f8fbff;
  color: #334967;
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-price-table-compact .product-spec-cell small {
  flex-basis: 100%;
  overflow: hidden;
  color: #6a7a91;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.products-price-table-compact .products-compact-price-cell {
  align-content: center;
}

.products-price-table-compact .products-compact-price-cell > small {
  color: #6a7a91;
  font-size: 9px;
}

.products-price-table-compact .m2-price-cell {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #0b5bd3;
  font-size: 12px !important;
  line-height: 1.15;
  text-align: left;
}

.products-price-table-compact .m2-price-cell small {
  margin: 0;
  font-size: 9px;
}

.products-price-table-compact .products-quick-calc {
  gap: 4px;
}

.products-price-table-compact .products-quick-calc input {
  width: 42px;
  height: 24px;
  border-radius: 5px;
  font-size: 9px;
}

.products-price-table-compact .products-quick-calc output {
  min-width: 98px;
  gap: 4px;
  font-size: 9px;
}

.products-price-table-compact .products-status-cell {
  text-align: center;
}

.products-price-table-compact .products-status-cell strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #edf9f2;
  font-size: 9px;
}

.products-price-table-compact .products-status-cell .status-passive {
  background: #fff4e6;
}

.products-price-table-compact .products-price-row > .products-row-actions {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
}

.products-price-table-compact .products-row-actions .compact-action {
  min-height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 9px;
}

.products-price-table-real {
  border: none;
  border-radius: 0;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.products-price-table-real .products-price-head,
.products-price-table-real .products-price-row {
  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 0.7fr)
    minmax(0, 1.5fr)
    60px
    100px
    70px
    160px;
  width: 100%;
  min-width: 0 !important;
}

.products-price-table-real .products-price-head {
  background: #e8eef7;
  position: sticky;
  top: 0;
  z-index: 2;
}

.products-price-table-real .products-price-head span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1e3a6e;
  padding: 4px 8px;
  border-right: 1px solid #d4dce8;
}

.products-price-table-real .products-price-row {
  min-height: unset;
  height: 32px;
  background: #f8fafc;
  cursor: default;
  border-bottom: 1px solid #f0f4f8;
}

.products-price-table-real .products-price-row.row-even {
  background: #ffffff;
}

.products-price-table-real .products-price-row:hover {
  background: #eef4ff !important;
}

.products-price-table-real .products-price-row.is-active {
  background: #ddeeff !important;
}

.products-price-table-real .products-price-row > span {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 11px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-right: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.products-price-table-real .products-price-head > span:last-child,
.products-price-table-real .products-price-row > span:last-child {
  border-right: none;
}

.products-price-table-real .code-cell {
  color: #1e3a6e;
  font-weight: 600;
}

.products-price-table-real .pl-price-cell {
  justify-content: flex-end;
}

.products-price-table-real .pl-status-cell {
  justify-content: center;
}

.products-price-table-real .products-row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 4px;
  gap: 4px;
  white-space: nowrap;
  overflow: visible;
  flex-wrap: nowrap;
}

.products-price-table-real .products-price-input {
  width: 100%;
  max-width: 112px;
  height: 24px;
  font-size: 11px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  text-align: right;
  font-family: inherit;
}

.products-price-table-real .products-price-input:focus {
  border-color: #4a8bd4;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 139, 212, 0.15);
}

.products-price-table-real .pra-btn {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #1e3a6e;
  color: #1e3a6e;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  line-height: normal;
  display: inline-block;
  width: auto;
  vertical-align: middle;
  transition: background 150ms, color 150ms;
}

.products-price-table-real .pra-btn:hover {
  background: #1e3a6e;
  color: #fff;
}

/* Status badges */
.pl-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.pl-badge-active {
  background: #dcfce7;
  color: #15803d;
}

.pl-badge-passive {
  background: #fee2e2;
  color: #dc2626;
}

/* ── productsListSection scoped overrides ───────────────────────── */

/* 1. Tablo altındaki boş alanı kaldır */
#productsListSection .products-clean-list-layout {
  min-height: 0;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
}

#productsListSection .products-clean-list {
  width: 100%;
  max-width: none;
  overflow: visible;
}

#productsListSection .products-card-list {
  flex: none;
  overflow-x: auto;
  overflow-y: visible;
}

/* 2. Kategori satırları kompakt */
#productsListSection .category-tree-row {
  height: 26px;
  max-height: 26px;
  padding: 0 8px;
}

#productsListSection .category-tree-label {
  font-size: 11px;
}

/* 3. Ana kategori (depth 0) */
#productsListSection .category-tree-row[data-category-depth="0"] .category-tree-label strong {
  font-size: 11px;
  font-weight: 600;
  color: #10245a;
}

/* Alt kategoriler (depth 1) */
#productsListSection .category-tree-row[data-category-depth="1"] .category-tree-label strong {
  font-size: 11px;
  font-weight: 400;
  color: #4a6080;
}

/* Daha derin alt kategoriler */
#productsListSection .category-tree-row:not([data-category-depth="0"]):not([data-category-depth="1"]) .category-tree-label strong {
  font-size: 11px;
  font-weight: 400;
  color: #4a6080;
}

/* 4. Kategori badge sağa hizalı */
#productsListSection .cat-tree-badge {
  justify-self: end;
  font-size: 10px;
  min-width: 18px;
  height: 15px;
  padding: 0 4px;
}

/* Category tree selected state in price list */
#productsListSection .category-tree-row.is-active {
  background: #1e3a6e !important;
  border-color: #1e3a6e !important;
  box-shadow: none !important;
  color: #fff;
}

#productsListSection .category-tree-row.is-active .category-tree-label strong,
#productsListSection .category-tree-row.is-active .category-tree-label span,
#productsListSection .category-tree-row.is-active .cat-tree-badge {
  color: #fff !important;
  background: rgba(255,255,255,0.15) !important;
}

/* Bulk update compact card in left panel */
.pl-bulk-card {
  padding: 10px 12px;
  border-top: 1px solid #dde4f0;
  background: #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-bulk-card-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a6e;
}

.pl-bulk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 0.85fr);
  gap: 6px;
  align-items: stretch;
}

.pl-bulk-row select {
  min-width: 0;
  height: 30px;
  font-size: 11px;
  border: 1px solid #cdd8e8;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: #25374a;
  font-family: inherit;
}

.pl-bulk-row input[type="number"] {
  width: 100%;
  height: 30px;
  font-size: 11px;
  border: 1px solid #cdd8e8;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: #25374a;
  font-family: inherit;
}

.pl-bulk-row .compact-action {
  grid-column: 1 / -1;
  width: 100%;
  height: 30px;
  font-size: 11px;
  padding: 0 10px;
  white-space: nowrap;
}

.pl-bulk-row select:focus,
.pl-bulk-row input[type="number"]:focus {
  border-color: #4a8bd4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(74, 139, 212, 0.15);
}

/* Export button pushed to right in toolbar */
.products-list-toolbar .pl-export-btn {
  margin-left: auto;
  flex-shrink: 0;
  height: 28px;
  font-size: 11px;
  padding: 0 8px;
  white-space: nowrap;
}

/* Product list vertical density */
.products-clean-list-layout {
  min-height: 0;
}

.products-clean-list-layout .products-clean-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.products-clean-list-layout .products-card-list {
  overflow-x: auto;
  overflow-y: auto;
  flex: 1;
  padding: 0;
}


.products-tree-workspace {
  display: block;
  min-height: 400px;
}

.products-tree-help {
  display: none;
}

.product-tree-manager {
  padding: 8px 10px;
}

/* Kategori Yönetimi sol "Kategori Listesi" panelini diğer ürün ağaçlarıyla aynı genişlikte yap */
#categoryTreeManager .erp-panel-layout {
  grid-template-columns: var(--product-tree-width) minmax(0, 1fr);
}

/* ── Kategoriler sayfası panel özelleştirmeleri ─────────────────── */
#view-categories .erp-panel-layout {
  min-height: 400px;
}

#view-categories .erp-panel-left {
  background: linear-gradient(180deg, #eaf1fb 0%, #f4f8fe 50%, #f8fbff 100%);
  border-right: 1px solid #d8e5f5;
  max-height: 70vh;
}

#view-categories .erp-panel-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  overflow-y: auto;
  max-height: 70vh;
  background: #f5f7fa;
}

.cat-nav-header {
  font-size: 11px;
  font-weight: 600;
  color: #10245a;
  padding: 8px 12px;
  border-bottom: 1px solid #d5e3f4;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
}

.cat-nav-list {
  display: flex;
  flex-direction: column;
  padding: 5px 5px 8px;
  flex: 1;
}

.cat-nav-node {
  display: flex;
  flex-direction: column;
}

.cat-nav-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 4px 0 calc(4px + var(--depth, 0) * 14px);
  border-radius: 4px;
  cursor: default;
  transition: background 150ms ease;
}

.cat-nav-row.is-active {
  background: linear-gradient(90deg, rgba(47, 111, 237, 0.12), rgba(47, 111, 237, 0.06));
  box-shadow: inset 2px 0 0 #2f6fed;
  border-radius: 0 4px 4px 0;
}

.cat-nav-row.is-passive {
  opacity: 0.5;
}

.cat-nav-row:not(.is-active):hover {
  background: #dde8f5;
}

.cat-nav-toggle {
  font-size: 14px;
  color: #7a90aa;
  cursor: pointer;
  text-align: center;
  line-height: 1;
  user-select: none;
  padding: 2px 0;
  transition: color 0.1s ease;
}

.cat-nav-row:hover .cat-nav-toggle {
  color: #2f6fed;
}

.cat-nav-name {
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 12px;
  color: #1a2e4a;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 24px;
}

.cat-nav-row.is-active .cat-nav-name {
  font-weight: 700;
  color: #1a3a8f;
}

.cat-nav-children {
  display: flex;
  flex-direction: column;
}

.cat-nav-product {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 22px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 11px;
  color: #4a6080;
  cursor: grab;
  padding: 0 4px 0 calc(6px + var(--depth, 0) * 14px);
  border-radius: 3px;
  transition: background 0.1s ease;
  user-select: none;
  -webkit-user-drag: element;
}

.cat-nav-product .cat-nav-product-name {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-nav-product-actions {
  display: none;
  flex: 0 0 auto;
  gap: 2px;
}

.cat-nav-product:hover .cat-nav-product-actions {
  display: inline-flex;
}

.cat-nav-prod-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
}

.cat-nav-prod-btn:hover {
  background: rgba(47, 111, 237, 0.18);
}

.category-product-row-actions {
  display: none;
  gap: 2px;
  justify-self: end;
}

.category-product-row:hover .category-product-row-actions {
  display: inline-flex;
}

.cat-nav-product:hover {
  background: rgba(47, 111, 237, 0.07);
  color: #1a2e4a;
}

.cat-nav-product.cat-nav-dragging {
  opacity: 0.35;
  pointer-events: none;
}

/* Drag sırasında tüm sayfada cursor:grabbing */
body.cat-product-dragging,
body.cat-product-dragging * {
  cursor: grabbing !important;
  user-select: none !important;
}

/* Drop hedefi üzerinde farklı cursor */
body.cat-product-dragging [data-cat-drop-id]:hover {
  cursor: grabbing !important;
}

.cat-nav-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: #1e40af;
  color: #fff;
  border-radius: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(30, 64, 175, 0.35);
  user-select: none;
}

/* ═══════════════════════════════════════════════════════════════════
   KULLANICI YÖNETİMİ
═══════════════════════════════════════════════════════════════════ */

.users-filter-bar {
  grid-template-columns: minmax(180px, 1fr) 150px 130px;
  align-items: end;
}

/* Rol rozetleri */
.user-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.user-role-badge.role-admin {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.user-role-badge.role-muhasebe {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.user-role-badge.role-personel {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

/* Durum rozetleri */
.user-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
}
.user-status-badge.is-active {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.user-status-badge.is-inactive {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* Modal */
.user-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}
.user-modal-overlay[hidden] { display: none; }

.user-modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: userModalIn 0.18s ease-out;
}
.user-modal-sm { max-width: 420px; }

@keyframes userModalIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.user-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.user-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #1a2332;
}
.user-modal-close {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.user-modal-close:hover { background: #f1f5f9; color: #475569; }

.user-form {
  padding: 18px 20px;
}
.user-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.user-form-grid-single { grid-template-columns: 1fr; }

.user-field {
  display: grid;
  gap: 5px;
}
.user-field-password { grid-column: 1 / -1; }
.user-field > span {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.user-field > span small {
  font-weight: 500;
  color: #94a3b8;
  text-transform: none;
}
.user-field input,
.user-field select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s;
}
.user-field input:focus,
.user-field select:focus {
  border-color: #0d6efd;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.user-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 600px) {
  .user-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Geniş modal (izinler için) */
.user-modal-lg { max-width: 760px; }

/* Sekme barı */
.user-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.user-modal-tab {
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  font-family: inherit;
}
.user-modal-tab:hover {
  color: #334155;
}
.user-modal-tab.is-active {
  color: #0d6efd;
  border-bottom-color: #0d6efd;
  background: #fff;
}

.user-tab-panel { display: none; }
.user-tab-panel.is-active { display: block; }

/* İzin matrisi araç barı */
.user-permissions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.user-permissions-toolbar strong {
  font-size: 13px;
  font-weight: 800;
  color: #1a2332;
  display: block;
}
.user-permissions-toolbar small {
  font-size: 11px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}
.user-permissions-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.user-permissions-actions .ghost-action {
  padding: 4px 10px;
  font-size: 11px;
  height: 28px;
  font-weight: 600;
}

/* İzin matrisi tablosu */
.user-permissions-table-wrap {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.user-permissions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.user-permissions-table thead tr {
  background: #1a2332;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.user-permissions-table th {
  padding: 7px 8px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.user-permissions-table th.perm-module-col {
  text-align: left;
  padding-left: 14px;
  min-width: 160px;
}
.user-permissions-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}
.user-permissions-table td.perm-module-cell {
  text-align: left;
  padding-left: 14px;
  font-weight: 600;
  color: #1a2332;
}
.user-permissions-table tr:nth-child(even) td {
  background: #fafbfc;
}
.user-permissions-table tr:hover td {
  background: #f0f7ff;
}

/* Custom checkbox */
.perm-checkbox {
  display: inline-block;
  width: 18px;
  height: 18px;
  cursor: pointer;
  appearance: none;
  border: 1.5px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  position: relative;
  transition: all 0.15s;
}
.perm-checkbox:hover {
  border-color: #0d6efd;
}
.perm-checkbox:checked {
  background: #0d6efd;
  border-color: #0d6efd;
}
.perm-checkbox:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.perm-checkbox:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* "Yok" badgeci (aksiyon o modülde tanımlı değilse) */
.perm-na {
  color: #cbd5e1;
  font-size: 12px;
}

/* ═══════════════════════════════════════════════════════════════════
   K6: YEDEKLEME SAYFASI
═══════════════════════════════════════════════════════════════════ */

.backup-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.backup-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.backup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.backup-table thead {
  background: #1a2332;
  color: #fff;
}

.backup-table th {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.backup-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.backup-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.backup-table tbody tr:hover td {
  background: #eff6ff;
}

.backup-table td:first-child {
  font-family: 'Courier New', monospace;
  font-size: 11.5px;
  color: #1a2332;
  font-weight: 600;
}

.backup-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.backup-type-badge.type-auto      { background: #dbeafe; color: #1e40af; }
.backup-type-badge.type-manual    { background: #fef3c7; color: #92400e; }
.backup-type-badge.type-emergency { background: #fee2e2; color: #991b1b; }
.backup-type-badge.type-silva     { background: #f1f5f9; color: #475569; }

.backup-age {
  font-size: 11px;
  color: #64748b;
}

.backup-row-actions {
  display: flex;
  gap: 4px;
}

.backup-row-actions button {
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  border: 1px solid #d6dee8;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.15s;
}

.backup-row-actions button:hover {
  background: #f1f5f9;
}

.backup-row-actions .btn-download { color: #0d6efd; border-color: #bfdbfe; }
.backup-row-actions .btn-download:hover { background: #eff6ff; border-color: #0d6efd; }

.backup-row-actions .btn-restore { color: #d97706; border-color: #fde68a; }
.backup-row-actions .btn-restore:hover { background: #fef3c7; border-color: #d97706; }

.backup-row-actions .btn-delete { color: #dc2626; border-color: #fecaca; }
.backup-row-actions .btn-delete:hover { background: #fee2e2; border-color: #dc2626; }

.backup-warning {
  margin-top: 18px;
  padding: 12px 16px;
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 8px;
}

.backup-warning strong {
  display: block;
  font-size: 12.5px;
  color: #9a3412;
  margin-bottom: 4px;
}

.backup-warning p {
  font-size: 11.5px;
  color: #7c2d12;
  margin: 0;
  line-height: 1.55;
}

.backup-empty {
  padding: 40px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.backup-empty .icon {
  font-size: 36px;
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════════
   Ö3: STOK KARTI + Hareket
═══════════════════════════════════════════════════════════════════ */
.stock-low-banner {
  background: #fff7ed;
  border: 1.5px solid #fed7aa;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #9a3412;
}
.stock-card.is-low {
  border-color: #fed7aa;
  background: #fffbf7;
}
.stock-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.stock-card-head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #1a2332;
}
.stock-card-head > div:first-child span {
  font-size: 11px;
  color: #64748b;
}
.stock-qty {
  text-align: right;
  flex-shrink: 0;
}
.stock-qty strong {
  font-size: 18px;
  font-weight: 800;
  color: #16a34a;
}
.stock-qty.low strong {
  color: #dc2626;
}
.stock-qty small {
  font-size: 10px;
  color: #94a3b8;
  margin-left: 2px;
}
.stock-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11.5px;
  color: #64748b;
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.stock-actions {
  flex-wrap: wrap;
  gap: 6px;
}
.stock-actions .stock-in-btn { color: #16a34a; }
.stock-actions .stock-in-btn:hover { background: #dcfce7; }
.stock-actions .stock-out-btn { color: #dc2626; }
.stock-actions .stock-out-btn:hover { background: #fee2e2; }

/* ═══════════════════════════════════════════════════════════════════
   Ö2: PERSONEL KARTI (zengin İK görünümü)
═══════════════════════════════════════════════════════════════════ */
.personnel-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.personnel-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.personnel-card-head strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #1a2332;
}
.personnel-card-head span {
  font-size: 11.5px;
  color: #64748b;
}
.personnel-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px 14px;
  padding: 10px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
}
.personnel-card-grid > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.personnel-card-grid label {
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.personnel-card-grid span {
  font-size: 12px;
  font-weight: 600;
  color: #1a2332;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mevcut kullanıcı (kendisi) için satır vurgusu */
.users-data-table tr.is-current-user {
  background: #f0f7ff !important;
}
.users-data-table tr.is-current-user td:first-child::before {
  content: "★ ";
  color: #0d6efd;
  font-weight: 800;
}

/* Kategori yer değiştirme insert-line göstergesi */
.cat-drop-line {
  position: fixed;
  display: none;
  height: 3px;
  background: #0d6efd;
  border-radius: 2px;
  z-index: 9998;
  pointer-events: none;
  box-shadow: 0 0 0 1px #0d6efd55, 0 2px 6px rgba(13, 110, 253, 0.4);
}
.cat-drop-line::before,
.cat-drop-line::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #0d6efd;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 4px rgba(13, 110, 253, 0.5);
}
.cat-drop-line::before { left: -5px; }
.cat-drop-line::after  { right: -5px; }

.cat-nav-row.cat-nav-drop-over {
  background: #1e40af !important;
  border-radius: 4px;
}

.cat-nav-row.cat-nav-drop-over .cat-nav-toggle,
.cat-nav-row.cat-nav-drop-over .cat-nav-name,
.cat-nav-row.cat-nav-drop-over .cat-nav-icon {
  color: #fff !important;
}

/* Sağ panel kategori kartı drop hedefi vurgusu */
.category-tree-row.cat-nav-drop-over {
  background: #1e40af !important;
  border-color: #1e40af !important;
}

.category-tree-row.cat-nav-drop-over .category-tree-label strong {
  color: #fff !important;
}

.category-tree-row.cat-nav-drop-over .cat-tree-badge {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

.cat-nav-icon {
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 2px;
}

.cat-nav-empty {
  padding: 12px 10px;
  font-size: 11px;
  color: #8899aa;
  font-style: italic;
}

.category-tree-row {
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.category-tree-row:not(.is-active):hover {
  border-color: #bad0f5;
  background: #f5f9ff;
  box-shadow: 0 2px 6px rgba(47, 111, 237, 0.08);
}

.category-tree-row.is-active {
  border-color: #5f93e8;
  background: linear-gradient(90deg, #e8f0fe, #eef5ff);
  box-shadow: inset 3px 0 0 #2f6fed;
}

.category-tree-actions .compact-action {
  font-size: 10px;
  padding: 2px 6px;
  height: auto;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.13s ease, border-color 0.13s ease, color 0.13s ease;
}

.category-tree-actions .cat-btn-blue {
  color: #1a5fd6;
  border-color: #b3cdf5;
  background: #eef5ff;
}
.category-tree-actions .cat-btn-blue:hover {
  background: #dceeff;
  border-color: #7aaef5;
}

.category-tree-actions .cat-btn-grey {
  color: #4a5a6e;
  border-color: #cdd6e3;
  background: #f4f6f9;
}
.category-tree-actions .cat-btn-grey:hover {
  background: #e8ecf2;
  border-color: #b0bccb;
}

.category-tree-actions .cat-btn-red {
  color: #c43d3d;
  border-color: #f0c4c4;
  background: #fff5f5;
}
.category-tree-actions .cat-btn-red:hover {
  background: #fde8e8;
  border-color: #e09090;
}

.category-tree-actions .cat-btn-green {
  color: #1a7a3a;
  border-color: #a8dabb;
  background: #edfaf2;
}
.category-tree-actions .cat-btn-green:hover {
  background: #d8f5e4;
  border-color: #70c490;
}

.category-tree-row.is-passive {
  opacity: .58;
}

/* ── Sağ panel genel font kalitesi ─────────────────────────────────── */
.erp-panel-right {
  font-family: 'Geist', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
}

/* ── Sağ panel: depth-bazlı hiyerarşi ──────────────────────────────── */
.category-tree-row[data-category-depth="0"] .category-tree-label strong {
  font-weight: 700;
  font-size: 13px;
  color: #10245a;
}
.category-tree-row[data-category-depth="1"] .category-tree-label strong {
  font-weight: 500;
  font-size: 12px;
  color: #3b5a8a;
}
.category-tree-row:not([data-category-depth="0"]):not([data-category-depth="1"]) .category-tree-label strong {
  font-weight: 400;
  font-size: 11px;
  color: #6b7fa8;
}

/* ── Sol panel: depth-bazlı hiyerarşi ──────────────────────────────── */
.cat-nav-row[data-nav-depth="0"] .cat-nav-name {
  font-weight: 700;
  font-size: 13px;
  color: #10245a;
}
.cat-nav-row[data-nav-depth="1"] .cat-nav-name {
  font-weight: 500;
  font-size: 12px;
  color: #3b5a8a;
}
.cat-nav-row:not([data-nav-depth="0"]):not([data-nav-depth="1"]) .cat-nav-name {
  font-weight: 400;
  font-size: 11px;
  color: #6b7fa8;
}

/* Rozet */
.cat-tree-badge {
  font-family: 'Geist', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* Toggle & grip */
.category-tree-toggle {
  font-family: 'Geist', sans-serif;
  font-size: 11px;
}

/* Toolbar yazıları */
.category-tree-toolbar,
.category-tree-add-form {
  font-family: 'Geist', sans-serif;
}
.category-root-drop {
  font-family: 'Geist', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.category-product-list {
  display: grid;
  gap: 4px;
  margin: 4px 0 4px calc(var(--depth, 0) * 16px + 52px);
}

.category-product-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 100px 110px 56px;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  min-height: 30px;
  border: 1px solid #e1e9f2;
  border-radius: 7px;
  padding: 5px 8px;
  background: #fff;
  color: #233653;
  text-align: left;
  cursor: pointer;
}

.category-product-row strong,
.category-product-row span,
.category-product-row b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: 'Geist', sans-serif;
}
.category-product-row strong {
  font-weight: 400;
  color: #1e2d40;
  letter-spacing: -0.01em;
}
.category-product-row span {
  font-weight: 400;
  color: #6b7f99;
}

.category-product-row b {
  color: #0b5bd3;
  text-align: right;
}

.products-tool-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.products-import-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.products-import-grid label {
  display: grid;
  gap: 5px;
  color: #4f6078;
  font-size: 11px;
  font-weight: 700;
}

.products-import-grid input {
  height: 34px;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  padding: 6px 8px;
  background: #fff;
}

.products-import-note,
.products-import-result {
  display: grid;
  gap: 4px;
  border: 1px solid #dce6f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
  color: #4f6078;
  font-size: 11px;
}

.products-production-table {
  display: grid;
  border: 1px solid #dce6f0;
  border-radius: 9px;
  overflow: hidden;
}

.products-production-head,
.products-production-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) 140px 120px 100px 80px;
}

.products-production-head span,
.products-production-row span {
  padding: 8px 10px;
  border-right: 1px solid #edf2f7;
  font-size: 10px;
}

.products-production-head {
  background: #f4f8fd;
  color: #53657e;
  font-weight: 800;
}

.products-production-row {
  border-top: 1px solid #edf2f7;
}

.products-production-row strong,
.products-production-row small {
  display: block;
}

/* ── Ürün önizleme kartı ────────────────────────────────────────────── */
.cat-product-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  max-width: 480px;
  background: #fff;
  border: 1px solid #dbe5f5;
  border-radius: 10px;
  font-family: 'Geist', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.cat-product-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.cat-product-preview-name {
  font-size: 15px;
  font-weight: 700;
  color: #10245a;
  line-height: 1.3;
}

.cat-product-preview-code {
  margin-top: 3px;
  font-size: 11px;
  color: #7a90aa;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.cat-product-preview-status {
  flex-shrink: 0;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.cat-product-preview-status.is-active  { background: #dcfce7; color: #16a34a; }
.cat-product-preview-status.is-passive { background: #f1f5f9; color: #64748b; }

.cat-product-preview-path {
  font-size: 11.5px;
  color: #4a6080;
  background: #f5f8ff;
  border: 1px solid #dbe5f5;
  border-radius: 6px;
  padding: 6px 10px;
  line-height: 1.5;
}

.cat-product-preview-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #e8eef8;
  border-radius: 7px;
  overflow: hidden;
}

.cat-product-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  border-bottom: 1px solid #f0f4fb;
}
.cat-product-preview-row:last-child { border-bottom: none; }
.cat-product-preview-row span  { color: #7a90aa; font-weight: 400; }
.cat-product-preview-row strong { color: #10245a; font-weight: 600; }

.cat-product-preview-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.cat-product-preview-foot button {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  cursor: pointer;
}

.cat-preview-delete-btn {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 150ms, color 150ms;
  line-height: 1.4;
}

.cat-preview-delete-btn:hover {
  background: #dc2626;
  color: #fff;
}

/* ── Form nav ürün satırı kalem ikonu ───────────────────────────────── */
.cat-nav-product--form {
  display: flex;
  align-items: center;
  gap: 0;
}

.cat-nav-product-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-nav-product-edit {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: #b0bec8;
  padding: 0 3px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
}

.cat-nav-product--form:hover .cat-nav-product-edit {
  opacity: 1;
}

.cat-nav-product-edit:hover {
  color: #2563eb;
}

/* ── Görseli Sil butonu ─────────────────────────────────────────────── */
.product-image-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: #fff5f5;
  border: 1px solid #f0c4c4;
  border-radius: 5px;
  color: #c43d3d;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
}
.product-image-clear-btn:hover {
  background: #fde8e8;
  border-color: #e09090;
}

/* ── PDF Kategori Seçim Modalı ───────────────────────────────────── */
.pl-pdf-cat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 4px;
  background: #f8fafc;
}

.pl-pdf-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: #1e2d40;
  font-family: 'Geist', sans-serif;
  transition: background 0.1s;
  user-select: none;
}

.pl-pdf-cat-row:hover {
  background: #eef4ff;
}

.pl-pdf-cat-cb {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: #1e3a6e;
  cursor: pointer;
}

/* ── Sol kategori ağacında ürün satırları (Yeni Teklif) ────────────── */
.cat-nav-offer-product {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px 3px calc(8px + var(--depth, 1) * 14px);
  font-size: 11px;
  color: #2d3e5a;
  cursor: pointer;
  border-radius: 4px;
  min-height: 24px;
  transition: background 120ms;
  user-select: none;
}

.cat-nav-offer-product:hover {
  background: rgba(47, 111, 237, 0.1);
  color: #1a3a8f;
}

.cat-nav-offer-product:active {
  background: rgba(47, 111, 237, 0.18);
}

.cat-nav-offer-product-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-nav-offer-product-price {
  font-size: 10px;
  font-weight: 600;
  color: #1e6a3a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Yeni Teklif Ekle – erp-panel-layout override ─────────────────── */
#offerFormSection .offer-form-erp-layout {
  grid-template-columns: var(--product-tree-width) minmax(0, 1fr);
  min-height: 0;
  border: none;
  box-shadow: none;
  border-radius: 0;
}

#offerFormSection .offer-cat-nav-panel {
  background: linear-gradient(180deg, #eaf1fb 0%, #f4f8fe 50%, #f8fbff 100%);
  border-right: 1px solid #d8e5f5;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding-bottom: 8px;
}

#offerFormSection .offer-form-erp-right {
  min-width: 0;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding: 0;
}

/* ─── Ö6: Denetim Kaydı (Audit Log) ─────────────────────────────────────────── */
.audit-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.audit-filter-input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  font-size: 12px;
  background: #fff;
  color: #1a2332;
}

.audit-filter-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#auditSearch {
  flex: 1 1 240px;
  min-width: 200px;
}

.audit-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.audit-table thead {
  background: #1a2332;
  color: #fff;
}

.audit-table th {
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.audit-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.audit-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.audit-table tbody tr:hover td {
  background: #eff6ff;
}

.audit-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.audit-act-create {
  background: #dcfce7;
  color: #166534;
}

.audit-act-update {
  background: #dbeafe;
  color: #1e40af;
}

.audit-act-delete {
  background: #fee2e2;
  color: #991b1b;
}

/* ════════════════════════════════════════════════
   PANJUR KAPAK MODÜLÜ (Yeni Sürüm)
   ════════════════════════════════════════════════ */
#view-panjur { padding: 16px; }
.panjur-page { background:#fff; border-radius:12px; border:1px solid #e4ecf2; min-height:600px; }
.panjur-empty { padding:60px 40px; text-align:center; color:#94a3b8; font-size:14px; }

/* Üst başlık */
.panjur-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 20px; border-bottom:1px solid #e4ecf2; background:linear-gradient(135deg,#1a3a5c,#2e6da4); color:#fff; border-radius:12px 12px 0 0;
}
.panjur-header h1 { font-size:16px; font-weight:800; margin:0; }
.panjur-header p { font-size:12px; opacity:0.85; margin:2px 0 0; }

/* Parametre paneli */
.panjur-params { padding:20px; border-bottom:1px solid #e4ecf2; }
.panjur-params h3 {
  font-size:13px; color:#1a3a5c; margin:0 0 14px; padding-bottom:8px;
  border-bottom:2px solid #e4ecf7;
}
.panjur-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; }
.panjur-field { display:flex; flex-direction:column; gap:5px; }
.panjur-field label { font-size:11px; font-weight:600; color:#444; }
.panjur-field label span.hint { font-weight:400; color:#888; }
.panjur-field input, .panjur-field select {
  padding:8px 11px; border:1.5px solid #ccd6e6; border-radius:6px;
  font-size:13px; color:#222; background:#f8fafe;
}
.panjur-field input:focus, .panjur-field select:focus {
  outline:none; border-color:#2e6da4; background:#fff;
}
.panjur-field input:disabled { background:#f0f4f8; color:#888; }

/* Butonlar */
.panjur-btn-calc {
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg,#2e6da4,#1a5490); color:#fff;
  border:none; border-radius:7px; padding:10px 22px;
  font-size:13px; font-weight:700; cursor:pointer; transition:opacity .2s;
}
.panjur-btn-calc:hover { opacity:0.9; }
.panjur-btn-dxf {
  display:inline-flex; align-items:center; gap:8px;
  background:linear-gradient(135deg,#27ae60,#1e8449); color:#fff;
  border:none; border-radius:7px; padding:9px 18px;
  font-size:12px; font-weight:700; cursor:pointer; transition:opacity .2s;
}
.panjur-btn-dxf:hover { opacity:0.9; }
.panjur-btn-save {
  display:inline-flex; align-items:center; gap:8px;
  background:#1e3a6e; color:#fff;
  border:none; border-radius:7px; padding:9px 18px;
  font-size:12px; font-weight:700; cursor:pointer;
}

/* Sonuç paneli */
.panjur-results { padding:20px; }
.panjur-stats { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.panjur-stat {
  background:#f0f6ff; border:1.5px solid #c5d9f1; border-radius:7px;
  padding:10px 16px; text-align:center; min-width:110px;
}
.panjur-stat .val { font-size:1.2rem; font-weight:700; color:#1a3a5c; }
.panjur-stat .lbl { font-size:10.5px; color:#668; margin-top:2px; }
.panjur-stat.warn { background:#fff3cd; border-color:#ffd97f; }
.panjur-stat.warn .val { color:#856404; }

/* SVG önizleme */
.panjur-preview {
  overflow-x:auto; border:1.5px solid #dde6f5; border-radius:8px;
  background:#fafcff; padding:16px; margin-bottom:18px;
}
.panjur-preview svg { display:block; }

/* Tablo */
.panjur-tbl-wrap { overflow-x:auto; max-height:340px; border:1px solid #dde6f5; border-radius:8px; }
.panjur-tbl { width:100%; border-collapse:collapse; font-size:12px; }
.panjur-tbl thead th {
  background:#1a3a5c; color:#fff; padding:8px 11px;
  text-align:left; position:sticky; top:0; font-size:11px;
}
.panjur-tbl tbody tr:nth-child(even) { background:#f5f8fd; }
.panjur-tbl tbody tr:hover { background:#e8f0fb; }
.panjur-tbl tbody td { padding:6px 11px; border-bottom:1px solid #edf1f8; }
.panjur-tbl .badge-first { background:#d4edda; color:#155724; border-radius:4px; padding:2px 6px; font-size:10px; font-weight:600; }
.panjur-tbl .badge-last { background:#f8d7da; color:#721c24; border-radius:4px; padding:2px 6px; font-size:10px; font-weight:600; }

/* Orta kayıt vurgu */
.panjur-orta-kayit-box {
  background:#edf2ff; border:1.5px solid #b0c4e8; border-radius:6px;
  padding:7px 12px; font-size:11px; color:#1a3a5c;
}

/* Bilgi kutuları */
.panjur-info {
  background:#fff8e1; border:1.5px solid #ffe082; border-radius:7px;
  padding:9px 13px; font-size:12px; color:#5d4037; margin-top:12px;
}
.panjur-info strong { color:#e65100; }

/* ════════════════════════════════════════════════════════════
   TEK TİP BUTON SİSTEMİ + 5 TEMA + BASMA HİSSİ
   (ikon butonları hariç; renk anlamları korunur)
   ════════════════════════════════════════════════════════════ */
[data-btn-style] .primary-btn,
[data-btn-style] .ghost-action,
[data-btn-style] .ghost-btn,
[data-btn-style] .danger-btn,
[data-btn-style] .compact-action,
[data-btn-style] .form-submit,
[data-btn-style] .pd-btn,
[data-btn-style] .panjur-btn-save,
[data-btn-style] .panjur-btn-dxf,
[data-btn-style] .panjur-btn-calc,
[data-btn-style] .cat-btn-blue,
[data-btn-style] .cat-btn-red,
[data-btn-style] .cat-btn-green,
[data-btn-style] .cat-btn-grey {
  border-radius: var(--btn-radius, 8px);
  transition: transform .07s ease, box-shadow .15s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}
/* Basma hissi — tüm temalarda ortak temel */
[data-btn-style] .primary-btn:active,
[data-btn-style] .ghost-action:active,
[data-btn-style] .ghost-btn:active,
[data-btn-style] .danger-btn:active,
[data-btn-style] .compact-action:active,
[data-btn-style] .form-submit:active,
[data-btn-style] .pd-btn:active,
[data-btn-style] .panjur-btn-save:active,
[data-btn-style] .panjur-btn-dxf:active,
[data-btn-style] .panjur-btn-calc:active,
[data-btn-style] .cat-btn-blue:active,
[data-btn-style] .cat-btn-red:active,
[data-btn-style] .cat-btn-green:active,
[data-btn-style] .cat-btn-grey:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.96);
}

/* 1) KLASİK — düz, sade */
[data-btn-style="klasik"] { --btn-radius: 6px; }

/* 2) MODERN — gölgeli, hover'da yükselir, basınca çöker */
[data-btn-style="modern"] { --btn-radius: 9px; }
[data-btn-style="modern"] .primary-btn,
[data-btn-style="modern"] .ghost-action,
[data-btn-style="modern"] .danger-btn,
[data-btn-style="modern"] .compact-action,
[data-btn-style="modern"] .form-submit,
[data-btn-style="modern"] .pd-btn,
[data-btn-style="modern"] .panjur-btn-save,
[data-btn-style="modern"] .panjur-btn-dxf,
[data-btn-style="modern"] .panjur-btn-calc,
[data-btn-style="modern"] .cat-btn-blue,
[data-btn-style="modern"] .cat-btn-red,
[data-btn-style="modern"] .cat-btn-green,
[data-btn-style="modern"] .cat-btn-grey { box-shadow: 0 2px 6px rgba(0,0,0,.14); }
[data-btn-style="modern"] .primary-btn:hover,
[data-btn-style="modern"] .ghost-action:hover,
[data-btn-style="modern"] .danger-btn:hover,
[data-btn-style="modern"] .compact-action:hover,
[data-btn-style="modern"] .form-submit:hover,
[data-btn-style="modern"] .pd-btn:hover,
[data-btn-style="modern"] .panjur-btn-save:hover,
[data-btn-style="modern"] .cat-btn-blue:hover,
[data-btn-style="modern"] .cat-btn-red:hover,
[data-btn-style="modern"] .cat-btn-green:hover,
[data-btn-style="modern"] .cat-btn-grey:hover { box-shadow: 0 5px 14px rgba(0,0,0,.22); transform: translateY(-1px); }
[data-btn-style="modern"] .primary-btn:active,
[data-btn-style="modern"] .ghost-action:active,
[data-btn-style="modern"] .danger-btn:active,
[data-btn-style="modern"] .compact-action:active,
[data-btn-style="modern"] .form-submit:active,
[data-btn-style="modern"] .pd-btn:active,
[data-btn-style="modern"] .cat-btn-blue:active,
[data-btn-style="modern"] .cat-btn-red:active { transform: translateY(1px) scale(.985); box-shadow: 0 1px 3px rgba(0,0,0,.28); }

/* 3) PILL — tam yuvarlak */
[data-btn-style="pill"] { --btn-radius: 999px; }
[data-btn-style="pill"] .primary-btn,
[data-btn-style="pill"] .ghost-action,
[data-btn-style="pill"] .danger-btn,
[data-btn-style="pill"] .compact-action,
[data-btn-style="pill"] .form-submit,
[data-btn-style="pill"] .pd-btn,
[data-btn-style="pill"] .panjur-btn-save,
[data-btn-style="pill"] .cat-btn-blue,
[data-btn-style="pill"] .cat-btn-red,
[data-btn-style="pill"] .cat-btn-green,
[data-btn-style="pill"] .cat-btn-grey { box-shadow: 0 2px 5px rgba(0,0,0,.12); }

/* 4) KONTUR — çerçeveli (iç gölge ile kontur hissi) */
[data-btn-style="kontur"] { --btn-radius: 8px; }
[data-btn-style="kontur"] .primary-btn,
[data-btn-style="kontur"] .ghost-action,
[data-btn-style="kontur"] .danger-btn,
[data-btn-style="kontur"] .compact-action,
[data-btn-style="kontur"] .form-submit,
[data-btn-style="kontur"] .pd-btn,
[data-btn-style="kontur"] .panjur-btn-save,
[data-btn-style="kontur"] .panjur-btn-dxf,
[data-btn-style="kontur"] .panjur-btn-calc,
[data-btn-style="kontur"] .cat-btn-blue,
[data-btn-style="kontur"] .cat-btn-red,
[data-btn-style="kontur"] .cat-btn-green,
[data-btn-style="kontur"] .cat-btn-grey { box-shadow: inset 0 0 0 1.6px rgba(0,0,0,.28); }

/* 5) SOFT — kabarık neomorfik, dokunsal basış */
[data-btn-style="soft"] { --btn-radius: 12px; }
[data-btn-style="soft"] .primary-btn,
[data-btn-style="soft"] .ghost-action,
[data-btn-style="soft"] .danger-btn,
[data-btn-style="soft"] .compact-action,
[data-btn-style="soft"] .form-submit,
[data-btn-style="soft"] .pd-btn,
[data-btn-style="soft"] .panjur-btn-save,
[data-btn-style="soft"] .panjur-btn-dxf,
[data-btn-style="soft"] .panjur-btn-calc,
[data-btn-style="soft"] .cat-btn-blue,
[data-btn-style="soft"] .cat-btn-red,
[data-btn-style="soft"] .cat-btn-green,
[data-btn-style="soft"] .cat-btn-grey { box-shadow: 3px 3px 8px rgba(0,0,0,.16), -2px -2px 6px rgba(255,255,255,.5); }
[data-btn-style="soft"] .primary-btn:active,
[data-btn-style="soft"] .ghost-action:active,
[data-btn-style="soft"] .danger-btn:active,
[data-btn-style="soft"] .compact-action:active,
[data-btn-style="soft"] .form-submit:active,
[data-btn-style="soft"] .pd-btn:active,
[data-btn-style="soft"] .cat-btn-blue:active,
[data-btn-style="soft"] .cat-btn-red:active { box-shadow: inset 2px 2px 6px rgba(0,0,0,.24), inset -1px -1px 4px rgba(255,255,255,.35); transform: translateY(1px); filter:none; }

/* Stil sayfası — buton stili seçim kartları */
.btn-style-card { display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.btn-style-demo { display:flex; align-items:center; justify-content:center; width:100%; padding:8px; background:#eef2f7; border-radius:8px; pointer-events:none; }
.btn-style-demo .primary-btn { font-size:12px; padding:7px 16px; }

/* ════════════════════════════════════════════════════════════════════
   MOBİL / TABLET UYUM — geniş tablolar yatay kaydırılır, taşma engellenir
   (Sadece ekran; yazdırma çıktıları etkilenmez.)
   ════════════════════════════════════════════════════════════════════ */

/* Geniş veri tabloları içeren kapsayıcılar: taşma yerine yatay kaydır */
.orders-table,
#ordersTable,
#orderHistoryTable {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.audit-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 860px) {
  /* Tablo hücrelerini sıkılaştır → daha az yatay kaydırma gerekir */
  .offers-data-table th,
  .offers-data-table td,
  .audit-table th,
  .audit-table td {
    padding: 6px 8px;
    font-size: 11px;
  }
  /* Tablolar en az okunur genişlikte kalsın, kapsayıcı kaydırsın */
  .offers-data-table { min-width: 680px; }
  .audit-table { min-width: 720px; }

  /* Modal / pop-up pencereler ekrana sığsın */
  .user-modal-card,
  .modal-card,
  .ui-modal-card {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 600px) {
  .main-content { padding: 12px; }
  /* Üst başlık ve buton grupları alt alta */
  .panel-header-row.compact { flex-direction: column; align-items: stretch; gap: 8px; }
  /* Filtre kutuları tam genişlik */
  .audit-filters,
  .offers-filter-bar,
  .erp-filter-bar { grid-template-columns: 1fr; display: grid; gap: 8px; }
  .audit-filter-input { width: 100%; }
  /* KPI kartları tek sütun */
  .erp-kpi-grid,
  .dash-kpi-grid,
  .dash-producttype-grid,
  .dash-insight-grid { grid-template-columns: 1fr; }
  /* Dashboard küçük analiz hücreleri tek sütun */
  .dash-cmp-row,
  .dash-fin-kpis { grid-template-columns: 1fr; }
  /* Tablo daha da küçük font */
  .offers-data-table th,
  .offers-data-table td,
  .audit-table th,
  .audit-table td { font-size: 10.5px; padding: 5px 6px; }
}

/* ── Fatura Modülü (satış/alış) ── */
.invoice-lines { margin: 12px 0; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px; }
.invoice-lines-head,
.invoice-line-row {
  display: grid;
  grid-template-columns: 1fr 80px 110px 70px 110px 32px;
  gap: 8px;
  align-items: center;
}
.invoice-lines-head { font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; padding: 0 2px 6px; }
.invoice-line-row { margin-bottom: 6px; }
.invoice-line-row input { width: 100%; padding: 5px 7px; border: 1px solid #d8e0ea; border-radius: 6px; font-size: 12px; }
.invoice-line-row input[type="number"] { text-align: right; }
.invoice-line-amount { text-align: right; font-weight: 700; font-size: 12px; }
.invoice-totals { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; margin: 6px 0 12px; }
.inv-tot-row { display: flex; gap: 18px; min-width: 240px; justify-content: space-between; font-size: 12.5px; }
.inv-tot-row.inv-tot-grand { border-top: 1.5px solid #1e3a6e; padding-top: 5px; margin-top: 3px; font-size: 14px; font-weight: 800; color: #1e3a6e; }
#salesInvoiceModal .user-modal-card,
#purchaseInvoiceModal .user-modal-card { max-height: 92vh; overflow-y: auto; }
@media (max-width: 640px) {
  .invoice-lines-head { display: none; }
  .invoice-line-row { grid-template-columns: 1fr 1fr; }
  .invoice-line-amount { grid-column: 1 / -1; text-align: left; }
}

/* DESIGN.md — hizalı rakamlar (tabular figures): para/adet/m² alt alta tutar */
body { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ── Sipariş durum kartları: aşama noktası/rozeti ── */
.order-stage-kpi .order-stage-label { display: flex; align-items: center; gap: 6px; }
.order-stage-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.order-stage-kpi strong { font-size: 22px; }

/* ── Termini geçmiş aktif sipariş satırı (kırmızı vurgu) ── */
.order-row-overdue td { background: #fef2f2 !important; }
.order-row-overdue:hover td { background: #fee2e2 !important; }
.order-row-overdue .offers-col-offer-no strong { color: #b91c1c; }
.order-overdue-badge {
  display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px;
  background: #fee2e2; color: #b91c1c; font-size: 10px; font-weight: 800; white-space: nowrap;
}

/* ──────────────────────────────── KANBAN PANO ─────────────────────────────── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px;
  overflow-x: auto;
  background: #f9fafb;
  border-radius: 8px;
}

.kanban-column {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  border-top: 3px solid #60a5fa;
  overflow: hidden;
  min-height: 400px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.kanban-column-header {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3f4f6;
}

.kanban-column-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #111;
}

.kanban-count {
  display: inline-block;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: #e5e7eb;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kanban-cards {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-cards::-webkit-scrollbar { width: 6px; }
.kanban-cards::-webkit-scrollbar-track { background: #f3f4f6; }
.kanban-cards::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

.kanban-column.is-drag-over {
  background: #f0f9ff;
  border-color: #0ea5e9;
}

.kanban-card {
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: grab;
  transition: all .2s;
  user-select: none;
}

.kanban-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  border-color: #d1d5db;
  transform: translateY(-2px);
}

.kanban-card.is-dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.kanban-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 6px;
}

.kanban-card-header strong {
  font-size: 12px;
  font-weight: 600;
  color: #111;
  flex: 1;
  word-break: break-word;
}

.kanban-overdue-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.kanban-card-body {
  margin-bottom: 8px;
  font-size: 11px;
}

.kanban-cari {
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 4px;
}

.kanban-product {
  color: #4b5563;
  line-height: 1.3;
  max-height: 2.3em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: #6b7280;
  border-top: 1px solid #f3f4f6;
  padding-top: 6px;
}

.kanban-amount {
  font-weight: 600;
  color: #059669;
}

.kanban-date {
  color: #9ca3af;
}

/* ──────────── Mobil: Kanban horizontal scroll ──────────── */
@media (max-width: 860px) {
  .kanban-board {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px;
  }
  .kanban-column { min-height: 300px; }
  .kanban-card { font-size: 12px; }
}

/* ── Gider Yönetimi: tab + filtre butonları (Finansal AI entegrasyonu) ──── */
.gider-tab-btn {
  padding: 9px 18px; font-size: 13px; font-weight: 600;
  background: transparent; border: none; border-bottom: 2px solid transparent;
  color: var(--text-secondary, #64748b); cursor: pointer; margin-bottom: -1px;
}
.gider-tab-btn:hover { color: var(--text, #0f172a); }
.gider-tab-btn.active { color: #0d6efd; border-bottom-color: #0d6efd; }
.gider-filtre-btn {
  padding: 5px 14px; font-size: 12px; font-weight: 600; border-radius: 999px;
  background: var(--surface-alt, #f1f5f9); border: 1px solid var(--border, #e2e8f0);
  color: var(--text-secondary, #64748b); cursor: pointer;
}
.gider-filtre-btn.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }
.gider-durum { display:inline-block; padding:2px 9px; border-radius:999px; font-size:11px; font-weight:700; }
.gider-durum.bekliyor { background:#fef9c3; color:#854d0e; }
.gider-durum.odendi   { background:#dcfce7; color:#15803d; }
.gider-durum.iptal    { background:#f1f5f9; color:#94a3b8; }
