/* Servis Takip — Next.js (Tailwind) arayüzünün düz CSS karşılığı */

:root {
  --background: #eef3f8;
  --foreground: #0f172a;
  --brand: #0ea5e9;
  --brand-dark: #0284c7;
  --panel: #ffffff;
  --line: #e2e8f0;
  --muted: #64748b;
  --success: #059669;
  --danger: #e11d48;
  --job-active-bg: #f0fff8;
  --job-active-accent: #bbf7d0;
  --job-active-text: #047857;
  --job-wait-bg: #f0faff;
  --job-wait-border: #bae6fd;
  --job-done-bg: #f8fafc;
  --job-done-border: #cbd5e1;
  --job-done-accent: #e0f2fe;
  --job-done-text: #0369a1;
  --radius-card: 16px;
  --radius-field: 12px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* display:grid/flex veren sınıflar hidden niteliğini ezmesin */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family:
    "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--foreground);
  background:
    radial-gradient(1200px 500px at 10% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #e0f2fe 0%, transparent 50%),
    var(--background);
  -webkit-font-smoothing: antialiased;
}

/* Login (auth-body) hariç — tüm uygulama metni büyük harf; yeni sayfalarda body.app-body kullanın */
body.app-body {
  text-transform: uppercase;
}

body.app-body input,
body.app-body textarea,
body.app-body select {
  text-transform: uppercase;
}

body.app-body ::placeholder {
  text-transform: uppercase;
}

input,
select,
textarea,
button {
  font: inherit;
}

a {
  color: var(--brand-dark);
}

/* ---------- Üst çubuk ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  overflow: visible;
}

.navbar-top {
  max-width: none;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: block;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #0f172a;
  text-decoration: none;
}

.brand-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.user-chip {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: #f0f9ff;
  color: #075985;
  padding: 6px 12px;
}

.warn-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.warn-chip:hover {
  background: #be123c;
  color: #fff;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.navlinks {
  max-width: none;
  margin: 0;
  padding: 8px 16px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  overflow: visible;
  line-height: 1;
}

.navlinks a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 32px;
  margin: 0;
  padding: 0 12px;
  line-height: 1;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.navlinks a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.navlinks a.active {
  background: var(--brand-dark);
  color: #fff;
}

.navlinks a.has-warn {
  background: #fff1f2;
  color: #be123c;
}

.navlinks a.has-warn .nav-count {
  background: #e11d48;
  color: #fff;
}

.navlinks a.has-warn.active {
  background: #e11d48;
  color: #fff;
}

.navlinks a.has-warn.active .nav-count {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.navbar .menu-toggle {
  display: none;
}

/* ---------- Oturum ekranı ---------- */

.auth-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px 16px;
  overflow: hidden;
}

.auth-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at top, #bae6fd 0%, transparent 55%),
    radial-gradient(ellipse at bottom, #e2e8f0 0%, transparent 50%);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 448px;
  padding: 32px 28px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 60px -28px rgba(14, 165, 233, 0.45);
  backdrop-filter: blur(8px);
}

.auth-head {
  margin-bottom: 28px;
  text-align: center;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: 0 10px 20px -6px rgba(2, 132, 199, 0.5);
}

.auth-head h1 {
  font-size: 30px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.auth-head p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.auth-field input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  background: rgba(248, 250, 252, 0.8);
  font-size: 16px;
  text-transform: none;
}

.auth-field input:focus {
  outline: 0;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px #e0f2fe;
}

.auth-form .check-row {
  margin: 0;
  background: rgba(248, 250, 252, 0.6);
}

.auth-form .auth-hint {
  margin: -8px 0 0;
  font-size: 13px;
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--brand-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px -6px rgba(2, 132, 199, 0.45);
}

.auth-submit:hover {
  background: #0369a1;
}

.auth-error {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-field);
  background: #fff1f2;
  font-size: 14px;
  color: #9f1239;
}

.auth-corner-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0369a1;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 20px -12px rgba(14, 165, 233, 0.55);
  backdrop-filter: blur(6px);
}

.auth-corner-link:hover {
  background: #fff;
  color: #0c4a6e;
}

.auth-foot {
  margin: 24px 0 0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.auth-foot span {
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Yerleşim ---------- */

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.page-head-text {
  min-width: 0;
}

.page-desc {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.page-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Yeni servis butonları — her zaman alt alta (page-head dışında, form içinde) */
.ticket-new-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  box-sizing: border-box;
}
.ticket-new-actions-pick {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
}
.ticket-new-actions .btn,
.ticket-new-actions button,
.ticket-new-actions a.btn {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 44px;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

/* Tamamı tıklanabilir kart (ayar modülleri gibi liste girişleri) */
a.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
}

a.card::after {
  content: "›";
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
}

a.card:active {
  background: #f0f9ff;
}

a.card b {
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
  align-items: center;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Form ---------- */

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-field);
  background: #fff;
  color: var(--foreground);
  font-weight: 400;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
}

input[type="file"] {
  font-size: 14px;
  padding: 8px;
}

/* ---------- Butonlar ---------- */

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-field);
  padding: 10px 16px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s;
}

