/* TeknikServisTakip Web Teması — mobil koyu tema eşdeğeri */
:root {
  --bg:           #0A0E1A;
  --bg-card:      #111827;
  --bg-elevated:  #1C2536;
  --bg-hover:     #1F2A3F;

  --accent:       #F5C518;
  --accent-hover: #FFD534;
  --accent-soft:  rgba(245, 197, 24, 0.12);

  --t1: #F1F5F9;
  --t2: #94A3B8;
  --t3: #475569;

  --border:       rgba(255, 255, 255, 0.08);
  --border-strong:rgba(255, 255, 255, 0.16);

  --status-pending:     #94A3B8;
  --status-assigned:    #3B82F6;
  --status-in_progress: #F59E0B;
  --status-completed:   #10B981;
  --status-cancelled:   #EF4444;

  --danger: #EF4444;
  --success:#10B981;
  --info:   #3B82F6;
  --warn:   #F59E0B;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 24px;

  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-elev: 0 8px 32px rgba(0, 0, 0, 0.35);

  --header-h: 72px;
  --drawer-w: 280px;
}

/* RESET / BASE */
* { box-sizing: border-box; }
html {
  overflow-x: hidden;
}
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--t1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* Bootstrap dark override */
.bg-app       { background: var(--bg) !important; }
.bg-card      { background: var(--bg-card) !important; }
.bg-elevated  { background: var(--bg-elevated) !important; }
.text-t1 { color: var(--t1) !important; }
.text-t2 { color: var(--t2) !important; }
.text-t3 { color: var(--t3) !important; }
.text-accent { color: var(--accent) !important; }
.border-soft { border: 1px solid var(--border) !important; }

/* HEADER */
.app-header {
  position: sticky; top: 0; z-index: 1030;
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px;
  gap: 12px;
}
.app-header .header-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--t1);
  cursor: pointer; transition: background .15s;
}
.app-header .header-btn:hover { background: var(--bg-hover); }
.app-header .header-btn.accent { background: var(--accent); color: #000; border-color: transparent; }
.app-header .header-btn.accent:hover { background: var(--accent-hover); }
.app-header .title-block { min-width: 0; }
.app-header .title-block .title {
  font-weight: 700; font-size: 16px; color: var(--t1); margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .title-block .subtitle { font-size: 12px; color: var(--t2); margin: 0; }
.app-header .title-block .brand-name {
  font-weight: 700; font-size: 15px; color: var(--t1); margin: 0;
  line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header .app-brand {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.app-header .app-brand .brand-logo {
  height: calc(var(--header-h) - 16px); max-height: 56px;
  width: auto; max-width: 200px; object-fit: contain;
  flex-shrink: 0;
}
.app-header .app-brand .brand-fallback {
  width: 52px; height: 52px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 22px;
}
@media (max-width: 480px) {
  .app-header .app-brand .brand-logo { max-width: 120px; }
  .app-header .app-brand .brand-fallback { width: 40px; height: 40px; font-size: 18px; }
  .app-header .title-block .title { font-size: 14px; }
}
.app-header .badge-dot {
  position: absolute; top: -4px; right: -4px;
  background: var(--info); color: #fff; font-size: 10px;
  min-width: 18px; height: 18px; border-radius: 9px;
  padding: 0 5px; display: inline-flex; align-items: center; justify-content: center;
}
.relative-pos { position: relative; }

/* DRAWER (offcanvas) */
.app-drawer {
  background: var(--bg-card); color: var(--t1);
  border-right: 1px solid var(--border);
  width: var(--drawer-w);
  display: flex; flex-direction: column;
}
.app-drawer .drawer-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.app-drawer .avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.app-drawer .user-name { font-weight: 600; color: var(--t1); margin: 0; font-size: 15px; }
.app-drawer .user-role { color: var(--t2); margin: 0; font-size: 12px; }
.app-drawer .drawer-list { list-style: none; padding: 10px 8px; margin: 0; flex: 1; overflow-y: auto; }
.app-drawer .drawer-list li { margin-bottom: 2px; }
.app-drawer .drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; color: var(--t1);
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: background .18s ease, transform .18s ease;
  position: relative;
}
.app-drawer .drawer-link .icon-tile {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--icon-color, var(--accent)) 14%, transparent);
  color: var(--icon-color, var(--accent));
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.app-drawer .drawer-link .icon-tile i { font-size: 18px; line-height: 1; }
.app-drawer .drawer-link .label { flex: 1; min-width: 0; }
.app-drawer .drawer-link .arrow {
  font-size: 14px; opacity: 0; color: var(--t3);
  transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.app-drawer .drawer-link:hover {
  background: var(--bg-hover); color: var(--t1);
}
.app-drawer .drawer-link:hover .icon-tile {
  background: color-mix(in srgb, var(--icon-color, var(--accent)) 22%, transparent);
  transform: scale(1.06);
}
.app-drawer .drawer-link:hover .arrow { opacity: 0.7; transform: translateX(0); }
.app-drawer .drawer-link.active {
  background: color-mix(in srgb, var(--icon-color, var(--accent)) 14%, transparent);
  color: var(--t1);
}
.app-drawer .drawer-link.active::before {
  content: ''; position: absolute; left: -8px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--icon-color, var(--accent));
}
.app-drawer .drawer-link.active .icon-tile {
  background: var(--icon-color, var(--accent));
  color: #0A0E1A;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--icon-color, var(--accent)) 35%, transparent);
}
.app-drawer .drawer-link.active .arrow { opacity: 1; transform: translateX(0); color: var(--icon-color, var(--accent)); }
.app-drawer .drawer-link.logout:hover { background: rgba(239,68,68,0.08); }

.app-drawer .drawer-divider {
  height: 1px; margin: 10px 12px;
  background: var(--border); list-style: none;
}

/* Action Links — Card action buttons */
.action-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; color: var(--t1);
  text-decoration: none; border-radius: 10px;
  font-size: 14px; font-weight: 500;
  transition: background .18s ease;
  position: relative;
}
.action-link .icon-tile {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--icon-color, var(--accent)) 14%, transparent);
  color: var(--icon-color, var(--accent));
  transition: background .18s ease, transform .18s ease;
}
.action-link .icon-tile i { font-size: 18px; line-height: 1; }
.action-link .label { flex: 1; min-width: 0; }
.action-link:hover { background: var(--bg-hover); }
.action-link:hover .icon-tile {
  background: color-mix(in srgb, var(--icon-color, var(--accent)) 22%, transparent);
  transform: scale(1.06);
}

