:root {
  --header-bg: #3d4f63;
  --header-text: #e8edf2;
  --sidebar-bg: #f4f6f9;
  --sidebar-border: #e1e6ed;
  --sidebar-width: 230px;
  --content-bg: #eef1f5;
  --card: #ffffff;
  --text: #2c3e50;
  --muted: #7f8c9a;
  --primary: #17a2d4;
  --primary-hover: #138eb8;
  --success: #28a745;
  --warning: #f0ad4e;
  --danger: #e74c3c;
  --border: #dee2e6;
  --table-head: #f8f9fb;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--content-bg);
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* —— Login —— */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(62, 198, 239, .18), transparent 60%),
    #2f4254;
}

.login-card {
  width: min(400px, 100%);
  background: var(--card);
  border-radius: 12px;
  padding: 40px 36px 32px;
  box-shadow: 0 18px 48px rgba(16, 28, 40, .28);
}

.brand { text-align: center; margin-bottom: 8px; }
.brand-logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 1.5rem; font-weight: 700; color: #173044;
}
.logo-mark { display: block; flex-shrink: 0; }
.brand-logo .logo-mark { width: 46px; height: 46px; }
.logo-word {
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-logo .logo-word { font-size: 1.75rem; color: #173044; }
.brand p { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }

.login-field { display: block; margin-top: 16px; }
.login-field span {
  display: block;
  margin-bottom: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: #3d4f63;
}
.login-field input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d5dde6;
  border-radius: 8px;
  font-size: .95rem;
  color: var(--text);
  background: #fff;
}
.login-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 162, 212, .16);
}
.error { color: var(--danger); font-size: .85rem; margin-top: 10px; }
.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-weight: 500;
  font-size: .85rem;
  color: #3d4f63;
  cursor: pointer;
  user-select: none;
}
.login-remember input {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}
.login-card .btn-block {
  margin-top: 20px;
  height: 44px;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
}
.license-banner {
  margin-top: 4px;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 500;
}
.license-banner--warn { color: #b45309; }
.license-info-platform {
  padding: 12px 14px;
  background: rgba(23, 162, 212, .08);
  border: 1px solid rgba(23, 162, 212, .25);
  border-radius: 4px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 4px;
}
.license-info-list {
  margin: 0;
  display: grid;
  gap: 12px;
}
.license-info-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
}
.license-info-row dt {
  margin: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}
.license-info-row dd {
  margin: 0;
  font-size: .92rem;
  font-weight: 500;
}
.license-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  background: #e9ecef;
  color: #495057;
}
.license-status-badge--active {
  background: rgba(40, 167, 69, .14);
  color: #1e7e34;
}
.license-status-badge--trial {
  background: rgba(23, 162, 212, .14);
  color: #0c7a9c;
}
.license-status-badge--expired,
.license-status-badge--suspended {
  background: rgba(231, 76, 60, .12);
  color: #c0392b;
}
.license-status-badge--warn {
  background: rgba(240, 173, 78, .18);
  color: #9a6b12;
}
.success-msg { color: var(--success); margin-top: 12px; }
.error-msg { color: var(--danger); margin: 8px 0 0; font-size: .85rem; }
.required { color: var(--danger); font-weight: 700; flex-shrink: 0; line-height: 1; }
.field-label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: .85rem; font-weight: 500;
}
.field-row {
  display: flex; align-items: center; gap: 6px;
}
.field-row input,
.field-row select {
  flex: 1; min-width: 0; width: auto;
}
.field-label > .wizard-input,
.field-label > select.wizard-input,
.field-label > textarea.wizard-input {
  width: 100%;
}

/* —— App shell —— */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: 50px minmax(0, 1fr);
  grid-template-areas:
    "header header"
    "sidebar main";
  min-height: 100vh;
}