.btn:hover,
button:hover {
  background: #0369a1;
}

.btn.secondary,
button.secondary {
  background: #fff;
  color: #334155;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.btn.secondary:hover,
button.secondary:hover {
  background: #f8fafc;
}

.btn.danger,
button.danger {
  background: var(--danger);
}

.btn.danger:hover,
button.danger:hover {
  background: #be123c;
}

.btn.success,
button.success {
  background: var(--success);
}

.btn.success:hover,
button.success:hover {
  background: #047857;
}

.btn.small,
button.small {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 10px;
}

/* ---------- Tablo ---------- */

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

th {
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #f8fafc;
}

/* ---------- Bildirim / etiket ---------- */

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-field);
  margin: 0 0 14px;
  font-size: 14px;
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.alert.error {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
}

.alert.success {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #065f46;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

/* Servis durumu — zemin rengi ayarlardan gelir (bkz. status_pill) */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0284c7;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge.sky {
  background: #e0f2fe;
  color: #075985;
}

.badge.green {
  background: #d1fae5;
  color: #065f46;
}

.quote-cat-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.quote-cat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.quote-cat-label {
  flex: 0 0 auto;
  min-width: 5.5rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}

.quote-cat-val {
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  line-height: 1.25;
  max-width: 100%;
  text-transform: none;
}

.suggest-field {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.suggest-field > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.suggest-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.suggest-menu[hidden] {
  display: none !important;
}

.suggest-menu li {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  cursor: pointer;
  line-height: 1.3;
}

.suggest-menu li:hover,
.suggest-menu li:focus {
  background: #e0f2fe;
  color: #075985;
}

.badge.red {
  background: #ffe4e6;
  color: #9f1239;
}

.totals {
  font-size: 17px;
  font-weight: 600;
  text-align: right;
}

/* ---------- Adımlı form (yeni servis kaydı) ---------- */

.step-card {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-card);
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.25);
}

.step-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.step-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.location-options,
.external-option-list {
  display: grid;
  gap: 10px;
}

.location-option,
.external-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  background: #fff;
  cursor: pointer;
}

.location-option:has(input:checked),
.external-option:has(input:checked) {
  border-color: #7dd3fc;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.15);
}

.location-option input,
.external-option input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.location-option-body,
.external-option span {
  display: grid;
  gap: 4px;
}

.location-option-body strong,
.external-option strong {
  font-size: 14px;
  color: #0f172a;
}

.location-option-body small,
.external-option small {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.field-service-options {
  margin-top: 14px;
}

.field-picker-head {
  margin-bottom: 16px;
}

.external-option-list[data-field-picker-panel] {
  margin-top: 10px;
}

.fee-picker-panel {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}

.fee-picker-panel .choice-list {
  margin-bottom: 10px;
}

.ticket-flow-hidden {
  display: none !important;
}

.req {
  color: #e11d48;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.field-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Form içinden gönderilen ama bağlantı gibi görünen buton */
.linklike {
  display: inline;
  width: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

/* Sil / Kaldır: kırmızı dolgu buton değil, net gri link */
button.linklike,
button.linklike.danger {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #64748b !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

button.linklike:hover,
button.linklike.danger:hover {
  background: none !important;
  color: #0f172a !important;
}

/* Seçim kutusu — boş hâli mavi, seçili hâli yeşil */
.picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  border: 2px solid #7dd3fc;
  border-radius: var(--radius-field);
  background: #f0f9ff;
  padding: 12px 16px;
  color: #0c4a6e;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.picker .arrow {
  flex: 0 0 auto;
  font-size: 18px;
}

.picker.on {
  border-color: #6ee7b7;
  background: #ecfdf5;
  color: #064e3b;
}

.picker.on .tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #047857;
}

.picker.on .val {
  display: block;
  font-weight: 600;
  color: #022c22;
}

.picker .change {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  background: #fff;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #064e3b;
  text-decoration: none;
}

/* Seçim listesi (müşteri / tür / marka) */
.pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}

.pick-list li {
  border-bottom: 1px solid #f1f5f9;
}

.pick-list li:last-child {
  border-bottom: 0;
}

.pick-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.pick-list a:active {
  background: #f0f9ff;
}

.pick-list .main {
  flex: 1;
  min-width: 0;
}

.pick-list .title {
  display: block;
  font-weight: 600;
  color: #0f172a;
}

.pick-list .sub {
  display: block;
  font-size: 13px;
  color: #475569;
}

.pick-list .meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #94a3b8;
}