/* Customer card action buttons — 3 buton yan yana, mobilde sarma */
.customer-card-actions {
  display: flex;
  gap: 6px;
  justify-content: stretch;
}
.customer-card-actions .action-link {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 8px;
  gap: 6px;
}
.customer-card-actions .action-link .label {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 400px) {
  .customer-card-actions {
    flex-direction: column;
    gap: 4px;
  }
  .customer-card-actions .action-link {
    flex-direction: row;
    padding: 9px 12px;
  }
}

.app-drawer .drawer-footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px; border-top: 1px solid var(--border);
}

/* CONTENT */
.app-content {
  padding: 16px;
  max-width: 1280px;
  margin: 0 auto;
  background: var(--bg);
  color: var(--t1);
  min-height: calc(100vh - var(--header-h));
  overflow-x: hidden;
}
@media (min-width: 1200px) {
  .app-content { padding: 24px 32px; }
}

/* CARDS */
.tst-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.tst-card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.section-title {
  font-size: 13px; color: var(--t2); text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600; margin: 0 0 12px;
}

/* STAT CARD */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-label { color: var(--t2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.stat-card .stat-value { color: var(--t1); font-size: 28px; font-weight: 700; line-height: 1; }
.stat-card .stat-icon { color: var(--accent); font-size: 24px; }

/* SERVICE CARD */
.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 14px 20px;
  margin-bottom: 10px;
  display: block; color: inherit; text-decoration: none;
  overflow: hidden;
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.service-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: inherit;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.22);
}
.service-card::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
}
.service-card.s-pending::before     { background: var(--status-pending); }
.service-card.s-assigned::before    { background: var(--status-assigned); }
.service-card.s-in_progress::before { background: var(--status-in_progress); }
.service-card.s-completed::before   { background: var(--status-completed); }
.service-card.s-cancelled::before   { background: var(--status-cancelled); }

.sc-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sc-date   { font-size: 11px; color: var(--t3); white-space: nowrap; }
.service-card .sc-title { font-size: 15px; color: var(--t1); font-weight: 600; margin: 0 0 10px; line-height: 1.4; }
.sc-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.service-card .sc-meta { font-size: 12px; color: var(--t2); display: flex; gap: 10px; flex-wrap: wrap; }
.service-card .sc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.sc-arrow { color: var(--t3); font-size: 13px; flex-shrink: 0; transition: transform .15s, color .15s; }
.service-card:hover .sc-arrow { transform: translateX(3px); color: var(--t2); }

/* STATUS BADGE */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; }
.s-pending     { background: rgba(148,163,184,.15); color: var(--status-pending); }
.s-pending     .dot { background: var(--status-pending); }
.s-assigned    { background: rgba(59,130,246,.15);  color: var(--status-assigned); }
.s-assigned    .dot { background: var(--status-assigned); }
.s-in_progress { background: rgba(245,158,11,.15);  color: var(--status-in_progress); }
.s-in_progress .dot { background: var(--status-in_progress); }
.s-completed   { background: rgba(16,185,129,.15);  color: var(--status-completed); }
.s-completed   .dot { background: var(--status-completed); }
.s-cancelled   { background: rgba(239,68,68,.15);   color: var(--status-cancelled); }
.s-cancelled   .dot { background: var(--status-cancelled); }

