/* ============================================================
   DOSYA    : components.css
   İÇERİK   : Kalender Gemi Bileşen Kütüphanesi (v3.20.0)
   BAĞIMLILIK: themes.css, typography.css
   ============================================================ */

/* --- 1. BUTON SİSTEMİ (.btn-ds) --- */
.btn-ds-lg   { padding: .65rem 1.4rem; font-size: var(--font-size-btn-lg); border-radius: var(--btn-radius); }
.btn-ds      { padding: .5rem 1.1rem;  font-size: var(--font-size-btn); border-radius: var(--btn-radius); display: inline-flex; align-items: center; gap: .5rem; transition: all .15s ease; border: 1px solid transparent; font-weight: 500; cursor: pointer; }
.btn-ds-sm   { padding: .35rem .75rem; font-size: var(--font-size-btn-sm); border-radius: var(--btn-sm-radius); }
.btn-ds-xs   { padding: .15rem .5rem;  font-size: var(--font-size-btn-xs); border-radius: var(--btn-xs-radius); }

.btn-ds-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-ds-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-ds-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ds-secondary:hover {
  background: var(--panel-alt);
}

.btn-ds-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-ds-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-ds-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ds-ghost:hover {
  background: var(--panel-alt);
  color: var(--text);
  border-color: var(--line);
}