.pick-list .pick-btn {
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--brand-dark);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.search-row input {
  flex: 1;
  font-size: 16px;
}

.search-row button {
  flex: 0 0 auto;
}

.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border-radius: var(--radius-field);
  font-size: 16px;
  font-weight: 700;
}

/* Görsel ekleme ekranındaki büyük dokunmatik butonlar */
.huge-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 72px;
  margin-bottom: 12px;
  border-radius: var(--radius-card);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 20px -12px rgba(15, 23, 42, 0.45);
}

.huge-btn.sky {
  background: var(--brand-dark);
}

.huge-btn.green {
  background: var(--success);
}

.check-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  background: #f8fafc;
  padding: 12px;
  margin: 0 0 16px;
  font-weight: 400;
  cursor: pointer;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.check-row .t {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
}

.check-row .d {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.intake-note-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 4px;
}

.intake-note-presets .check-row {
  margin: 0;
  min-height: 0;
  padding: 10px 12px;
}

.intake-note-presets .check-row .t {
  font-weight: 500;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.7);
  padding: 40px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- İmza tuvali ---------- */

.sign-wrap {
  border: 2px solid #38bdf8;
  border-radius: var(--radius-card);
  background: #fff;
  padding: 8px;
  margin-bottom: 12px;
  touch-action: none;
}

.sign-wrap canvas {
  display: block;
  width: 100%;
  height: 280px;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}

.sign-state {
  margin: 0 0 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #475569;
}

.input-phone,
input[type="tel"][data-phone-input="1"] {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.sign-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.sign-kbd-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 600;
}

.sign-toolbar-hint {
  flex: 1 1 160px;
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.sign-submit-bar {
  margin: 12px 0 16px;
}

.sign-submit-bar .btn.big-btn,
.sign-submit-bar button[type="submit"] {
  width: 100%;
  min-height: 52px;
}

/* Klavye açıkken Kaydet sabit altta — imza sonrası görünür kalsın */
html.sign-kbd-open #sign-form.sign-kbd-open {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

html.sign-kbd-open #sign-form.sign-kbd-open .sign-submit-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  margin: 0;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.12);
}

html.sign-kbd-open #sign-form.sign-kbd-open .sign-toolbar {
  position: sticky;
  top: 0;
  z-index: 1100;
  padding: 8px 0;
  background: rgba(248, 250, 252, 0.96);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

html.erginay-apk.sign-kbd-open #sign-form.sign-kbd-open {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Görsel ızgarası ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

/* ---------- İş atama / İşlerim ---------- */

.work-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* Next.js sürümündeki lg kırılımı: 1024px altında tek kolon */
@media (max-width: 1024px) {
  .work-layout {
    grid-template-columns: 1fr;
  }
}

.work-sections,
.job-list {
  display: grid;
  gap: 16px;
}

.job-date-filter {
  margin-bottom: 4px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.job-date-filter > label {
  flex: 1 1 140px;
  min-width: 120px;
}

.job-date-filter .job-show-done-check {
  flex: 1 1 200px;
  align-self: stretch;
  margin-bottom: 0;
}

.job-done-range {
  display: contents;
}

.job-done-range[hidden] {
  display: none !important;
}

.job-done-range .field-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.85rem;
}

.job-done-hint {
  margin: 0 0 10px;
  font-size: 0.9rem;
}

.job-done-cta .btn {
  margin-top: 8px;
}

.job-done-date-filter {
  margin-top: 12px;
}

.job-section > .job-done-date-filter {
  margin-top: 0;
  margin-bottom: 12px;
}

.job-section {
  margin-bottom: 0;
}

.job-section .job-list {
  gap: 12px;
}

.job-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
}

.job-card.sky {
  border-color: var(--job-wait-border);
  background: var(--job-wait-bg);
}

.job-card.amber {
  border-color: #fde68a;
  background: rgba(255, 251, 235, 0.75);
}

.job-card.red {
  border-color: #f43f5e;
  background: #ffe4e6;
}

.job-card.green {
  border-color: var(--job-active-accent);
  background: var(--job-active-bg);
}

.job-card.completed {
  border-color: var(--job-done-border);
  background: var(--job-done-bg);
}

.job-card.slate {
  border-color: #cbd5e1;
  background: rgba(248, 250, 252, 0.8);
}