/* BUTTONS */
.btn-accent {
  background: var(--accent); color: #000;
  border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 12px 20px; font-weight: 600; min-height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #000; }
.btn-elevated {
  background: var(--bg-elevated); color: var(--t1);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 20px; min-height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-elevated:hover { background: var(--bg-hover); color: var(--t1); border-color: var(--border-strong); }
.btn-danger-tst {
  background: var(--danger); color: #fff; border: 1px solid var(--danger);
  border-radius: var(--radius); padding: 12px 20px; min-height: 50px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

/* Bootstrap Button Overrides for Dark Theme */
.btn { color: var(--t1) !important; }
.btn-secondary { background: var(--bg-elevated); border-color: var(--border) !important; color: var(--t1) !important; }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong) !important; }
.btn-primary { background: var(--accent); border-color: var(--accent) !important; color: #000 !important; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover) !important; }
.btn-danger { background: var(--danger); border-color: var(--danger) !important; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626 !important; }
.btn-outline-secondary { background: transparent; border-color: var(--border) !important; color: var(--t1) !important; }
.btn-outline-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong) !important; }
.btn-outline-primary { background: transparent; border-color: var(--accent) !important; color: var(--accent) !important; }
.btn-outline-primary:hover { background: rgba(245, 197, 24, 0.1); border-color: var(--accent-hover) !important; color: var(--accent-hover) !important; }
.btn-check:checked + .btn-outline-primary { background: var(--accent-soft); border-color: var(--accent) !important; color: var(--accent) !important; }
.btn-check:checked + .btn-outline-secondary { background: var(--bg-hover); border-color: var(--border-strong) !important; color: var(--t1) !important; }

/* Bootstrap Card Overrides */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-header { background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.card-body { color: var(--t1); }
.card-footer { background: var(--bg-elevated); border-top: 1px solid var(--border); }

/* Bootstrap Alert Overrides */
.alert { border-radius: var(--radius-sm); }
.alert-danger { background: rgba(239,68,68,.1); color: #fca5a5; border-color: rgba(239,68,68,.3) !important; }
.alert-info { background: rgba(59,130,246,.1); color: #93c5fd; border-color: rgba(59,130,246,.3) !important; }

/* Bootstrap Form Overrides */
.form-label { color: var(--t2); }
.form-control { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--t1); }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 0.2rem rgba(245, 197, 24, 0.12); }
.form-control::placeholder { color: var(--t3); }

/* Bootstrap Container Overrides */
.container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl, .container-fluid {
  background: var(--bg);
  color: var(--t1);
}

/* Bootstrap Row/Col Overrides */
.row {
  background: var(--bg);
}
[class*="col-"] {
  background: var(--bg);
  color: var(--t1);
}

/* Bootstrap Text Utilities */
.text-muted { color: var(--t2) !important; }
.text-white { color: var(--t1) !important; }
.text-dark { color: var(--t1) !important; }

/* FORMS */
.tst-field {
  margin-bottom: 16px;
}
.tst-field label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--t2);
  margin-bottom: 7px; font-weight: 600;
  letter-spacing: 0.01em;
}
.tst-input-wrap {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .18s, box-shadow .18s;
  min-height: 50px;
}
.tst-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.12);
}
.tst-input-wrap .icon {
  padding: 0 13px; color: var(--t3); font-size: 17px;
  transition: color .18s;
}
.tst-input-wrap:focus-within .icon { color: var(--accent); }
.tst-input-wrap input,
.tst-input-wrap select,
.tst-input-wrap textarea {
  background: transparent; border: 0; outline: none;
  color: var(--t1); flex: 1;
  padding: 13px 12px 13px 0;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
}
.tst-input-wrap textarea { resize: vertical; min-height: 80px; padding-top: 14px; }
.tst-input-wrap input::placeholder,
.tst-input-wrap textarea::placeholder { color: var(--t3); }
.tst-input-wrap select option { background: var(--bg-elevated); color: var(--t1); }

/* Password toggle button */
.tst-input-action {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 100%;
  background: none; border: none; cursor: pointer;
  color: var(--t3); font-size: 17px;
  padding: 0; flex-shrink: 0;
  transition: color .18s;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.tst-input-action:hover { color: var(--t1); }
.tst-input-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* AUTH PAGES */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px 32px;
  box-shadow: var(--shadow-elev), 0 0 0 1px rgba(255,255,255,0.03);
}
.auth-card .brand {
  text-align: center; margin-bottom: 28px;
}
.auth-card .brand .logo {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--accent); color: #000;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; margin-bottom: 12px;
}
.auth-card h1 { font-size: 22px; margin: 0 0 6px; color: var(--t1); font-weight: 700; }
.auth-card .lead { color: var(--t2); margin: 0 0 24px; font-size: 14px; }

.auth-divider {
  height: 1px; background: var(--border);
  margin: 24px 0; border: none;
}

.auth-section-title {
  font-size: 12px; color: var(--t2); text-transform: uppercase;
  letter-spacing: 0.5px; font-weight: 600;
  margin: 16px 0 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}

