/* ═══════════════════════════════════════════════
   Cargobar v4 — Modern Minimal Design System
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* ── Color Palette ── */
  --background:     #f8f9fb;
  --foreground:     #1a1d26;
  --card:           #ffffff;
  --primary:        #7ed957;
  --primary-hover:  #6bc247;
  --primary-fg:     #ffffff;
  --accent:         #6366f1;
  --accent-light:   #818cf8;
  --border:         #e5e7eb;
  --border-hover:   #d1d5db;
  --muted:          #f3f4f6;
  --muted-foreground: #6b7280;
  --text-muted:     #9ca3af;

  --green:          #10b981;
  --green-bg:       rgba(16,185,129,0.08);
  --red:            #ef4444;
  --red-bg:         rgba(239,68,68,0.08);
  --amber:          #7ed957;
  --amber-bg:       rgba(126,217,87,0.08);

  /* ── Spacing & Radius ── */
  --radius-xs:      6px;
  --radius-sm:      8px;
  --radius:         12px;
  --radius-lg:      16px;
  --radius-xl:      20px;

  /* ── Shadows ── */
  --shadow-xs:      0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:      0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg:      0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-focus:   0 0 0 3px rgba(126,217,87,0.18);

  /* ── Transitions ── */
  --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s ease;

  /* ── Fonts ── */
  --font-ui:        'Inter', system-ui, -apple-system, sans-serif;
}

/* ═══════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-ui);
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(126, 217, 87, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 217, 87, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.12) transparent;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.2); }

::selection { background: rgba(126,217,87,0.2); color: var(--foreground); }

/* ═══════════════════════════════════════
   LAYOUT
═══════════════════════════════════════ */
#app-container { display: flex; width: 100vw; min-height: 100vh; }

/* ── Sidebar (unused but kept for compat) ── */
.sidebar { display: none; }

/* ── Main Content ── */
.main-content {
  padding: 2.5rem 3rem 8rem 3rem;
  overflow-y: auto;
  height: 100vh;
  flex: 1;
  max-width: 100%;
}

/* ── View Panes ── */
.view-pane { display: none; animation: fadeUp 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.view-pane.active { display: block; }
/* Login page needs grid layout, not block */
.view-pane.login-layout.active { display: grid; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   PAGE HEADER
═══════════════════════════════════════ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.page-title {
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.page-subtitle {
  font-size: 0.95rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ── Company Layout ── */
.company-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
  align-items: start;
}

/* ═══════════════════════════════════════
   FORM CONTROLS
═══════════════════════════════════════ */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.form-label .req { color: var(--red); margin-left: 2px; font-weight: 700; }

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-ui);
  background: var(--card);
  color: var(--foreground);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control::placeholder { color: var(--text-muted); opacity: 1; }
.form-control:hover { border-color: var(--border-hover); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; background: var(--muted); }

textarea.form-control { resize: vertical; min-height: 60px; line-height: 1.5; }

/* Hide number spinner */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
#copy-count { text-align: center; }

.input-with-icon { position: relative; }
.input-with-icon .icon {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; display: flex;
}
.input-with-icon .icon svg { width: 16px; height: 16px; }
.input-with-icon .form-control { padding-left: 2.5rem; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.85rem; }

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.85rem;
  font-family: var(--font-ui);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--card); border-color: var(--border); color: var(--foreground);
}
.btn-secondary:hover { background: var(--muted); border-color: var(--border-hover); }

.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-success:hover { filter: brightness(1.08); }

.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { filter: brightness(1.08); }

.btn-ghost {
  background: transparent; border-color: var(--border); color: var(--muted-foreground);
}
.btn-ghost:hover { background: var(--muted); color: var(--foreground); }

.btn-lg { padding: 0.8rem 1.6rem; font-size: 0.95rem; border-radius: var(--radius); }
.btn-full { width: 100%; }
.btn-icon { padding: 0.45rem; width: 34px; height: 34px; border-radius: var(--radius-xs); }

/* ═══════════════════════════════════════
   CARDS
═══════════════════════════════════════ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.card-body { padding: 1.5rem; }
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card);
}
.card-title {
  font-weight: 700; font-size: 0.95rem; color: var(--foreground);
  display: flex; align-items: center; gap: 0.5rem;
}
.card-title svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

/* ═══════════════════════════════════════
   KARGO FİŞİ — MAIN LAYOUT
═══════════════════════════════════════ */
.slip-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.5rem;
  align-items: start;
}

