/* Servis takip programı — arayüz stilleri (mobil öncelikli) */
:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #0f1419;
  --text-2: #3d4452;
  --muted: #6b7280;
  --line: #e7e9ee;
  --line-strong: #d3d7df;
  --brand: #e11d2a;
  --brand-dark: #bf1520;
  --ink: #0e1015;
  --ink-2: #1a1d24;
  --blue: #2563eb;
  --blue-soft: #e8efff;
  --green: #0f9d6b;
  --green-soft: #e3f6ee;
  --amber: #b45309;
  --amber-soft: #fff3e0;
  --red: #dc2626;
  --red-soft: #fdeaea;
  --violet: #7c3aed;
  --violet-soft: #f0e9ff;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, .05);
  --shadow: 0 1px 2px rgba(15, 20, 25, .04), 0 4px 16px rgba(15, 20, 25, .05);
  --shadow-lg: 0 12px 40px rgba(15, 20, 25, .16);
  --topbar: 64px;
  --sidebar: 248px;
  --bottomnav: 66px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
small, .muted { color: var(--muted); }
.ic { width: 20px; height: 20px; flex: none; }
.mt { margin-top: 12px; } .mt-lg { margin-top: 20px; } .mb { margin-bottom: 14px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.strong { font-weight: 600; }
.pos { color: var(--green); } .neg { color: var(--red); }
.hidden { display: none !important; }
.only-desktop, .only-desktop-flex { display: none !important; }
@media (min-width: 900px) {
  .only-mobile { display: none !important; }
  .only-desktop { display: revert !important; }
  .only-desktop-flex { display: inline-flex !important; }
}

/* ---------- Uygulama iskeleti ---------- */
.app { display: flex; min-height: 100vh; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
  width: var(--sidebar); flex: none; background: var(--ink); color: #c9ced8;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand img { height: 26px; filter: brightness(0) invert(1); }
.brand span { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--brand); color: #fff; padding: 3px 8px; border-radius: 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #aeb4c0; font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side-nav a.active { background: rgba(255,255,255,.09); color: #fff; }
.side-nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-nav a .ic { width: 19px; height: 19px; }
.side-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0; padding: 12px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 600; box-shadow: 0 6px 18px rgba(225,29,42,.35); }
.side-cta:hover { background: var(--brand-dark); text-decoration: none; }
.side-user { display: flex; align-items: center; gap: 8px; padding: 12px 4px 0; border-top: 1px solid rgba(255,255,255,.08); }
.side-user-name { flex: 1; min-width: 0; color: #fff; font-weight: 600; font-size: 13.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-name small { display: block; color: #8b93a3; font-weight: 400; font-size: 12px; }
.side-user .icon-btn { color: #8b93a3; padding: 7px; }
.side-user .icon-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.side-user .icon-btn .ic { width: 18px; height: 18px; }
.side-user form { margin: 0; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #ff4d57, var(--brand-dark)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
a.avatar:hover { text-decoration: none; }

.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: rgba(244,245,248,.85); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.topsearch { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.topsearch:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.topsearch .ic { color: var(--muted); width: 18px; }
.topsearch input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: none; height: 42px; font: inherit; font-size: 15px; outline: none; padding: 0; }
.topbar .btn-primary { margin-left: auto; }
.icon-btn { background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; display: inline-flex; border-radius: 10px; }
.brand-m img { height: 24px; display: block; }

.main { flex: 1; width: 100%; max-width: 1320px; padding: 8px 28px 48px; }
.main-bare { max-width: none; padding: 0; }
.drawer-backdrop { display: none; }
.bottomnav { display: none; }

@media (max-width: 899px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .drawer-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(10,12,16,.45); z-index: 55; }
  .topbar { padding: 0 12px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); height: 58px; }
  .topbar .topsearch { display: none; }
  .brand-m { margin-right: auto; }
  .main { padding: 16px 14px calc(var(--bottomnav) + 28px + env(safe-area-inset-bottom)); }
  .main-bare { padding: 0; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255,255,255,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    height: calc(var(--bottomnav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottomnav a, .bottomnav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); background: none; border: 0; font-family: inherit; cursor: pointer; }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav .active { color: var(--brand); }
  .bottomnav .bn-cta { color: var(--text); }
  .bottomnav .bn-cta .ic { background: var(--brand); color: #fff; border-radius: 14px; width: 44px; height: 44px; padding: 11px; margin-top: -20px; box-shadow: 0 8px 20px rgba(225,29,42,.4); }
}

/* ---------- Sayfa başlığı ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 8px 0 20px; }
.page-head h1 { margin-right: auto; }
.page-head .sub { width: 100%; margin-top: -4px; color: var(--muted); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Kart / ızgara ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card + .card, .card + .grid, .grid + .card, .card + details, details + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin-right: auto; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.grid > * { min-width: 0; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}
@media (max-width: 699px) { .card-head { padding: 14px 16px; } .card-body { padding: 16px; } }

/* ---------- Özet kutuları ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 18px; }
@media (min-width: 700px) { .kpis { grid-template-columns: repeat(3, 1fr); } .kpis.kpis-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .kpis.kpis-5 { grid-template-columns: repeat(5, 1fr); } }
.kpi { position: relative; display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s; }
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,20,25,.08); border-color: var(--line-strong); }
.kpi .v { font-size: 28px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .v.sm { font-size: 21px; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 4px; font-weight: 500; }
.kpi .l small { font-weight: 400; }
.kpi-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 12px; }
.kpi-ic .ic { width: 19px; height: 19px; }
.ic-blue { background: var(--blue-soft); color: var(--blue); }
.ic-green { background: var(--green-soft); color: var(--green); }
.ic-amber { background: var(--amber-soft); color: var(--amber); }
.ic-red { background: var(--red-soft); color: var(--red); }
.ic-violet { background: var(--violet-soft); color: var(--violet); }
.ic-gray { background: #eef0f4; color: var(--text-2); }
.kpi.warn .v { color: var(--amber); } .kpi.danger .v { color: var(--red); } .kpi.ok .v { color: var(--green); }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr.link { cursor: pointer; }
.table tbody tr:hover { background: #fafbfc; }
.table tfoot td { font-weight: 600; background: var(--surface-2); }
.table .th-num { text-align: right; }
@media (max-width: 699px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table.stack td { border: 0; padding: 2px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.stack td::before { content: attr(data-l); color: var(--muted); font-size: 13px; text-align: left; flex: none; }
  .table.stack td.main-cell { display: block; text-align: left; font-weight: 600; font-size: 15px; }
  .table.stack td.main-cell::before { content: none; }
  .table.stack td:empty { display: none; }
}

/* ---------- İş listesi ---------- */
.wo-list { list-style: none; margin: 0; padding: 0; }
.wo-item { display: flex; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text); transition: background .12s; }
.wo-item:last-child { border-bottom: 0; }
a.wo-item:hover { background: #fafbfc; text-decoration: none; }
/* Türk plakası görünümü */
.wo-plate {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding-right: 9px; overflow: hidden;
  font: 700 14px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .06em; color: var(--text);
  background: #fff; border: 1.5px solid #1c1f26; border-radius: 6px; min-width: 118px; box-shadow: var(--shadow-sm);
}
.wo-plate::before { content: "TR"; align-self: stretch; display: grid; place-items: center; width: 18px; background: #1d4ed8; color: #fff; font: 700 8px/1 Inter, sans-serif; letter-spacing: 0; }
.wo-plate.none { border-color: var(--line-strong); color: var(--muted); font: 500 12px/1 Inter, sans-serif; letter-spacing: 0; padding: 0 10px; justify-content: center; }
.wo-plate.none::before { display: none; }
.wo-main { flex: 1; min-width: 0; }
.wo-title { font-weight: 600; }
.wo-title .muted { font-weight: 400; }
.wo-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; }
.wo-side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
@media (max-width: 599px) {
  .wo-item { flex-wrap: wrap; padding: 14px 16px; align-items: flex-start; }
  .wo-side { flex-direction: row; width: 100%; justify-content: flex-start; align-items: center; flex-wrap: wrap; }
  .wo-plate { min-width: 0; }
}

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: #eef0f4; color: var(--text-2); line-height: 1.5; }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-gray { background: #eef0f4; color: #475063; }
.badge-blue { background: var(--blue-soft); color: #1d4ed8; }
.badge-amber { background: var(--amber-soft); color: #9a4a06; }
.badge-green { background: var(--green-soft); color: #0b7a53; }
.badge-dark { background: #1f232b; color: #fff; }
.badge-red, .badge-late { background: var(--red-soft); color: #b91c1c; }
.badge-acil { background: var(--brand); color: #fff; letter-spacing: .04em; }
.badge-outline { background: none; border: 1px solid var(--line-strong); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 11px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: #c3c8d2; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(225,29,42,.25); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-dark { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-success { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(15,157,107,.25); }
.btn-success:hover { background: #0b8159; border-color: #0b8159; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #f3c0c0; }
.btn-ghost { border-color: transparent; background: none; box-shadow: none; }
.btn-ghost:hover { background: #eceef2; border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 54px; font-size: 16px; padding: 0 22px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlg-label { margin-top: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); }
.dlg-label:first-child { margin-top: 0; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions-hint { grid-column: 1 / -1; flex-basis: 100%; margin-top: -2px; font-size: 13px; color: var(--muted); }
.big-actions .btn { height: 56px; font-size: 15px; min-width: 0; white-space: normal; text-align: center; line-height: 1.2; padding: 0 10px; border-radius: 13px; }
@media (min-width: 900px) { .big-actions { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Formlar ---------- */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 700px) {
  .form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .span-2 { grid-column: span 2; }
  .span-all { grid-column: 1 / -1; }
}
.field label, .label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.field .req::after { content: " *"; color: var(--brand); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=search], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; color: var(--text);
  font: inherit; font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
input[type=file] { padding: 9px; height: auto; font-size: 14px; background: var(--surface-2); border-style: dashed; }
textarea { height: auto; min-height: 80px; padding: 11px 14px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
input::placeholder, textarea::placeholder { color: #9aa1ae; }
input.upper { text-transform: uppercase; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; font-size: 14.5px; }
.check input { width: 19px; height: 19px; accent-color: var(--brand); }
.quick-dt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #eef0f4; border-radius: 12px; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 14px; font-weight: 600; font-size: 14px; border-radius: 9px; color: var(--text-2); transition: background .12s, color .12s; }
.seg input:checked + span { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(15,20,25,.12); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@media (max-width: 699px) { .form-actions .btn { flex: 1; } }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

details.more { border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface); }
details.more > summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--ink-2); color: #fff; font-size: 16px; line-height: 1; }
details.more[open] > summary::before { content: "–"; }
details.more[open] { border-style: solid; box-shadow: var(--shadow); }
details.more > summary small { font-weight: 400; }
details.more > .more-body { padding: 4px 20px 20px; }

/* ---------- Uyarılar ---------- */
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; font-weight: 500; font-size: 14.5px; }
.alert-success { background: var(--green-soft); border-color: #b9e7d4; color: #0a5e41; }
.alert-danger { background: var(--red-soft); border-color: #f5c2c2; color: #8f1b1b; }
.alert-warning { background: #fff8e6; border-color: #f6dd9a; color: #6d4b00; }
.alert-info { background: var(--blue-soft); border-color: #c3d4fb; color: #1b3f8f; }
.alert a { color: inherit; text-decoration: underline; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: #e9ebf0; border-radius: 13px; margin-bottom: 16px; scrollbar-width: none; width: fit-content; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 14px; color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap; border-radius: 10px; }
.tabs a:hover { color: var(--text); text-decoration: none; background: rgba(255,255,255,.5); }
.tabs a.active { color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(15,20,25,.12); }
.tabs .count { font-size: 11px; background: #eef0f4; padding: 1px 7px; border-radius: 9px; margin-left: 5px; color: var(--muted); }

/* ---------- İş emri başlığı ---------- */
.wo-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 14px; }
.wo-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.wo-head-no { font-weight: 800; font-size: 20px; letter-spacing: -.01em; margin-right: 4px; }
.wo-head-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px 22px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; }
.wo-head-facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wo-head-facts small { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.wo-head-facts b { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 699px) { .wo-head { padding: 16px; } .wo-head-facts { grid-template-columns: 1fr 1fr; } }

.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 499px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 10px; } }

.totals div { display: flex; justify-content: space-between; padding: 6px 0; font-variant-numeric: tabular-nums; }
.totals .grand { font-size: 18px; font-weight: 700; }
.totals .bal { font-size: 18px; font-weight: 700; border-top: 1px dashed var(--line-strong); margin-top: 6px; padding-top: 12px; }

/* ---------- Zaman çizelgesi ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); }
.timeline li:first-child::before { border-color: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 8.5px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Fotoğraflar ---------- */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.photo { position: relative; display: block; border-radius: 12px; overflow: hidden; background: #eef0f4; aspect-ratio: 1; border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
a.photo:hover img { transform: scale(1.04); }
.photo .cap { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: 11px; padding: 16px 8px 6px; }
.photo.pdf { display: grid; place-items: center; font-weight: 700; color: var(--muted); }

/* ---------- Pencereler ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog[open] { animation: dlgIn .18s ease-out; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
dialog::backdrop { background: rgba(10, 12, 16, .5); backdrop-filter: blur(2px); }
dialog .dlg-head { display: flex; align-items: center; padding: 18px 20px 10px; }
dialog .dlg-head h2 { margin-right: auto; font-size: 18px; }
dialog .dlg-body { padding: 10px 20px 20px; max-height: calc(100vh - 190px); overflow-y: auto; }
dialog .dlg-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 599px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  dialog .dlg-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  dialog .dlg-foot .btn { flex: 1; }
}

/* ---------- Diğer ---------- */
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 16px; border-top: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters .field { min-width: 150px; flex: 1; }
.filters .field.grow { flex: 3; min-width: 220px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-sm); }
.chip:hover { text-decoration: none; border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.note-box { background: #fffaeb; border: 1px solid #f5e3a6; border-radius: 11px; padding: 11px 14px; }
.lines-done td { color: var(--muted); }
.done-mark { color: var(--green); font-weight: 700; }
.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 13px; margin-top: 6px; box-shadow: var(--shadow-lg); max-height: 380px; overflow-y: auto; padding: 6px; }
.suggest-list button { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 9px; background: none; font: inherit; cursor: pointer; }
.suggest-list button:hover, .suggest-list button.hl { background: var(--surface-2); }
.suggest-list small { display: block; width: 100%; }
.selected-box { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1.5px solid #9fdcc3; background: var(--green-soft); border-radius: 12px; }
.step-no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink-2); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.repeat-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.repeat-row .n { width: 22px; color: var(--muted); font-weight: 600; text-align: right; flex: none; }
.repeat-row input, .repeat-row textarea { flex: 1; }
.bar { display: block; height: 8px; background: #eef0f4; border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar i.green { background: var(--green); } .bar i.violet { background: var(--violet); }
.barcell { display: flex; align-items: center; gap: 12px; }
.barcell .bar { flex: 1; }
.barcell b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 104px; text-align: right; }
.dist + .dist { margin-top: 14px; }
.dist-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; }
.dist-row b { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 699px) { .barcell .bar { display: none; } .barcell b { min-width: 0; } }

/* İşlem / parça satırları */
.line-meta { display: block; font-weight: 400; margin-top: 2px; }
.line-meta + br { display: none; }
td.line-act { text-align: right; white-space: nowrap; }
@media (max-width: 699px) {
  .table.stack tr:has(td.line-check) { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: "c d a" "c t a"; gap: 0 10px; align-items: start; }
  .table.stack td.line-check { grid-area: c; } .table.stack td.main-cell { grid-area: d; } .table.stack td.line-act { grid-area: a; } .table.stack td.line-total { grid-area: t; justify-content: flex-start; padding-top: 4px; }
  .table.stack td.line-check, .table.stack td.line-act { display: block; width: auto; padding: 0; }
  .table.stack td.line-check::before, .table.stack td.line-act::before, .table.stack td.line-total::before { content: none; }
  .table.stack td.line-act { display: flex; }
}

/* ---------- Giriş ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--brand) 25%, #0e1015) 0%, transparent 60%), radial-gradient(900px 500px at 110% 110%, #1b2233 0%, transparent 60%), var(--ink); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 32px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.login-card img { display: block; height: 36px; margin: 0 auto 8px; }
.login-card h1 { text-align: center; font-size: 15px; color: var(--muted); font-weight: 500; margin-bottom: 24px; }

/* Hasarlı araç: parça satırları */
.dmg-rows { display: grid; gap: 8px; }
.dmg-row { display: grid; grid-template-columns: 1fr 80px 150px 120px 40px; gap: 8px; align-items: center; }
.dmg-row .r { text-align: right; }
.dmg-head { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.dmg-sum { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 640px) {
  .dmg-head { display: none; }
  .dmg-row { grid-template-columns: 70px 1fr 40px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .dmg-row input[name="item_desc[]"] { grid-column: 1 / -1; }
  .dmg-row .dmg-sum { grid-column: 1 / 3; }
  .dmg-row [data-row-del] { grid-row: 3; grid-column: 3; }
}

/* Demo */
.login-wrap { gap: 16px; align-content: center; }
.login-demo { text-align: center; }
.login-demo h2 { font-size: 18px; margin-bottom: 6px; }
.login-demo p { font-size: 14px; margin-bottom: 16px; }
.demo-bar { font-size: 14px; }
.demo-bar a { color: inherit; }