/* FLASHES / TOAST */
.tst-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  font-size: 14px;
  border: 1px solid var(--border);
}
.tst-alert.success { background: rgba(16,185,129,.1); color: #6EE7B7; border-color: rgba(16,185,129,.3); }
.tst-alert.error   { background: rgba(239,68,68,.1);  color: #FCA5A5; border-color: rgba(239,68,68,.3); }
.tst-alert.info    { background: rgba(59,130,246,.1); color: #93C5FD; border-color: rgba(59,130,246,.3); }

#toast-container {
  position: fixed; right: 16px; top: 80px; z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}
@media (max-width: 480px) {
  #toast-container {
    right: 8px; left: 8px; top: 76px;
    max-width: none;
  }
  .tst-toast { min-width: 0; max-width: none; width: 100%; }
}
.tst-toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--t1);
  box-shadow: var(--shadow-elev);
  min-width: 240px; max-width: 360px;
  pointer-events: auto;
  animation: slideIn .25s ease-out;
}
.tst-toast.success { border-left-color: var(--success); }
.tst-toast.error   { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* TIMELINE (customer durum gösterimi) */
.tst-timeline { padding: 8px 0; }
.tst-timeline .step { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.tst-timeline .step:last-child { padding-bottom: 0; }
.tst-timeline .step::before {
  content: ''; position: absolute;
  left: 11px; top: 26px; bottom: -4px;
  width: 2px; background: var(--border);
}
.tst-timeline .step:last-child::before { display: none; }
.tst-timeline .step .dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg-elevated); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; z-index: 1;
}
.tst-timeline .step.done .dot { background: var(--success); border-color: var(--success); color: #000; }
.tst-timeline .step.active .dot { background: var(--accent); border-color: var(--accent); color: #000; }
.tst-timeline .step .body { padding-top: 2px; }
.tst-timeline .step .body .label { font-weight: 600; color: var(--t1); font-size: 14px; }
.tst-timeline .step .body .meta  { color: var(--t2); font-size: 12px; }

/* MODAL (Bootstrap override) */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--t1);
}
.modal-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  color: var(--t1);
}
.modal-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}
.modal-title {
  color: var(--t1) !important;
}
.btn-close {
  filter: invert(1) !important;
}

/* TABLE */
.tst-table {
  width: 100%;
  border-collapse: collapse;
}
.tst-table th, .tst-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.tst-table th {
  background: var(--bg-elevated);
  color: var(--t2);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.4px;
}
.tst-table tbody tr:hover { background: var(--bg-hover); }
.tst-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

/* EMPTY STATE */
.empty-state {
  text-align: center; padding: 48px 16px;
  color: var(--t2);
}
.empty-state i { font-size: 48px; color: var(--t3); margin-bottom: 12px; display: block; }
.empty-state .title { color: var(--t1); font-weight: 600; margin-bottom: 4px; }

/* SIGNATURE PAD */
.signature-pad-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  position: relative;
}
.signature-pad-wrap canvas { width: 100%; height: 200px; display: block; }

/* FILTER BAR */
.filter-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.filter-bar .filter-search {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: border-color .15s, box-shadow .15s;
}
.filter-bar .filter-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.filter-bar .filter-search .icon {
  padding: 0 12px; color: var(--t2); font-size: 16px;
}
.filter-bar .filter-search input {
  flex: 1; background: transparent; border: 0; outline: none;
  color: var(--t1); font-size: 14px; padding: 10px 12px 10px 0;
}
.filter-bar .filter-search input::placeholder { color: var(--t3); }
.filter-bar .filter-search .clear-btn {
  background: transparent; border: 0; color: var(--t3);
  padding: 0 12px; cursor: pointer; font-size: 14px;
}
.filter-bar .filter-search .clear-btn:hover { color: var(--t1); }

.filter-bar .filter-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px; margin-top: 12px;
}

.chip-group {
  display: flex; flex-wrap: wrap; gap: 6px;
  flex: 1; min-width: 0;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--t2);
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.chip:hover { background: var(--bg-hover); color: var(--t1); border-color: var(--border-strong); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); }
.chip .count {
  background: rgba(255,255,255,.06); color: var(--t2);
  font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  min-width: 20px; text-align: center;
}
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.chip.active .count { background: rgba(245,197,24,.2); color: var(--accent); }
.chip.chip-pending.active     { background: rgba(148,163,184,.18); border-color: var(--status-pending);     color: var(--status-pending); }
.chip.chip-pending.active .count     { background: rgba(148,163,184,.25); color: var(--status-pending); }
.chip.chip-pending     .dot { background: var(--status-pending); }
.chip.chip-assigned.active    { background: rgba(59,130,246,.18);  border-color: var(--status-assigned);    color: var(--status-assigned); }
.chip.chip-assigned.active .count    { background: rgba(59,130,246,.25); color: var(--status-assigned); }
.chip.chip-assigned    .dot { background: var(--status-assigned); }
.chip.chip-in_progress.active { background: rgba(245,158,11,.18);  border-color: var(--status-in_progress); color: var(--status-in_progress); }
.chip.chip-in_progress.active .count { background: rgba(245,158,11,.25); color: var(--status-in_progress); }
.chip.chip-in_progress .dot { background: var(--status-in_progress); }

.chip-clear {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px;
  font-size: 12px; color: var(--t3);
  background: transparent; border: 1px dashed var(--border-strong);
  text-decoration: none;
}
.chip-clear:hover { color: var(--t1); border-color: var(--t2); }