/* --- 2. ROZET / STATÜ SİSTEMİ (.ds-badge) --- */
.ds-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 20px;
  font-size: var(--font-size-badge);
  font-weight: 500;
  white-space: nowrap;
  border: 0.5px solid;
}
.ds-badge-wait     { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.ds-badge-success  { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.ds-badge-info     { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.ds-badge-danger   { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.ds-badge-neutral  { background: var(--panel-alt); color: var(--muted); border-color: var(--line); }
.ds-badge-purple   { background: #fdf4ff; color: #7e22ce; border-color: #e9d5ff; }

/* --- Dashboard istatistik kartları (.ds-stat-*) --- */
.ds-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.ds-stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-alt);
  padding: 10px 12px;
}
.ds-stat-label {
  font-size: var(--font-size-stat-label);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.ds-stat-value {
  font-size: var(--font-size-stat-value);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-top: 2px;
}
.ds-stat-meta {
  margin-top: 6px;
  font-size: var(--font-size-meta);
  color: var(--muted);
}
@media (max-width: 991px) {
  .ds-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- 3. MODAL STANDARTLARI (.ds-modal) --- */
.ds-modal .modal-content {
  border: none;
  border-radius: var(--modal-radius);
  box-shadow: var(--modal-shadow);
  overflow: hidden;
}
.ds-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  min-height: 54px;
}
.ds-modal-title { font-size: var(--font-size-lg); font-weight: 500; color: var(--text); }
.ds-modal-body { padding: 1.25rem 1.5rem; }
.ds-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  padding: .9rem 1.25rem;
  border-top: 1px solid var(--line);
  background: var(--panel-alt);
}

/* --- 4. FORM STANDARTLARI --- */
.form-control, .form-select {
  border-radius: var(--input-radius);
  padding: .55rem .85rem;
  border: 1px solid var(--input-border);
  font-size: var(--font-size-body);
  color: var(--text);
  background: var(--panel);
  min-height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
  outline: none;
}
.form-label { font-size: var(--font-size-meta); font-weight: 500; color: var(--text); margin-bottom: .35rem; }

/* --- 5. LEGACY / CSP HELPERS (Geriye Dönük Uyumluluk) --- */

/* --- 6. TEMA SEÇİCİ NOKTALARI (.theme-dot) --- */
.ds-theme-dropdown { border-radius: var(--radius-md); min-width: 196px; padding: .5rem; }
.theme-switcher-toggle {
  color: rgba(255,255,255,.9) !important;
}
.theme-switcher-toggle:hover,
.theme-switcher-toggle:focus,
.theme-switcher-toggle.show {
  color: #ffb25b !important;
  background: rgba(240,125,0,.14) !important;
  border-color: transparent !important;
}
.ds-theme-dropdown .dropdown-item {
  color: var(--text) !important;
  transition: background-color .16s ease, color .16s ease;
}
.ds-theme-dropdown .dropdown-item:hover,
.ds-theme-dropdown .dropdown-item:focus {
  background: color-mix(in srgb, var(--primary) 14%, var(--panel) 86%);
  color: var(--text) !important;
}
.ds-theme-font-block {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.ds-theme-font-label {
  font-size: var(--font-size-table-head);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ds-font-scale-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
}
.ds-font-scale-btn {
  min-height: 31px;
  padding: .32rem .25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font-size: var(--font-size-small);
  font-weight: 700;
  line-height: 1;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.ds-font-scale-btn:hover,
.ds-font-scale-btn:focus {
  background: color-mix(in srgb, var(--primary) 12%, var(--panel) 88%);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line) 58%);
  color: var(--text);
  outline: none;
}
.ds-font-scale-btn.is-active,
.ds-font-scale-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--primary) 18%, var(--panel) 82%);
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line) 45%);
  color: var(--primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent 76%);
}
.theme-dot {
  width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1);
  display: inline-block; flex-shrink: 0;
}
.dot-soft { background: #d4770a; }
.dot-stone { background: #78716c; }
.dot-slate { background: #475569; }
.dot-sage { background: #4a7c59; }
.dot-ocean { background: #1d6fa8; }
.dot-dusk { background: #1c2128; border-color: rgba(255,255,255,.1); }

/* ── Genel yardımcılar ──────────────────────────────────────── */
.bg-purple  { background-color: #7c3aed !important; }
.t-wait     { background:#fef9e7; color:#b45309; border:1px solid #fde68a; }
.t-ok       { background:#ecfdf5; color:#065f46; border:1px solid #6ee7b7; }
.t-prep     { background:#eff6ff; color:#1d4ed8; border:1px solid #bfdbfe; }
.t-done     { background:#f0fdf4; color:#166534; border:1px solid #86efac; }
.t-cancel   { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }

/* ── Panel & Section yardımcıları ───────────────────────────── */
.panel-head {
    padding: .55rem .85rem;
    font-weight: 700;
    font-size: var(--font-size-subtle);
    border-bottom: 1px solid var(--line);
    background: var(--panel);
}
.section-title {
    font-size: var(--font-size-note);
    font-weight: 700;
    color: var(--text);
}
/* ── Masaüstü / Mobil kart geçişleri ────────────────────────── */
.desktop-table { display: block; }
.mobile-cards  { display: none; }

.mobile-item {
    padding: .55rem .5rem;
    border-bottom: 1px solid var(--line);
}
.mobile-item:last-child { border-bottom: none; }

@media (max-width: 640px) {
    .desktop-table { display: none; }
    .mobile-cards  { display: block; }
}

/* ── Mesaj paneli yükseklik ─────────────────────────────────── */
.msg-panel-card {
    height: 520px;
    min-height: 320px;
}
#msgArea {
    min-height: 0;
}
@media (max-width: 991px) {
    .msg-panel-card {
        height: 420px;
    }
}

/* ── Mesaj balonları ────────────────────────────────────────── */
.msg-bubble {
    max-width: 85%;
    padding: .4rem .65rem;
    border-radius: 12px;
    font-size: var(--font-size-note);
    line-height: 1.45;
    word-break: break-word;
}
.msg-left {
    background: #f6f2ea;
    border: 1px solid #eadfce;
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.msg-right {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.msg-right .msg-meta {
    color: rgba(255,255,255,.82);
    opacity: 1;
}
.msg-left .msg-meta {
    opacity: 1;
}
.msg-meta {
    font-size: var(--font-size-label);
    margin-top: .18rem;
    color: #6b7280;
    opacity: .82;
}

/* ── Popup ──────────────────────────────────────────────────── */
.popup-shell {
    padding: 1rem 1.1rem;
}
.popup-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}
.popup-product .small.text-secondary {
    color: var(--text);
}
.popup-product .small.text-secondary strong {
    font-weight: normal;
}

/* ── Popup kur bilgileri layout ─────────────────────────── */
.popup-product-header {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.popup-logo-section {
    grid-column: 1;
}

.popup-currency-info {
    grid-column: 2;
    font-size: var(--font-size-subtle);
    line-height: 1.6;
}

.popup-currency-info div {
    color: var(--text);
}

/* Mobil: Logo üstte, kur bilgileri sağda 4 satır */
@media (max-width: 768px) {
    .popup-product-header {
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 0.5rem 1rem;
    }
    .popup-logo-section {
        grid-row: 1 / 3;
        grid-column: 1;
    }
    .popup-currency-info {
        grid-column: 2;
        grid-row: 1 / 5;
        text-align: right;
    }
    .product-thumb-fixed {
        width: 70px;
        height: 70px;
    }
}

/* ── Ürün küçük resim ───────────────────────────────────────── */
.product-thumb-fixed {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--line);
    display: block;
}

/* ── Hero logo (login sayfaları) ────────────────────────────── */
.hero-logo-block { display: inline-block; }

/* ── Arama kutusu ───────────────────────────────────────────── */
.search-bar .input-group-text {
    background: var(--panel);
    border-color: var(--line);
    color: var(--muted);
}
.search-bar .form-control {
    border-color: var(--line);
}
.search-bar .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(240,125,0,.12);
}

/* ── Spec satırı hover ──────────────────────────────────────── */
.spec-row:hover {
    background: rgba(240,125,0,.03);
}

/* ── Badge düzeltmeleri ─────────────────────────────────────── */
.badge.t-wait,
.badge.t-ok,
.badge.t-prep,
.badge.t-done,
.badge.t-cancel {
    font-weight: 700;
    font-size: var(--font-size-label);
    padding: .28em .55em;
    border-radius: 6px;
}

/* ── CSP Sprint 4 (low-risk extraction) ───────────────────────────────────── */
.app-version-footnote {
    font-size: var(--font-size-label);
    padding: 6px 0 10px;
}

.print-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid #eee;
}

.print-note-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 1rem;
}

.print-note-grid-1 { grid-template-columns: 1fr; }
.print-note-grid-2 { grid-template-columns: 1fr 1fr; }

.print-inquiry-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.print-note-label-warn { color: #92400e; }

.print-toolbar {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-print-back {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: var(--font-size-body);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-print-primary {
    background: #f07d00;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--font-size-body);
    font-weight: 700;
}

.col-w-40 { width: 40px; }
.col-w-100 { width: 100px; }
.col-w-110 { width: 110px; }
.col-width-30 { width: 30px; }
.col-width-50 { width: 50px; }
.col-width-70 { width: 70px; }
.col-width-80 { width: 80px; }
.col-width-90 { width: 90px; }
.col-width-100 { width: 100px; }
.col-width-110 { width: 110px; }
.col-width-150 { width: 150px; }
.popup-col-id-desktop { width: 40px; }
.popup-col-unit-desktop { width: 56px; }
.popup-col-desc-desktop { width: 130px; }
.popup-col-id-mobile { width: 26px; }
.popup-col-unit-mobile { width: 34px; }

.text-muted-soft { color: #9ca3af; }
.text-right { text-align: right; }
.popup-import-badge { font-size: var(--font-size-label); }
.popup-fixed-table { width: 100%; table-layout: fixed; }
.popup-fixed-table tbody tr:nth-child(odd) > * { background: #fff; }
.popup-fixed-table tbody tr:nth-child(even) > * { background: #f8f9fa; }

/* ── CSP Faz-1 Paket-A helpers ───────────────────────────────────────────── */
.section-title-md { font-size: var(--font-size-2xl); }
.cursor-pointer { cursor: pointer; }
.nowrap-cell { white-space: nowrap; }
.ii-product-results-dropdown {
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  z-index: 9999;
  width: calc(100% - 24px);
  display: none;
}

.badge-rate-fixed { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; font-size: var(--font-size-label); }
.badge-rate-fixed-sm { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; font-size: var(--font-size-caption); }
.inline-form { display: inline; }
.alert-text-sm { font-size: var(--font-size-note); }
.note-revision { color: #92400e; }
.note-danger { color: #dc2626; }
.note-warning { color: #d97706; }
.strike-old { text-decoration: line-through; color: #9ca3af; }
.text-primary-var { color: var(--primary); }
.order-total-bar { border-top: 1px solid var(--line); background: var(--panel); }
.order-total-value { color: var(--primary); font-size: var(--font-size-xl); }
.text-xs { font-size: var(--font-size-caption); }
.msg-area-stack { display: flex; flex-direction: column; gap: .4rem; }
.border-top-line-important { border-color: var(--line) !important; }
.no-resize { resize: none; }
.btn-primary-solid { background: var(--primary); color: #fff; }
.btn-primary-solid:hover,
.btn-primary-solid:focus { background: #d66e00; color: #fff; }
.no-shrink { flex-shrink: 0; }
.filter-toggle-row { cursor: pointer; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.filter-toggle-active { background: #fffbeb; }
.badge-active-mini { background: var(--primary); color: #fff; font-size: var(--font-size-caption); }
.chevron-sm-primary { font-size: var(--font-size-caption); color: var(--primary); }
.filter-body-panel { border-top: 1px solid var(--line); padding: 1rem; }
.label-pointer { cursor: pointer; }
.activity-band {
  display: flex;
  background: #fef9c3;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: .5rem 1rem;
  margin-bottom: .75rem;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}
.activity-band-text { font-size: var(--font-size-subtle); color: #854d0e; }
.activity-band-close { background: none; border: none; font-size: var(--font-size-xl); cursor: pointer; color: #854d0e; }
.empty-icon-xl { font-size: 2.5rem; color: var(--muted); }
.order-total-mobile { font-size: var(--font-size-note); }
.text-purple { color: #7c3aed; }
.loadmore-wrap { text-align: center; padding: 1rem 0; }
.loading-spinner-inline { display: inline; }
.all-loaded-wrap { text-align: center; padding: .5rem 0; }

/* ── CSP Faz-1 Paket-B (customer/products) ───────────────────────────────── */
.btn-cart-summary { background: var(--primary); color: #fff; }
.search-info-min-h { min-height: 1.2em; }
.th-w-50 { width: 50px; }
.th-w-200 { width: 200px; }
.customer-catalog-card {
  margin-bottom: 0;
  padding: .3rem;
}
.customer-catalog-card .ds-panel-body,
.customer-catalog-card .ds-panel-footer {
  padding: 0;
  background: transparent;
  border: 0;
}
.customer-catalog-card .grid-img-wrap {
  margin-bottom: .35rem !important;
  min-height: 98px;
  max-height: 98px;
  padding: .3rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.customer-catalog-card .grid-img-fit {
  max-width: 100%;
  max-height: 88px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.customer-catalog-card .grid-ph-wrap {
  width: 100%;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.customer-catalog-card .grid-title-text {
  font-size: var(--font-size-small);
  line-height: 1.2;
  margin-bottom: .15rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}
.customer-catalog-card .grid-price-text {
  font-size: var(--font-size-meta);
  white-space: nowrap;
}
.customer-catalog-card .text-xs {
  font-size: var(--font-size-2xs);
}
.customer-catalog-card .grid-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  margin-top: auto;
  padding-bottom: .1rem;
}
.customer-catalog-card .grid-qty-input {
  min-height: 28px;
  padding: .2rem .35rem;
  font-size: var(--font-size-small);
  flex: 1 1 auto;
  min-width: 0;
}
.customer-catalog-card .add-cart-form .btn {
  padding: .28rem .38rem;
  font-size: var(--font-size-small);
  line-height: 1.1;
  flex: 0 0 auto !important;
  white-space: nowrap;
}
.customer-catalog-card .add-cart-form {
  gap: .3rem !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.customer-catalog-card .pt-1.border-top {
  padding-top: .3rem !important;
}
.customer-catalog-view-switch .btn-ds {
  justify-content: center;
}
.customer-catalog-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}
.customer-catalog-hero-copy {
  flex: 0 1 auto;
  min-width: 220px;
}
.customer-catalog-cart-summary {
  margin-left: auto;
  align-self: flex-start;
}
.customer-catalog-hero-copy .hero-title-standard {
  margin-bottom: .2rem;
}
.customer-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .85rem;
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
}
.customer-catalog-toolbar > .btn-cart-summary {
  display: none !important;
}
.customer-catalog-search {
  flex: 1 1 440px;
  max-width: 920px;
  min-width: 260px;
  margin: 0;
}
.customer-catalog-search .input-group {
  flex-wrap: nowrap;
}
.customer-catalog-view-switch {
  flex: 0 0 auto;
  flex-wrap: nowrap !important;
}
.customer-catalog-view-switch .btn-ds {
  min-width: 134px;
}
.customer-catalog-hero .btn-cart-summary {
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 1200px) {
  .customer-catalog-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .customer-catalog-search {
    max-width: none;
  }
}
@media (max-width: 767px) {
  .customer-catalog-hero-row {
    align-items: stretch;
  }
  .customer-catalog-cart-summary {
    width: 100%;
    margin-left: 0;
  }
  .customer-catalog-toolbar {
    width: 100%;
    gap: .75rem;
  }
  .customer-catalog-search {
    flex: 1 1 100%;
    min-width: 0;
  }
  .customer-catalog-view-switch {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .customer-catalog-view-switch .btn-ds {
    min-width: 0;
  }
}
.customer-order-meta-grid > div {
  min-width: 140px;
}
.customer-orders-col-main {
  width: 272px;
  min-width: 272px;
}
.customer-orders-no {
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
}
.customer-orders-user {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.product-thumb-sm-clickable {
  width: 38px;
  height: 38px;
  cursor: pointer;
}

.product-thumb-placeholder-sm {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f6dcc0, #f0e8d8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-caption);
  color: #c97a30;
  cursor: pointer;
}

.product-link-primary {
  cursor: pointer;
  color: var(--primary);
}

.qty-input-desktop {
  width: 70px;
  border-radius: 9px;
  padding: .35rem .4rem;
}

.btn-cart-base {
  border-radius: 9px;
}

.text-2xs { font-size: var(--font-size-caption); }

.product-thumb-md {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.product-thumb-placeholder-md {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f6dcc0, #f0e8d8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-caption);
  color: #c97a30;
  flex-shrink: 0;
}

.product-name-mobile {
  cursor: pointer;
  color: var(--primary);
  font-size: var(--font-size-note);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-unit-mobile { font-size: var(--font-size-caption); color: var(--muted); }
.product-price-mobile { color: var(--primary); font-size: var(--font-size-subtle); }
.cart-form-mobile { width: 90px; }
.qty-input-mobile { border-radius: 9px; padding: .3rem .4rem; font-size: var(--font-size-note); }
.btn-cart-mobile { border-radius: 9px; font-size: var(--font-size-caption); padding: .3rem .4rem; }
.modal-width-500 { --modal-width: 500px; }

.modal-product-img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.modal-product-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f6dcc0, #f0e8d8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: calc(var(--font-size-3xl) * 1.6);
  color: #c97a30;
}

.spec-link { color: var(--primary); word-break: break-all; }
.icon-xs { font-size: var(--font-size-caption); }
.spec-text-sm { font-size: var(--font-size-subtle); }
.modal-price-xl { font-size: var(--font-size-2xl); font-weight: 900; color: var(--primary); }

.cart-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 14px;
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  z-index: 9999;
  min-width: 260px;
  max-width: 90vw;
  animation: cartToastSlideUp .25s ease;
}

.cart-toast-icon { color: #16a34a; font-size: var(--font-size-xl); }
.cart-toast-sub { font-size: var(--font-size-note); }

.cart-toast-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  cursor: pointer;
  color: var(--muted);
}

.btn-cart-incart { background: #16a34a; color: #fff; }

@keyframes cartToastSlideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}


/* ============================================================
   customer_module.css — birleştirildi
   ============================================================ */

/* ── Durum badge'i (t-ready eksikti) ───────────────────────── */
.t-ready    { background:#f5f3ff; color:#5b21b6; border:1px solid #c4b5fd; }

/* ── Sipariş Durumu Badge'leri ──────────────────────────────── */
.badge-pending      { background-color: #fcd34d !important; color: #78350f !important; }
.badge-confirmed    { background-color: #86efac !important; color: #15803d !important; }
.badge-preparing    { background-color: #60a5fa !important; color: #1e40af !important; }
.badge-ready        { background-color: #c084fc !important; color: #581c87 !important; }
.badge-delivered    { background-color: #34d399 !important; color: #065f46 !important; }
.badge-cancelled    { background-color: #fca5a5 !important; color: #7c2d12 !important; }

/* ── Bildirim & Alert'ler ───────────────────────────────────── */
.alert-notification   { border-left: 4px solid #f59e0b; padding: 1rem; border-radius: 6px; background: #fef3c7; }
.alert-info-custom    { background-color: #f0f9ff; border-left: 4px solid #0284c7; }
.alert-success-custom { background-color: #f0fdf4; border-left: 4px solid #16a34a; }
.alert-warning-custom { background-color: #fef3c7; border-left: 4px solid #ea580c; }
.alert-error-custom   { background-color: #fee2e2; border-left: 4px solid #dc2626; }

/* ── Modal özelleştirmeleri ─────────────────────────────────── */
.modal-header-custom { background-color: #f07d00; color: white; border-radius: 8px 8px 0 0; }
.modal-body-custom   { max-height: 70vh; overflow-y: auto; }
.btn-close-white     { filter: invert(1); }

/* ── Kart stilleri ──────────────────────────────────────────── */
.card-custom            { border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.card-custom-hover:hover{ box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: all 0.3s ease; }
.card-header-custom     { background-color: #f3f4f6; border-bottom: 1px solid #e5e7eb; font-weight: 600; }

/* ── product-thumb-fixed: tablo içi override (38px) ────────── */
.product-thumb-fixed { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; }
@media (max-width: 768px) {
    .product-thumb-fixed { width: 32px; height: 32px; }
}

/* Customer Messages v3.20.x refresh */
.msg-admin {
    background: #eef6ff;
    border: 1px solid #cfe1ff;
}
.msg-system {
    background: #fff4e5;
    border: 1px solid #f7cf96;
}

.customer-chat-detail .ds-panel-body {
    padding: 0;
}
.customer-chat-body {
    padding: 0 !important;
}
.customer-chat-area {
    min-height: 340px;
    max-height: 56vh;
    overflow-y: auto;
    padding: 1rem;
}
.customer-chat-empty {
    margin: .75rem;
}
.customer-chat-compose {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .5rem;
    align-items: end;
}
.chat-shell {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.chat-sidebar {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 128px);
}
.chat-sidebar .ds-panel-body {
    padding: 0;
    max-height: calc(100vh - 184px);
    overflow-y: auto;
}
.chat-thread-list {
    display: grid;
}
.chat-thread {
    display: grid;
    gap: .25rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}
.chat-thread:last-child {
    border-bottom: 0;
}
.chat-thread:hover {
    background: var(--panel-alt);
    color: var(--text);
}
.chat-thread-active {
    border-left: 3px solid var(--primary);
    padding-left: calc(1rem - 3px);
    background: #f8faf7;
}
.chat-thread-unread {
    background: #fffbeb;
}
.chat-thread-title-row,
.chat-thread-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.chat-thread-title,
.chat-thread-subject,
.chat-thread-preview {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-thread-title {
    font-size: var(--font-size-body);
    font-weight: 600;
}
.chat-thread-subject {
    font-size: var(--font-size-meta);
    color: var(--text);
}
.chat-thread-preview,
.chat-thread-meta {
    font-size: var(--font-size-small);
    color: var(--muted);
}

.customer-conv-table td {
    vertical-align: middle;
}
.customer-conv-row-unread td,
.customer-conv-row-unread {
    background: #fffbeb;
}
.customer-conv-row-clickable {
    cursor: pointer;
}
.customer-conv-row-clickable:focus {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}
.customer-conv-link {
    text-decoration: none;
    color: var(--text);
}
.customer-conv-cell-link {
    display: block;
}
.customer-conv-link:hover {
    color: var(--text);
}
.customer-conv-lastmsg {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.customer-conv-mobile {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    padding: .75rem;
    margin-bottom: .6rem;
}

.kalender-help-accordion .accordion-item {
    border-color: var(--line);
    background: transparent;
}
.kalender-help-accordion .accordion-button {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--text);
    background: var(--panel);
    box-shadow: none;
}
.kalender-help-accordion .accordion-button:not(.collapsed) {
    background: #f8faf7;
    color: var(--text);
}
.kalender-help-copy {
    font-size: var(--font-size-body);
    color: var(--text);
    line-height: 1.65;
}
.kalender-help-copy p:last-child,
.kalender-help-copy ul:last-child {
    margin-bottom: 0;
}
.kalender-help-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
}
.kalender-help-contact {
    font-size: var(--font-size-body);
    color: var(--text);
}
.kalender-help-contact-block {
    margin-bottom: .9rem;
}
.kalender-help-contact-label {
    font-size: var(--font-size-meta);
    font-weight: 600;
    color: var(--muted);
    margin-bottom: .25rem;
}
.kalender-help-shortcuts {
    display: grid;
    gap: .65rem;
}
.kalender-help-shortcut {
    justify-content: flex-start;
    width: 100%;
}

.customer-notif-stack {
    display: grid;
    gap: .9rem;
}
.customer-notif-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1rem;
    background: var(--panel);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.customer-notif-card.is-unread {
    border-color: #f5d38b;
    background: #fffdf7;
}
.customer-notif-card:hover {
    background: var(--panel-alt);
    border-color: color-mix(in srgb, var(--primary) 20%, var(--line) 80%);
    box-shadow: var(--shadow-sm);
}
.customer-notif-card-top,
.customer-notif-card-main,
.customer-order-notif-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}
.customer-notif-card-top {
    justify-content: space-between;
}
.customer-notif-icon,
.customer-order-notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--font-size-2xl);
}
.customer-notif-icon.is-price {
    background: #fff7e6;
    color: #b45309;
}
.customer-notif-icon.is-campaign,
.customer-order-notif-icon {
    background: #f5f3ff;
    color: #6d28d9;
}
.customer-notif-title,
.customer-order-notif-link {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}
.customer-order-notif-link:hover {
    color: var(--text);
}
.customer-notif-meta {
    margin-top: .25rem;
    font-size: var(--font-size-meta);
    color: var(--muted);
}
.customer-notif-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .4rem;
    flex-shrink: 0;
}
.customer-notif-message {
    padding: .85rem .95rem;
    border-radius: 12px;
    background: var(--panel-alt);
    border: 1px solid var(--line);
    font-size: var(--font-size-body);
    color: var(--text);
    line-height: 1.6;
}
.customer-notif-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.customer-order-notif-body {
    padding: .9rem 1rem;
}
.customer-order-notif-list {
    display: grid;
    gap: .5rem;
}
.customer-order-notif-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: .65rem .75rem;
    background: var(--panel);
}
.customer-order-notif-item.is-unread {
    border-color: #d7c6f8;
    background: #fcfaff;
}
.customer-order-notif-item .customer-notif-actions {
    gap: .3rem;
}
.customer-order-notif-item .customer-notif-meta {
    font-size: var(--font-size-small);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.customer-order-notif-icon {
    width: 32px;
    height: 32px;
    font-size: var(--font-size-lg);
    border-radius: 10px;
}
.customer-order-notif-link {
    font-size: var(--font-size-body);
}
.customer-notif-empty {
    margin: 0;
    box-shadow: none;
}
.customer-notif-strike {
    text-decoration: line-through;
}
.announcement-modal-card {
    overflow: hidden;
}
.announcement-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem 1rem;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-bottom: 1px solid #fed7aa;
}
.announcement-modal-copy {
    min-width: 0;
}
.announcement-modal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .45rem;
    font-size: var(--font-size-label);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #c2410c;
}
.announcement-modal-title {
    line-height: 1.25;
}
.announcement-modal-body {
    display: grid;
    gap: .85rem;
}
.announcement-modal-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}
.announcement-modal-counter {
    font-size: var(--font-size-small);
    font-weight: 700;
    color: var(--muted);
}
.announcement-modal-nav {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.announcement-modal-summary {
    font-size: var(--font-size-body);
    line-height: 1.65;
    color: var(--text);
}
.announcement-price-list {
    display: grid;
    gap: .65rem;
}
.announcement-price-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem .85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-alt);
}
.announcement-price-name {
    font-size: var(--font-size-body);
    font-weight: 600;
    color: var(--text);
}
.announcement-price-values {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    white-space: nowrap;
}
.announcement-price-old {
    color: var(--muted);
    text-decoration: line-through;
}
.announcement-price-arrow {
    color: var(--muted);
}
.announcement-price-up {
    color: #dc2626;
}
.announcement-price-down {
    color: #16a34a;
}
.announcement-modal-meta {
    font-size: var(--font-size-small);
    color: var(--muted);
}
.announcement-modal-footer {
    justify-content: flex-end;
    gap: .5rem;
}
.customer-other-cart-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--line);
    border-left: 4px solid #60a5fa;
    border-radius: 14px;
    background: var(--panel);
}

@media (min-width: 992px) {
    .customer-order-notif-list {
        max-height: 58vh;
        overflow-y: auto;
        padding-right: .2rem;
    }
}

@media (max-width: 767px) {
    .customer-chat-compose {
        grid-template-columns: 1fr;
    }
    .customer-chat-compose .btn-ds {
        justify-content: center;
        width: 100%;
    }
    .customer-chat-area {
        max-height: 52vh;
    }
    .chat-shell {
        display: block;
    }
    .chat-sidebar {
        display: none;
    }
    .msg-bubble {
        max-width: 92%;
    }
    .customer-notif-card-top,
    .customer-notif-card-main,
    .customer-order-notif-item {
        flex-direction: column;
    }
    .announcement-price-item,
    .announcement-modal-footer,
    .announcement-modal-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .announcement-modal-nav {
        width: 100%;
        justify-content: stretch;
    }
    .announcement-modal-nav .btn-ds {
        flex: 1 1 0;
        justify-content: center;
    }
    .announcement-price-values {
        white-space: normal;
    }
    .customer-notif-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .customer-notif-actions .btn-ds {
        justify-content: center;
    }
    .customer-notif-toolbar {
        justify-content: stretch;
    }
    .customer-notif-toolbar form,
    .customer-notif-toolbar .btn-ds,
    .kalender-help-shortcut {
        width: 100%;
    }
    .customer-orders-col-main,
    .customer-orders-user {
        width: auto;
        min-width: 0;
        max-width: none;
    }
    .customer-catalog-card .grid-img-wrap {
        min-height: 84px;
        max-height: 84px;
    }
    .customer-catalog-card .grid-img-fit,
    .customer-catalog-card .grid-ph-wrap {
        max-height: 74px;
        min-height: 74px;
    }
}

.shared-resolver-shell {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.shared-resolver-state {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-alt) 78%, var(--panel) 22%);
    padding: .9rem 1rem;
}

.shared-resolver-state-label {
    display: block;
    margin-bottom: .2rem;
    font-size: var(--font-size-label);
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--muted);
}

.shared-resolver-state-main {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--text);
    line-height: 1.4;
}

.shared-resolver-state-meta {
    margin-top: .3rem;
    font-size: var(--font-size-note);
    color: var(--muted);
    line-height: 1.45;
}

#sharedCustomProductCreateModal .shared-resolver-shell {
    gap: .65rem;
}

#sharedCustomProductCreateModal .modal-header {
    padding-bottom: .75rem;
}

#sharedCustomProductCreateContext {
    font-size: var(--font-size-caption);
    line-height: 1.25;
}

#sharedCustomProductCreateModal .shared-product-create-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: .65rem;
    align-items: end;
}

#sharedCustomProductCreateModal .shared-product-create-name-wrap,
#sharedCustomProductCreateModal .shared-product-create-unit-wrap {
    min-width: 0;
}

#sharedCustomProductCreateModal .shared-product-create-unit-wrap .form-control {
    text-transform: lowercase;
}

#sharedCustomProductCreateModal .shared-resolver-state {
    padding: .55rem .75rem;
    border-radius: 12px;
}

#sharedCustomProductCreateModal .shared-resolver-state-label {
    display: none;
}

#sharedCustomProductCreateModal .shared-resolver-state-main {
    font-size: var(--font-size-note);
    line-height: 1.3;
}

#sharedCustomProductCreateModal .shared-resolver-state-meta {
    margin-top: .1rem;
    font-size: var(--font-size-caption);
    line-height: 1.2;
}

@media (max-width: 767px) {
    #sharedCustomProductCreateModal .shared-product-create-fields {
        grid-template-columns: 1fr;
        gap: .5rem;
    }
}

.shared-resolver-options {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.shared-resolver-option {
    display: block;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    padding: .8rem .95rem;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.shared-resolver-option:hover {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--line) 64%);
    background: color-mix(in srgb, var(--panel-alt) 72%, var(--panel) 28%);
}

.shared-resolver-option.is-selected {
    border-color: color-mix(in srgb, var(--primary) 56%, var(--line) 44%);
    background: color-mix(in srgb, var(--primary) 10%, var(--panel) 90%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent 82%);
}

.shared-resolver-option.is-create {
    background: color-mix(in srgb, var(--success-bg) 70%, var(--panel) 30%);
}

.shared-resolver-option-row {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
}

.shared-resolver-option-radio {
    margin-top: .18rem;
    flex-shrink: 0;
}

.shared-resolver-option-body {
    min-width: 0;
    flex: 1 1 auto;
}

.shared-resolver-option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.shared-resolver-option-title {
    font-size: var(--font-size-body);
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
}

.shared-resolver-option-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: var(--font-size-caption);
    font-weight: 700;
    white-space: nowrap;
}

.shared-resolver-option-badge.is-create {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.shared-resolver-option-badge.is-firm,
.shared-resolver-option-badge.is-product {
    background: var(--panel-alt);
    color: var(--muted);
    border: 1px solid var(--line);
}

.shared-resolver-option-badge.is-trade,
.shared-resolver-option-badge.is-custom {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.shared-resolver-option-meta {
    margin-top: .3rem;
    font-size: var(--font-size-note);
    color: var(--muted);
    line-height: 1.45;
}

.shared-resolver-empty {
    border: 1px dashed var(--line);
    border-radius: 14px;
    padding: .9rem 1rem;
    color: var(--muted);
    background: color-mix(in srgb, var(--panel-alt) 72%, var(--panel) 28%);
    font-size: var(--font-size-note);
}

.shared-resolver-inline-summary {
    margin-top: .65rem;
}

@media (max-width: 767px) {
    .shared-resolver-option {
        padding: .75rem .85rem;
    }
}