.job-card.problem {
  border: 2px solid #dc2626;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.1);
}

.job-card-body {
  padding: 16px;
}

.job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-state,
.job-priority {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-state {
  background: #0284c7;
  color: #fff;
}

.job-card.amber .job-state {
  background: #f59e0b;
}

.job-card.sky .job-state {
  background: #0284c7;
}

.job-card.red .job-state {
  background: #e11d48;
}

.job-card.green .job-state {
  background: var(--success);
}

.job-card.green .job-duration,
.job-card.green .job-duration.live {
  background: var(--job-active-accent);
  border: 1px solid var(--job-active-accent);
  color: var(--job-active-text);
}

.job-card.green .job-travel {
  background: var(--job-active-bg);
  border-color: var(--job-active-accent);
}

.job-card.green .job-travel-title {
  color: var(--job-active-text);
}

.job-card.completed .job-state {
  background: var(--job-done-text);
}

.job-card.completed .job-duration {
  background: var(--job-done-accent);
  border: 1px solid #bae6fd;
  color: var(--job-done-text);
}

.job-card.completed .job-travel {
  background: var(--job-done-bg);
  border-color: var(--job-done-border);
}

.job-card.completed .job-travel-title {
  color: var(--job-done-text);
}

.job-card.completed .job-result {
  color: var(--job-done-text);
  font-weight: 600;
}

.job-card.slate .job-state {
  background: #64748b;
}

.job-card.problem .job-state {
  background: #dc2626;
}

.job-card.problem .job-result {
  margin-top: 10px;
  border-radius: 12px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
}

.job-priority.normal {
  background: #e2e8f0;
  color: #334155;
}

.job-priority.high {
  background: #ffedd5;
  color: #c2410c;
}

.job-priority.urgent {
  background: #ffe4e6;
  color: #be123c;
}

.job-title {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.worker-chip {
  display: inline-flex;
  margin-top: 6px;
  border-radius: 999px;
  background: #e0f2fe;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #075985;
}

.job-desc {
  margin: 6px 0 0;
  font-size: 14px;
  color: #475569;
}

.job-contact {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px 12px;
  font-size: 13px;
  color: #475569;
}

.job-contact:empty {
  display: none;
}

.job-contact p,
.job-time,
.job-result {
  margin: 0;
}

.job-time,
.job-result {
  margin-top: 10px;
  font-size: 13px;
  color: #334155;
}

.job-actions {
  border-top: 1px solid rgba(203, 213, 225, 0.7);
  padding: 12px 16px;
}

.job-actions form,
.job-actions .btn {
  width: 100%;
}

.job-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.job-actions-row form,
.job-actions-row .btn {
  flex: 1;
  width: auto;
  min-width: 120px;
}

.job-duration {
  margin-top: 10px;
  border-radius: 12px;
  background: #ecfeff;
  color: #155e75;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 12px;
}

.job-duration.live {
  background: var(--job-active-accent);
  color: var(--job-active-text);
}

.job-travel.en-route {
  background: var(--job-active-bg);
  border-color: var(--job-active-accent);
}

.job-travel.en-route .job-travel-title {
  color: var(--job-active-text);
}

.job-travel.en-route .job-duration.live {
  background: var(--job-active-accent);
  border: 1px solid var(--job-active-accent);
  color: var(--job-active-text);
}

.job-travel {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--job-wait-bg);
  border: 1px solid var(--job-wait-border);
}

.job-vehicle,
.job-vehicle-line {
  margin: 0 0 8px;
}

.job-vehicle .vehicle-plate,
.job-vehicle-line .vehicle-plate {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #0f172a;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 1px 8px;
  margin-left: 2px;
}

.job-vehicle .vehicle-sep,
.job-vehicle-line .vehicle-sep {
  color: var(--muted);
  font-weight: 400;
}

.job-travel-title {
  margin: 0 0 6px;
  color: #0c4a6e;
}

.job-travel p {
  margin: 4px 0;
  font-size: 13px;
  color: #0f172a;
}

.job-travel a {
  color: #0369a1;
  font-weight: 600;
}

.job-map-btn {
  display: inline-flex !important;
  margin-top: 6px;
  width: auto !important;
}

.job-geo-form .btn {
  width: 100%;
}

.job-geo-form label {
  display: block;
  margin-bottom: 10px;
}

.job-geo-form select {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-field);
  background: #fff;
  font: inherit;
}

.job-problem-form {
  margin-top: 10px;
  border: 1px solid #fecaca;
  border-radius: var(--radius-field);
  background: #fff5f5;
}

.job-problem-form summary {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #b91c1c;
  list-style: none;
}