.filter-bar .page-size {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px 4px 12px;
  font-size: 12px; color: var(--t2);
}
.filter-bar .page-size select {
  background: transparent; border: 0; outline: none;
  color: var(--t1); font-size: 13px; font-weight: 500;
  padding: 4px 4px 4px 0; cursor: pointer;
}
.filter-bar .page-size select option { background: var(--bg-elevated); color: var(--t1); }

.filter-summary {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--t3);
  margin-bottom: 12px;
}
.filter-summary strong { color: var(--t1); font-weight: 600; }

/* NOTIFICATION PANEL */
.notif-panel-popup {
  position: fixed;
  top: 80px;
  right: 12px;
  width: min(380px, calc(100vw - 24px));
  max-width: min(380px, calc(100vw - 24px));
  max-height: 70vh;
  z-index: 1060;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-elev), 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  animation: notifSlideIn 0.18s cubic-bezier(0.16,1,0.3,1);
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.notif-unread-badge {
  background: var(--info);
  color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
}
.notif-action-btn {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--t3);
  cursor: pointer;
  font-size: 13px;
  transition: background .15s, color .15s, border-color .15s;
}
.notif-action-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--t1);
}

.notif-panel-list {
  max-height: calc(70vh - 60px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.notif-panel-list::-webkit-scrollbar { width: 4px; }
.notif-panel-list::-webkit-scrollbar-track { background: transparent; }
.notif-panel-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.notif-item {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.notif-item:last-child { margin-bottom: 0; }
.notif-item.unread {
  background: var(--bg-elevated);
  border-color: var(--border);
  border-left: 3px solid var(--accent);
}
.notif-item.read {
  background: transparent;
  border-color: transparent;
}
.notif-item:hover { background: var(--bg-hover); border-color: var(--border); }

.notif-item-icon {
  width: 34px; height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  margin-top: 1px;
}
.notif-item.unread .notif-item-icon { background: var(--accent-soft); color: var(--accent); }
.notif-item.read .notif-item-icon { background: var(--bg-elevated); color: var(--t3); }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 13px; font-weight: 600;
  color: var(--t1);
  margin-bottom: 2px;
  white-space: normal; overflow-wrap: break-word; word-break: break-word;
}
.notif-item.read .notif-item-title { color: var(--t2); font-weight: 500; }
.notif-item-msg { font-size: 12px; color: var(--t2); line-height: 1.45; overflow-wrap: break-word; word-break: break-word; }
.notif-item-time { font-size: 11px; color: var(--t3); margin-top: 4px; }

.notif-item-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .15s;
}
.notif-item:hover .notif-item-actions { opacity: 1; }
.notif-mini-btn {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--t2);
  cursor: pointer;
  font-size: 12px;
  transition: background .12s, color .12s, border-color .12s;
}
.notif-mini-btn:hover { background: var(--bg-hover); color: var(--t1); border-color: var(--border-strong); }
.notif-mini-btn.danger:hover { background: rgba(239,68,68,0.15); color: var(--danger); border-color: rgba(239,68,68,0.3); }

.notif-empty {
  text-align: center;
  padding: 36px 16px;
}
.notif-empty i { font-size: 38px; color: var(--t3); display: block; margin-bottom: 10px; opacity: 0.5; }
.notif-empty span { font-size: 13px; color: var(--t3); }

/* GRID LAYOUT */
.row {
  display: flex;
  flex-wrap: wrap;
}
.row .col-12, .row .col-lg-6 {
  display: flex;
  flex-direction: column;
}

/* ======= FILE UPLOAD COMPONENT STYLES ======= */

/* UPLOAD ZONE - Drag & Drop Area */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: rgba(245, 197, 24, 0.02);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(245, 197, 24, 0.06);
}

.upload-zone.drag-active {
  border-color: var(--accent);
  background: rgba(245, 197, 24, 0.12);
  transform: scale(1.01);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.1);
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-zone-icon {
  font-size: 48px;
  color: var(--accent);
  display: block;
  line-height: 1;
}

.upload-zone-text {
  color: var(--t1);
  font-weight: 600;
  font-size: 16px;
  margin: 0;
  line-height: 1.3;
}

.upload-zone-hint {
  color: var(--t3);
  font-size: 13px;
  margin: 0;
  line-height: 1.3;
}