.app-header {
  grid-area: header;
  height: 50px;
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  color: var(--header-text);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-body {
  display: contents;
}

.header-left, .header-center, .header-right {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.header-left {
  flex: 1;
  overflow: hidden;
}
.header-center {
  flex-shrink: 0;
  gap: 4px;
}

@media (min-width: 769px) {
  .header-center {
    display: none;
  }
}
.header-right {
  flex-shrink: 0;
}

.header-logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 1rem; letter-spacing: .5px;
  text-transform: uppercase;
  min-width: 0;
  overflow: hidden;
}
.header-logo .logo-mark { width: 28px; height: 28px; }
.header-logo .logo-word {
  text-transform: none;
  letter-spacing: -0.03em;
  font-size: 1.08rem;
}
.header-company {
  font-weight: 500;
  font-size: .9rem;
  color: #b8c5d4;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,.25);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(280px, 32vw);
}

.icon-btn {
  background: transparent; border: none; color: var(--header-text);
  cursor: pointer; padding: 6px 8px; border-radius: 3px;
  font-size: .8rem; display: inline-flex; align-items: center; gap: 4px;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

.header-user-wrap {
  position: relative;
}
.header-user {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 5px 10px 5px 5px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  transition: background .15s ease, border-color .15s ease;
  font: inherit;
  color: inherit;
}
button.header-user {
  appearance: none;
  -webkit-appearance: none;
}
.header-user:hover,
.header-user-wrap.is-open .header-user {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
}
.header-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #17a2d4, #0d7ea8);
  color: #fff; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  flex-shrink: 0;
}
.header-user-meta {
  display: flex; flex-direction: column; gap: 3px;
  align-items: flex-start; min-width: 0;
}
.header-user-name {
  font-size: .82rem; font-weight: 600; line-height: 1.1;
  max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.header-user-chevron {
  width: 16px; height: 16px; fill: rgba(255,255,255,.65); flex-shrink: 0;
  transition: transform .15s ease;
}
.header-user-wrap.is-open .header-user-chevron { transform: rotate(180deg); }
.header-user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 80;
  min-width: 180px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}
.header-user-dropdown-item {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.header-user-dropdown-item:hover { background: #f1f5f9; }
.header-user-dropdown-item--danger { color: var(--danger); }
.header-user-dropdown-item--danger:hover { background: rgba(220, 53, 69, .08); }
.flag { width: 22px; height: 16px; border-radius: 2px; }

.role-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; line-height: 1.4;
}
.role-badge--admin {
  color: #0c5460;
  background: linear-gradient(135deg, #d4f4ff, #a8e6f5);
  border: 1px solid rgba(23,162,212,.35);
}
.role-badge--user {
  color: #4a5568;
  background: linear-gradient(135deg, #f0f3f7, #e2e8f0);
  border: 1px solid rgba(0,0,0,.08);
}
.header-user-meta .role-badge { font-size: .6rem; padding: 1px 7px; }

/* —— Sidebar —— */
.sidebar {
  grid-area: sidebar;
  width: auto;
  min-width: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-profile {
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
}

.profile-card {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}
.user-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.user-status-pill--active {
  background: rgba(40, 167, 69, .12);
  color: var(--success);
}
.audit-log-filters {
  align-items: end;
}
.audit-log-table {
  font-size: .88rem;
}
.audit-log-table td {
  vertical-align: top;
}
.audit-details-cell {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.audit-action-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: #eef2f7;
  color: #334155;
}
.audit-action-olustur { background: rgba(40,167,69,.12); color: var(--success); }
.audit-action-guncelle { background: rgba(23,162,212,.12); color: #0b6d94; }
.audit-action-sil,
.audit-action-iptal { background: rgba(220,53,69,.12); color: var(--danger); }
.audit-action-teslim,
.audit-action-odeme { background: rgba(255,193,7,.18); color: #9a6b00; }

.profile-banner {
  position: relative;
  height: 56px;
  background: linear-gradient(135deg, #1a3a5c 0%, #17a2d4 55%, #5ec4e8 100%);
  overflow: hidden;
}

.profile-banner-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 120%, rgba(255,255,255,.25), transparent 45%),
    radial-gradient(circle at 85% -20%, rgba(255,255,255,.18), transparent 40%);
}

.profile-content {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 0 12px 12px;
  margin-top: -22px;
  position: relative;
}

.profile-avatar-wrap {
  position: relative; flex-shrink: 0;
}

.profile-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(145deg, #17a2d4, #0b6d94);
  color: #fff; display: grid; place-items: center;
  font-size: .95rem; font-weight: 700;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(23,162,212,.35);
}

.profile-status-dot {
  position: absolute; right: 1px; bottom: 2px;
  width: 11px; height: 11px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(34,197,94,.4);
}

.profile-info {
  display: flex; flex-direction: column; gap: 5px;
  min-width: 0; padding-bottom: 2px; flex: 1;
}

.profile-username {
  font-size: .92rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.2;
}

.profile-info .role-badge { align-self: flex-start; }

.nav { padding: 12px 10px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; margin: 0; padding: 10px 14px;
  border: none; background: transparent;
  color: var(--text); font-size: .9rem; cursor: pointer; text-align: left;
  border-radius: 10px; border-left: none;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover {
  background: rgba(23,162,212,.08);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(23,162,212,.18), rgba(23,162,212,.06));
  color: var(--primary); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(23,162,212,.22);
}
.nav-item svg {
  width: 18px; height: 18px; fill: currentColor; flex-shrink: 0;
  padding: 7px; border-radius: 8px; box-sizing: content-box;
  background: rgba(23,162,212,.1);
  transition: background .15s ease, fill .15s ease;
}
.nav-item.active svg { background: var(--primary); fill: #fff; }
.nav-badge {
  margin-left: auto; background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700; min-width: 20px; height: 20px;
  border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
}

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

/* —— Main content —— */
.content {
  grid-area: main;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  background: var(--content-bg);
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 16px;
  margin-bottom: 16px;
  width: 100%;
}
.page-head-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.page-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.breadcrumb {
  font-size: .85rem; color: var(--muted);
  line-height: 1.3;
}
.dashboard-date-bar {
  display: inline-flex;
  align-items: center;
}
.dashboard-date-control {
  display: inline-flex;
  align-items: stretch;
  gap: 4px;
  padding: 5px;
  background: linear-gradient(180deg, #fff 0%, #f8fafb 100%);
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(30, 45, 62, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.dashboard-date-today-btn,
.dashboard-date-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text);
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.dashboard-date-today-btn {
  padding: 0 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.dashboard-date-today-btn:hover {
  background: rgba(23, 162, 212, .08);
  color: var(--primary);
}
.dashboard-date-today-btn:active {
  transform: scale(.98);
}
.dashboard-date-today-btn.is-active {
  background: linear-gradient(135deg, var(--primary) 0%, #0d8fbd 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(23, 162, 212, .32);
}
.dashboard-date-today-btn.is-active .dashboard-date-icon {
  fill: #fff;
}
.dashboard-date-picker {
  position: relative;
  margin: 0;
  padding: 0 12px 0 10px;
  border-left: 1px solid rgba(0, 0, 0, .06);
  cursor: pointer;
  background: rgba(255, 255, 255, .7);
}
.dashboard-date-picker:hover {
  background: rgba(23, 162, 212, .06);
}
.dashboard-date-picker:focus-within {
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(23, 162, 212, .18);
}
.dashboard-date-icon {
  width: 16px;
  height: 16px;
  fill: var(--primary);
  flex-shrink: 0;
  opacity: .92;
}
.dashboard-date-input {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 0;
  min-width: 132px;
  cursor: pointer;
}
.dashboard-date-input:focus {
  outline: none;
}
.dashboard-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .55;
  filter: grayscale(.2);
  transition: opacity .15s ease, transform .12s ease;
}
.dashboard-date-picker:hover .dashboard-date-input::-webkit-calendar-picker-indicator,
.dashboard-date-input:focus::-webkit-calendar-picker-indicator {
  opacity: 1;
}
.dashboard-date-input::-webkit-datetime-edit {
  padding: 0;
}
.dashboard-date-input::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}
@media (max-width: 640px) {
  .page-head {
    align-items: flex-start;
  }
  .page-head-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .dashboard-date-control {
    width: 100%;
    max-width: 100%;
  }
  .dashboard-date-picker {
    flex: 1;
    justify-content: space-between;
  }
  .dashboard-date-input {
    flex: 1;
    min-width: 0;
  }
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb span { margin: 0 6px; }

/* —— Buttons —— */
.btn {
  padding: 8px 16px; border: 1px solid var(--border);
  border-radius: 3px; background: #fff; cursor: pointer;
  font-size: .85rem; font-weight: 500; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: #f8f9fa; }
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger {
  background: var(--danger); color: #fff; border-color: var(--danger);
}
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 5px 12px; font-size: .8rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-ghost { background: transparent; border: none; color: var(--muted); }

/* —— Cards & tables —— */
.panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 3px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.panel-head {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.panel-head h2 { margin: 0; font-size: 1rem; font-weight: 600; }
.panel-head-left {
  display: flex; align-items: center; gap: 12px;
}
.btn-page-back { padding: 6px 12px; font-size: .85rem; }
.wizard-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 18px;
}
.wizard-actions .wizard-next { margin-left: auto; }

.toolbar {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 3px; overflow: hidden;
}
.toolbar select, .toolbar input {
  border: none; padding: 7px 10px; font-size: .85rem; outline: none;
}
.toolbar select { border-right: 1px solid var(--border); background: #fff; }
.toolbar input { min-width: 160px; }
.toolbar .tb-btn {
  padding: 7px 10px; border: none; border-left: 1px solid var(--border);
  background: #fff; cursor: pointer; color: var(--muted);
}
.toolbar .tb-btn:hover { background: #f8f9fa; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  background: var(--table-head); padding: 10px 14px;
  text-align: left; font-size: .8rem; font-weight: 600;
  color: var(--muted); border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #fafbfc; }
.data-table tbody tr.row-alert { border-left: 3px solid var(--danger); }

.cell-vehicle { display: flex; align-items: center; gap: 10px; }
.vehicle-logo {
  width: 36px; height: 36px; border-radius: 50%;
  background: #eef1f5; display: grid; place-items: center;
  font-size: .65rem; font-weight: 700; color: var(--muted);
}
.vehicle-plate { font-weight: 700; font-size: .95rem; }
.vehicle-model { font-size: .8rem; color: var(--muted); }

.cell-customer { display: flex; align-items: center; gap: 10px; }
.customer-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem;
  font-weight: 600; color: #fff; flex-shrink: 0;
}
.customer-name { font-weight: 500; }
.customer-phone { font-size: .8rem; color: var(--muted); }

.payment-amount { font-weight: 600; }
.payment-status { font-size: .78rem; display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.payment-status.paid { color: var(--success); }
.payment-status.pending { color: var(--warning); }
.payment-status.cancelled { color: var(--danger); }
.repair-status-cancelled { color: var(--danger); font-weight: 600; }

.empty { color: var(--muted); text-align: center; padding: 24px; }

/* Stats & misc */
.grid-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 20px;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 3px; padding: 18px;
}
.stat-card span { display: block; color: var(--muted); font-size: .8rem; }
.stat-card strong { font-size: 1.6rem; font-weight: 600; }

/* —— Dashboard —— */
.dashboard-shell { display: flex; flex-direction: column; gap: 8px; }
.dashboard-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1200px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  padding: 16px 18px;
  box-shadow: 0 4px 18px rgba(30, 45, 62, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30, 45, 62, .1);
}
.stat-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.stat-card-body span {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}
.stat-card-body strong {
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 2px;
}
.stat-card--blue { background: linear-gradient(135deg, #fff 0%, #f0f8ff 100%); }
.stat-card--blue .stat-card-icon { background: rgba(23, 162, 212, .14); }
.stat-card--amber { background: linear-gradient(135deg, #fff 0%, #fff8ef 100%); }
.stat-card--amber .stat-card-icon { background: rgba(240, 173, 78, .18); }
.stat-card--cyan { background: linear-gradient(135deg, #fff 0%, #eefcff 100%); }
.stat-card--cyan .stat-card-icon { background: rgba(6, 182, 212, .14); }
.stat-card--green { background: linear-gradient(135deg, #fff 0%, #f0fdf6 100%); }
.stat-card--green .stat-card-icon { background: rgba(40, 167, 69, .14); }
.stat-card--green .stat-card-body strong { color: #1e7e34; }
.stat-card--slate { background: linear-gradient(135deg, #fff 0%, #f4f6f9 100%); }
.stat-card--slate .stat-card-icon { background: rgba(61, 79, 99, .1); }

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}
.dashboard-maintenance-panel {
  grid-column: 1 / -1;
}
.dashboard-main,
.dashboard-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.dashboard-panel-head h2 {
  margin: 0;
  font-size: 1.1rem;
}
.dashboard-panel-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .86rem;
  text-transform: capitalize;
}
.dashboard-panel-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.dashboard-metric-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: .8rem;
  font-weight: 600;
}
.dashboard-metric-chip--amount {
  background: rgba(23, 162, 212, .12);
  color: #0c6e8f;
}
.dashboard-monthly-panel {
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 4px 20px rgba(30, 45, 62, .06);
}
.dashboard-monthly-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 18px;
  max-height: 420px;
  overflow-y: auto;
}
.dashboard-repair-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #e8edf2;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dashboard-repair-card:hover {
  border-color: rgba(23, 162, 212, .35);
  box-shadow: 0 4px 14px rgba(23, 162, 212, .08);
}
.dashboard-repair-vehicle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.dashboard-repair-plate {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 8px;
  background: #3d4f63;
  color: #fff;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.dashboard-repair-meta {
  min-width: 0;
}
.dashboard-repair-meta strong {
  display: block;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-repair-meta small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  margin-top: 2px;
}
.dashboard-repair-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: .82rem;
  color: #5b6b7a;
}
.dashboard-repair-info span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dashboard-repair-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.dashboard-repair-amount {
  font-size: 1rem;
  font-weight: 700;
  color: #0c6e8f;
}
.dashboard-status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  background: #e8f4f8;
  color: #0c6e8f;
}
.dashboard-status-pill--done {
  background: rgba(40, 167, 69, .12);
  color: #1e7e34;
}
.dashboard-status-pill--service {
  background: rgba(240, 173, 78, .15);
  color: #b7791f;
}
.dashboard-status-pill--cancelled {
  background: rgba(231, 76, 60, .12);
  color: #c0392b;
}
.dashboard-quick-panel {
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 4px 20px rgba(30, 45, 62, .06);
}
.dashboard-quick-panel h3 {
  margin: 0 0 14px;
  font-size: 1rem;
}
.dashboard-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dashboard-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.dashboard-quick-btn:hover {
  background: #f8fafb;
  border-color: #c5d0db;
  transform: translateY(-1px);
}
.dashboard-quick-btn--primary {
  background: linear-gradient(135deg, #17a2d4 0%, #138eb8 100%);
  border-color: transparent;
  color: #fff;
}
.dashboard-quick-btn--primary:hover {
  background: linear-gradient(135deg, #138eb8 0%, #0f7aa0 100%);
}
.dashboard-quick-btn span {
  font-size: 1.1rem;
  line-height: 1;
}
.dashboard-maintenance-panel,
.dashboard-cancelled-panel {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 4px 20px rgba(30, 45, 62, .06);
  overflow: hidden;
}
.dashboard-maintenance-panel .panel-head,
.dashboard-cancelled-panel .panel-head {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.dashboard-maintenance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dashboard-maintenance-head-main {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.maintenance-filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
}
.maintenance-filter-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.maintenance-filter-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .7);
}
.maintenance-filter-tab.is-active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(30, 45, 62, .08);
}
.dashboard-maintenance-panel .panel-head h2,
.dashboard-cancelled-panel .panel-head h2 {
  font-size: 1.1rem;
}
.dashboard-maintenance-panel .table-wrap {
  padding: 0;
}
.dashboard-maintenance-table-wrap {
  padding: 16px 18px 20px;
}
.dashboard-maintenance-table-wrap .data-table {
  width: 100%;
  min-width: 0;
}
.dashboard-table th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dashboard-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .dashboard-maintenance-panel {
    grid-column: 1;
  }
  .dashboard-repair-card {
    grid-template-columns: 1fr;
  }
  .dashboard-repair-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}

.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px; margin: 16px 0;
}
.form-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.form-inline input { flex: 1; min-width: 140px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 3px; }

.wizard-steps { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.step {
  padding: 6px 14px; background: #e9ecef; border-radius: 20px; font-size: .82rem;
}
.step.active { background: var(--primary); color: #fff; }
.wizard-panel { padding: 18px; }
.confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.muted { color: var(--muted); font-size: .88rem; }

/* —— Yeni Tamirat wizard —— */
.wizard-shell {
  max-width: 920px; margin: 0 auto;
}
.wizard-hero {
  margin-bottom: 20px;
}
.wizard-title {
  margin: 0 0 4px; font-size: 1.45rem; font-weight: 700; color: var(--text);
}
.wizard-subtitle {
  margin: 0; color: var(--muted); font-size: .92rem;
}
.wizard-stepper {
  position: relative; margin-bottom: 20px;
}
.wizard-step-track {
  position: absolute; left: 0; right: 0; top: 28px; height: 3px;
  background: #e8ecf1; border-radius: 999px; z-index: 0;
}
.wizard-step-progress {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--primary), #5ec4e8);
  border-radius: 999px; transition: width .25s ease;
}
.wizard-shell .wizard-steps {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 0;
}
.wizard-shell .step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: #fff; border: 1px solid var(--border);
  cursor: default; text-align: left;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.wizard-shell .step.active {
  background: linear-gradient(135deg, #f0f9ff, #fff);
  border-color: rgba(23,162,212,.45);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(23,162,212,.12);
  transform: translateY(-1px);
}
.wizard-shell .step.done {
  border-color: rgba(23,162,212,.25);
  background: #f8fcfe;
}
.step-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: #eef2f6; display: grid; place-items: center;
  font-size: 1rem; flex-shrink: 0;
}
.wizard-shell .step.active .step-icon {
  background: linear-gradient(135deg, var(--primary), #0d8fbd);
  filter: none;
}
.wizard-shell .step.done .step-icon {
  background: rgba(23,162,212,.15);
}
.step-text {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.step-text strong {
  font-size: .82rem; font-weight: 700; line-height: 1.2;
}
.step-text small {
  font-size: .7rem; color: var(--muted); line-height: 1.2;
}
.wizard-shell .step.active .step-text small { color: #5a8fa3; }

.wizard-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 4px 20px rgba(15,23,42,.05);
}
.wizard-section-head {
  margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid #eef1f5;
}
.wizard-section-head h3 {
  margin: 0 0 4px; font-size: 1.05rem; font-weight: 700;
}
.wizard-section-head .muted { margin: 0; }

.wizard-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0 16px; color: var(--muted); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .06em;
}
.wizard-divider::before,
.wizard-divider::after {
  content: ""; flex: 1; height: 1px; background: #e8ecf1;
}

.wizard-form-grid {
  gap: 14px; margin: 0 0 16px;
}
.wizard-shell .wizard-input,
.wizard-shell .wizard-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dce3ea;
  border-radius: 10px;
  background: #fafbfc;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.wizard-shell .wizard-input:hover,
.wizard-shell .wizard-select:hover {
  border-color: #c5d0db; background: #fff;
}
.wizard-shell .wizard-input:focus,
.wizard-shell .wizard-select:focus {
  outline: none; border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23,162,212,.15);
}
.wizard-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.wizard-shell .field-label > span:first-child {
  display: block; margin-bottom: 6px;
  font-size: .78rem; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: .04em;
}
.required { color: var(--danger); font-weight: 700; }

.btn-outline {
  background: #fff; border: 1px dashed #c5d0db; color: var(--text);
  border-radius: 10px; padding: 9px 14px;
}
.btn-outline:hover {
  background: #f8fafb; border-color: var(--primary); color: var(--primary);
}

.wizard-catalog-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 14px; padding: 12px;
  background: #f8fafb; border-radius: 12px; border: 1px solid #eef1f5;
}
.wizard-catalog-bar .wizard-select { flex: 1; min-width: 200px; }

.wizard-table-wrap {
  border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 12px;
}
.wizard-lines-table th { background: #f8fafb; }
.lines-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.lines-add-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background .15s, border-color .15s, opacity .15s;
}
.lines-add-btn:hover:not(:disabled) {
  background: rgba(23, 162, 212, .08);
  border-color: var(--primary);
}
.lines-add-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.work-order-section-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wizard-line-input {
  width: 100%; padding: 8px 10px;
  border: 1px solid #e2e8f0; border-radius: 8px;
  background: #fff; font-size: .88rem;
}
.wizard-line-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(23,162,212,.12);
}
.wizard-line-qty { width: 72px; }
.wizard-line-price { width: 96px; }
.line-total-cell { white-space: nowrap; font-weight: 600; color: var(--text); }
.line-total { font-variant-numeric: tabular-nums; }

.wizard-shell .confirm-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px; margin-top: 20px;
}
.confirm-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--border); background: #fff;
  cursor: pointer; text-align: left;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.confirm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.confirm-card--primary {
  border-color: rgba(23,162,212,.35);
  background: linear-gradient(135deg, #f0f9ff, #fff);
}
.confirm-card--primary:hover { border-color: var(--primary); }
.confirm-card--success {
  border-color: rgba(34,197,94,.35);
  background: linear-gradient(135deg, #f0fdf4, #fff);
}
.confirm-card--success:hover { border-color: #22c55e; }
.confirm-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(23,162,212,.12);
  display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0;
}
.confirm-card--success .confirm-card-icon { background: rgba(34,197,94,.12); }
.confirm-card-body { display: flex; flex-direction: column; gap: 2px; }
.confirm-card-body strong { font-size: .92rem; color: var(--text); }
.confirm-card-body small { font-size: .78rem; color: var(--muted); }

.wizard-shell .wizard-actions {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid #eef1f5;
}
.wizard-shell .wizard-back {
  border-radius: 10px; padding: 9px 16px;
  background: #f4f6f8; border: 1px solid #e2e8f0;
}
.wizard-shell .wizard-next,
.wizard-shell .btn-primary.wizard-next {
  border-radius: 10px; padding: 10px 20px;
  font-weight: 600; box-shadow: 0 4px 12px rgba(23,162,212,.25);
}

.wizard-result {
  margin-top: 16px; padding: 12px 14px;
  border-radius: 10px; font-size: .9rem;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
}
.wizard-result.hidden { display: none; }
.wizard-result.is-error {
  background: #fef2f2; border-color: #fecaca; color: #991b1b;
}

@media (max-width: 768px) {
  .wizard-shell .wizard-steps { grid-template-columns: 1fr 1fr; }
  .wizard-step-track { display: none; }
  .step-text small { display: none; }
}

.nav-admin {
  margin-top: 8px;
  border-top: 1px solid var(--sidebar-border);
  padding-top: 16px !important;
  color: var(--muted);
  font-size: .85rem;
}

.admin-banner {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  color: #7a5d00;
  padding: 10px 14px;
  border-radius: 3px;
  margin-bottom: 16px;
  font-size: .88rem;
}

.shop-code-badge {
  font-size: .8rem;
  background: #e8f4fc;
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 3px;
  font-weight: 600;
}

.shop-settings-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
}

.shop-settings-form input,
.shop-settings-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: .9rem;
  font-weight: 400;
}

.settings-body { padding: 18px; }
.settings-section-title {
  margin: 20px 0 12px;
  font-size: .95rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.settings-section-title:first-child { margin-top: 0; }
.form-grid .span-2 { grid-column: 1 / -1; }

.settings-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  border-bottom: 2px solid var(--border);
}
.settings-tab {
  padding: 10px 20px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: .9rem;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.settings-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.shop-tab-panel { margin-top: 0; border-top: none; border-radius: 0 0 3px 3px; }

.role-select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: .85rem;
}

.customer-combo { position: relative; }
.entry-form {
  background: #f8f9fa; border: 1px solid var(--border);
  border-radius: 4px; padding: 16px;
}
.catalog-block { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.catalog-row {
  display: flex;
  margin-top: 6px;
  align-items: center;
  gap: 8px;
}
.catalog-row .catalog-select { flex: 1; min-width: 0; }
.work-order-tools .catalog-row { margin-top: 0; }
.work-order-tools-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: end;
}
.work-order-tools-grid .form-control {
  width: 100%;
  height: 42px;
  min-height: 42px;
}
.work-order-tools #modalAddFromCatalog {
  flex-shrink: 0;
  height: 42px;
  white-space: nowrap;
}
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .9rem;
  font-family: inherit;
  line-height: 1.35;
  color: var(--text);
  background: #fff;
  box-sizing: border-box;
  min-height: 42px;
  transition: border-color .15s, box-shadow .15s;
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
input.form-control[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  min-height: 42px;
}
.form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23,162,212,.15);
}
select.form-control:focus {
  background-color: #fff;
}
.service-item-card {
  background: linear-gradient(180deg, #fff 0%, #f8fafb 100%);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.service-item-card-head { margin-bottom: 16px; }
.service-item-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; align-items: end;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.form-field-actions { display: flex; gap: 8px; align-items: center; }
.form-field-span-2 { grid-column: 1 / -1; }
.si-included-hint { margin: 0 0 8px; font-size: .85rem; }
.si-included-combo { position: relative; display: grid; gap: 10px; }
.si-included-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 45, 62, .12);
  max-height: 220px;
  overflow-y: auto;
}
.si-included-list .si-included-option {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.si-included-list .si-included-option:hover,
.si-included-list .si-included-option.active {
  background: rgba(23, 162, 212, .1);
}
.si-included-list .si-included-option span {
  color: var(--muted);
  font-size: .82rem;
}
.si-included-empty {
  padding: 12px;
  color: var(--muted);
  font-size: .88rem;
}
.si-included-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}
.si-included-placeholder {
  color: var(--muted);
  font-size: .88rem;
}
.si-included-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(23, 162, 212, .12);
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
}
.si-included-tag button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.si-included-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(23,162,212,.12); color: var(--primary); font-size: .78rem; font-weight: 600;
}
.shop-info-form { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.shop-rules-card .settings-section-title { margin-top: 0; border-bottom: none; padding-bottom: 0; }
.shop-rules-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.shop-rules-section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.shop-rules-subtitle {
  margin: 0 0 12px;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .01em;
}
.shop-rules-scalar-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.field-hint {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.35;
}
.shop-rules-list-hint { margin: 0 0 14px; font-size: .85rem; }
.shop-rules-definitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.shop-definition-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
}
.shop-definition-panel-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shop-definition-panel-head strong { font-size: .9rem; }
.shop-definition-panel-head .muted { font-size: .78rem; }
.shop-definition-table {
  margin-top: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(280px, 38vh);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.shop-definition-table .data-table {
  margin: 0;
}
.shop-definition-table .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafb;
}
.data-table-compact th,
.data-table-compact td { padding: 8px 10px; font-size: .85rem; }
.data-table-compact th:last-child,
.data-table-compact td:last-child { width: 72px; text-align: right; }
.shop-rules-save-row {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.shop-rules-save-row .muted { font-size: .82rem; }

.definition-list-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.definition-list-bar .form-control { flex: 1; min-width: 120px; }
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.modal-panel-sm { width: min(440px, 100%); }
.payment-summary {
  margin-top: 16px; padding: 12px 14px; border-radius: 3px;
  background: var(--bg-soft, #f6f7f9); border: 1px solid var(--border);
  display: grid; gap: 8px;
}
.payment-summary div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ledger-summary {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 12px 14px; background: var(--bg-soft, #f6f7f9);
  border: 1px solid var(--border); border-radius: 3px;
}
.ledger-summary strong { font-size: 1.05rem; }

.ledger-shell { display: grid; gap: 16px; }
.ledger-toolbar { padding: 0; overflow: hidden; }
.ledger-toolbar-head {
  padding: 18px 20px 0;
}
.ledger-toolbar-head h2 { margin: 0 0 6px; font-size: 1.15rem; }
.ledger-filter-card {
  margin: 16px 20px 20px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #f8fafb 100%);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.ledger-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: end;
}
.ledger-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ledger-filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ledger-filter-msg {
  margin: 12px 0 0;
  min-height: 1.2em;
}
.ledger-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.ledger-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ledger-stat-card--range strong {
  font-size: .95rem;
  line-height: 1.35;
}
.ledger-stat-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.ledger-stat-card strong {
  font-size: 1.35rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ledger-table-card { padding: 0 0 18px; }
.ledger-table th { background: #f8fafb; }
.ledger-table td:nth-child(5),
.ledger-table td:nth-child(6) {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.customer-combo-list {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 0; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: 360px; overflow-y: auto;
}
.customer-combo-item {
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f0f0f0;
  font-size: .88rem;
}
.customer-combo-item:hover,
.customer-combo-item.active { background: rgba(23,162,212,.1); }
.customer-combo-item small { display: block; color: var(--muted); margin-top: 2px; }

.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow: hidden;
}
body.modal-open {
  overflow: hidden;
}
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
}
.modal-panel {
  position: relative; z-index: 1; width: min(920px, 100%);
  max-height: min(90vh, calc(100dvh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff; border-radius: 6px; box-shadow: 0 16px 48px rgba(0,0,0,.2);
}
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head h2 { margin: 0; font-size: 1.15rem; }
.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 22px;
}
.modal-total { margin-top: 16px; font-size: 1.05rem; text-align: right; }
.report-preview-panel { width: min(980px, 100%); max-height: 92vh; }
.report-preview-body { padding: 0; height: min(72vh, 760px); }
.report-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.field-label textarea.wizard-input { resize: vertical; min-height: 64px; }

.dashboard-cancelled-panel { margin-top: 0; }
.dashboard-maintenance-panel { margin-top: 0; }
.dashboard-maintenance-hint {
  margin: 0;
  padding: 14px 20px 0;
  font-size: .88rem;
}
.maintenance-status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  background: rgba(245, 158, 11, .15);
  color: #b45309;
}
.maintenance-status--called {
  background: rgba(40, 167, 69, .14);
  color: #1e7e34;
}
.dashboard-cancelled-list {
  display: grid;
  gap: 10px;
  padding: 16px 18px 20px;
}
.dashboard-cancelled-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.dashboard-cancelled-item:hover {
  border-color: #f5b7b1; box-shadow: 0 4px 12px rgba(231,76,60,.08);
}
.dashboard-cancelled-item strong { display: block; font-size: .95rem; }
.dashboard-cancelled-item small { color: var(--muted); }
.cancelled-detail-body { display: grid; gap: 10px; }
.cancelled-detail-body .detail-block {
  padding: 12px 14px; border-radius: 8px; background: #f8fafb; border: 1px solid var(--border);
}
.cancelled-detail-body .detail-block h4 {
  margin: 0 0 8px; font-size: .82rem; color: var(--muted); text-transform: uppercase;
}
.table-actions { display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .app-layout {
    --sidebar-width: 200px;
  }
}

@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 50px auto minmax(0, 1fr);
    grid-template-areas:
      "header"
      "sidebar"
      "main";
  }
  .sidebar {
    width: 100%;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .header-center { display: none; }
  .header-company { max-width: min(180px, 40vw); }
  .page-head {
    grid-template-columns: 1fr;
  }
}

/* —— List screens —— */
.panel-subtitle { margin: 4px 0 0; font-size: .85rem; color: var(--muted); }
.list-filter-bar {
  display: grid;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.list-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}
.list-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.list-filter-field span {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.list-filter-field-grow { flex: 1 1 240px; min-width: 180px; max-width: 420px; }
.list-filter-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.repairs-filter-bar {
  display: grid;
  grid-template-columns: 150px minmax(180px, 1.5fr) 148px 148px auto;
  gap: 12px;
  align-items: end;
}
.repairs-filter-bar .list-filter-field {
  min-width: 0;
}
.repairs-filter-type {
  width: 150px;
}
.repairs-filter-search {
  min-width: 0;
}
.repairs-filter-date {
  width: 148px;
}
.repairs-filter-actions {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.repairs-filter-actions .btn {
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  font-size: .9rem;
  box-sizing: border-box;
}
@media (max-width: 1100px) {
  .repairs-filter-bar {
    grid-template-columns: 150px 1fr 1fr;
  }
  .repairs-filter-search {
    grid-column: 2 / -1;
  }
  .repairs-filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  .repairs-filter-bar {
    grid-template-columns: 1fr;
  }
  .repairs-filter-type,
  .repairs-filter-date,
  .repairs-filter-search {
    width: 100%;
    grid-column: 1;
  }
}
.repairs-panel-summary {
  margin: 0;
  font-size: .9rem;
  font-weight: 500;
}
.repairs-panel-head {
  padding: 14px 20px 10px;
}

.repairs-panel,
.list-page-toolbar,
.list-page-table-card {
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 4px 20px rgba(30, 45, 62, .06);
  overflow: hidden;
}
.repairs-panel-head,
.list-page-toolbar-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.repairs-table-wrap,
.list-page-table-wrap { padding: 16px 18px 20px; }
.technicians-table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f8fafb;
}
.technician-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(40, 167, 69, .12);
  color: var(--success);
  font-size: .78rem;
  font-weight: 600;
}
.repairs-table thead th,
.customers-table thead th,
.vehicles-table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f8fafb;
}

.list-page-shell { display: grid; gap: 16px; }
.list-page-toolbar { padding: 0; }
.list-page-toolbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 20px 0;
}
.list-page-toolbar-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}
.list-page-toolbar-head .muted {
  margin: 0;
  font-size: .88rem;
}
.list-page-filter-card {
  margin: 16px 20px 20px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fff 0%, #f8fafb 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
}
.list-page-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.list-page-search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.list-page-filter-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.list-page-filter-actions .btn {
  min-height: 42px;
  height: 42px;
  padding: 0 14px;
  font-size: .9rem;
  box-sizing: border-box;
}
.list-page-filter-msg {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-size: .88rem;
}
.list-page-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.list-page-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.list-page-stat-card--listed strong { color: var(--primary); }
.list-page-stat-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.list-page-stat-card strong {
  font-size: 1.35rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.list-page-table-card { padding: 0 0 18px; }
.customers-table tbody tr,
.vehicles-table tbody tr {
  transition: background .12s ease;
}
.customers-table tbody tr:hover,
.vehicles-table tbody tr:hover {
  background: rgba(23, 162, 212, .04);
}
.customers-cell-name .customer-name {
  font-weight: 600;
  font-size: .92rem;
}
.customers-cell-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
}
.customers-contact-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(23, 162, 212, .1);
  color: #0b6d94;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}
.customer-form-card {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f8fafb 100%);
  box-shadow: 0 4px 16px rgba(30, 45, 62, .06);
}
.customer-form-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.customer-form-card-head h3 { margin: 0 0 4px; font-size: 1rem; }
.customer-form-card-head .muted { margin: 0; font-size: .88rem; }
.customer-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.customer-form-actions { display: flex; gap: 8px; margin-top: 16px; }
.customers-address-cell {
  max-width: 240px;
  color: #475569;
  font-size: .88rem;
  line-height: 1.4;
}
.customers-table .customer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #17a2d4, #0d8fbd);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(23, 162, 212, .25);
}
@media (max-width: 720px) {
  .list-page-search-row {
    grid-template-columns: 1fr;
  }
  .list-page-filter-actions {
    justify-content: stretch;
  }
  .list-page-filter-actions .btn {
    flex: 1;
  }
}

.vehicles-plate-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1a3a5c, #17a2d4);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
.vehicles-visit-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(23, 162, 212, .12);
  color: #0b6d94;
  font-size: .82rem;
  font-weight: 700;
}

/* —— Work order modal —— */
.work-order-modal {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22);
  max-height: min(92vh, calc(100dvh - 32px));
}
.work-order-modal-head {
  padding: 18px 22px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
  align-items: center;
  flex-shrink: 0;
}
.work-order-modal-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.work-order-plate-badge {
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #17a2d4 0%, #0d8fbd 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: .06em;
  font-size: .95rem;
  box-shadow: 0 4px 14px rgba(23, 162, 212, .25);
}
.work-order-modal-title h2 {
  margin: 0;
  font-size: 1.15rem;
  text-transform: capitalize;
}
.work-order-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(23, 162, 212, .12);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
}
.work-order-modal-body {
  padding: 0 22px 22px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.work-order-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.work-order-info-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafb;
  display: grid;
  gap: 4px;
}
.work-order-info-card span {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.work-order-info-card strong {
  font-size: .92rem;
  color: var(--text);
  word-break: break-word;
}
.work-order-info-card--editable {
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.work-order-info-card--editable:hover {
  border-color: rgba(23, 162, 212, .35);
  background: #fff;
  box-shadow: 0 2px 10px rgba(23, 162, 212, .08);
}
.work-order-info-card--editable.is-editing {
  border-color: var(--primary);
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(23, 162, 212, .15);
}
.work-order-info-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text);
  background: #fff;
}
.work-order-info-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 162, 212, .12);
}
.work-order-section { margin-bottom: 18px; }
.work-order-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.work-order-section-head h3 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
}
.work-order-lines-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  max-height: min(42vh, 420px);
}
.work-order-lines-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafb;
}
.vehicle-history-modal .table-wrap {
  max-height: min(60vh, 520px);
  overflow: auto;
}
.vehicle-history-modal .data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafb;
}
.work-order-lines-table .modal-line-input {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .88rem;
}
.work-order-lines-table .line-qty { width: 72px; }
.work-order-lines-table .line-price { width: 100px; }
.work-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.work-order-actions-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.work-order-total-box {
  display: grid;
  gap: 2px;
  text-align: right;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #102a43 0%, #243b53 100%);
  color: #fff;
  min-width: 160px;
}
.work-order-total-box span {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .8;
}
.work-order-total-box strong { font-size: 1.2rem; }
.btn-report {
  font-weight: 600;
  letter-spacing: .01em;
}