/* ── Customer Mode Toggle ── */
.mode-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mode-card {
  position: relative;
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--card);
  display: flex; align-items: center; gap: 0.85rem;
  user-select: none;
  box-shadow: var(--shadow-xs);
}
.mode-card input[type="radio"] { display: none; }
.mode-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}
.mode-card.selected {
  border-color: var(--primary);
  background: rgba(126,217,87,0.04);
  box-shadow: 0 0 0 3px rgba(126,217,87,0.1);
}

.mode-card .mode-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.mode-card .mode-icon svg { width: 20px; height: 20px; color: var(--muted-foreground); }
.mode-card.selected .mode-icon {
  background: rgba(126,217,87,0.12);
}
.mode-card.selected .mode-icon svg { color: var(--primary); }

.mode-card .mode-label { font-weight: 600; font-size: 0.9rem; color: var(--foreground); }
.mode-card .mode-desc  { font-size: 0.78rem; color: var(--muted-foreground); margin-top: 0.1rem; }

.mode-indicator {
  position: absolute; top: 0.6rem; right: 0.7rem;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: all var(--transition);
}
.mode-card.selected .mode-indicator {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(126,217,87,0.2);
}

/* ── Form Section ── */
.form-section { margin-bottom: 1.25rem; }
.form-section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted-foreground);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.form-section-title::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.form-stack { display: flex; flex-direction: column; gap: 0.85rem; }

/* ── Saved customer select button ── */
.saved-customer-btn {
  width: 100%;
  padding: 0.85rem 1.15rem;
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted-foreground);
  font-weight: 600; font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
}
.saved-customer-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(126,217,87,0.03);
}
.saved-customer-btn svg { width: 18px; height: 18px; }

/* selected customer badge */
.selected-customer-badge {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1rem;
  background: var(--green-bg);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.selected-customer-badge .badge-name { font-weight: 600; color: var(--green); }
.selected-customer-badge .badge-code { font-size: 0.78rem; color: var(--muted-foreground); }
.badge-clear {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted-foreground);
  display: flex; align-items: center;
  padding: 0.2rem; border-radius: var(--radius-xs);
  transition: all var(--transition);
}
.badge-clear:hover { color: var(--red); background: var(--red-bg); }
.badge-clear svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════
   DESI CALCULATOR
═══════════════════════════════════════ */
.desi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.desi-input-wrapper { display: flex; flex-direction: column; }
.desi-unit {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-align: right;
  padding-right: 0.2rem;
}

.desi-result-card {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: var(--muted);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  transition: all var(--transition);
}
.desi-result-card.dhl-active {
  background: var(--amber-bg);
  border-color: rgba(126,217,87,0.25);
}

.desi-result-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.desi-result-row:last-child { margin-bottom: 0; }
.desi-result-label { font-size: 0.8rem; color: var(--muted-foreground); }
.desi-result-value { font-weight: 700; font-size: 1rem; color: var(--foreground); }
.desi-result-value.highlight { color: var(--primary); }
.desi-result-value.amber { color: var(--amber); }

.dhl-warning {
  display: none;
  align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  background: var(--amber-bg);
  border: 1px solid rgba(126,217,87,0.2);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.dhl-warning.visible { display: flex; }
.dhl-warning svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   PRINT OPTIONS CARD
═══════════════════════════════════════ */
.print-options-card { position: sticky; top: 1.5rem; }

.tkg-row {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.copy-count-row { display: flex; align-items: center; gap: 0.5rem; }
.copy-count-label { font-size: 0.82rem; color: var(--muted-foreground); font-weight: 500; }

.print-divider { height: 1px; background: var(--border); margin: 1.25rem 0; }

.print-summary {
  padding: 0.85rem 1rem;
  background: var(--muted);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  color: var(--muted-foreground);
  line-height: 1.75;
  border: 1px solid var(--border);
}
.print-summary strong { color: var(--foreground); font-weight: 600; }

.print-btn-main {
  width: 100%; padding: 0.9rem; font-size: 0.95rem;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════
   CUSTOMERS VIEW
═══════════════════════════════════════ */
.search-bar { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }

.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th {
  background: var(--muted);
  padding: 0.8rem 1.1rem;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  vertical-align: middle;
  color: var(--foreground);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr { transition: background var(--transition-fast); }
.data-table tr:hover td { background: rgba(126,217,87,0.03); }

.code-badge {
  display: inline-flex; align-items: center;
  background: var(--amber-bg);
  border: 1px solid rgba(126,217,87,0.15);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-xs);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-hover);
}

.cell-stack { display: flex; flex-direction: column; gap: 0.15rem; }
.cell-main  { font-weight: 600; }
.cell-sub   { font-size: 0.78rem; color: var(--muted-foreground); }

.action-group { display: flex; gap: 0.25rem; justify-content: center; }
.action-btn {
  background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-foreground); transition: all var(--transition);
}
.action-btn svg { width: 15px; height: 15px; }
.action-btn:hover { background: var(--muted); color: var(--foreground); }
.action-btn.btn-use:hover  { color: var(--green);  background: var(--green-bg); }
.action-btn.btn-edit:hover { color: var(--accent);  background: rgba(99,102,241,0.08); }
.action-btn.btn-del:hover  { color: var(--red);    background: var(--red-bg); }

.empty-row td {
  text-align: center; padding: 3rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════
   MODALS
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }
.modal-box.modal-lg { max-width: 680px; }

.modal-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head-title { font-weight: 700; font-size: 1.1rem; color: var(--foreground); }

.modal-close-btn {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted-foreground);
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close-btn svg { width: 18px; height: 18px; }
.modal-close-btn:hover { background: var(--muted); color: var(--foreground); }

.modal-body { padding: 1.5rem; }
.modal-foot {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 0.65rem;
  background: var(--muted);
}

/* Customer Selection Modal */
.cust-search-wrap { margin-bottom: 1rem; }
.cust-list {
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.cust-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}
.cust-list-item:hover {
  border-color: var(--primary);
  background: rgba(126,217,87,0.03);
  box-shadow: var(--shadow-sm);
}
.cust-list-item .item-name { font-weight: 600; font-size: 0.9rem; }
.cust-list-item .item-sub  { font-size: 0.78rem; color: var(--muted-foreground); margin-top: 0.1rem; }
.cust-list-item .item-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8rem; font-weight: 600; color: var(--foreground);
}