.upload-zone-support {
  font-size: 12px;
  color: var(--t2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  margin-top: 8px;
}

/* PREVIEW SECTION */
.upload-preview {
  display: none;
  width: 100%;
  box-sizing: border-box;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.preview-image {
  max-height: 100px;
  max-width: 100%;
  width: auto;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.preview-info {
  display: flex;
  align-items: center;
  font-size: 13px;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.preview-filename {
  color: var(--t1);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.preview-size {
  color: var(--t3);
  flex-shrink: 0;
  font-size: 11px;
}

.preview-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.preview-actions button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--t1);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  min-width: 0;
  white-space: nowrap;
}

.preview-actions button:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.preview-actions button:active {
  transform: scale(0.97);
}

.preview-actions button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--t1);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}

.preview-actions button:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.preview-actions button:active {
  transform: scale(0.97);
}

/* PROGRESS BAR */
.upload-progress {
  display: none;
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.upload-progress.active {
  display: block;
}

.progress-label {
  font-size: 13px;
  color: var(--t1);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-percent {
  font-weight: 600;
  color: var(--accent);
  min-width: 35px;
  text-align: right;
}

.progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  transition: width 0.3s ease;
  border-radius: 3px;
}

.btn-cancel {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--danger);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
  width: 100%;
  margin-top: 0 !important;
}

.btn-cancel:hover {
  background: #DC2626;
  border-color: var(--danger);
  opacity: 0.9;
}

/* VALIDATION MESSAGES */
.upload-message {
  display: none;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  margin: 12px 0;
  border-left: 3px solid;
  gap: 8px;
  align-items: center;
}

.upload-message.show {
  display: flex;
}

.upload-message.success {
  background: rgba(16, 185, 129, 0.1);
  color: #6EE7B7;
  border-left-color: var(--success);
}

.upload-message.success::before {
  content: "✓";
  font-weight: bold;
}

.upload-message.error {
  background: rgba(239, 68, 68, 0.1);
  color: #FCA5A5;
  border-left-color: var(--danger);
}

.upload-message.error::before {
  content: "✕";
  font-weight: bold;
}

.upload-message.warning {
  background: rgba(245, 158, 11, 0.1);
  color: #FBBF24;
  border-left-color: var(--warn);
}

.upload-message.warning::before {
  content: "⚠";
}

/* CIRCULAR PREVIEW (Profile Pictures) */
.preview-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto 20px;
  position: relative;
  flex-shrink: 0;
}

.preview-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-circle-initials {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

.upload-trigger-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.upload-trigger-badge:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.upload-trigger-badge:active {
  transform: scale(0.95);
}

/* CROP MODAL STYLES */
.crop-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}

.crop-modal.active {
  display: flex;
}

.crop-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-elev);
}

.crop-modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.crop-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  margin: 0;
}

.crop-modal-close {
  background: none;
  border: none;
  color: var(--t2);
  cursor: pointer;
  font-size: 24px;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.crop-modal-close:hover {
  color: var(--t1);
}

.crop-modal-body {
  padding: 16px;
}

.crop-container {
  position: relative;
  width: 100%;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.crop-container img {
  display: block;
  max-width: 100%;
}

.crop-modal-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.crop-modal-footer button {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.crop-modal-footer .btn-cancel {
  background: var(--bg-elevated);
  color: var(--t1);
  border: 1px solid var(--border);
  width: auto;
  margin: 0;
}

.crop-modal-footer .btn-cancel:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.crop-modal-footer .btn-crop {
  background: var(--accent);
  color: #000;
  border: none;
}

.crop-modal-footer .btn-crop:hover {
  background: var(--accent-hover);
}

/* UPLOAD FORM WRAPPER */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.upload-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.upload-actions button {
  flex: 1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .upload-zone {
    padding: 24px 16px;
    min-height: 160px;
  }

  .upload-zone-icon {
    font-size: 36px;
  }

  .upload-zone-text {
    font-size: 14px;
  }

  .preview-circle {
    width: 100px;
    height: 100px;
  }

  .preview-circle-initials {
    font-size: 40px;
  }

  .crop-modal-content {
    width: 95%;
    max-height: 85vh;
  }
}

@media (max-width: 480px) {
  .upload-zone {
    padding: 20px 12px;
    min-height: 140px;
    gap: 10px;
  }

  .upload-zone-icon {
    font-size: 32px;
  }

  .upload-zone-text {
    font-size: 13px;
  }

  .upload-zone-support {
    font-size: 11px;
    gap: 4px;
  }

  .preview-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .preview-actions {
    width: 100%;
  }

  .preview-actions button {
    flex: 1;
  }

  .crop-modal-footer {
    flex-direction: column-reverse;
  }

  .crop-modal-footer button {
    width: 100%;
  }
}

/* ACCESSIBILITY */
.upload-zone:focus,
.upload-trigger-badge:focus,
.crop-modal-close:focus,
.upload-message:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type="file"]:focus-visible {
  outline: none;
}

/* ======= END FILE UPLOAD COMPONENT STYLES ======= */

/* ======= PARTS MANAGER COMPONENT ======= */

/* Search area wrapper (gives dropdown its anchor) */
.parts-search-area {
  position: relative;
  /* Reserve vertical space so absolute dropdown doesn't overlap selected list */
  padding-bottom: 2px;
}

/* Search box */
.parts-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 0 14px;
  min-height: 50px;
  transition: border-color .2s, box-shadow .2s;
}
.parts-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245,197,24,.11), 0 2px 10px rgba(0,0,0,.22);
}
.parts-search-icon {
  color: var(--accent);
  font-size: 16px;
  flex-shrink: 0;
  opacity: .85;
  pointer-events: none;
}
.parts-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--t1);
  font-size: 14px;
  padding: 14px 0;
  min-width: 0;
}
.parts-search-input::placeholder { color: var(--t3); }
.parts-search-input:disabled     { color: var(--t3); cursor: not-allowed; }