@media (max-width: 768px) {
  .work-order-tools-grid { grid-template-columns: 1fr; }
  .work-order-actions { flex-direction: column; align-items: stretch; }
  .work-order-total-box { text-align: left; }
}

.appointments-filter-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.appointments-filter-presets,
.appointments-filter-dates {
  display: grid;
  gap: 8px;
  align-items: end;
}
.appointments-filter-presets {
  grid-template-columns: repeat(3, 110px);
  flex: 0 0 auto;
}
.appointments-filter-dates {
  grid-template-columns: 168px 168px auto;
  margin-left: auto;
}
.appointments-filter-dates .list-filter-field {
  min-width: 0;
  width: 168px;
}
.appointments-filter-dates .form-control {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  min-height: 42px;
  height: 42px;
}
.appointments-filter-dates .btn,
.appointment-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  white-space: nowrap;
  box-sizing: border-box;
}
.appointment-filter-btn {
  width: 110px;
}
.appointment-filter-btn.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
@media (max-width: 920px) {
  .appointments-filter-bar {
    flex-wrap: wrap;
    gap: 12px;
  }
  .appointments-filter-dates {
    margin-left: 0;
  }
}
.apt-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
}
.apt-status--bekliyor { background: rgba(23,162,212,.14); color: #0c7a9c; }
.apt-status--geldi { background: rgba(40,167,69,.14); color: #1e7e34; }
.apt-status--gelmedi { background: rgba(240,173,78,.2); color: #9a6b12; }
.apt-status--iptal { background: rgba(231,76,60,.12); color: #c0392b; }
.dashboard-appointment-list {
  padding: 4px 16px 10px;
  display: grid;
  gap: 8px;
}
.dashboard-appointment-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.dashboard-appointment-item:hover { border-color: var(--primary); }
.dashboard-appointment-item strong { display: block; font-size: .85rem; }
.dashboard-appointment-item small { color: var(--muted); }
.apt-overlap { color: #9a6b12; font-size: .75rem; margin-top: 4px; }
.appointments-table .apt-datetime-col,
.appointments-table .apt-when { min-width: 148px; }
.appointments-table .apt-col-customer { min-width: 160px; overflow-wrap: anywhere; }
.appointments-table .apt-col-phone { min-width: 140px; white-space: nowrap; }
.apt-day-row td {
  background: #f4f7fa;
  color: var(--text);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 10px 14px;
}
.apt-when { white-space: nowrap; }
.apt-when-time {
  display: block;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
}
.apt-when-date {
  display: block;
  margin-top: 3px;
  font-size: .78rem;
  color: var(--muted);
}
.apt-when-slot {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff4d6;
  color: #8a6d12;
  font-size: .7rem;
  font-weight: 700;
}
.apt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.apt-action {
  border: 1px solid #d7dee6;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
}
.apt-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 162, 212, .08);
}
.apt-action--danger { color: #c0392b; border-color: #f0c6c2; }
.apt-action--danger:hover {
  background: rgba(231, 76, 60, .06);
  border-color: #c0392b;
  color: #c0392b;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, .08);
}
.apt-modal-panel { width: min(560px, 100%); }
.apt-datetime-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}
.apt-date-input {
  min-height: 46px;
  font-size: 1rem;
  font-weight: 600;
}
.apt-time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.apt-time-chip {
  border: 1px solid #d7dee6;
  background: #fff;
  color: #334155;
  border-radius: 10px;
  min-height: 40px;
  padding: 8px 6px;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.apt-time-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.apt-time-chip.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(23, 162, 212, .16);
}
.apt-time-chip.is-busy {
  box-shadow: inset 0 0 0 1px #e8c56b;
}
.apt-time-chip.is-selected.is-busy {
  box-shadow: 0 0 0 3px rgba(23, 162, 212, .16);
}
.apt-slot-hint {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fff6d8;
  color: #8a6d12;
  font-size: .82rem;
  font-weight: 600;
}
.apt-slot-hint.hidden { display: none; }
@media (max-width: 640px) {
  .apt-time-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .appointments-table .apt-datetime-col,
  .appointments-table .apt-when { min-width: 132px; width: auto; }
}