.job-problem-form summary::-webkit-details-marker {
  display: none;
}

.job-problem-form[open] summary {
  border-bottom: 1px solid #fecaca;
}

.job-problem-form form {
  padding: 12px;
}

.job-problem-label {
  display: block;
  margin-bottom: 10px;
}

.job-problem-label span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #7f1d1d;
}

.job-problem-label textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-field);
  font: inherit;
  resize: vertical;
}

.job-problem-form .btn {
  width: 100%;
}

.job-kind {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.job-kind.field {
  background: #e0f2fe;
  color: #075985;
}

.job-kind.normal {
  background: #f1f5f9;
  color: #475569;
}

.job-edit-hint {
  margin: 0 0 14px;
}

.count-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 14px;
  white-space: nowrap;
}

.finish-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 8px;
}

.appointment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 100px;
  gap: 10px;
  margin-bottom: 14px;
}

.job-tabs {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.job-tabs a {
  display: flex;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  color: #1e293b;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.job-tabs a.on {
  border-color: #0369a1;
  background: #0284c7;
  color: #fff;
}

.job-tabs small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.job-tabs a.on small {
  color: #e0f2fe;
}

/* ---------- Servis listesi ---------- */

.mobile-only {
  display: none;
}

.filter-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
}

.filter-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ticket-cards {
  gap: 12px;
}

.ticket-card {
  display: block;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 16px;
  color: var(--foreground);
  text-decoration: none;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.25);
}

.ticket-card:active {
  transform: scale(0.99);
}

.expired-banner {
  margin: 0 0 16px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-card);
  background: #fffbeb;
  color: #92400e;
  padding: 12px 16px;
  font-size: 14px;
}

.expired-list {
  display: grid;
  gap: 12px;
}

.expired-card {
  border-color: #fecdd3;
  box-shadow: 0 8px 24px -16px rgba(190, 18, 60, 0.35);
}

.expired-card:hover {
  background: #fff1f2;
}

.expired-card-side {
  text-align: right;
}

.expired-late {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #be123c;
}

.ticket-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ticket-card-head strong {
  color: #0369a1;
}

.ticket-card-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.ticket-card-head p {
  margin: 1px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.ticket-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  color: #475569;
}

.ticket-meta small {
  display: block;
  margin-bottom: 2px;
  color: #94a3b8;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ticket-meta span {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.ticket-balance,
.ticket-warranty {
  display: inline-flex;
  margin-top: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
}

.ticket-balance {
  background: #fff1f2;
  color: #be123c;
}

.ticket-warranty {
  background: #ecfdf5;
  color: #047857;
}

/* ---------- Müşteri listesi ---------- */

.search-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.search-form > label {
  flex: 1 1 auto;
  margin-bottom: 0;
}

.search-form > button {
  flex: 0 0 auto;
}

.customer-cards {
  gap: 12px;
}

.customer-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 16px;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.25);
}

.customer-card h3 {
  margin: 0;
  font-size: 16px;
}

.customer-name,
.customer-phone,
.customer-muted {
  margin: 2px 0 0;
}

.customer-name {
  color: var(--muted);
  font-size: 14px;
}

.customer-card .badge {
  margin: 8px 6px 0 0;
}

.customer-phone {
  margin-top: 10px;
  color: #334155;
  font-size: 14px;
}

.customer-muted {
  color: #94a3b8;
  font-size: 12px;
}

.customer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.customer-actions .btn {
  flex: 1 1 90px;
  justify-content: center;
}

.btn.soft {
  border: 1px solid #bae6fd;
  background: #f0f9ff;
  color: #075985;
}

.row-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.text-danger {
  color: #be123c;
}

/* ---------- Mobil ---------- */

