*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* kabuk */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.rail { flex: 1 1 88px; max-width: 88px; background: var(--rail); padding: 16px 8px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rail .logo { align-self: center; width: 44px; height: 44px; border-radius: 14px; background: #2DD4BF; color: #062B27; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; margin-bottom: 12px; overflow: hidden; flex: none; }
.rail .logo img { width: 100%; height: 100%; object-fit: contain; }
.rail .logo.has-logo { background: transparent; }
.rail a.logo { text-decoration: none; }
.rail a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px; border-radius: 14px; text-decoration: none; font-size: 11px; font-weight: 600; color: var(--rail-idle); text-align: center; }
.rail a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.rail a:hover svg { color: var(--ic, #fff); }  /* seçili olmayanlar gri; üzerine gelince kendi rengi */
.rail a[aria-current="page"] { background: color-mix(in srgb, var(--ic, #2DD4BF) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--ic, #2DD4BF); color: #fff; font-weight: 700; }
.rail a[aria-current="page"] svg { color: var(--ic, #2DD4BF); }  /* seçili menünün simgesi kendi rengine döner */
.rail a[data-k="home"] { --ic: #5EEAD4; } .rail a[data-k="workorders"] { --ic: #FBBF24; } .rail a[data-k="requests"] { --ic: #60A5FA; }
.rail a[data-k="shipments"] { --ic: #FB923C; } .rail a[data-k="devices"] { --ic: #34D399; } .rail a[data-k="accounts"] { --ic: #A78BFA; }
.rail a[data-k="people"] { --ic: #F472B6; } .rail a[data-k="planning"] { --ic: #38BDF8; } .rail a[data-k="catalog"] { --ic: #FACC15; }
.rail a[data-k="stock"] { --ic: #94A3F8; } .rail a[data-k="reports"] { --ic: #FDA4AF; } .rail a[data-k="dealer"] { --ic: #5EEAD4; } .rail a[data-k="settings"] { --ic: #CBD5E1; }
.rail .push { margin-top: auto; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px 32px 32px; display: flex; flex-direction: column; gap: 20px; }
.cellname { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.cellname > span { overflow: hidden; text-overflow: ellipsis; }
.cellic { flex: none; }
.colhead { position: relative; user-select: none; }
.collabel { cursor: grab; display: inline-block; }
.colhead.over { box-shadow: inset 3px 0 0 var(--primary); background: var(--selected); border-radius: 6px; }
.colhead.dragging { opacity: .5; }
.colgrip { position: absolute; right: -9px; top: -8px; bottom: -8px; width: 12px; cursor: col-resize; touch-action: none; }
.colgrip::after { content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: transparent; }
.colhead:hover .colgrip::after, .colgrip.drag::after { background: var(--primary); }
.backbtn { flex: none; width: 50px; height: 50px; border: 1px solid var(--input-border); border-radius: 14px; background: var(--card); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.backbtn:hover { border-color: var(--primary); color: var(--primary); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.topbar .search { flex: 1 1 320px; position: relative; display: flex; align-items: center; }
.topbar .search svg { position: absolute; left: 13px; width: 17px; height: 17px; pointer-events: none; }
.topbar .search button { width: 100%; min-height: 38px; padding: 0 14px 0 40px; border: 1px solid var(--input-border); border-radius: 12px; background: var(--card); font-size: 14px; color: var(--muted); text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.topbar .search button:hover { border-color: var(--primary); }
kbd { font: 600 11px var(--mono); background: var(--bg); color: var(--muted); border: 1px solid #D5E0E6; border-radius: 6px; padding: 2px 6px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar { overflow: hidden; width: 44px; height: 44px; border-radius: 999px; background: #FDE3A7; color: #6B4300; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 0; padding: 0; cursor: pointer; }
.usermenu { position: relative; }
.usermenu .pop { position: absolute; right: 0; top: 52px; z-index: 50; background: var(--card); border: 1px solid var(--input-border); border-radius: 14px; box-shadow: 0 14px 36px rgba(16, 36, 46, .18); padding: 8px; min-width: 220px; }
.usermenu .pop .who { padding: 8px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.usermenu .pop button { width: 100%; min-height: 44px; border: 0; background: transparent; border-radius: 10px; text-align: left; padding: 0 12px; cursor: pointer; font-weight: 600; }
.usermenu .pop button:hover { background: var(--bg); }
h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0; font-size: 21px; }
.pagehead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pagehead .sub { color: var(--muted); font-size: 15px; }

/* bileşenler */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.btn { min-height: 46px; padding: 0 20px; border: 1px solid var(--input-border); border-radius: var(--radius-btn); background: var(--card); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--text); }
.btn:hover { border-color: var(--primary); color: var(--text); }
.btn-danger { background: var(--red-bg); border-color: var(--red-fg); color: var(--red-fg); }
.btn-danger:hover { background: var(--red-fg); border-color: var(--red-fg); color: #fff; }
.btn-success { background: var(--green-bg); border-color: #1E8A62; color: var(--green-fg); font-weight: 700; }
.btn-success:hover { background: #1E8A62; border-color: #1E8A62; color: #fff; }
.btn.ic-blue:not(.btn-primary) svg { color: var(--blue-fg); } .btn.ic-amber svg { color: #C26A00; } .btn.ic-purple svg { color: var(--purple-fg); }
.btn-ready { background: #12A678; border-color: #12A678; color: #fff; font-weight: 700; }
.btn-ready:hover { background: #0E8A63; border-color: #0E8A63; color: #fff; }
.btn-notready { background: #E8870B; border-color: #E8870B; color: #fff; font-weight: 700; }
.btn-notready:hover { background: #C26A00; border-color: #C26A00; color: #fff; }
.btn-primary svg { color: #fff; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn[disabled], .btn-save[disabled] { cursor: not-allowed; }
.btn-save { min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; font-weight: 700; cursor: pointer; background: var(--input-border); color: #fff; }
.btn-save.dirty { background: var(--primary); }
.btn-save.saved { background: var(--green-bg); color: var(--green-fg); }
.dirtynote { color: var(--amber-fg); font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; min-width: 0; }
.field > span, .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.input, .field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field input[type=url], .field textarea, .field select, input.input, select.input {
  min-height: 46px; width: 100%; padding: 0 12px; border: 1px solid var(--input-border); border-radius: var(--radius-input); background: var(--card); }
.field textarea { padding: 10px 12px; resize: vertical; }
.row { display: flex; flex-wrap: wrap; gap: 14px; }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--red-fg); font-size: 12px; font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.green { background: var(--green-bg); color: var(--green-fg); }
.badge.amber { background: var(--amber-bg); color: var(--amber-fg); }
.badge.blue { background: var(--blue-bg); color: var(--blue-fg); }
.badge.purple { background: var(--purple-bg); color: var(--purple-fg); }
.badge.red { background: var(--red-bg); color: var(--red-fg); }
.badge.gray { background: var(--gray-bg); color: var(--gray-fg); }
.table { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.table .tr { display: grid; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--bg); align-items: center; }
.table .tr.th { background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; border-top: 0; padding: 10px 14px; }
.scroll-x { overflow-x: auto; }
.scroll-x > .table { min-width: 560px; }
.switch { width: 42px; height: 24px; border: 0; border-radius: 999px; position: relative; cursor: pointer; background: var(--input-border); flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: var(--card); transition: left .12s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { left: 21px; }
.msgs { display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 12px 16px; border-radius: 12px; font-weight: 600; background: var(--green-bg); color: var(--green-fg); }
.msg.error { background: var(--red-bg); color: var(--red-fg); }
.msg.warning { background: var(--amber-bg); color: var(--amber-fg); }

/* ayarlar */
.settings { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.settings-nav { flex: 0 0 260px; max-width: 100%; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.settings-nav .grp { margin: 12px 0 4px; padding: 8px 12px; font-size: 13px; font-weight: 800; letter-spacing: .05em; color: var(--text); text-transform: uppercase; background: var(--bg); border-left: 4px solid var(--primary); border-radius: 0 8px 8px 0; }
.settings-nav .grp:first-child { margin-top: 0; }
.settings-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.settings-nav a:hover { background: var(--bg); }
.settings-nav a[aria-current="page"] { background: var(--selected); color: var(--selected-text); font-weight: 700; }
.settings-body { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 44px; height: 44px; border-radius: 999px; cursor: pointer; border: 3px solid transparent; }
.swatch[aria-pressed="true"] { border-color: var(--text); box-shadow: inset 0 0 0 2px #fff; }
.daybtns { display: flex; flex-wrap: wrap; gap: 8px; }
.daybtn { position: relative; }
.daybtn input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.daybtn span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 56px; padding: 0 14px; border-radius: 12px; font-weight: 600; border: 1px solid var(--input-border); background: var(--card); }
.daybtn input:checked + span { background: var(--selected); border-color: var(--primary); color: var(--selected-text); }
.daybtn input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.logo-prev { width: 72px; height: 72px; border-radius: 18px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; overflow: hidden; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; background: var(--card); }
.permcell { min-height: 40px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; width: 100%; }
.permcell input { position: absolute; opacity: 0; }
.permbox { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: transparent; font-weight: 700; background: var(--card); border: 1.5px solid var(--input-border); }
.permcell input:checked + .permbox { background: var(--primary); border-color: var(--primary); color: #fff; }
.permcell input:disabled { cursor: default; }
.permcell input:focus-visible + .permbox { outline: 2px solid var(--primary); outline-offset: 2px; }
.permcell { position: relative; }

/* tasarım: tarama kutuları */
.alerts { display: flex; flex-wrap: wrap; gap: 14px; }

/* giriş ekranları */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 32px 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-card .brand { display: flex; align-items: center; gap: 12px; }
.auth-card .brand .logo-prev { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.auth-card .btn { width: 100%; min-height: 48px; }
.auth-card .field { flex: none; }

/* mobil */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .rail { position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 40; max-width: none; height: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 6px 8px; gap: 2px; }
  .rail .logo { display: none; }
  .rail a { flex: 0 0 72px; min-height: 56px; }
  .rail .push { margin-top: 0; }
  .main { padding: 16px 16px 96px; }
  .settings-nav { flex-basis: 100%; }
  h1 { font-size: 24px; }
}
[x-cloak] { display: none !important; }

.th-cell { padding: 6px 8px; background: var(--soft); font-size: 12px; font-weight: 700; color: var(--muted); }
.td-cell { padding: 6px 8px; border-top: 1px solid var(--bg); }

/* bildirim zili */
.bellmenu { position: relative; }
.bellbtn { position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--input-border); background: var(--card); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.bellbtn:hover { border-color: var(--primary); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #B42318; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bellpop { width: 360px; max-width: calc(100vw - 32px); right: 0; top: 52px; position: absolute; z-index: 50; background: var(--card); border: 1px solid var(--input-border); border-radius: 14px; box-shadow: 0 14px 36px rgba(16, 36, 46, .18); padding: 6px; }
.notif { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.notif:hover { background: var(--bg); }
.notif.unread { background: var(--tint); }
.notif.unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--primary); margin-right: 8px; }
.usermenu .pop .menulink { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; font-weight: 600; color: var(--text); text-decoration: none; }
.usermenu .pop .menulink:hover { background: var(--bg); }

/* arıza seçici (servis formu) */
.fp-field { position: relative; }
.fp-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 4px; background: var(--card); border: 1px solid var(--input-border); border-radius: 12px; box-shadow: 0 14px 36px rgba(16, 36, 46, .18); max-height: 260px; overflow-y: auto; padding: 4px; }
.fp-list button { width: 100%; min-height: 44px; border: 0; background: transparent; text-align: left; padding: 6px 12px; border-radius: 8px; cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 2px; }
.fp-list button:hover, .fp-list button:focus { background: var(--bg); }

/* yükleniyor / iskelet durumları */
.skel { display: block; height: 14px; border-radius: 8px; background: linear-gradient(90deg, #E8EFF3 25%, #F4F8FA 37%, #E8EFF3 63%); background-size: 400% 100%; animation: skel 1.4s ease infinite; }
.skel.lg { height: 44px; border-radius: 12px; }
.skel-box { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
/* bakım modu uyarı şeridi (yönetici) */
.maint-bar { background: var(--amber-bg); border-bottom: 1px solid #F2D49B; color: var(--amber-fg); font-size: 13px; font-weight: 600; padding: 8px 16px; text-align: center; }

/* tarih / saat seçiciler diğer alanlarla aynı görünür (tarayıcı varsayılanı değil) */
input[type=date], input[type=time], input[type=datetime-local], input[type=month] {
  min-height: 46px; width: 100%; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--input-border); border-radius: var(--radius-input); background: var(--card); font: inherit; color: var(--text); }
input[type=date]:focus, input[type=time]:focus, input[type=datetime-local]:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }

.cmodal-ov { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(11, 43, 58, .45); }
.cmodal { width: 100%; max-width: 440px; background: var(--card); border-radius: 18px; padding: 24px 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 24px 60px rgba(11, 43, 58, .35); }
.cmodal-t { font-size: 20px; font-weight: 700; }
.cmodal-m { color: var(--muted); font-size: 15px; line-height: 1.5; }
.cmodal-b { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.cmodal-b .btn { min-height: 46px; padding: 0 22px; }
.cmodal-b .cm-danger { background: var(--red-fg, #B3261E); border-color: var(--red-fg, #B3261E); }
.cmodal-b .cm-danger:hover { background: #8F1D17; border-color: #8F1D17; }

/* Giriş sayfaları: koyu zemin + hareketli cihaz ağı (static/js/auth-net.js). Zemin firma renginden türetilir. */
.auth-bg { background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--primary) 35%, #0B2B3A) 0, #0B2B3A 50%, #06202B 100%); overflow-x: hidden; }
#auth-net { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.auth-bg .auth { position: relative; z-index: 1; }
.auth-bg .auth-card { background: rgba(255, 255, 255, .97); border-color: rgba(255, 255, 255, .25); box-shadow: 0 30px 90px rgba(0, 0, 0, .45); transition: transform .15s ease-out; }
@media (prefers-reduced-motion: reduce) { .auth-bg .auth-card { transition: none; } }

/* Ana sayfa (genel bakış) */
.hm-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 26px 30px 28px; color: #fff; background: radial-gradient(900px 300px at 85% -20%, #13806f55, transparent 60%), linear-gradient(135deg, #0B2B3A 0%, #0E3A4D 100%); display: flex; flex-direction: column; gap: 22px; box-shadow: 0 8px 28px rgba(11, 43, 58, .22); }
.hm-hero h1 { color: #fff; font-size: 30px; }
.hm-sub { color: #A9C9D6; font-size: 15px; }
.hm-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px; font-weight: 700; text-decoration: none; font-size: 14px; background: #ffffff1a; color: #fff; border: 1px solid #ffffff2e; }
.hm-chip:last-child { background: #2DD4BF; color: #062B27; border-color: transparent; }
.hm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.hm-stat { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 18px; background: #ffffff12; border: 1px solid #ffffff1f; text-decoration: none; color: #fff; transition: background .15s, transform .15s; }
.hm-stat:hover { background: #ffffff1f; transform: translateY(-2px); }
.hm-stat .n { font-size: 38px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.hm-stat .l { font-size: 13px; font-weight: 600; color: #BBD6E0; }
.hm-stat .t { display: flex; justify-content: space-between; align-items: end; gap: 8px; }
.hm-pill { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; align-self: flex-start; }
.hm-alerts { display: flex; flex-wrap: wrap; gap: 12px; }
.hm-al { flex: 1 1 230px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--card); border: 1px solid var(--border); border-left-width: 5px; border-radius: 14px; text-decoration: none; color: var(--text); box-shadow: 0 1px 2px rgba(11, 43, 58, .05); transition: box-shadow .15s, transform .15s; }
.hm-al:hover { box-shadow: 0 6px 16px rgba(11, 43, 58, .12); transform: translateY(-1px); }
.hm-al .ic { flex: 0 0 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.hm-al b { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1; display: block; }
.hm-al .t { font-size: 13px; font-weight: 600; color: var(--muted); }
.hm-tech { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.hm-ring { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: conic-gradient(var(--c, #0B7F73) calc(var(--p) * 1%), #E6EEF2 0); position: relative; }
.hm-ring::before { content: ""; position: absolute; inset: 5px; background: var(--card); border-radius: 50%; }
.hm-ring i { position: relative; font-style: normal; font-size: 12px; font-weight: 700; }
.hm-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.hm-live { animation: hm-pulse 1.8s infinite; }
@keyframes hm-pulse { 0% { box-shadow: 0 0 0 0 #12A67866; } 100% { box-shadow: 0 0 0 8px #12A67800; } }
@media (prefers-reduced-motion: reduce) { .hm-live { animation: none; } .hm-stat, .hm-al { transition: none; } }

/* “Yeni ekle” penceresi */
.qa-ov { position: fixed; inset: 0; z-index: 9000; background: rgba(11, 43, 58, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.qa { background: var(--card); border-radius: 18px; padding: 22px 24px; width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 20px 50px rgba(11, 43, 58, .3); }
.qa h2 { font-size: 19px; }
.qa-warn { background: var(--amber-bg); color: var(--amber-fg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.qa-warn ul { margin: 0; padding-left: 18px; }
.qa [hidden] { display: none !important; }

/* Toplu işlem çubukları (Departmanlar) */
.bulkwrap { display: flex; flex-direction: column; gap: 10px; }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 16px; border-radius: 14px; background: var(--selected); }
.bulkbar-soft { background: var(--bg); }
.bulkbar-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-width: 0; flex: 1 1 280px; }
.bulkbar-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
.bulkbar-act .btn { min-height: 44px; }
.bulkbar-field { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0; }
.bulkbar-field .input { min-height: 44px; width: 260px; max-width: 100%; }
.linkbtn { background: none; border: 0; padding: 4px 0; font: inherit; font-weight: 700; color: var(--primary); cursor: pointer; text-decoration: underline; }
.bulkhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 44px; }
.bulkhead-r { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.bulkhead-r .btn { min-height: 44px; border-radius: 10px; }
.bulkhead-all { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.bulkhead-all input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.filterrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; width: 100%; }
.filterrow .bulkhead-r { margin-left: auto; }

/* Cihaz kartı: satır içi değer girişi — kalem yalnız satırın üzerine gelince görünür; değerin kendisine tıklamak da düzenler */
.inl-btn { border: 0; background: transparent; color: var(--faint); border-radius: 8px; min-height: 28px; min-width: 28px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; opacity: 0; transition: opacity .12s; }
.inl-cell:hover .inl-btn, .inl-btn:focus-visible { opacity: 1; }
.inl-btn:hover { background: #E3ECF0; color: var(--primary); }
.inl-btn.inl-add { opacity: 1; color: var(--primary); padding: 0 2px; font-weight: 600; }
.inl-btn.inl-add:hover { background: transparent; text-decoration: underline; }
.inl-val { cursor: text; border-radius: 6px; transition: background .12s; }
.inl-cell:hover .inl-val { background: var(--soft); box-shadow: 0 0 0 4px #F1F5F7; }
@media (hover: none) { .inl-btn:not(.inl-add) { opacity: .55; } }
.inl-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.inl-form .input { min-height: 40px; width: 100%; }
.inl-act { display: flex; gap: 8px; }
.inl-act .btn { min-height: 40px; }

/* Ortak form düzeni: dar sütun, bölümlere ayrılmış kartlar, 2/3 sütunlu ızgara, alt eylem satırı */
.form-page { max-width: 920px; display: flex; flex-direction: column; gap: 20px; }
.form-section { padding: 22px 24px; gap: 18px; }
.form-section > h2 { font-size: 16px; font-weight: 700; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.form-grid > .field, .form-grid > label.field { flex: none; }
.form-grid > .span-2 { grid-column: 1 / -1; }
.field > span { font-size: 13px; }
.field > small, .field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-actions .btn { min-height: 48px; }
.form-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-weight: 600; }
.form-check input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
@media (max-width: 760px) { .form-grid, .form-grid.cols-3 { grid-template-columns: minmax(0, 1fr); } .form-section { padding: 18px 16px; } }

/* Tıklanabilir değer: renk korunur, üzerine gelince altı çizilir, sağda küçük ok */
.lnk { color: inherit; text-decoration: none; display: inline-flex; align-items: baseline; gap: 4px; }
.lnk:hover { text-decoration: underline; text-underline-offset: 3px; }
.lnk .lnk-arrow { opacity: 0; transition: opacity .12s, transform .12s; font-weight: 700; }
.lnk:hover .lnk-arrow, .lnk:focus-visible .lnk-arrow { opacity: .8; transform: translateX(2px); }
@media (hover: none) { .lnk .lnk-arrow { opacity: .5; } }

/* Çoklu seçim çipleri (örn. parçanın uygun olduğu modeller) */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-check span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--track); color: var(--text); font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: background .12s; }
.chip-check input:checked + span { background: var(--selected); color: var(--selected-text); border-color: var(--primary); }
.chip-check input:checked + span::before { content: "✓"; margin-right: 6px; font-weight: 700; }
.chip-check input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Çoklu seçim açılır menüsü: tetikleyici özel seçim menüsüyle aynı görünür; açılan liste .sui (select-ui) stilini kullanır */
.msel { position: relative; }
.msel-btn { width: 100%; min-height: 46px; padding: 0 38px 0 12px; border: 1px solid var(--input-border); border-radius: var(--radius-input); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A7080' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; text-align: left; font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-btn:hover { border-color: var(--dashed); }
.msel-btn[aria-expanded="true"], .msel-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.msel-empty { color: var(--muted); }
.msel-pop { z-index: 99999; }
.msel-pop ul { max-height: 260px; }
.msel-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 13px; }


/* Servis formu: ilerleme çubuğu, etiketler, kalanlar listesi */
.step-bar { position: sticky; top: 0; z-index: 6; background: var(--bg); padding: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.step-bar .st { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--track); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; border: 1px solid transparent; }
.step-bar .st i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--card); font-size: 12px; font-weight: 700; }
.step-bar .st small { font-weight: 500; opacity: .7; }
.step-bar .st.done { background: var(--green-bg); color: var(--green-fg); }
.step-bar .st.done i { background: #12A678; color: #fff; }
.step-bar .st.todo { background: var(--amber-bg); color: var(--amber-fg); }
.step-bar .st.cur { box-shadow: 0 0 0 2px var(--primary); }
.step-bar .st.opt { background: transparent; border: 1px dashed var(--dashed); color: var(--primary); }
.tag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: var(--track); color: var(--text); vertical-align: middle; }
.tag.req { background: var(--amber-bg); color: var(--amber-fg); }
.collapsed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border: 1px dashed var(--dashed); border-radius: 16px; background: var(--card); color: var(--primary); font-weight: 700; }
.todo-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: 14px; padding: 5px 0; background: none; border: 0; cursor: pointer; color: var(--text); }
.todo-row b { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.todo-row.ok b { background: #12A678; color: #fff; }
.todo-row.no b { background: var(--amber-bg); color: var(--amber-fg); }
.todo-row.no:hover span { text-decoration: underline; }

/* Servis formu parça satırları: kompakt tek satır (parça · adet · [fiyat · tutar] · sil) */
.part-grid { display: grid; gap: 8px; align-items: center; }
.part-grid .input { min-height: 40px; padding: 0 10px; }
.part-grid .part-qty { text-align: center; padding: 0 6px; }
.part-grid .part-x { min-height: 40px; min-width: 40px; width: 40px; padding: 0; color: var(--red-fg); font-size: 18px; line-height: 1; }
.part-head { color: var(--muted); font-size: 12px; font-weight: 600; padding: 0 2px; }

/* Servis formu: kayıtlı imza önizlemesi (web'de imza atılmaz) */
.sig-prev { min-height: 96px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); display: flex; align-items: center; justify-content: center; padding: 8px; }
.sig-prev img { max-width: 100%; max-height: 90px; }
.sig-prev.empty { border-style: dashed; border-color: var(--dashed); color: var(--muted); font-size: 14px; }

/* Servis formu üst bilgi kartı: her değerin üstünde adı yazar */
.info-card { padding: 20px 22px; gap: 14px; }
.info-card hr { border: 0; border-top: 1px solid var(--border); margin: 2px 0; width: 100%; }
.info-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 24px; }
.kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv > span { font-size: 12px; font-weight: 600; color: var(--muted); }
.kv > b { font-weight: 600; overflow-wrap: anywhere; }
.kv > input[type=time] { min-height: 40px; max-width: 150px; }
label.photo-add { cursor: pointer; }
label.photo-add:hover { background: var(--selected); }

/* Ayarlar › İş emri türleri: tek satırlık tür listesi */
.wotypes { display: flex; flex-direction: column; }
.wotype { display: grid; grid-template-columns: 44px minmax(140px, 1.5fr) 76px minmax(190px, 1.3fr) 84px 84px 56px 96px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.wotype.head { border-top: 0; padding: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.wotype .btn { white-space: nowrap; }
.wotype .c { display: flex; justify-content: center; align-items: center; gap: 6px; cursor: pointer; }
.wotype .l { display: none; font-size: 13px; }
.wotype input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); }
.wotype input[type=color] { width: 38px; height: 38px; padding: 2px; border-radius: 10px; }
.wotype-new { background: var(--soft); border: 0; border-radius: 14px; padding: 12px; position: relative; margin-top: 4px; }
.wotype-new .newhead { position: absolute; top: -9px; left: 12px; font-size: 12px; font-weight: 700; background: var(--card); padding: 0 6px; border-radius: 6px; }
@media (max-width: 1000px) {
  .wotype { display: flex; flex-wrap: wrap; }
  .wotype.head { display: none; }
  .wotype > input[type=text]:not([inputmode]) { flex: 1 1 200px; }
  .wotype > input[inputmode] { flex: 0 0 76px; }
  .wotype > select, .wotype > .sui { flex: 1 1 200px; }
  .wotype .l { display: inline; }
}
.timepair { display: flex; flex-wrap: wrap; gap: 8px; }
.timepair input { min-height: 40px; width: 150px; }
@media (min-width: 640px) { .kv.times { grid-column: span 2; } }
.hov:hover { background: var(--bg); }

/* Hızlı planla formu: Alpine x-show satır içi display'i sildiği için yerleşim sınıfta durur */
.qplan { display: flex; flex-direction: column; align-items: stretch; gap: 12px; background: var(--bg); border-radius: 12px; padding: 14px; }
.xs-col12 { display: flex; flex-direction: column; gap: 12px; }
.xs-col6 { display: flex; flex-direction: column; gap: 6px; }
.xs-pick { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--selected); border: 2px solid var(--primary); border-radius: 12px; padding: 10px 14px; }

/* kullanıcı listesi */
.ugrid { grid-template-columns: minmax(200px, 1.2fr) minmax(280px, 2fr) 56px 110px; }
.umenu { position: relative; }
.umenu > summary { list-style: none; min-height: 36px; min-width: 40px; padding: 0 10px; justify-content: center; cursor: pointer; font-size: 18px; line-height: 1; }
.umenu > summary::-webkit-details-marker { display: none; }
.umenu-list { position: absolute; right: 0; top: 40px; z-index: 20; min-width: 190px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(11, 43, 58, .14); padding: 6px; display: flex; flex-direction: column; }
.umenu-list button { width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.umenu-list button:hover { background: var(--soft); }
@media (max-width: 760px) { .ugrid { grid-template-columns: 1fr 56px 110px; } .ugrid > :nth-child(2) { grid-column: 1 / -1; order: 5; } .ugrid.th { display: none; } }

/* kullanıcı süzgeci / davet hizası */
.ualign { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .ualign { grid-template-columns: 1fr; } }
/* eksik parça dikkat çekici nabız */
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red-fg); display: inline-block; flex: none; animation: pulse-dot 1.6s ease-out infinite; }
.pulse-ring { animation: pulse-ring 1.8s ease-out infinite; }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(192, 57, 43, 0); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(192, 57, 43, .45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(192, 57, 43, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot, .pulse-ring { animation: none; } }

/* yeni kurulum bildirimi: ana sayfa kartında yeşil nabız */
.hm-al.pulse .ic { animation: pulse-green 1.8s ease-out infinite; }
.pulse-ring-green { animation: pulse-green 1.8s ease-out infinite; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(18, 166, 120, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(18, 166, 120, 0); } }
@media (prefers-reduced-motion: reduce) { .hm-al.pulse .ic, .pulse-ring-green { animation: none; } }