/* Keyboard shortcut badge */
.parts-search-kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  color: var(--t3);
  font-size: 11px;
  font-family: inherit;
  background: var(--bg);
  white-space: nowrap;
  flex-shrink: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.parts-search-wrap:focus-within .parts-search-kbd { opacity: 0; }

/* Loading spinner inside search */
.parts-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.parts-spinner {
  display: block;
  width: 17px;
  height: 17px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: partsSpin .7s linear infinite;
}
@keyframes partsSpin { to { transform: rotate(360deg); } }

/* Hint text below search */
.parts-search-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--t3);
  padding-left: 4px;
}

/* No-depot warning */
.parts-no-depot {
  margin-bottom: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .28);
  color: #f59e0b;
  font-size: 12px;
  line-height: 1.5;
}

/* ── Results dropdown (absolute, floats over content) ─── */
.parts-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  overflow-y: auto;
  max-height: 380px;
  z-index: 200;
  box-shadow: 0 16px 40px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.25);
}
.parts-result-empty {
  padding: 18px;
  color: var(--t2);
  font-size: 13px;
  text-align: center;
}
.parts-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: default;
  transition: background .1s;
}
.parts-result-item:last-child { border-bottom: none; }
.parts-result-item:hover      { background: rgba(255,255,255,.04); }
.parts-result-item.is-added   { opacity: .6; }

/* Item image — bullet-proof fixed size */
.parts-ri {
  display: block;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.parts-ri-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--t3);
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

/* Item body */
.parts-ri-body {
  flex: 1;
  min-width: 0;
}
.parts-ri-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parts-ri-meta {
  font-size: 11px;
  color: var(--t2);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

/* Stock badge */
.parts-stock {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}
.parts-stock.ok  { background: rgba(34,197,94,.15); color: #22c55e; }
.parts-stock.out { background: rgba(239,68,68,.15);  color: #ef4444; }

/* Item right (price + action) */
.parts-ri-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.parts-ri-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.parts-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.parts-add-btn:hover  { opacity: .85; }
.parts-add-btn:active { transform: scale(.96); }

.parts-added-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #22c55e;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(34,197,94,.12);
  white-space: nowrap;
}

/* ── Selected parts list ──────────────────── */
.parts-selected-list {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Header row */
.parts-list-header {
  display: grid;
  grid-template-columns: 1fr 110px 130px 110px 36px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.parts-list-header .pcol-qty,
.parts-list-header .pcol-price,
.parts-list-header .pcol-total { text-align: center; }
.parts-list-header .pcol-action { /* empty */ }

/* Part row */
.parts-row {
  display: grid;
  grid-template-columns: 1fr 110px 130px 110px 36px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
.parts-row:last-child { border-bottom: none; }
.parts-row:hover      { background: rgba(255,255,255,.025); }

/* Row: product info cell */
.parts-row-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.parts-row-img {
  display: block;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}
.parts-row-img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--t3);
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.parts-row-text { min-width: 0; }
.parts-row-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parts-row-code {
  font-size: 11px;
  color: var(--t2);
  margin-top: 1px;
}

/* Row: qty cell */
.parts-row-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pqb {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--t1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background .12s, border-color .12s;
  flex-shrink: 0;
}
.pqb:hover:not(:disabled)  { background: var(--accent); color: #000; border-color: var(--accent); }
.pqb:disabled               { opacity: .35; cursor: not-allowed; }
.pq-inp {
  width: 42px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--t1);
  font-size: 13px;
  font-weight: 600;
  padding: 3px 4px;
  outline: none;
  -moz-appearance: textfield;
}
.pq-inp::-webkit-outer-spin-button,
.pq-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pq-inp:focus { border-color: var(--accent); }

/* Row: price edit button */
.pcol-price { display: flex; justify-content: center; }
.parts-price-edit {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--t1);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: border-color .12s, background .12s;
  white-space: nowrap;
}
.parts-price-edit:hover { border-color: var(--accent); background: rgba(245,197,24,.08); }

/* Row: total cell */
.pcol-total {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  text-align: center;
  white-space: nowrap;
}

/* Row: remove button */
.pcol-action { display: flex; justify-content: center; }
.parts-rm {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--t2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background .12s, color .12s, border-color .12s;
}
.parts-rm:hover { background: rgba(239,68,68,.1); color: #ef4444; border-color: rgba(239,68,68,.4); }

/* Total row */
.parts-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
}
.parts-total-row span:last-child {
  color: var(--accent);
  font-size: 16px;
}

/* ── Price edit modal ─────────────────────── */
.parts-price-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 1060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.parts-pm-inner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  width: 100%;
  max-width: 360px;
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
  overflow: hidden;
}
.parts-pm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
}
.parts-pm-close {
  background: transparent;
  border: none;
  color: var(--t2);
  cursor: pointer;
  font-size: 14px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .12s;
}
.parts-pm-close:hover { color: var(--t1); }
.parts-pm-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.parts-pm-product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.parts-pm-foot {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}
.parts-pm-foot .btn-elevated,
.parts-pm-foot .btn-accent {
  flex: 1;
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 640px) {
  /* Collapse grid to compact card per row */
  .parts-list-header {
    display: none; /* hide labels on mobile */
  }
  .parts-row {
    grid-template-columns: 1fr 36px;
    grid-template-rows: auto auto;
    gap: 6px;
  }
  .parts-row-info { grid-column: 1; grid-row: 1; }
  .pcol-action    { grid-column: 2; grid-row: 1; align-self: start; }
  .parts-row-qty,
  .pcol-price,
  .pcol-total {
    grid-column: 1;
  }
  .parts-row-qty  { grid-row: 2; justify-content: flex-start; }
  .pcol-price     { grid-row: 3; justify-content: flex-start; }
  .pcol-total     { grid-row: 4; text-align: left; }
  .parts-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto auto;
  }
  .parts-total-row span:last-child { font-size: 15px; }
}