@media (max-width: 850px) {
  .navbar .menu-toggle {
    display: inline-flex;
    min-height: 40px;
    width: 44px;
    padding: 0;
    background: #fff;
    color: #334155;
    border: 1px solid var(--line);
  }

  .user-chip {
    display: none;
  }

  .navlinks {
    display: none;
    flex-direction: column;
    padding: 8px 12px 14px;
  }

  .navlinks.open {
    display: flex;
  }

  .navlinks a {
    border-radius: var(--radius-field);
    height: auto;
    padding: 12px 14px;
    min-height: 46px;
    font-size: 15px;
    font-weight: 500;
  }

  /* Menü açıkken sayfa gövdesi kaymasın, liste kaydırılabilir olsun */
  .navlinks.open {
    max-height: 70vh;
    overflow-y: auto;
  }

  .container {
    padding: 16px 12px 32px;
  }

  .mobile-only {
    display: grid;
  }

  .desktop-only {
    display: none;
  }

  .filter-main,
  .filter-dates {
    grid-template-columns: 1fr;
  }

  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .search-form > button {
    width: 100%;
  }

  .job-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .finish-grid,
  .appointment-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 21px;
  }

  /* iOS'ta odaklanınca sayfanın yakınlaşmasını engeller */
  input,
  select,
  textarea {
    font-size: 16px;
    padding: 13px 12px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .btn,
  button {
    min-height: 46px;
  }

  .photo-grid {
    gap: 6px;
  }

  /* Başlık aksiyonları */
  .page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .page-head-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .page-head-actions > * {
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .page-head-actions .btn,
  .page-head-actions button {
    width: 100%;
    justify-content: center;
  }

  .actions {
    gap: 8px;
  }

  .actions > form {
    flex: 1 1 140px;
  }

  .actions > form > button,
  .actions > .btn,
  .actions > button {
    width: 100%;
    justify-content: center;
  }

  .totals {
    text-align: left;
  }

  /* Kart içindeki tek başına duran gönder butonları tam genişlik */
  .card > form > button,
  .step-card > form > button,
  form.card > button,
  form.step-card > button {
    width: 100%;
    justify-content: center;
  }

  /* Tabloları satır satır kart görünümüne çevir */
  .table-wrap {
    overflow: visible;
  }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100%;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tr {
    border: 1px solid var(--line);
    border-radius: var(--radius-field);
    background: #fff;
    padding: 4px 0;
    margin-bottom: 10px;
  }

  .table-wrap tr:last-child {
    margin-bottom: 0;
  }

  .table-wrap td {
    border-bottom: 1px solid #f1f5f9;
    padding: 10px 14px;
  }

  .table-wrap tr td:last-child {
    border-bottom: 0;
  }

  .table-wrap tbody tr:hover td {
    background: transparent;
  }

  /* Hücre başlığı sola, değer sağa */
  .table-wrap td[data-label]:not([data-label=""])::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
  }

  .table-wrap td:empty {
    display: none;
  }

  /* Satır aksiyonları (Aç / Sil gibi) kartın altında yan yana dursun */
  .table-wrap td:has(button, .btn) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .table-wrap td:has(button, .btn)::before {
    display: none;
  }

  .table-wrap td form {
    flex: 1 1 120px;
  }

  .table-wrap td button,
  .table-wrap td .btn {
    flex: 1 1 120px;
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .table-wrap .empty-row td {
    text-align: center;
    color: var(--muted);
  }
}

/* Çentikli ekranlarda içeriğin kenarlara girmemesi */
@supports (padding: env(safe-area-inset-left)) {
  .navbar-top,
  .navlinks,
  .container {
    padding-left: calc(12px + env(safe-area-inset-left));
    padding-right: calc(12px + env(safe-area-inset-right));
  }

  .container {
    padding-bottom: calc(32px + env(safe-area-inset-bottom));
  }
}

/* Uzun kelime/URL taşmalarını engelle — harf harf kırma */
.card,
.step-card,
.alert,
.page-head-text {
  overflow-wrap: anywhere;
}

td {
  overflow-wrap: break-word;
}

.cell-nowrap {
  display: inline-block;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

/* Müşteri görev rehberi */
.task-guide-desc {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 14px;
}

.task-guide-customer-head {
  margin-bottom: 20px;
}

.task-guide-customer-banner {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 2px solid #0ea5e9;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12);
}

.task-guide-customer-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0369a1;
}

.task-guide-customer-store {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0c4a6e;
  line-height: 1.2;
}

.task-guide-customer-person {
  margin: 6px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
}

.task-guide-customer-meta {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
}

.task-guide-customer-banner-view {
  margin-bottom: 16px;
}

.task-guide-pick li.is-pending {
  border-left: 4px solid #f97316;
  background: #fff7ed;
}

.task-guide-pick li.is-pending .pick-btn-start {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
  min-width: 118px;
}

.task-guide-pick li.is-active {
  border-left: 4px solid #0ea5e9;
  background: #f0f9ff;
}

.task-guide-pick li.is-active .pick-btn-continue {
  background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  min-width: 100px;
}

.task-guide-pick li.is-problem {
  border-left: 4px solid #ef4444;
  background: #fef2f2;
}

.task-guide-pick li.is-problem .pick-btn-problem {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  min-width: 100px;
}

.task-guide-pick li.is-completed {
  border-left: 4px solid #22c55e;
  background: #f0fdf4;
}

.task-guide-pick li.is-completed .pick-btn-view {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
  min-width: 72px;
}

.task-guide-pick .pick-btn-start,
.task-guide-pick .pick-btn-continue,
.task-guide-pick .pick-btn-problem,
.task-guide-pick .pick-btn-view {
  border: 0;
  letter-spacing: 0.02em;
}

.task-guide-step-check.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  border-style: dashed;
}

