/* =====================================================================
   SERVICE PRO - Tek Tasarım Sistemi (Admin + Personel)
   Mobile-first. Tüm breakpointlerde yatay taşma olmayacak şekilde kurgulandı.
   Fontlar yereldir (assets/fonts) - harici CDN yok.
   ===================================================================== */

/* ---------- Fontlar ---------- */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/manrope-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/manrope-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/manrope-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/manrope-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/manrope-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/manrope-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/manrope-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/manrope-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/manrope-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/manrope-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/jetbrains-mono-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+20A0-20C0,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/jetbrains-mono-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- Tokenlar ---------- */
:root {
  --navy-950: #070B14;
  --navy-900: #0F172A;
  --navy-800: #1E293B;
  --navy-700: #334155;
  --navy-600: #475569;
  --slate-400: #94A3B8;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50:  #F8FAFC;
  --orange:    #F97316;
  --orange-600:#EA580C;
  --orange-100:#FFEDD5;
  --orange-50: #FFF7ED;
  --green:     #10B981;
  --green-600: #059669;
  --green-100: #D1FAE5;
  --blue:      #3B82F6;
  --blue-100:  #DBEAFE;
  --red:       #EF4444;
  --red-100:   #FEE2E2;
  --amber:     #F59E0B;
  --amber-100: #FEF3C7;
  --violet:    #7C3AED;
  --violet-100:#EDE9FE;

  /* Açık tema (admin) */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --text: #0F172A;
  --muted: #64748B;
  --border: #E2E8F0;
  --input-bg: #FFFFFF;
  --input-border: #E2E8F0;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.05);

  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 268px;
  --topbar-h: 64px;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Koyu tema (personel) */
body.staff {
  --bg: #070B14;
  --surface: #111827;
  --surface-2: #0B1220;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --border: #1F2A3C;
  --input-bg: #1E293B;
  --input-border: #334155;
  --shadow: none;
  color-scheme: dark;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased; font-feature-settings: "ss01";
}
img, svg, canvas, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--orange-600); text-decoration: none; }
a:hover { text-decoration: underline; }
body.staff a { color: var(--orange); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; overflow-wrap: anywhere; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.mono { font-family: var(--mono); font-weight: 700; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; word-break: break-word; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.text-right { text-align: right; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: 8px } .mt-2 { margin-top: 16px } .mt-3 { margin-top: 24px }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: 8px } .mb-2 { margin-bottom: 16px } .mb-3 { margin-bottom: 24px }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 1px solid transparent; border-radius: var(--radius-sm);
  font: inherit; font-weight: 700; font-size: .93rem; line-height: 1.2; text-align: center; cursor: pointer;
  text-decoration: none !important; max-width: 100%; white-space: normal;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--orange); color: #fff !important; box-shadow: 0 4px 14px rgba(249,115,22,.25); }