/* Save Prompt Modal */
.save-prompt-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  background: var(--amber-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.5rem;
}
.save-prompt-text { text-align: center; color: var(--muted-foreground); font-size: 0.9rem; line-height: 1.65; }
.save-prompt-name { font-weight: 700; color: var(--foreground); }

/* Customer Form Modal */
.cust-form-grid { display: flex; flex-direction: column; gap: 0.85rem; }

/* ═══════════════════════════════════════
   PRINT LABEL TEMPLATE (screen preview + print)
═══════════════════════════════════════ */

/* Hidden on screen, shown only when printing */
#print-area { display: none !important; }

/* Each label is 100x100mm */
.label-page {
  width: 100mm !important;
  height: 100mm !important;
  min-width: 100mm !important;
  min-height: 100mm !important;
  max-width: 100mm !important;
  max-height: 100mm !important;
  position: relative !important;
  background: #fff;
  color: #000;
  font-family: 'Arial', sans-serif;
  overflow: hidden !important;
  page-break-after: always;
  page-break-inside: avoid;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
}
.label-page:last-child { page-break-after: avoid; }

/* Inner padding */
.label-inner {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100mm !important;
  height: 100mm !important;
  padding: 3mm !important;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box !important;
  border: 0.5mm solid #000 !important;
  margin: 0 !important;
}

/* Header row */
.label-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5mm;
  border-bottom: 0.4mm solid #000;
  margin-bottom: 1.5mm;
  flex-shrink: 0;
}
.label-logo-text {
  font-size: 11pt;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  color: #000;
}
.label-logo-sub {
  font-size: 5pt;
  color: #555;
  margin-top: 0.5mm;
  font-weight: 400;
}

/* Sender row */
.label-section {
  margin-bottom: 1mm;
  padding-bottom: 1mm;
  border-bottom: 0.3mm solid #ddd;
  flex-shrink: 0;
}
.label-section:last-child { border-bottom: none; margin-bottom: 0; }

.label-section-tag {
  font-size: 5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #666;
  margin-bottom: 0.5mm;
}
.label-sender-name {
  font-size: 6.5pt;
  font-weight: 700;
  color: #000;
  line-height: 1.2;
}
.label-sender-addr {
  font-size: 5.5pt;
  color: #444;
  line-height: 1.3;
}

/* Receiver */
.label-recv-title {
  font-size: 10pt;
  font-weight: 900;
  color: #000;
  line-height: 1.15;
  margin-bottom: 0.75mm;
}
.label-recv-contact {
  font-size: 7pt;
  font-weight: 700;
  color: #111;
  margin-bottom: 0.5mm;
}
.label-recv-addr {
  font-size: 6.5pt;
  color: #333;
  line-height: 1.3;
}
.label-recv-city {
  font-size: 7.5pt;
  font-weight: 700;
  color: #000;
  margin-top: 0.5mm;
}