.task-guide-view-step.is-locked {
  opacity: 0.92;
}

.task-guide-problem-form {
  flex: 1 1 100%;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7ed;
}

.task-guide-problem-form summary {
  cursor: pointer;
  font-weight: 700;
  color: #b45309;
}

.task-guide-problem-label {
  display: block;
  margin: 10px 0;
}

.task-guide-problem-label span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #92400e;
}

.task-guide-problem-label textarea {
  width: 100%;
  min-height: 72px;
}

.task-guide-problem-banner {
  margin-bottom: 12px;
}

.task-guide-problem-clear {
  margin-top: 10px;
}

.task-guide-steps-ready-banner {
  margin-top: 12px;
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e40af;
}

.task-guide-run-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
}

.task-guide-run-actions form {
  margin: 0;
}

.task-guide-run-hint {
  margin: 0;
  flex: 1 1 220px;
}

.task-guide-timer {
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 14px;
}

.task-guide-timer.done {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.task-guide-customer-name,
.task-guide-view-title {
  margin: 4px 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

/* Görev adımları: başlık / not büyük-küçük harf serbest */
.task-guide-form input[type="text"],
.task-guide-form textarea,
.task-guide-form input:not([type]),
.task-guide-form ::placeholder {
  text-transform: none !important;
}

.task-guide-view-step-head h3,
.task-guide-view-body,
.task-guide-image-caption,
.task-guide-lightbox-caption,
.task-guide-desc,
.task-guide-view-title {
  text-transform: none;
}

.task-guide-step-edit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-guide-steps-card {
  margin-top: 16px;
}

.task-guide-steps-hint {
  margin: -4px 0 16px;
}

.task-guide-step-edit {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0;
  margin: 0;
  background: #fff;
  overflow: hidden;
}

.task-guide-step-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 16px 0;
}

.task-guide-step-badge,
.task-guide-new-badge {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
}

.task-guide-new-badge {
  background: #64748b;
  margin-top: 8px;
}

.task-guide-step-main,
.task-guide-new-fields {
  flex: 1;
  min-width: 0;
}

.task-guide-step-media {
  margin: 12px 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.task-guide-media-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.task-guide-step-del-row {
  margin: 12px 16px 16px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.task-guide-upload {
  margin-top: 12px;
}

.task-guide-upload-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 14px;
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.task-guide-upload-box:hover {
  border-color: var(--brand-dark);
  background: #f0f9ff;
}

.task-guide-upload-box input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.task-guide-upload-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0f2fe;
  color: var(--brand-dark);
  font-size: 24px;
  line-height: 40px;
  font-weight: 700;
}

.task-guide-upload-title {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}

.task-guide-upload-hint,
.task-guide-upload-count {
  font-size: 12px;
  color: #64748b;
  margin: 0;
}

.task-guide-preview-item figcaption {
  padding: 4px 6px;
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
}

.task-guide-step-num {
  margin: 0 0 12px;
  font-weight: 700;
  color: var(--brand-dark);
}

.task-guide-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.task-guide-image {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  position: relative;
}

.task-guide-image-thumb {
  position: relative;
}

.task-guide-image-num {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  line-height: 24px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
  pointer-events: none;
}

.task-guide-image-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.task-guide-image-open img,
.task-guide-image-thumb > a > img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.task-guide-image-del {
  padding: 6px;
  text-align: center;
}

.task-guide-image-del button {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
}

.task-guide-images-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.task-guide-image-edit {
  position: relative;
  width: 160px;
  margin: 0;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: grab;
}

.task-guide-image-edit.is-dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.task-guide-image-handle {
  display: block;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  letter-spacing: -2px;
  user-select: none;
  margin-bottom: 4px;
}

.task-guide-image-edit img {
  height: 100px;
}

.task-guide-image-caption-label {
  display: block;
  margin-top: 8px;
}

.task-guide-image-caption-label span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.task-guide-image-caption-label textarea {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  resize: vertical;
  min-height: 52px;
  font-family: inherit;
}

.task-guide-image-caption-label input {
  width: 100%;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.task-guide-image-del-btn {
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  padding: 6px 8px;
}

.task-guide-image-sort-hint {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 12px;
}

.task-guide-image-caption {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  text-align: center;
}

.task-guide-new-steps {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed #cbd5e1;
}

.task-guide-new-title {
  margin: 0 0 6px;
  font-size: 1rem;
}

.task-guide-new-step {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.task-guide-save-row {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: linear-gradient(transparent, #fff 24%);
  padding: 16px 0 8px;
  margin-top: 8px;
}

.task-guide-view-steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-guide-view-step {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  background: #fff;
  scroll-margin-top: 88px;
}

.task-guide-view-step-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.task-guide-view-step-head h3 {
  flex: 1;
  min-width: 0;
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.35;
}

.task-guide-step-photos-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  margin-top: 2px;
  border: 2px solid #0ea5e9;
  border-radius: 999px;
  background: #f0f9ff;
  color: #0369a1;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.task-guide-step-photos-toggle.is-open {
  background: #0ea5e9;
  color: #fff;
  border-color: #0284c7;
}

.task-guide-step-photos-count {
  font-size: 11px;
  font-weight: 800;
  margin-left: 1px;
}

.task-guide-step-photos {
  margin: 10px 0 0 44px;
}

.task-guide-step-photos[hidden] {
  display: none !important;
}

.task-guide-view-num {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-guide-view-body {
  margin: 10px 0 0 44px;
  color: #475569;
  font-size: 14px;
}

.task-guide-view-step .task-guide-images {
  margin-left: 44px;
}

.task-guide-view-step .task-guide-image img {
  height: 140px;
}

.task-guide-view-step.is-done {
  border-color: #86efac;
  background: #f0fdf4;
}

.task-guide-view-step.is-done .task-guide-view-num {
  background: #16a34a;
}

.task-guide-step-toggle {
  flex: 0 0 auto;
  margin: 0;
}

.task-guide-step-check {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #475569;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.task-guide-step-check.done {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.task-guide-progress-bar {
  margin: 12px 0 0;
}

.task-guide-progress-text {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.task-guide-progress-track {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.task-guide-progress-fill {
  display: block;
  height: 100%;
  background: #16a34a;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.task-guide-success-banner {
  margin-top: 12px;
}

.task-guide-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 16px;
}

.task-guide-lightbox[hidden] {
  display: none !important;
}

.task-guide-lightbox-inner {
  max-width: min(960px, 100%);
  max-height: calc(100vh - 80px);
}

.task-guide-lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}

.task-guide-lightbox-caption {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
}

.task-guide-lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.task-guide-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

body.task-guide-lightbox-open {
  overflow: hidden;
}

.task-guide-done-card {
  margin-top: 20px;
}

.task-guide-done-search {
  margin: 12px 0 8px;
}

.task-guide-done-filter {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.task-guide-done-count {
  margin: 0 0 12px;
}

.task-guide-pick-hero {
  margin-bottom: 16px;
  padding: 18px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
  border: 1px solid #bae6fd;
}

.task-guide-pick-lead {
  margin: 0 0 14px;
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

.task-guide-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.task-guide-pick-start {
  margin-bottom: 16px;
}

.customer-pick-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.customer-pick-modal[hidden] {
  display: none !important;
}

.customer-pick-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.customer-pick-modal-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(88vh, 720px);
  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-pick-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.customer-pick-modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.customer-pick-modal-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.customer-pick-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
}

.customer-pick-modal-foot {
  padding: 12px 18px 18px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.customer-pick-search {
  margin-bottom: 10px;
}

body.customer-pick-modal-open {
  overflow: hidden;
}

@media (min-width: 640px) {
  .customer-pick-modal {
    align-items: center;
    padding: 20px;
  }

  .customer-pick-modal-panel {
    border-radius: 18px;
    max-height: min(82vh, 680px);
  }
}

.task-guide-pick-card {
  scroll-margin-top: 80px;
}

.task-guide-pick-count {
  margin: 0 0 12px;
}

.task-guide-customer-pick {
  max-height: none;
  overflow: visible;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.task-guide-customer-pick li {
  border-bottom: 1px solid #f1f5f9;
}

.task-guide-customer-pick li:last-child {
  border-bottom: 0;
}

.task-guide-done-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-guide-done-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}

.task-guide-done-tick {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-top: 4px;
}

.task-guide-done-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-guide-done-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 10px;
  align-items: baseline;
}

.task-guide-done-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.task-guide-done-store {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.task-guide-done-customer {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
}

.task-guide-done-task {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 5px 10px;
  line-height: 1.3;
}

.task-guide-done-task-row {
  align-items: center;
}

.task-guide-done-meta {
  display: block;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed #bbf7d0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

.task-guide-done-main .sub,
.task-guide-done-main .meta {
  display: none;
}

@media (max-width: 640px) {
  .task-guide-view-body,
  .task-guide-view-step .task-guide-images {
    margin-left: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  .navbar,
  .no-print {
    display: none !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: 0;
  }
}