.btn-primary:hover { background: var(--orange-600); }
.btn-secondary { background: var(--navy-900); color: #fff !important; }
.btn-secondary:hover { background: var(--navy-800); }
body.staff .btn-secondary { background: var(--navy-800); border-color: var(--input-border); }
.btn-outline { background: transparent; border-color: var(--orange); color: var(--orange-600) !important; }
.btn-outline:hover { background: var(--orange-50); }
body.staff .btn-outline { color: var(--orange) !important; }
body.staff .btn-outline:hover { background: rgba(249,115,22,.1); }
.btn-light { background: transparent; border-color: var(--input-border); color: var(--text) !important; }
.btn-light:hover { border-color: var(--slate-400); }
.btn-ghost { background: transparent; color: var(--muted) !important; }
.btn-ghost:hover { color: var(--text) !important; background: var(--surface-2); }
.btn-danger { background: var(--red); color: #fff !important; }
.btn-danger:hover { background: #DC2626; }
.btn-success { background: var(--green); color: #fff !important; }
.btn-success:hover { background: var(--green-600); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .84rem; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: .8rem; font-weight: 600; }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 1.05rem; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px;
  border: 0; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; text-decoration: none !important;
}
.icon-btn:hover { background: rgba(148,163,184,.15); }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-group > .btn { flex: 0 1 auto; }

/* ---------- Kart ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; min-width: 0; margin-bottom: 20px;
}
.card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: -2px 0 18px; }
.card-header h2, .card-header h3 { margin: 0; min-width: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; font-weight: 700; margin: 0; min-width: 0; }
.card-title .icon { color: var(--orange); }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-header { padding: 20px 24px 0; margin: 0 0 14px; }
.card-accent { border: 1.5px solid var(--orange); }
.card-accent > .card-header .card-title { color: var(--orange-600); }

/* ---------- Grid yardımcıları ---------- */
.grid { display: grid; gap: 16px; min-width: 0; }
.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-2 > *, .grid-3 > *, .grid-auto > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.row-between > * { min-width: 0; }

/* ---------- İstatistik kartları (etiket üstte, değer mono, ikon sağda) ---------- */
.stats { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; }
.stat {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); color: var(--text) !important; text-decoration: none !important;
  transition: border-color .15s, box-shadow .15s;
}
a.stat:hover { border-color: var(--orange); box-shadow: 0 6px 20px rgba(15,23,42,.08); }
.stat-body { min-width: 0; order: 1; }
.stat-icon {
  order: 2; display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; flex: 0 0 56px; border-radius: 10px; background: var(--orange-50); color: var(--orange);
}
.stat-icon .icon { width: 30px; height: 30px; stroke-width: 1.8; }
.stat-icon.navy { background: #EFF6FF; color: #2563EB; }
.stat-icon.green { background: #ECFDF5; color: var(--green-600); }
.stat-icon.blue { background: #EFF6FF; color: var(--blue); }
.stat-icon.red { background: var(--orange-50); color: var(--orange-600); }
.stat-icon.amber { background: #FFFBEB; color: var(--amber); }
.stat-icon.violet { background: #ECFDF5; color: var(--green-600); }
.stat-icon.slate { background: var(--slate-100); color: var(--navy-700); }
.stat-label { color: var(--muted); font-size: .9rem; font-weight: 500; }
.stat-value { font-family: var(--mono); font-size: 1.9rem; font-weight: 700; line-height: 1.15; margin-top: 6px; overflow-wrap: anywhere; }
.stat.money .stat-value { font-size: 1.45rem; color: var(--orange-600); }

/* ---------- Formlar ---------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-grid-3 { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .92rem; color: var(--text); }
.field .req { color: var(--text); }
.input, input[type=text], input[type=password], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=search], input[type=url], select, textarea {
  display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 46px; padding: 10px 14px;
  font: inherit; font-size: 16px; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: var(--radius-sm); outline: none;
  transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: #94A3B8; opacity: 1; }
body.staff input::placeholder, body.staff textarea::placeholder { color: #64748B; }
select {
  padding-right: 40px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer;
  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 d='M1 1.5l5 5 5-5' stroke='%2394A3B8' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
input[readonly] { background: var(--surface-2); }
.input-error { border-color: var(--red) !important; }
.field-error { color: var(--red); font-size: .83rem; }
body.staff .field-error { color: #FCA5A5; }
.help { color: var(--muted); font-size: .82rem; }
.checkbox, .radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.checkbox input, .radio input { width: 20px; height: 20px; accent-color: var(--orange); margin: 0; flex: 0 0 auto; }
.select-wrap { width: 100%; min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.form-actions > .btn { flex: 0 1 auto; }

/* Özel açılır liste (referans tasarım) */
.cselect { position: relative; width: 100%; min-width: 0; }
.cselect > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.cselect-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 46px; padding: 10px 14px;
  font: inherit; font-size: 16px; text-align: left; color: var(--text); background: var(--input-bg);
  border: 1px solid var(--input-border); border-radius: var(--radius-sm); cursor: pointer;
}
.cselect-btn:focus-visible, .cselect.open .cselect-btn { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.18); outline: none; }
.cselect-btn:disabled { opacity: .55; cursor: not-allowed; }
.cselect-btn .val { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect-btn .val.ph { color: #64748B; }
body:not(.staff) .cselect-btn .val.ph { color: #94A3B8; }
.cselect-btn .icon { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.cselect.open .cselect-btn .icon { transform: rotate(180deg); }
.cselect-list {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); max-height: 300px; overflow-y: auto;
  background: #fff; color: var(--navy-900); border: 1px solid var(--slate-200); border-radius: 10px; padding: 6px;
  box-shadow: 0 16px 40px rgba(2,6,23,.3); display: none;
}
.cselect.open .cselect-list { display: block; }
.cselect.up .cselect-list { top: auto; bottom: calc(100% + 6px); }
.cselect-search { padding: 2px 2px 8px; }
.cselect-search input { min-height: 40px; font-size: 16px; background: #fff; color: var(--navy-900); border-color: var(--slate-200); }
.cselect-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0;
  border-radius: 7px; background: transparent; font: inherit; font-size: .95rem; color: var(--navy-900); text-align: left; cursor: pointer;
}
.cselect-opt span { min-width: 0; overflow-wrap: anywhere; }
.cselect-opt small { display: block; color: #64748B; font-size: .8rem; }
.cselect-opt .icon { width: 18px; height: 18px; visibility: hidden; }
.cselect-opt:hover, .cselect-opt.active { background: var(--orange-50); }
.cselect-opt[aria-selected="true"] { background: var(--orange); color: #fff; }
.cselect-opt[aria-selected="true"] small { color: rgba(255,255,255,.85); }
.cselect-opt[aria-selected="true"] .icon { visibility: visible; }
.cselect-empty { padding: 10px 12px; color: #64748B; font-size: .9rem; }

/* Arama kutusu */
.search-box { position: relative; min-width: 0; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-box input { padding-left: 42px; }

/* ---------- Uyarılar ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; border: 1px solid; overflow-wrap: anywhere; }
.alert-success { background: var(--green-100); color: #065F46; border-color: #A7F3D0; }
.alert-error { background: var(--red-100); color: #7F1D1D; border-color: #FECACA; }
.alert-warning { background: var(--amber-100); color: #78350F; border-color: #FDE68A; }
.alert-info { background: var(--blue-100); color: #1E3A8A; border-color: #BFDBFE; }
body.staff .alert-success { background: rgba(16,185,129,.12); color: #A7F3D0; border-color: rgba(16,185,129,.35); }
body.staff .alert-error { background: rgba(239,68,68,.12); color: #FECACA; border-color: rgba(239,68,68,.35); }
body.staff .alert-warning { background: rgba(245,158,11,.12); color: #FDE68A; border-color: rgba(245,158,11,.35); }
body.staff .alert-info { background: rgba(59,130,246,.12); color: #BFDBFE; border-color: rgba(59,130,246,.35); }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 10px; border-radius: 6px;
  font-size: .76rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: var(--slate-100); color: var(--navy-700);
}
.badge-draft { background: #64748B; color: #fff; }
.badge-submitted, .badge-pricing_pending { background: var(--amber); color: #fff; }
.badge-priced { background: var(--green); color: #fff; }
.badge-closed { background: var(--navy-700); color: #fff; }
.badge-warranty { background: var(--violet-100); color: #5B21B6; }
.badge-no_warranty { background: var(--slate-100); color: #475569; }
.badge-admin { background: var(--orange-100); color: #9A3412; }
.badge-staff { background: #E0E7FF; color: #3730A3; }
.badge-active { background: var(--green-100); color: #065F46; }
.badge-passive { background: var(--red-100); color: #991B1B; }
body.staff .badge-no_warranty, body.staff .badge-warranty { background: #1E293B; color: #CBD5E1; }

/* ---------- Tablolar ---------- */
.table-responsive { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 13px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); font-weight: 700; white-space: nowrap; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table td.num { font-family: var(--mono); font-weight: 500; font-size: .88rem; }
.table .cell-main { font-weight: 700; overflow-wrap: anywhere; }
.table a.cell-main { color: var(--text); }
.table a.cell-main:hover { color: var(--orange-600); }
.table .cell-sub { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.table tfoot td { font-weight: 700; background: var(--surface-2); }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bar { height: 8px; background: var(--slate-100); border-radius: 999px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--orange); border-radius: 999px; }

/* ---------- Etiket / değer (üst üste) ---------- */
.kv { display: block; margin: 0; }
.kv > div { min-width: 0; }
.kv > dt:not(:first-child), .kv > div:not(:first-child) { margin-top: 14px; }
.kv dt { color: var(--muted); font-size: .86rem; font-weight: 500; margin-bottom: 3px; }
.kv dd { margin: 0; font-weight: 500; font-size: 1rem; overflow-wrap: anywhere; min-width: 0; }
.kv.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.kv.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 24px; }
.kv.cols-2 > div, .kv.cols-3 > div { margin-top: 0; }
.kv .full { grid-column: 1 / -1; }
.text-block { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1rem; }
.text-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Sayfa başlığı ---------- */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 28px; }
.page-header > div { min-width: 0; }
.page-header h2 { margin: 0; font-size: 2rem; font-weight: 800; }
.page-header .sub { color: var(--muted); margin: 6px 0 0; overflow-wrap: anywhere; }
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; min-width: 0; flex-wrap: wrap; }
.detail-head .back { width: 44px; height: 44px; flex: 0 0 44px; color: var(--text) !important; }
.detail-head .titles { min-width: 0; flex: 1 1 200px; }
.detail-head h2 { margin: 0; font-family: var(--mono); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.detail-head .sub { color: var(--muted); margin-top: 2px; }
.detail-head .btn-group { flex: 0 1 auto; }
.toolbar { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: end; }
.toolbar .field.grow { grid-column: span 2; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 769px) { .toolbar-actions { grid-column: span 2; } .toolbar-actions .btn { flex: 0 1 auto; } }
.toolbar-actions .btn { flex: 1 1 auto; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab {
  display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text) !important; font-weight: 600; font-size: .88rem; text-decoration: none !important;
}
.tab.active { background: var(--orange); border-color: var(--orange); color: #fff !important; }

/* ---------- Sayfalama ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0 4px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text) !important;
  text-decoration: none !important; font-weight: 600; font-family: var(--mono);
}
.page-link.active { background: var(--orange); border-color: var(--orange); color: #fff !important; }
.page-gap { align-self: center; color: var(--muted); }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .icon { width: 48px; height: 48px; margin: 0 auto 14px; color: var(--slate-400); display: block; stroke-width: 1.6; }
.empty-card { text-align: center; padding: 48px 20px; }
.empty-card .icon { width: 56px; height: 56px; margin: 0 auto 18px; display: block; color: #64748B; stroke-width: 1.6; }
.empty-card p { font-size: 1.05rem; margin-bottom: 16px; color: var(--text); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,6,23,.65); }
.modal-dialog {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 22px; -webkit-overflow-scrolling: touch;
}
.modal-dialog.sm { max-width: 440px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-header h3 { margin: 0; min-width: 0; }
body.modal-open { overflow: hidden; }

/* ---------- Fotoğraf ---------- */
.photo-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photo-item { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); aspect-ratio: 4 / 3; min-width: 0; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item a { display: block; width: 100%; height: 100%; }
.photo-remove {
  position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(15,23,42,.85); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px;
}
.photo-remove .icon { width: 18px; height: 18px; }
.upload-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  width: 100%; min-height: 128px; padding: 20px; border: 2px dashed var(--input-border); border-radius: var(--radius);
  background: transparent; color: var(--text); cursor: pointer; font-weight: 600;
}
.upload-drop:hover { border-color: var(--orange); }
.upload-drop .icon { width: 30px; height: 30px; }
.upload-drop small { color: var(--muted); font-weight: 500; }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-drop.disabled { opacity: .5; pointer-events: none; }

/* ---------- İmza ---------- */
.sig-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sig-box { min-width: 0; }
.sig-pad { position: relative; width: 100%; max-width: 100%; height: 160px; background: #fff; border: 1px solid var(--input-border); border-radius: var(--radius-sm); overflow: hidden; }
.sig-pad canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sig-pad .sig-hint { position: absolute; inset: auto 0 10px; text-align: center; color: #94A3B8; font-size: .8rem; pointer-events: none; }
.sig-pad.signed .sig-hint { display: none; }
.sig-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }
.sig-img { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px; }
.sig-img img { max-height: 140px; width: auto; margin: 0 auto; }
.sig-title { font-weight: 700; font-size: .92rem; margin-bottom: 10px; }

/* ---------- Parça satırları (personel) ---------- */
.parts-list { display: flex; flex-direction: column; gap: 10px; }
.part-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 40px; gap: 8px; align-items: center; }
.part-row .field { gap: 0; }
.part-row .field > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.part-row input { min-height: 42px; }
.part-row .icon-btn { width: 40px; height: 40px; flex-basis: 40px; color: var(--red); }
.part-row .icon-btn .icon { width: 18px; height: 18px; }

/* ---------- Personel servis kartları ---------- */
.service-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.service-card {
  display: block; min-width: 0; padding: 18px 20px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--amber); color: var(--text) !important; text-decoration: none !important;
  transition: border-color .15s, transform .1s;
}
.service-card:hover { border-color: var(--orange); border-left-color: var(--orange); }
.service-card.status-draft { border-left-color: #64748B; }
.service-card.status-priced { border-left-color: var(--green); }
.service-card.status-closed { border-left-color: var(--navy-600); }
.service-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 10px; }
.service-no { font-family: var(--mono); font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; overflow-wrap: anywhere; min-width: 0; }
.service-date { color: var(--muted); font-size: .88rem; margin-top: 2px; }
.service-card .customer { font-weight: 700; margin-top: 12px; overflow-wrap: anywhere; }
.service-card .machine { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.service-card .complaint-label { font-weight: 700; margin-top: 14px; font-size: .92rem; }
.service-card .complaint { font-size: .92rem; overflow-wrap: anywhere; opacity: .9; margin-top: 2px; }
.service-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .8rem; margin-top: 12px; }
.service-meta span { display: inline-flex; align-items: center; gap: 5px; }
.service-meta .icon { width: 14px; height: 14px; }

/* ---------- Admin servis kartları ---------- */
.svc-list { display: flex; flex-direction: column; gap: 20px; }
.svc-card {
  display: block; padding: 22px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--amber); box-shadow: var(--shadow); min-width: 0; color: var(--text);
}
.svc-card.status-priced { border-left-color: var(--green); }
.svc-card.status-closed { border-left-color: var(--navy-600); }
.svc-card.status-draft { border-left-color: #94A3B8; }
.svc-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.svc-card-head a { color: var(--text) !important; }
.svc-card-head .service-no { font-size: 1.3rem; }
.svc-card .kv { gap: 14px 24px; }
.svc-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border); margin-top: 16px; padding-top: 14px; }
.svc-total .lbl { color: var(--muted); font-size: .86rem; }
.svc-total .amt { font-family: var(--mono); font-weight: 700; font-size: 1.45rem; color: var(--orange-600); }

/* ---------- Müşteri seçici (açılır liste + arama) ---------- */
.picker { position: relative; min-width: 0; }

/* ---------- Fiyatlandırma ---------- */
.price-rows { display: flex; flex-direction: column; gap: 12px; }
.price-head, .price-row { display: grid; grid-template-columns: minmax(0, 1fr) 100px 150px 130px 40px; gap: 10px; align-items: center; }
.price-head { font-size: .74rem; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .04em; padding: 0 2px; }
.price-row .field { gap: 4px; }
.price-row .field > label { display: none; }
.price-row .line-total { font-family: var(--mono); font-weight: 700; text-align: right; white-space: nowrap; }
.price-row .icon-btn { color: var(--red); width: 40px; height: 40px; flex-basis: 40px; }
.totals { display: grid; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.totals > div:last-child { border-bottom: 0; }
.totals span:last-child { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.totals .grand { background: var(--navy-900); color: #fff; font-size: 1.1rem; }
.totals .grand span:last-child { color: var(--orange); }
.price-inputs { display: grid; gap: 18px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price-breakdown { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .86rem; }
.price-breakdown b { font-family: var(--mono); color: var(--text); font-weight: 700; }
.grand-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.grand-line .lbl { font-size: 1.6rem; font-weight: 800; }
.grand-line .amt { font-family: var(--mono); font-size: 1.9rem; font-weight: 700; color: var(--orange); overflow-wrap: anywhere; }

/* ---------- Zaman çizelgesi ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 2px solid var(--surface); }
.timeline .t-date { font-weight: 700; font-size: .85rem; color: var(--muted); }
.timeline .t-body { overflow-wrap: anywhere; }

/* =====================================================================
   ADMIN DÜZENİ
   ===================================================================== */
.admin-shell { display: flex; min-height: 100vh; min-height: 100dvh; width: 100%; }
.sidebar {
  flex: 0 0 var(--sidebar-w); width: var(--sidebar-w); position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--navy-900); color: #E2E8F0; display: flex; flex-direction: column; padding-top: var(--safe-top); z-index: 900;
}
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 28px 24px 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff !important; text-decoration: none !important; min-width: 0; }
.brand-text { font-weight: 800; letter-spacing: .01em; font-size: 1.45rem; white-space: nowrap; color: #fff; }
.brand-text b { color: inherit; font-weight: 800; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: var(--orange); color: #fff; }
.brand-mark.small { width: 36px; height: 36px; flex-basis: 36px; }
.sidebar .brand-mark { display: none; }
.sidebar-close { display: none; color: #fff; }
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; padding: 8px 24px; flex: 1 1 auto; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; border-radius: 6px;
  color: #E2E8F0 !important; text-decoration: none !important; font-weight: 500; font-size: 1.02rem;
}
.nav-link .icon { width: 19px; height: 19px; opacity: .7; }
.nav-link:hover { background: rgba(148,163,184,.12); color: #fff !important; }
.nav-link.active { background: var(--orange); color: #fff !important; font-weight: 600; }
.nav-link.active .icon { opacity: 1; }
.nav-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.nav-badge { background: #fff; color: var(--orange-600); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 1px 8px; font-family: var(--mono); }
.nav-link:not(.active) .nav-badge { background: var(--orange); color: #fff; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 16px 24px calc(16px + var(--safe-bottom)); border-top: 1px solid rgba(148,163,184,.14); }
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sidebar-user-text b { color: #CBD5E1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-text small { color: #64748B; }
.avatar { display: none; }
.sidebar-overlay { display: none; }

.admin-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 800; display: none; align-items: center; gap: 10px; min-height: var(--topbar-h);
  padding: var(--safe-top) 12px 0; background: var(--navy-900); color: #fff;
}
.topbar-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.05rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.topbar-user { display: none; }
.topbar-logo { display: none; }
.content { flex: 1 1 auto; width: 100%; max-width: 1560px; margin: 0 auto; padding: 36px 36px; min-width: 0; }
.admin-footer { padding: 16px 24px calc(16px + var(--safe-bottom)); color: var(--muted); font-size: .8rem; text-align: center; }
.admin-quick { display: flex; flex-direction: column; gap: 12px; }
.admin-quick .btn { justify-content: flex-start; min-height: 40px; }

/* Tablet: kompakt sidebar */
@media (min-width: 769px) and (max-width: 1100px) {
  :root { --sidebar-w: 78px; }
  .brand-text, .nav-label, .sidebar-user-text { display: none; }
  .sidebar .brand-mark { display: inline-flex; }
  .sidebar-brand { justify-content: center; padding: 18px 8px; }
  .sidebar-nav { padding: 8px 10px; }
  .nav-link { justify-content: center; padding: 10px; position: relative; }
  .nav-link .icon { opacity: 1; }
  .nav-badge { position: absolute; top: 2px; right: 2px; padding: 0 6px; font-size: .66rem; }
  .sidebar-user { justify-content: center; padding-left: 8px; padding-right: 8px; }
  .content { padding: 28px 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}

/* Mobil: üst bar + hamburger + off-canvas sidebar */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100%; width: min(85vw, 300px); flex-basis: auto;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.4); visibility: hidden;
  }
  body.sidebar-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar-overlay { position: fixed; inset: 0; background: rgba(2,6,23,.55); z-index: 850; }
  body.sidebar-open .sidebar-overlay { display: block; }
  body.sidebar-open { overflow: hidden; }
  .sidebar-close { display: inline-flex; }
  .sidebar-brand { padding: 18px 16px 12px 24px; }
  .topbar { display: flex; }
  .content { padding: 20px 16px; }
  .card { padding: 18px; }
  .card-flush > .card-header { padding: 16px 18px 0; }
  .page-header { margin-bottom: 20px; }
  .page-header h2 { font-size: 1.55rem; }
  .detail-head h2 { font-size: 1.35rem; }
  .detail-head { margin-bottom: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px; }
  .stat-icon { width: 42px; height: 42px; flex-basis: 42px; }
  .stat-icon .icon { width: 22px; height: 22px; }
  .stat-value { font-size: 1.5rem; }
  .svc-card { padding: 18px; }
  .grand-line .lbl { font-size: 1.25rem; }
  .grand-line .amt { font-size: 1.5rem; }
}

/* =====================================================================
   PERSONEL DÜZENİ (mobil öncelikli, koyu)
   ===================================================================== */
.s-topbar { position: sticky; top: 0; z-index: 800; background: #0F172A; border-bottom: 1px solid var(--border); padding-top: var(--safe-top); }
.s-topbar-inner { display: flex; align-items: center; gap: 10px; max-width: 960px; margin: 0 auto; min-height: 64px; padding: 8px 16px; }
.s-brand { flex: 1 1 auto; min-width: 0; }
.s-brand b { display: block; font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: .01em; }
.s-brand small { display: block; color: var(--muted); font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.15rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.s-right { display: flex; align-items: center; gap: 4px; color: #fff; flex: 0 0 auto; }
.s-topbar .icon-btn { color: #fff; margin-left: -8px; }
.s-logout { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 8px; color: #fff !important; font-weight: 700; font-size: .88rem; text-decoration: none !important; }
.s-logout .icon { width: 18px; height: 18px; }
.s-main { width: 100%; max-width: 960px; margin: 0 auto; padding: 22px 16px calc(100px + var(--safe-bottom)); min-width: 0; }
.s-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.s-head h2 { margin: 0; font-size: 1.6rem; font-weight: 800; color: #fff; }
.s-bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end;
  background: #0F172A; border-top: 1px solid var(--border); padding: 6px 8px calc(6px + var(--safe-bottom));
}
.s-bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted) !important; font-size: .74rem; font-weight: 600; text-decoration: none !important; min-width: 0; }
.s-bottomnav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.s-bottomnav a.active { color: var(--orange) !important; }
.s-bottomnav .s-fab .icon {
  width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: var(--orange); color: #fff; margin-top: -24px;
  box-shadow: 0 6px 18px rgba(249,115,22,.45); border: 4px solid #0F172A; box-sizing: content-box;
}
body.staff .card { padding: 20px; }
body.staff .card-header { margin-bottom: 16px; }
body.staff .card-title { font-size: 1rem; }
body.staff .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
body.staff .stat { padding: 14px; flex-direction: column; gap: 4px; }
body.staff .stat-icon { display: none; }
body.staff .stat-value { font-size: 1.4rem; margin-top: 2px; }
body.staff .stat-label { font-size: .8rem; }
body.staff .tab { background: var(--surface); }
body.staff .modal-dialog { background: #111827; }
body.staff .table th { background: var(--surface-2); }
.form-bottom { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.detail-actions { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin-bottom: 18px; }

/* =====================================================================
   GİRİŞ / KURULUM / HATA
   ===================================================================== */
.auth-body {
  background-color: #0F172A;
  background-image:
    linear-gradient(180deg, rgba(15,23,42,.72) 0%, rgba(15,23,42,.86) 100%),
    var(--login-bg, none),
    repeating-linear-gradient(90deg, rgba(148,163,184,.05) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(148,163,184,.05) 0 1px, transparent 1px 80px),
    radial-gradient(900px 500px at 20% 10%, #334155 0%, #0F172A 60%);
  background-size: cover, cover, auto, auto, cover; background-position: center; background-attachment: scroll; color: #0F172A;
}
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); }
.auth-card { width: 100%; max-width: 440px; background: #fff; color: var(--navy-900); border-radius: 14px; padding: 32px 24px 26px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.auth-card.wide { max-width: 760px; }
.auth-logo { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 12px; background: var(--orange); color: #fff; }
.auth-logo .icon { width: 30px; height: 30px; }
.auth-title { text-align: center; font-size: 1.85rem; font-weight: 800; margin: 0 0 6px; color: var(--navy-900); letter-spacing: .01em; }
.auth-sub { text-align: center; color: var(--muted); margin: 0 0 26px; }
.auth-card .field > label { color: var(--navy-900); }
.auth-card input { background: #fff; color: var(--navy-900); border-color: var(--slate-200); }
.auth-card .btn-primary { box-shadow: none; }
.auth-note { text-align: center; color: var(--muted); font-size: .88rem; margin: 18px 0 0; }
.auth-foot { text-align: center; color: #94A3B8; font-size: .82rem; margin-top: 18px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand .brand-text { color: var(--navy-900); font-size: 1.3rem; }
.auth-brand .brand-mark { display: inline-flex; }
.error-card { text-align: center; }
.error-code { font-family: var(--mono); font-size: 3.2rem; font-weight: 700; color: var(--orange); line-height: 1; margin-bottom: 8px; }
.req-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.req-list li { display: flex; align-items: center; gap: 8px; font-size: .9rem; overflow-wrap: anywhere; }
.req-list .ok { color: var(--green-600); } .req-list .bad { color: var(--red); }
.req-list .icon { width: 18px; height: 18px; }

/* =====================================================================
   RESPONSIVE KIRILIMLAR
   ===================================================================== */
@media (min-width: 600px) { .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .price-head { display: none; }
  .price-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; background: var(--surface-2); }
  .price-row .field > label { display: block; font-size: .85rem; font-weight: 600; }
  .price-row .f-name { grid-column: 1 / -1; }
  .price-row .line-total { text-align: left; display: flex; flex-direction: column; gap: 4px; }
  .price-row .line-total::before { content: "Toplam"; font-family: var(--font); font-size: .85rem; color: var(--muted); font-weight: 600; }
  .price-row .row-del { grid-column: 1 / -1; }
  .price-row .row-del .icon-btn { width: 100%; flex: 1 1 auto; border: 1px solid var(--red); height: 42px; }
  .price-row .row-del .icon-btn::after { content: "Parçayı Sil"; margin-left: 8px; font-weight: 600; font-size: .9rem; }
}
@media (max-width: 768px) {
  .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .sig-grid { grid-template-columns: minmax(0, 1fr); }
  .kv.cols-2, .kv.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .toolbar .field.grow { grid-column: auto; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions > .btn { width: 100%; }
  .price-inputs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  /* Tabloları karta dönüştür */
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; padding: 6px 0; background: var(--surface); }
  .table-cards tbody tr:hover { background: var(--surface); }
  .table-cards td { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 14px; border-bottom: 1px dashed var(--border); text-align: right; min-width: 0; }
  .table-cards td:last-child { border-bottom: 0; }
  .table-cards td::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem; font-family: var(--font); }
  .table-cards td > * { min-width: 0; overflow-wrap: anywhere; }
  .table-cards td.num { white-space: normal; }
  .table-cards td[data-label=""]::before, .table-cards td:not([data-label])::before { display: none; }
  .table-cards td.td-main { display: block; text-align: left; background: var(--surface-2); border-bottom: 1px solid var(--border); }
  .table-cards td.td-main::before { display: none; }
  .table-cards td.td-actions { justify-content: flex-end; }
  .table-cards td.td-actions::before { display: none; }
  .table-cards .table-actions { justify-content: stretch; width: 100%; }
  .table-cards .table-actions .btn, .table-cards .table-actions form { flex: 1 1 auto; }
  .table-cards .table-actions form .btn { width: 100%; }
  .table-cards tfoot { display: block; }
  .card-flush .table-cards { padding: 0 12px 4px; }
}
@media (max-width: 480px) {
  .btn-group { flex-direction: column; align-items: stretch; }
  .btn-group > .btn, .btn-group > form, .btn-group > form .btn { width: 100%; }
  .page-header .btn-group, .detail-head .btn-group { width: 100%; }
  .price-inputs { grid-template-columns: minmax(0, 1fr); }
  .price-row { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  body.staff .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.staff .stat { padding: 12px 10px; }
  .part-row { grid-template-columns: minmax(0, 1fr) 72px 40px; }
  .auth-card { padding: 26px 18px 22px; }
  .modal { padding: 12px; }
  .modal-dialog { padding: 16px; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .s-head h2 { font-size: 1.4rem; }
  .s-head .btn { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 360px) {
  .part-row { grid-template-columns: minmax(0, 1fr) 64px 40px; gap: 6px; }
  .s-main { padding-left: 12px; padding-right: 12px; }
  .content { padding-left: 12px; padding-right: 12px; }
  body.staff .stats { grid-template-columns: minmax(0, 1fr); }
  body.staff .stat { flex-direction: row; align-items: center; justify-content: space-between; }
  .s-head { flex-direction: column; align-items: stretch; }
  .s-head .btn { width: 100%; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .sig-pad { height: 150px; }
  .s-bottomnav a { min-height: 44px; }
  .s-bottomnav .s-fab .icon { margin-top: -10px; width: 36px; height: 36px; padding: 8px; }
}

/* Yazdırma */
@media print {
  .sidebar, .topbar, .s-topbar, .s-bottomnav, .btn, .icon-btn, .admin-footer, .no-print { display: none !important; }
  body, body.staff { background: #fff; color: #000; }
  .content, .s-main { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