/* Cargo Info Row */
.label-cargo-row {
  display: flex;
  gap: 1.5mm;
  padding: 1mm 0;
  border-top: 0.4mm solid #000;
  border-bottom: 0.4mm solid #000;
  margin: 1mm 0;
  flex-shrink: 0;
}
.label-cargo-cell {
  flex: 1;
  text-align: center;
}
.label-cargo-val {
  font-size: 9pt;
  font-weight: 900;
  color: #000;
  line-height: 1;
}
.label-cargo-key {
  font-size: 4.5pt;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-top: 0.3mm;
}
.label-cargo-sep {
  width: 0.3mm;
  background: #ccc;
  margin: 0.3mm 0;
}

/* Bottom barcode */
.label-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 1mm;
}
.label-dhl-note {
  font-size: 5pt;
  color: #888;
  text-align: right;
  line-height: 1.4;
}

/* Custom Background Overrides */
.label-page.has-custom-bg .label-inner {
  border: none !important;
  background: transparent !important;
}
.label-page.has-custom-bg .label-header {
  border-bottom: none !important;
}
.label-page.has-custom-bg .label-cargo-row {
  border-top: none !important;
  border-bottom: none !important;
}
.label-page.has-custom-bg .label-cargo-sep {
  display: none !important;
}

/* ═══════════════════════════════════════
   PRINT MEDIA QUERY
═══════════════════════════════════════ */
@page {
  size: 100mm 100mm;
  margin: 0mm;
}

@media print {
  html, body {
    width: 100mm !important;
    height: 100mm !important;
    max-width: 100mm !important;
    max-height: 100mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  /* Hide everything */
  body > * { display: none !important; }
  
  /* Show only print area — exact 100x100mm */
  #print-area {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100mm !important;
    height: 100mm !important;
    max-width: 100mm !important;
    max-height: 100mm !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    z-index: 999999 !important;
    overflow: hidden !important;
  }
  
  /* Label page fills 100% of available print area */
  .label-page {
    width: 100mm !important;
    height: 100mm !important;
    max-width: 100mm !important;
    max-height: 100mm !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    page-break-after: always;
    overflow: hidden !important;
    position: relative !important;
  }

  /* Label-inner: border exactly at the edge of the printable area */
  .label-inner {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0.5mm solid #000 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 3mm !important;
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ═══════════════════════════════════════
   UTILITY
═══════════════════════════════════════ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.gap-1 { gap: 0.5rem; }

.text-muted  { color: var(--muted-foreground); }
.text-small  { font-size: 0.8rem; }
.font-mono   { font-family: 'SF Mono', 'Fira Code', monospace; }

.chip {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 100px; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.01em;
}
.chip-green { background: var(--green-bg); color: var(--green); }
.chip-amber { background: var(--amber-bg); color: var(--amber); }
.chip-blue  { background: rgba(99,102,241,0.08); color: var(--accent); }

/* ═══════════════════════════════════════
   DOCK
═══════════════════════════════════════ */
.dock-wrapper {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  height: 96px; /* room for magnification to grow up */
}

.dock-panel {
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 0.5rem 0.75rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 8px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.dock-item {
  --dock-size: 48px;
  position: relative;
  width: var(--dock-size);
  height: var(--dock-size);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 12px;
  transition: width 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
  transform-origin: bottom center;
}

.dock-item:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.dock-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: width 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-radius 0.15s ease,
              transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.dock-icon svg {
  width: 22px;
  height: 22px;
  color: var(--text-main);
  transition: width 0.15s cubic-bezier(0.34, 1.56, 0.64, 1),
              height 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

/* Active page indicator */
.dock-item.active .dock-icon {
  background: var(--amber-bg);
  border-color: rgba(126, 217, 87, 0.35);
}
.dock-item.active .dock-icon svg {
  color: var(--amber);
}

/* Tooltip label */
.dock-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(25, 25, 25, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.15s ease, translate 0.15s ease;
}
.dock-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(25, 25, 25, 0.88);
}
.dock-item:hover .dock-label,
.dock-item:focus-visible .dock-label {
  opacity: 1;
  translate: 0 0;
}

/* Divider */
.dock-divider {
  width: 1px;
  height: 30px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 1px;
  margin: 0 0.15rem;
  align-self: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   LOGIN PAGE — Clean Minimal Design
═══════════════════════════════════════ */

/* Full-screen layout split */
.view-pane.login-layout.active {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  width: 100%;
  overflow-y: auto;
}

/* ── Left decorative panel ── */
.login-left {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  overflow: hidden;
  background: transparent;
}

.login-left-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

/* Logo */
.login-logo {
  height: 120px;
  width: auto;
  object-fit: contain;
  align-self: center;
}

/* Tagline */
.login-slogan-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-slogan {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.login-neon {
  color: #7ed957;
  position: relative;
  display: inline-block;
}

.chalk-underline {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 8px;
  opacity: 0.7;
}

.login-subtext {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  line-height: 1.6;
  max-width: 360px;
}

/* Feature pills */
.login-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.login-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  border: 1px solid rgba(126,217,87,0.3);
  background: rgba(126,217,87,0.1);
  font-size: 0.78rem;
  font-weight: 600;
  color: #000000;
}

.login-feature-pill svg {
  width: 13px; height: 13px;
  color: #7ed957;
  flex-shrink: 0;
}

/* Bottom meta */
.login-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.75rem;
  color: rgba(0,0,0,0.5);
  font-weight: 400;
}

.login-footer span {
  cursor: default;
  transition: color 0.15s;
}

/* ── Right form panel ── */
.login-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2.5rem;
  background: transparent;
  position: relative;
}

/* Mobile-only logo */
.login-mobile-logo {
  display: none;
  margin-bottom: 2rem;
  justify-content: center;
}

.login-mobile-logo img {
  height: 48px;
  width: auto;
}

.login-form-box {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

/* Card wrapper */
.login-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(126,217,87,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.login-header-icon svg {
  width: 24px; height: 24px;
  color: #5da83f;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
}

.login-header p {
  font-size: 0.85rem;
  color: #64748b;
  line-height: 1.5;
}

/* Form inputs */
.lf-group {
  margin-bottom: 1.1rem;
}

.lf-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.45rem;
  letter-spacing: 0.01em;
}

.lf-input-wrap {
  position: relative;
}

.lf-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 1;
}

.lf-input {
  width: 100%;
  height: 46px;
  padding-left: 42px;
  padding-right: 1rem;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #f9fafb;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e293b;
  outline: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
  font-family: var(--font-ui);
}

.lf-input::placeholder {
  color: #b0b9c8;
  font-weight: 400;
}

.lf-input:focus {
  border-color: #7ed957;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(126,217,87,0.12);
}

.lf-input.error {
  border-color: #f43f5e;
  background: #fff5f6;
}

.lf-input-pass {
  padding-right: 46px;
}

.lf-eye-btn {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.lf-eye-btn:hover {
  color: #475569;
}

.lf-error {
  font-size: 0.75rem;
  font-weight: 500;
  color: #f43f5e;
  margin-top: 0.3rem;
}

/* Forgot link */
.lf-forgot {
  font-size: 0.78rem;
  font-weight: 600;
  color: #5da83f;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.lf-forgot:hover {
  color: #4a9433;
  text-decoration: underline;
}

/* Submit button */
.lf-submit-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  background: linear-gradient(135deg, #7ed957 0%, #5da83f 100%);
  box-shadow: 0 2px 12px rgba(126,217,87,0.3);
  transition: all 0.2s;
  font-family: var(--font-ui);
}

.lf-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(126,217,87,0.4);
}

.lf-submit-btn:active {
  transform: scale(0.98);
}

.lf-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Divider */
.lf-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #cbd5e1;
  font-size: 0.75rem;
}

.lf-divider::before,
.lf-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

/* ── Forgot Password Modal ── */
.fp-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
}