/* ======= END PARTS MANAGER COMPONENT ======= */

/* ======= PAINT ORDERS MODERN DESIGN ======= */

/* Filter Section */
.paint-filters-section {
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.paint-filters-header {
  margin-bottom: 16px;
}

.paint-filters-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--t1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.paint-filters-title i {
  font-size: 16px;
  color: var(--accent);
}

.paint-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.paint-filter-check {
  display: none;
}

.paint-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--t2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.paint-filter-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--chip-color, var(--accent)), transparent);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.paint-filter-chip:hover {
  border-color: var(--chip-color, var(--accent));
  color: var(--t1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.paint-filter-chip:hover::before {
  opacity: 0.08;
}

.paint-filter-check:checked + .paint-filter-chip {
  background: var(--chip-color, var(--accent));
  border-color: var(--chip-color, var(--accent));
  color: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.paint-filter-check:checked + .paint-filter-chip::before {
  opacity: 0.2;
}

.paint-filter-chip-all {
  --chip-color: var(--accent);
}

/* Product Grid */
.paint-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

@media (min-width: 768px) {
  .paint-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .paint-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.paint-product-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.paint-product-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.paint-product-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  background: var(--bg-elevated);
  transition: transform 0.3s ease;
}

.paint-product-card:hover .paint-product-image {
  transform: scale(1.05);
}

.paint-product-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.paint-product-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--t1);
  margin: 0 0 6px;
  line-height: 1.3;
}

.paint-product-meta {
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 8px;
}

.paint-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.paint-product-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

.paint-product-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  background: var(--accent);
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.paint-product-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.05);
}

.paint-product-btn:active {
  transform: scale(0.95);
}

/* Selection Summary */
.paint-selection-card {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.paint-selection-empty {
  text-align: center;
  padding: 24px 12px;
}

.paint-selection-empty i {
  font-size: 48px;
  color: var(--t3);
  margin-bottom: 12px;
  opacity: 0.5;
}

.paint-selection-empty p {
  color: var(--t2);
  font-size: 14px;
}

/* ======= END PAINT ORDERS MODERN DESIGN ======= */

/* ── UNIVERSAL PAGER ─────────────────────────────────────── */
.uni-pager {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
}
.uni-pager a,
.uni-pager button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; border-radius: 9px;
  font-size: 13px; font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--t1);
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  padding: 0 10px;
}
.uni-pager a:hover { background: var(--bg-hover); border-color: var(--border-strong); color: var(--t1); }
.uni-pager .pg-active { background: var(--accent); border-color: var(--accent); color: #000; cursor: default; }
.uni-pager .pg-off    { opacity: .35; cursor: not-allowed; pointer-events: none; }
.uni-pager .pg-dots   { background: transparent; border-color: transparent; color: var(--t3); cursor: default; }
.uni-pager .pg-dots:hover { background: transparent; border-color: transparent; color: var(--t3); }

/* RESPONSIVE */
canvas { max-width: 100%; }

@media (max-width: 768px) {
  .app-content { padding: 12px; }
  .auth-card   { padding: 24px; }
  .filter-bar { padding: 12px; }
  .filter-bar .filter-row { gap: 8px; }
  .chip-group { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .filter-bar .page-size { width: 100%; justify-content: space-between; }

  /* Tablolar — yatay kaydırma */
  .tst-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Stat card değer font küçültme */
  .stat-card .stat-value { font-size: 22px; }

  /* uni-pager mobilde sarma */
  .uni-pager { flex-wrap: wrap; padding: 12px; }
}

@media (max-width: 480px) {
  .app-content { padding: 10px; }

  /* Row > col spacing daraltma */
  .row.g-3 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }

  /* Buton tam genişlik — tekli işlem butonları */
  .btn-accent.w-100, .btn-elevated.w-100, .btn-danger-tst.w-100 { font-size: 14px; padding: 10px 16px; min-height: 44px; }

  /* Service card meta metinleri küçült */
  .service-card .sc-meta { font-size: 11px; gap: 6px; }

  /* uni-pager butonları küçült */
  .uni-pager a, .uni-pager button { min-width: 32px; height: 32px; font-size: 12px; padding: 0 8px; }

  /* Stat card modern değer */
  .stat-card-modern .stat-card-value { font-size: 26px; }
}