.fp-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 380px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fp-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.fp-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(126,217,87,0.15);
  flex-shrink: 0;
}

.fp-title { font-size: 1rem; font-weight: 700; color: #1e293b; }
.fp-subtitle { font-size: 0.78rem; color: #64748b; margin-top: 2px; }

.fp-input-wrap {
  position: relative;
}

.fp-input-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: #94a3b8;
}

.fp-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.875rem;
  color: #1e293b;
  outline: none;
  transition: border-color 0.2s;
  font-family: var(--font-ui);
}
.fp-input:focus { border-color: #7ed957; background: #fff; }

.fp-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.fp-notfound {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #be123c;
  font-weight: 500;
}

.fp-footer {
  display: flex;
  gap: 0.625rem;
}

.fp-btn-cancel {
  flex: 1; padding: 0.625rem;
  border-radius: 12px; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 600;
  color: #475569; background: #f1f5f9;
  transition: background 0.15s;
  font-family: var(--font-ui);
}
.fp-btn-cancel:hover { background: #e2e8f0; }

.fp-btn-search {
  flex: 1; padding: 0.625rem;
  border-radius: 12px; border: none; cursor: pointer;
  font-size: 0.875rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7ed957, #5da83f);
  transition: opacity 0.15s;
  font-family: var(--font-ui);
}
.fp-btn-search:hover { opacity: 0.9; }
.fp-btn-search:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .login-mobile-logo { display: flex; justify-content: center; }
  .login-right { min-height: 100dvh; padding: 2rem 1.25rem; background: #f8fafc; }
  .login-form-box {
    background: #fff;
    border-radius: 2rem;
    box-shadow: 0 20px 60px rgba(126,217,87,0.1);
    padding: 2.5rem 2rem;
    border: 1px solid #f1f5f9;
  }
}

/* Spin animation for loading */
@keyframes spin { to { transform: rotate(360deg); } }
.lp-spin { animation: spin 0.8s linear infinite; }

/* ═══════════════════════════════════════
   AUTH VEIL — Kimlik doğrulama perdesi
   Tüm içeriği gizler, auth yüklenince kaybolur
═══════════════════════════════════════ */
#auth-veil {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(126, 217, 87, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 217, 87, 0.15) 1px, transparent 1px);
  background-size: 48px 48px;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#auth-veil.av-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* Login sayfasında veil hiç gösterilmez — anında gizle */
#auth-veil.av-skip {
  display: none !important;
}

/* ═══════════════════════════════════════
   PAGE TRANSITION — Sayfa geçiş yükleyici
═══════════════════════════════════════ */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 88888;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  background-image:
    linear-gradient(rgba(126, 217, 87, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 217, 87, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
#page-transition.pt-active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
#page-transition.pt-hiding {
  opacity: 0;
  visibility: hidden;
}
.pt-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.pt-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  animation: pt-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pt-pop {
  0%   { opacity: 0; transform: scale(0.65); }
  100% { opacity: 1; transform: scale(1); }
}
.pt-sphere {
  --color-1: #e4f7d9;
  --color-2: #b4ed9c;
  --color-3: #7ed957;
  --color-4: #2b5718;
  --color-5: rgba(126, 217, 87, 0.05);
  --color-6: rgba(126, 217, 87, 0.25);
  --color-7: rgba(126, 217, 87, 0.3);
  --color-8: rgba(126, 217, 87, 0.5);
  --color-9: rgba(126, 217, 87, 0.7);
  --color-10: #7ed957;
  --color-11: rgba(126, 217, 87, 0.6);
  --color-12: rgba(126, 217, 87, 0.4);
  --size: 0.6px;

  width: calc(100 * var(--size));
  height: calc(100 * var(--size));
  background: linear-gradient(
    165deg,
    var(--color-1) 0%,
    var(--color-2) 40%,
    var(--color-3) 98%,
    var(--color-4) 100%
  );
  border-radius: 50%;
  position: relative;
}

.pt-sphere:before {
  position: absolute;
  content: '';
  width: 100%;
  height: 100%;
  border-radius: 100%;
  border-bottom: 0 solid var(--color-5);
  box-shadow:
    0 calc(-10 * var(--size)) calc(20 * var(--size)) calc(20 * var(--size)) var(--color-6) inset,
    0 calc(-5 * var(--size)) calc(15 * var(--size)) calc(10 * var(--size)) var(--color-7) inset,
    0 calc(-2 * var(--size)) calc(5 * var(--size)) var(--color-8) inset,
    0 calc(-3 * var(--size)) calc(2 * var(--size)) var(--color-9) inset,
    0 calc(2 * var(--size)) 0 var(--color-10),
    0 calc(2 * var(--size)) calc(3 * var(--size)) var(--color-10),
    0 calc(5 * var(--size)) calc(5 * var(--size)) var(--color-11),
    0 calc(10 * var(--size)) calc(15 * var(--size)) var(--color-12),
    0 calc(10 * var(--size)) calc(20 * var(--size)) calc(20 * var(--size)) var(--color-6);
  filter: blur(calc(3 * var(--size)));
  animation: 2s rotate linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  background: white;
  color: var(--text-dark);
  padding: 0.875rem 1.25rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  pointer-events: all;
  animation: toast-slide-down 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-width: 90vw;
  width: max-content;
  border: 1px solid rgba(0,0,0,0.05);
  font-weight: 500;
  font-size: 0.95rem;
}

.toast.toast-hiding {
  animation: toast-fade-out 0.3s ease-in forwards;
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  background: rgba(126, 217, 87, 0.15);
  color: #5da83f;
}

.toast-error .toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.toast-warning .toast-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.toast-info .toast-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

@keyframes toast-slide-down {
  0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-fade-out {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-15px) scale(0.95); }
}

.pt-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 1rem;
  letter-spacing: 0.5px;
  animation: pulse-text 2s infinite ease-in-out;
  display: none;
}
.pt-text.active {
  display: block;
}
@keyframes pulse-text {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════
   SETTINGS VIEW
═══════════════════════════════════════ */
#view-settings {
  /* Inherits from view-pane */
}

.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.settings-tab {
  flex: 1;
  padding: 1rem;
  background: transparent;
  border: none;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
}

.settings-tab:hover {
  background: rgba(0,0,0,0.02);
  color: var(--text-dark);
}

.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: white;
}

.settings-tab.text-danger.active {
  color: #ef4444;
  border-bottom-color: #ef4444;
}

.settings-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.settings-pane.active {
  display: block;
}

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.template-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
  text-align: center;
  position: relative;
}

.template-card:hover:not(.disabled) {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(126, 217, 87, 0.15);
  transform: translateY(-2px);
}

.template-card.active {
  border-color: var(--primary);
  background: rgba(126, 217, 87, 0.05);
  box-shadow: 0 0 0 1px var(--primary);
}

.template-card.disabled {
  cursor: not-allowed;
  opacity: 0.7;
  background: #f8fafc;
}

.template-preview {
  height: 180px;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.template-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.template-badge {
  display: none;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.template-card.active .template-badge {
  display: block;
}

.template-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.prefix-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}
.prefix-item.active {
  border-color: var(--primary);
  background: rgba(126, 217, 87, 0.05);
}
.prefix-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.prefix-tag {
  background: white;
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
  font-size: 1.1rem;
}

/* ═══════════════════════════════════════
   MOBILE RESPONSIVE STYLES
═══════════════════════════════════════ */
@media (max-width: 768px) {
  /* ─── DOCK MOBIL PREMIUM UYARLAMA ─── */
  .dock-wrapper {
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 0;
    transform: none;
    padding-bottom: env(safe-area-inset-bottom); /* iOS support */
  }
  .dock-panel {
    width: 100%;
    border-radius: 20px 20px 0 0;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    justify-content: space-around;
    padding: 0.75rem 0.5rem 1rem 0.5rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.04);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    backdrop-filter: blur(24px) saturate(200%);
  }
  .dock-item {
    width: 60px !important;
    height: auto !important;
    gap: 4px;
    background: transparent !important;
  }
  .dock-icon {
    width: 44px !important;
    height: 44px !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 12px;
    transition: all 0.2s ease;
  }
  .dock-icon svg {
    width: 26px !important;
    height: 26px !important;
    color: #1a1d26 !important; /* Unselected icons are black */
    opacity: 0.6;
  }
  
  /* Seçili Tab (Active) */
  .dock-item.active .dock-icon {
    background: var(--amber-bg) !important;
  }
  .dock-item.active .dock-icon svg {
    color: var(--amber) !important; /* Seçili olanlar tema yeşili */
    opacity: 1;
  }
  
  .dock-label {
    display: none !important;
  }
  .dock-item.active .dock-label {
    display: none !important;
  }
  .dock-divider {
    display: none;
  }

  /* ─── GENEL YERLEŞİM & NATIVE SCROLL (iOS Scroll to Top Support) ─── */
  #app-container {
    height: auto !important;
    min-height: 100vh;
    display: block !important; /* Stop flex so body can scroll naturally */
  }
  
  .app-container {
    padding-bottom: 0 !important; /* Managed by main-content instead */
  }
  
  .main-content {
    margin-left: 0;
    padding: 1rem 1.25rem !important; /* Add left and right padding to prevent squished look */
    padding-bottom: 90px !important; /* Reduced bottom padding to keep print button safely above the dock */
    height: auto !important; /* Allow content to dictate height */
    overflow-y: visible !important; /* Let the body scroll instead of this div */
  }
  /* ─── GİRİŞ (LOGIN) MOBİL TASARIMI ─── */
  .login-layout.active {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    touch-action: none !important;
    display: block !important;
  }
  .login-right {
    min-height: 100dvh !important;
    width: 100% !important;
    padding: 2rem 1.5rem !important; /* Slightly wider side padding */
    justify-content: center !important;
    background: #ffffff !important;
  }
  .login-mobile-logo {
    margin-bottom: 2.5rem !important;
  }
  .login-mobile-logo img {
    height: 64px !important; /* Bigger logo on mobile */
  }
  .login-card {
    border: none !important;
    box-shadow: none !important;
    padding: 1.5rem 0 !important; /* Remove horizontal padding so inputs span full width */
    background: transparent !important; /* Blend with background */
  }
  .login-header h1 {
    font-size: 1.75rem !important; /* Bigger welcome text */
  }
  .lf-input {
    height: 54px !important; /* Huge tap-friendly inputs */
    font-size: 1rem !important;
    border-radius: 12px !important;
  }
  .lf-submit-btn {
    height: 54px !important; /* Huge submit button */
    font-size: 1.05rem !important;
    border-radius: 12px !important;
    margin-top: 1rem !important;
  }
  .login-header-icon {
    width: 60px !important;
    height: 60px !important;
    border-radius: 16px !important;
  }
  .login-header-icon svg {
    width: 28px !important;
    height: 28px !important;
  }

  /* ─── KARGO FİŞİ OLUŞTURMA (PREMIUM MOBILE LAYOUT) ─── */
  .slip-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  
  #view-slip .card-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  
  .mode-toggle-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  .desi-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
  }
  
  /* Make the 4th item (Gerçek Ağırlık) span 2 columns to look balanced */
  .desi-input-wrapper:nth-child(4) {
    grid-column: span 2;
  }
  
  .desi-input-wrapper {
    margin-bottom: 0 !important;
  }
  
  /* ─── YAZDIRMA SEÇENEKLERİ (MOBİL SIKIŞTIRMA) ─── */
  .print-options-card .card-body {
    padding: 0.75rem !important; /* Further reduce from 1rem */
  }
  .print-options-card .form-section-title {
    margin-bottom: 0.25rem !important;
    font-size: 0.85rem !important;
  }
  .print-options-card .text-muted.mt-1 {
    margin-bottom: 0.75rem !important; /* Reduce from 1rem */
    font-size: 0.75rem !important;
  }
  .copy-count-row {
    margin-bottom: 0.75rem !important; /* Reduce from 1rem */
  }
  .print-divider {
    margin: 0.75rem 0 !important; /* Reduce from 1rem */
  }
  .print-summary {
    margin-bottom: 0.75rem !important; /* Reduce from 1rem */
    padding: 0.5rem !important; /* Reduce padding */
    font-size: 0.75rem !important;
  }
  .btn-print-huge {
    margin-top: 0.25rem !important; /* Reduce margin */
    padding: 1rem !important; /* Slightly smaller padding */
    font-size: 1.15rem !important;
  }
  
  /* Preview area styling for mobile */
  .label-preview-wrap {
    overflow-x: auto;
    display: flex;
    justify-content: center;
    padding: 1.5rem 0;
    margin: 0 -1.5rem; /* Bleed out of card padding for full width feel */
    background: #f8fafc; /* Subtle background to separate it */
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  
  .label-page {
    /* Scale down perfectly to fit mobile screens (~350px width max) */
    transform: scale(0.85);
    transform-origin: top center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  }

  /* Sticky or huge print button enhancement for mobile */
  .btn-print-huge {
    padding: 1.25rem !important;
    font-size: 1.25rem !important;
    border-radius: 16px !important;
    margin-top: 1rem;
    box-shadow: 0 8px 20px rgba(126, 217, 87, 0.3) !important;
  }

  /* ─── PAGE HEADER & SEARCH BAR (MOBİL) ─── */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }
  .page-header .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Fix logo centering on view-slip */
  #view-slip .page-header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  #view-slip .page-header img {
    height: 60px !important;
    margin-left: 1rem !important;
  }

  .search-bar {
    flex-direction: column;
  }

  /* ─── MÜŞTERİ TABLOSUNU ŞIK KARTLARA ÇEVİRME ─── */
  .table-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap th,
  .table-wrap td,
  .table-wrap tr {
    display: block;
  }
  .table-wrap thead {
    display: none; /* Tablo başlığını gizle */
  }
  .table-wrap tbody tr {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow-sm);
  }
  .table-wrap td {
    border: none !important;
    padding: 0.5rem 0 !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    border-bottom: 1px dashed var(--border) !important;
  }
  .table-wrap td:last-child {
    border-bottom: none !important;
    margin-top: 0.75rem;
    padding-top: 1rem !important;
    justify-content: space-between; /* Space out buttons */
    gap: 0.5rem;
  }
  .table-wrap td:last-child .btn {
    flex: 1; /* Make buttons equal width */
    justify-content: center;
  }
  
  /* Kolon başlıklarını td'lerin soluna ekleyelim */
  .table-wrap td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
  }
  .table-wrap td:last-child::before {
    display: none; /* Butonların olduğu kolonda başlığı gizle */
  }

  /* ─── ŞİRKETİM & AYARLAR ─── */
  .company-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .settings-tabs {
    flex-wrap: wrap;
  }
  .settings-tab {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
    flex: 1; /* Make tabs span evenly */
  }
  .template-grid {
    grid-template-columns: 1fr !important; /* Templates full width on small screens */
    gap: 1rem !important;
  }
  .company-form-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  /* Settings Kargo Kodu input flex */
  #settings-tab-code > div[style*="display: flex; gap: 0.75rem;"] {
    max-width: 100% !important;
    flex-direction: column !important;
  }
  #settings-tab-code > div[style*="display: flex; gap: 0.75rem;"] .btn {
    width: 100%;
  }
  #prefix-list {
    max-width: 100% !important;
  }
}
