/* ==========================================================================
   Fimaks FPT — tasarım sistemi
   Renkler Fimaks logosundan: mavi dişli #2B7BC9, İ noktasındaki kırmızı #E53935
   ========================================================================== */
:root {
  --brand: #2b7bc9;
  --brand-2: #4aa3ff;
  --brand-3: #1a4f8a;
  --accent: #e53935;
  --ok: #22c55e;
  --warn: #f59e0b;
  --run: #22d3ee;
  --danger: #ef4444;
  --violet: #a855f7;

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Rajdhani", "Inter", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar: 252px;
  --topbar: 64px;
}

:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060b16;
  --bg-2: #0a1324;
  --panel: rgba(16, 27, 49, .72);
  --panel-solid: #101b31;
  --panel-2: rgba(25, 40, 70, .6);
  --hover: rgba(74, 163, 255, .08);
  --line: rgba(148, 170, 205, .14);
  --line-2: rgba(148, 170, 205, .24);
  --text: #e7eef9;
  --text-2: #b8c6dd;
  --muted: #7f92b3;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .03) inset;
  --glow: 0 0 0 1px rgba(74, 163, 255, .35), 0 8px 30px rgba(43, 123, 201, .35);
  --grid-line: rgba(74, 163, 255, .045);
  --input: rgba(6, 12, 24, .6);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #eef3fa;
  --bg-2: #e3ebf6;
  --panel: rgba(255, 255, 255, .86);
  --panel-solid: #ffffff;
  --panel-2: #f3f6fb;
  --hover: rgba(43, 123, 201, .07);
  --line: rgba(20, 45, 85, .1);
  --line-2: rgba(20, 45, 85, .18);
  --text: #0f1b2e;
  --text-2: #33445f;
  --muted: #62728d;
  --shadow: 0 8px 24px rgba(20, 45, 85, .08), 0 1px 2px rgba(20, 45, 85, .06);
  --glow: 0 0 0 1px rgba(43, 123, 201, .35), 0 8px 24px rgba(43, 123, 201, .2);
  --grid-line: rgba(43, 123, 201, .05);
  --input: #f7f9fc;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #eef3fa; --bg-2: #e3ebf6; --panel: rgba(255, 255, 255, .86); --panel-solid: #fff; --panel-2: #f3f6fb;
    --hover: rgba(43, 123, 201, .07); --line: rgba(20, 45, 85, .1); --line-2: rgba(20, 45, 85, .18);
    --text: #0f1b2e; --text-2: #33445f; --muted: #62728d;
    --shadow: 0 8px 24px rgba(20, 45, 85, .08), 0 1px 2px rgba(20, 45, 85, .06);
    --glow: 0 0 0 1px rgba(43, 123, 201, .35), 0 8px 24px rgba(43, 123, 201, .2);
    --grid-line: rgba(43, 123, 201, .05); --input: #f7f9fc;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(43, 123, 201, .18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(229, 57, 53, .07), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.display { font-family: var(--display); letter-spacing: .01em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.gap-lg { gap: 18px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: rgba(74, 163, 255, .35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------ Kabuk */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(10, 20, 38, .92), rgba(6, 11, 22, .96));
  border-right: 1px solid var(--line);
  padding: 18px 14px; z-index: 30;
}
:root[data-theme="light"] .sidebar { background: linear-gradient(180deg, #0f2747, #0a1a33); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .sidebar { background: linear-gradient(180deg, #0f2747, #0a1a33); } }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-logo { height: 38px; width: auto; filter: drop-shadow(0 4px 14px rgba(43, 123, 201, .45)); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 22px; color: #fff; letter-spacing: .04em; line-height: 1; }
.brand-name small { display: block; font-size: 10.5px; letter-spacing: .28em; color: #7fb6ee; font-weight: 600; margin-top: 3px; }
.brand-gear { width: 40px; height: 40px; flex: none; }
.brand-gear img { width: 40px; height: 40px; animation: spin 18s linear infinite; }
.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; margin: 0 -6px; padding: 0 6px; }
.nav-group { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: #5f7aa5; margin: 14px 10px 6px; font-weight: 700; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: #b4c5e2; font-weight: 550; transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav a svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav a:hover { background: rgba(74, 163, 255, .09); color: #fff; transform: translateX(2px); }
.nav a.active { background: linear-gradient(90deg, rgba(43, 123, 201, .38), rgba(43, 123, 201, .08)); color: #fff; box-shadow: inset 0 0 0 1px rgba(74, 163, 255, .28); }
.nav a.active::before { content: ""; position: absolute; left: -6px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--brand-2); box-shadow: 0 0 12px var(--brand-2); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: rgba(229, 57, 53, .85); color: #fff; }
.sidebar-foot { border-top: 1px solid rgba(148, 170, 205, .12); padding-top: 12px; margin-top: 10px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: #dbe7fb; cursor: pointer; }
.user-chip:hover { background: rgba(74, 163, 255, .09); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar); display: flex; align-items: center; gap: 14px;
  padding: 0 26px; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line);
}
.topbar h1 { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .02em; }
.topbar .crumb { color: var(--muted); font-size: 12.5px; }
.clock { font-family: var(--mono); font-size: 13px; color: var(--text-2); padding: 6px 10px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: livePulse 2s infinite; }
.live-dot.off { background: var(--warn); animation: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text-2); cursor: pointer; transition: all .2s var(--ease);
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.content { padding: 24px 26px 60px; max-width: 1680px; width: 100%; margin: 0 auto; }
.page-enter { animation: pageIn .45s var(--ease) both; }
.content:has(.chat) { padding-bottom: 20px; padding-top: 18px; }

.bottom-nav { display: none; }
.menu-btn { display: none; }

/* ------------------------------------------------------------------ Kartlar */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 18px; position: relative;
}
.card.flat { box-shadow: none; }
.card.pad-0 { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.card-head h3 svg { width: 18px; height: 18px; color: var(--brand-2); }
svg.ic { flex: none; vertical-align: middle; }
h4 svg.ic { width: 16px; height: 16px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; }
.card-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.span-2 { grid-column: span 2; }
.stagger > * { animation: fadeUp .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-head h2 { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: .01em; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head .tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* KPI */
.kpi { display: flex; gap: 14px; align-items: center; overflow: hidden; }
.kpi .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 55%, #000)); box-shadow: 0 8px 22px color-mix(in srgb, var(--c, var(--brand)) 40%, transparent); }
.kpi .ico svg { width: 24px; height: 24px; }
.kpi .val { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.kpi .trend { margin-left: auto; font-size: 12px; font-weight: 600; }
.kpi::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--brand)) 22%, transparent), transparent 70%); pointer-events: none; }

/* ------------------------------------------------------------------ Form öğeleri */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 600 14px var(--font); cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; user-select: none;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--brand-2) 50%, var(--line-2)); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: linear-gradient(135deg, #3a8fe0, var(--brand) 55%, #1f64ab); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(43, 123, 201, .35); }
.btn-primary:hover { box-shadow: var(--glow); }
.btn-danger { background: linear-gradient(135deg, #f05a57, var(--danger)); border-color: transparent; color: #fff; }
.btn-ok { background: linear-gradient(135deg, #34d36c, #16a34a); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(34, 197, 94, .3); }
.btn-warn { background: linear-gradient(135deg, #fbbf24, #f59e0b); border-color: transparent; color: #241500; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { height: 52px; padding: 0 22px; font-size: 16px; border-radius: 14px; }
.btn-icon { width: 34px; padding: 0; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--input);
  color: var(--text); font: 500 14.5px var(--font); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(74, 163, 255, .15); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237f92b3' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.input-sm { height: 34px; font-size: 13px; border-radius: 9px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 550; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); }
.search .input { padding-left: 36px; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--muted); font: 600 13px var(--font); padding: 7px 12px; border-radius: 9px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: all .2s; }
.seg button svg { width: 16px; height: 16px; }
.seg button.on { background: var(--panel-solid); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; border: 0; background: none; color: var(--muted); font: 650 14px var(--font); padding: 11px 14px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs button .count { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }

/* ------------------------------------------------------------------ Rozetler */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 650;
  background: color-mix(in srgb, var(--c, var(--brand)) 16%, transparent); color: color-mix(in srgb, var(--c, var(--brand)) 85%, var(--text)); border: 1px solid color-mix(in srgb, var(--c, var(--brand)) 30%, transparent); white-space: nowrap; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand)); }
.badge.pulse .dot { animation: livePulse 1.6s infinite; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--c, var(--brand)), color-mix(in srgb, var(--c, var(--brand)) 50%, #000)); box-shadow: 0 0 0 2px var(--panel-solid); position: relative; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
.avatar.xl { width: 92px; height: 92px; font-size: 32px; }
.avatar .st { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 2px var(--panel-solid); }
.avatar .st.in { background: var(--ok); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 28px; height: 28px; font-size: 11px; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.progress { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; border-radius: inherit; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 1.1s var(--ease); position: relative; overflow: hidden; }
.progress > i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: shimmer 2.4s infinite; }

/* İlerleme halkası */
.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: var(--panel-2); }
.ring .bar { transition: stroke-dashoffset 1.2s var(--ease); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 60%, transparent)); }
.ring .lbl { position: absolute; text-align: center; font-family: var(--display); font-weight: 700; line-height: 1; }

/* ------------------------------------------------------------------ Tablo */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid); z-index: 1; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--hover); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ------------------------------------------------------------------ Modal / sheet */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(3, 8, 18, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s both; }
.overlay.closing { animation: fadeOut .2s both; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel-solid); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: modalIn .35s var(--spring) both; }
.modal.wide { width: min(880px, 100%); }
.modal.xwide { width: min(1100px, 100%); }
.overlay.closing .modal { animation: modalOut .2s both; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel-solid); z-index: 2; }
.modal-head h3 { font-size: 17px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: var(--panel-solid); }

.drawer-overlay { place-items: stretch end; padding: 0; }
.drawer { width: min(620px, 100vw); height: 100vh; overflow: auto; background: var(--panel-solid); border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px rgba(0, 0, 0, .45); animation: drawerIn .38s var(--ease) both; }
.overlay.closing .drawer { animation: drawerOut .22s both; }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; min-width: 260px; max-width: 380px; display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); animation: toastIn .45s var(--spring) both; border-left: 4px solid var(--c, var(--brand)); }
.toast.out { animation: toastOut .3s both; }
.toast svg { width: 20px; height: 20px; color: var(--c, var(--brand)); flex: none; margin-top: 1px; }

/* Boş durum */
.empty { text-align: center; padding: 38px 20px; color: var(--muted); }
.empty svg { width: 54px; height: 54px; opacity: .5; margin-bottom: 10px; }
.empty h4 { color: var(--text-2); margin-bottom: 4px; }

.skeleton { background: linear-gradient(90deg, var(--panel-2), var(--hover), var(--panel-2)); background-size: 200% 100%; animation: skel 1.3s infinite; border-radius: 10px; }

/* ------------------------------------------------------------------ Projeler */
.project-card { display: flex; flex-direction: column; gap: 14px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; cursor: pointer; overflow: hidden; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: rgba(74, 163, 255, .4); }
.project-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--c), transparent); }
.project-card .top { display: flex; gap: 14px; align-items: flex-start; }
.project-card h3 { font-size: 16.5px; line-height: 1.25; }
.project-card .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 12.5px; }
.project-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.project-card .meta svg { width: 14px; height: 14px; }
.countdown { font-family: var(--display); font-weight: 700; font-size: 15px; }
.countdown.late { color: var(--danger); }
.countdown.soon { color: var(--warn); }
.countdown.ok { color: var(--ok); }

.stepper { display: flex; align-items: center; gap: 0; }
.stepper .st { flex: 1; height: 6px; border-radius: 3px; background: var(--panel-2); margin-right: 3px; position: relative; overflow: hidden; }
.stepper .st.done { background: var(--c); }
.stepper .st.cur { background: var(--panel-2); }
.stepper .st.cur::after { content: ""; position: absolute; inset: 0; background: var(--c); animation: stepFill 1.8s ease-in-out infinite alternate; }

.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pipeline .step { text-align: center; position: relative; cursor: pointer; padding: 6px 2px; border-radius: 12px; transition: background .2s; }
.pipeline .step:hover { background: var(--hover); }
.pipeline .node { width: 38px; height: 38px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); background: var(--panel-solid); color: var(--muted); font-weight: 800; position: relative; z-index: 1; transition: all .4s var(--spring); }
.pipeline .node svg { width: 18px; height: 18px; }
.pipeline .step::before { content: ""; position: absolute; top: 25px; left: -50%; right: 50%; height: 2px; background: var(--line-2); }
.pipeline .step:first-child::before { display: none; }
.pipeline .step.done::before, .pipeline .step.cur::before { background: var(--c); }
.pipeline .step.done .node { background: var(--c); border-color: var(--c); color: #fff; }
.pipeline .step.cur .node { border-color: var(--c); color: var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); transform: scale(1.12); animation: nodePulse 2s infinite; }
.pipeline .lbl { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.pipeline .step.cur .lbl, .pipeline .step.done .lbl { color: var(--text); }

.list-row { display: grid; grid-template-columns: minmax(200px, 2fr) 150px minmax(140px, 1.4fr) 120px auto; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.list-row:hover { background: var(--hover); }

/* Gantt */
.gantt { position: relative; overflow-x: auto; }
.gantt-inner { min-width: 760px; position: relative; }
.gantt-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; min-height: 40px; border-bottom: 1px dashed var(--line); }
.gantt-name { font-weight: 600; font-size: 13px; padding-right: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-track { position: relative; height: 40px; }
.gantt-bar { position: absolute; top: 9px; height: 22px; border-radius: 7px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); box-shadow: 0 4px 12px color-mix(in srgb, var(--c) 35%, transparent); overflow: hidden; transform-origin: left; animation: growX .9s var(--ease) both; font-size: 11px; color: #fff; font-weight: 700; padding: 3px 8px; white-space: nowrap; }
.gantt-bar .fill { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, .22); }
.gantt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); z-index: 2; }
.gantt-today::before { content: "BUGÜN"; position: absolute; top: -18px; left: -18px; font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.gantt-scale { display: grid; grid-template-columns: 220px 1fr; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.gantt-scale .ticks { position: relative; height: 18px; }
.gantt-scale .ticks span { position: absolute; transform: translateX(-50%); }

/* ------------------------------------------------------------------ Atölye / CNC */
.shop-floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.machine { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-top: 3px solid var(--mc); transition: box-shadow .3s, transform .3s var(--ease); }
.machine.drop-hot { box-shadow: 0 0 0 2px var(--mc), 0 0 40px color-mix(in srgb, var(--mc) 40%, transparent); transform: scale(1.01); }
.machine-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.machine-head h3 { font-family: var(--display); font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.machine-stage { position: relative; height: 178px; margin: 0 12px; border-radius: 14px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--mc) 22%, transparent), transparent 65%), linear-gradient(180deg, rgba(4, 9, 20, .5), rgba(4, 9, 20, .15)); border: 1px solid var(--line); }
:root[data-theme="light"] .machine-stage { background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--mc) 16%, transparent), transparent 65%), linear-gradient(180deg, #e7eef8, #f5f8fc); }
.machine-stage > svg { width: 100%; height: 100%; display: block; }
.machine-stage .now svg { width: 16px; height: 16px; flex: none; }
.machine-stage .now { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(3, 8, 18, .72); backdrop-filter: blur(6px); color: #e7eef9; font-size: 12.5px; border: 1px solid rgba(255, 255, 255, .08); }
.machine-stage .now b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.machine-stage .now .timer { margin-left: auto; font-family: var(--mono); color: var(--run); font-weight: 700; }
.machine-now { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 9px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); min-height: 52px; }
.machine-now.idle { color: var(--muted); font-size: 12.5px; }
.machine-now.idle svg { width: 16px; height: 16px; }
.machine-now.running { border-color: color-mix(in srgb, var(--run) 45%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--run) 12%, var(--panel-2)), var(--panel-2)); }
.machine-now.paused { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.machine-now .now-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; background: var(--run); box-shadow: 0 0 14px color-mix(in srgb, var(--run) 60%, transparent); }
.machine-now.paused .now-ic { background: var(--warn); box-shadow: none; }
.machine-now .now-ic svg { width: 14px; height: 14px; }
.machine-now .now-title { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.machine-now .timer { font-weight: 700; font-size: 15px; color: var(--run); flex: none; }
.machine-now.paused .timer { color: var(--warn); }
.now-progress { height: 4px; border-radius: 4px; background: var(--line); margin-top: 5px; overflow: hidden; }
.now-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--run), var(--brand-2)); border-radius: inherit; transition: width 1s; }
.now-progress.over i { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.machine-load { padding: 12px 16px 6px; }
.machine-load .row { font-size: 12px; color: var(--muted); }
.load-bar { height: 10px; border-radius: 99px; background: var(--panel-2); overflow: hidden; display: flex; border: 1px solid var(--line); }
.load-bar i { display: block; height: 100%; transition: width .9s var(--ease); }
.queue { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 14px; min-height: 120px; }
.queue-empty { border: 2px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; color: var(--muted); font-size: 13px; min-height: 90px; text-align: center; padding: 10px; }

.job { position: relative; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); cursor: grab; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; touch-action: manipulation; }
.job:hover { border-color: var(--line-2); transform: translateY(-1px); }
.job .handle { color: var(--muted); cursor: grab; display: grid; place-items: center; }
.job .handle svg { width: 16px; height: 16px; }
.job .t { font-weight: 650; font-size: 13.5px; line-height: 1.2; }
.job .s { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.job .acts { margin-left: auto; display: flex; gap: 4px; flex: none; }
.job.running { border-color: color-mix(in srgb, var(--run) 50%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--run) 12%, var(--panel-2)), var(--panel-2)); }
.job.running::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--run); box-shadow: 0 0 10px var(--run); }
.job.paused { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.job.urgent { box-shadow: inset 3px 0 0 var(--accent); }
.job.material { background: linear-gradient(90deg, rgba(245, 158, 11, .14), var(--panel-2)); border-color: rgba(245, 158, 11, .32); }
.job.unplanned { background: linear-gradient(90deg, rgba(249, 115, 22, .16), var(--panel-2)); border-color: rgba(249, 115, 22, .35); }
.sortable-ghost { opacity: .35; }
.sortable-chosen { box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transform: rotate(-1.2deg) scale(1.02); }
.sortable-drag { opacity: .95; }
.pool { display: flex; flex-wrap: wrap; gap: 10px; min-height: 70px; }
.pool .job { width: 280px; max-width: 100%; }

.tap-target { outline: 2px dashed var(--brand-2); outline-offset: 2px; }
.machine-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.machine-pick button { border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 14px; padding: 14px; cursor: pointer; text-align: left; transition: all .2s var(--ease); border-top: 3px solid var(--mc); font: inherit; }
.machine-pick button:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--mc), 0 10px 26px color-mix(in srgb, var(--mc) 30%, transparent); }

/* Makine SVG animasyonları */
.m-spindle { transform-box: fill-box; transform-origin: center; }
.state-running .m-spin { animation: spinFast .35s linear infinite; transform-box: fill-box; transform-origin: center; }
.state-running .m-head { animation: headMove 4.2s ease-in-out infinite; }
.state-running .m-zaxis { animation: zMove 2.1s ease-in-out infinite; }
.state-running .m-chuck { animation: spinFast .25s linear infinite; transform-box: fill-box; transform-origin: center; }
.state-running .m-tool-l { animation: latheTool 3.4s ease-in-out infinite; }
.state-running .m-chip { animation: chip 1s linear infinite; }
.state-running .m-cool { animation: coolant .7s linear infinite; }
.state-running .m-spark { animation: spark .6s ease-out infinite; }
.m-chip, .m-cool, .m-spark { opacity: 0; }
.m-beacon { transition: fill .3s; }
.state-running .m-beacon.g { animation: beacon 1s steps(2) infinite; }
.state-paused .m-beacon.y { animation: beacon 1.4s steps(2) infinite; }
.state-idle .m-screen { opacity: .45; }
.state-running .m-screen-line { animation: screenScan 1.8s linear infinite; }
.state-running .m-truck { animation: truck 3s ease-in-out infinite; }
.state-running .m-gear { animation: spin 3s linear infinite; transform-box: fill-box; transform-origin: center; }
.state-running .m-wp { animation: wpSpin .22s linear infinite; }
@keyframes wpSpin { to { transform: translateY(6px); } }

/* ------------------------------------------------------------------ İş takip (kanban) */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.kcol { padding: 12px; background: color-mix(in srgb, var(--panel) 70%, transparent); }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; }
.kcol-head h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; }
.kcol-list { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.task { padding: 12px 14px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); cursor: grab; transition: transform .2s var(--ease), box-shadow .2s; border-left: 4px solid var(--c, var(--brand)); }
.task:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
.task .t { font-weight: 650; }
.task.done .t { text-decoration: line-through; color: var(--muted); }
.task .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------ Personel */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.person { display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s; }
.person:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.person .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.person .stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 8px; text-align: center; }
.person .stat b { display: block; font-family: var(--display); font-size: 20px; line-height: 1.1; }
.person .stat span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.leave-meter { position: relative; height: 12px; border-radius: 99px; background: var(--panel-2); overflow: hidden; border: 1px solid var(--line); }
.leave-meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #16a34a, #4ade80); border-radius: inherit; transition: width 1s var(--ease); }

.presence-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.presence-strip .p { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 70px; font-size: 11.5px; text-align: center; }

/* Puantaj ızgarası */
.mgrid-wrap { overflow: auto; max-height: calc(100vh - 260px); border-radius: 12px; }
table.mgrid { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.mgrid th, .mgrid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 0; text-align: center; min-width: 34px; height: 38px; }
.mgrid thead th { position: sticky; top: 0; z-index: 2; background: var(--panel-solid); font-weight: 700; color: var(--muted); font-size: 11px; line-height: 1.1; padding: 4px 2px; }
.mgrid th.name, .mgrid td.name { position: sticky; left: 0; z-index: 1; background: var(--panel-solid); text-align: left; padding: 0 12px; min-width: 170px; font-weight: 600; white-space: nowrap; }
.mgrid thead th.name { z-index: 3; }
.mgrid .we { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.mgrid .hol { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.mgrid .today { box-shadow: inset 0 0 0 2px var(--brand-2); }
.cell { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 700; font-size: 11px; cursor: pointer; transition: transform .15s; }
.cell:hover { transform: scale(1.12); }
.cell.worked { background: color-mix(in srgb, var(--ok) 22%, transparent); color: color-mix(in srgb, var(--ok) 80%, var(--text)); }
.cell.ot { background: color-mix(in srgb, var(--run) 26%, transparent); color: color-mix(in srgb, var(--run) 80%, var(--text)); }
.cell.leave { background: color-mix(in srgb, var(--lc, var(--violet)) 28%, transparent); color: var(--text); }
.cell.absent { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.cell.in { background: color-mix(in srgb, var(--brand-2) 25%, transparent); color: var(--brand-2); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* Bordro */
.slip { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.slip > div { padding: 14px 16px; }
.slip > div + div { border-left: 1px solid var(--line); }
.slip .ln { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.slip .ln:last-child { border-bottom: 0; }
.slip .ln b { font-variant-numeric: tabular-nums; }
.slip .tot { font-size: 15px; font-weight: 800; }
.net-hero { display: flex; align-items: center; gap: 18px; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, rgba(34, 197, 94, .18), rgba(43, 123, 201, .14)); border: 1px solid rgba(34, 197, 94, .28); }
.net-hero .v { font-family: var(--display); font-size: 38px; font-weight: 700; line-height: 1; }
.waterfall { display: flex; height: 26px; border-radius: 8px; overflow: hidden; }
.waterfall i { display: block; height: 100%; transition: width 1s var(--ease); }

/* Aktivite */
.feed { display: flex; flex-direction: column; }
.feed .it { display: flex; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); animation: fadeUp .4s var(--ease) both; }
.feed .it:last-child { border-bottom: 0; }
.feed .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--brand)) 16%, transparent); color: var(--c, var(--brand)); }
.feed .ic svg { width: 16px; height: 16px; }
.feed .tx { font-size: 13px; }
.feed .tm { font-size: 11.5px; color: var(--muted); }

/* Takvim (izinler) */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dh { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; padding-bottom: 4px; }
.cal .d { min-height: 86px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); padding: 6px; font-size: 11.5px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal .d.out { opacity: .35; }
.cal .d.today { border-color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand-2); }
.cal .d.hol { background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); }
.cal .d .n { font-weight: 700; font-size: 12.5px; display: flex; justify-content: space-between; }
.cal .ev { border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--c); }

/* ------------------------------------------------------------------ Mesajlar */
.nav .count.green { background: #22c55e; }
.chat { display: grid; grid-template-columns: 340px 1fr; height: calc(100dvh - var(--topbar) - 48px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.chat-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; background: color-mix(in srgb, var(--panel-solid) 85%, transparent); }
#chat-list-wrap { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.chat-side-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.chat-side-head h3 { font-family: var(--display); font-size: 22px; }
.chat-search { padding: 0 12px 10px; }
.chat-search svg { left: 23px; }
.chat-banner { display: flex; gap: 10px; align-items: center; margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(34, 197, 94, .35); background: rgba(34, 197, 94, .1); color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.chat-banner.off { border-color: rgba(245, 158, 11, .35); background: rgba(245, 158, 11, .08); cursor: default; }
.chat-banner svg { width: 22px; height: 22px; color: #22c55e; flex: none; }
.chat-list { overflow-y: auto; flex: 1; }
.chat-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px; color: inherit; border: 0; background: none; width: 100%; font: inherit; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .15s; }
.chat-item:hover { background: var(--hover); }
.chat-item.on { background: color-mix(in srgb, var(--brand) 16%, transparent); }
.chat-item .avatar { width: 46px; height: 46px; font-size: 15px; }
.chat-item .avatar svg { width: 20px; height: 20px; }
.chat-av-genel { background: #0b1a33 !important; }
.chat-av-genel img { width: 70%; height: 70%; }
.chat-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.chat-prev { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; margin-top: 2px; }
.unread-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #22c55e; color: #04220f; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; animation: pop .35s var(--spring); }
.unread-time { color: #22c55e; font-weight: 700; }
.typing-txt { color: #22c55e; font-style: italic; }
.typing-txt .dots { display: inline-flex; gap: 2px; margin-left: 3px; }
.typing-txt .dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: typingDot 1.2s infinite; }
.typing-txt .dots i:nth-child(2) { animation-delay: .15s; }
.typing-txt .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background-color: var(--bg-2);
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--brand-2) 14%, transparent) 1px, transparent 0), linear-gradient(160deg, color-mix(in srgb, var(--brand) 7%, transparent), transparent 60%);
  background-size: 22px 22px, 100% 100%; }
.chat-empty { margin: auto; text-align: center; padding: 30px; max-width: 380px; }
.chat-empty img { width: 84px; opacity: .85; animation: spin 18s linear infinite; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 92%, transparent); backdrop-filter: blur(10px); z-index: 2; }
.chat-head .avatar { width: 42px; height: 42px; }
.chat-head .avatar svg { width: 18px; height: 18px; }
.chat-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 7% 18px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.chat-loading { margin: auto; color: var(--muted); }
.chat-loading svg { width: 26px; height: 26px; animation: spin 1s linear infinite; }
.chat-hello { margin: 30px auto; padding: 10px 16px; border-radius: 12px; background: var(--panel-solid); color: var(--muted); font-size: 13px; }
.day-sep { align-self: center; margin: 10px 0 6px; padding: 4px 12px; border-radius: 8px; background: color-mix(in srgb, var(--panel-solid) 90%, transparent); color: var(--text-2); font-size: 11.5px; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); text-transform: capitalize; }
.day-sep.enc, .day-sep.load-more { text-transform: none; color: var(--muted); font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.day-sep svg { width: 12px; height: 12px; }
.msg-row { display: flex; }
.msg-row.me { justify-content: flex-end; }
.msg-row.fresh .bubble { animation: bubbleIn .32s var(--spring) both; }
.msg-row.flash .bubble { box-shadow: 0 0 0 3px var(--brand-2); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.bubble { position: relative; max-width: min(78%, 580px); padding: 6px 9px 7px; border-radius: 12px; background: var(--panel-solid); box-shadow: 0 1px 1.5px rgba(0, 0, 0, .18); font-size: 14.2px; line-height: 1.38; word-wrap: break-word; overflow-wrap: anywhere; }
.them .bubble { border-top-left-radius: 4px; }
.me .bubble { border-top-right-radius: 4px; background: linear-gradient(135deg, #1d6fbf, #175a9c); color: #f2f8ff; }
:root[data-theme="light"] .me .bubble { background: #d9fdd3; color: #0f1b2e; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .me .bubble { background: #d9fdd3; color: #0f1b2e; } }
.bubble .who { font-size: 12.5px; font-weight: 700; margin-bottom: 1px; }
.bubble .txt a { color: inherit; text-decoration: underline; }
.bubble .meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 7px 0 -3px 12px; font-size: 10.5px; opacity: .72; white-space: nowrap; }
.bubble.photo { padding: 3px; }
.bubble.photo .meta { position: absolute; right: 8px; bottom: 6px; margin: 0; padding: 1px 6px; border-radius: 8px; background: rgba(0, 0, 0, .45); color: #fff; opacity: 1; }
.bubble.deleted { color: var(--muted); font-size: 13px; }
.me .bubble.deleted { color: rgba(242, 248, 255, .7); }
.msg-img { display: block; max-width: 100%; width: 330px; height: auto; max-height: 380px; object-fit: cover; border-radius: 9px; cursor: zoom-in; margin-bottom: 3px; background: var(--panel-2); }
.tick { font-size: 11px; letter-spacing: -2px; margin-left: 2px; }
.tick svg { width: 11px; height: 11px; }
.tick.read { color: #53bdeb; }
:root[data-theme="light"] .me .tick.read { color: #0a8fd6; }
.reply-quote { border-left: 3px solid var(--brand-2); background: rgba(0, 0, 0, .14); border-radius: 6px; padding: 4px 8px; margin: 2px 0 4px; font-size: 12.5px; cursor: pointer; }
.reply-quote div { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
.mact { position: absolute; top: 3px; right: 3px; width: 24px; height: 22px; border: 0; border-radius: 6px; display: grid; place-items: center; cursor: pointer; opacity: 0; color: inherit; background: color-mix(in srgb, currentColor 12%, transparent); transition: opacity .15s; }
.mact svg { width: 14px; height: 14px; }
.bubble:hover .mact { opacity: 1; }
@media (hover: none) { .mact { display: none; } }
.chat-jump { position: absolute; right: 18px; bottom: 84px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--panel-solid); color: var(--text); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); z-index: 3; }
.chat-jump svg { transform: rotate(90deg); }
.chat-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--panel-solid); animation: fadeUp .2s both; }
.chat-bar .bar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-bar .bar-img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; }
.chat-emoji { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 2px; padding: 8px 10px; max-height: 180px; overflow-y: auto; border-top: 1px solid var(--line); background: var(--panel-solid); }
.chat-emoji button { font-size: 22px; height: 38px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.chat-emoji button:hover { background: var(--hover); }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel-solid) 95%, transparent); }
.chat-compose .icon-btn { width: 42px; height: 42px; border-radius: 50%; font-size: 19px; flex: none; }
.chat-compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; padding: 10px 16px; border-radius: 22px; border: 1px solid var(--line-2); background: var(--input); color: var(--text); font: 500 14.5px var(--font); outline: none; line-height: 1.4; }
.chat-compose textarea:focus { border-color: var(--brand-2); }
.send-btn { width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: linear-gradient(135deg, #34d36c, #16a34a); box-shadow: 0 6px 16px rgba(34, 197, 94, .35); transition: transform .15s var(--spring); }
.send-btn:active { transform: scale(.9); }
.send-btn svg { width: 20px; height: 20px; }
.msg-preview { padding: 10px 12px; border-radius: 10px; background: var(--panel-2); margin-bottom: 14px; font-size: 13.5px; white-space: pre-wrap; }
.chat-toast { cursor: pointer; align-items: center; }
.bottom-nav a { position: relative; }
.bcount { position: absolute; top: 2px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #22c55e; color: #04220f; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

/* Sıfırlama */
.danger-zone { border: 1px solid rgba(239, 68, 68, .35); background: linear-gradient(135deg, rgba(239, 68, 68, .08), transparent 60%); }
.danger-zone h3 { color: #f87171; }

.cust-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }

/* ------------------------------------------------------------------ Müşteri portalı */
.portal-body { min-height: 100vh; }
.portal-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px max(16px, calc((100vw - 1180px) / 2)); background: color-mix(in srgb, var(--panel-solid) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.portal-logo { height: 40px; width: auto; }
.portal-top-title { display: flex; flex-direction: column; line-height: 1.2; border-left: 1px solid var(--line-2); padding-left: 12px; }
.portal { max-width: 1180px; margin: 0 auto; padding: 24px 16px 40px; }
.portal-hero { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; padding: 26px 28px; border-radius: 22px; color: #fff; margin-bottom: 10px;
  background: radial-gradient(600px 300px at 90% 0%, rgba(74, 163, 255, .45), transparent 60%), linear-gradient(135deg, #0f2c56, #1d5fa8 60%, #2b7bc9); box-shadow: 0 18px 40px rgba(20, 60, 120, .25); animation: fadeUp .5s var(--ease) both; }
.portal-hero h1 { font-family: var(--display); font-size: 38px; letter-spacing: .02em; margin: 4px 0; }
.portal-hero p { margin: 0 0 6px; opacity: .9; }
.hero-kpis { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: 10px; }
.hero-kpis div { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); }
.hero-kpis b { display: block; font-family: var(--display); font-size: 30px; line-height: 1; }
.hero-kpis span { font-size: 12px; opacity: .85; display: block; margin-top: 4px; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-h2 { font-family: var(--display); font-size: 24px; margin: 26px 0 12px; }
.portal-card { padding: 22px; display: flex; flex-direction: column; gap: 18px; animation: fadeUp .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.pc-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pc-title { font-size: 22px; line-height: 1.2; margin: 0 0 4px; }
.pc-count { text-align: center; min-width: 150px; padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--ok) 10%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.pc-count .v { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; color: var(--ok); }
.pc-count .l { font-weight: 650; font-size: 13px; }
.pc-count .d { font-size: 11.5px; color: var(--muted); margin-top: 4px; max-width: 200px; }
.pc-count.soon { background: color-mix(in srgb, var(--warn) 10%, var(--panel-2)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.pc-count.soon .v { color: var(--warn); }
.pc-count.late { background: color-mix(in srgb, var(--warn) 8%, var(--panel-2)); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.pc-count.late .v { color: var(--warn); }
.pc-pipe .lbl { min-height: 28px; }
.pc-note { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 9%, transparent); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); font-size: 14px; }
.pc-note svg { color: var(--brand-2); flex: none; margin-top: 2px; }
.pc-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pc-tile { padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.pc-tile svg { width: 16px; height: 16px; color: var(--brand-2); }
.pc-tile-v { font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.pc-tile-v small { font-size: 16px; color: var(--muted); }
.pc-sec { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pc-sec summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; background: var(--panel-2); }
.pc-sec summary::-webkit-details-marker { display: none; }
.pc-sec summary svg { width: 17px; height: 17px; color: var(--brand-2); }
.pc-sec[open] summary { border-bottom: 1px solid var(--line); }
.pc-sec > p { padding: 0 16px; }
.pc-parts { display: flex; flex-direction: column; }
.pc-part { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pc-part:last-child { border-bottom: 0; }
.pc-part .dotx { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.pc-part.run .dotx { background: var(--run); box-shadow: 0 0 0 4px color-mix(in srgb, var(--run) 25%, transparent); animation: livePulse 1.8s infinite; }
.pc-part.done .dotx { background: var(--ok); }
.pc-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.portal-foot { max-width: 1180px; margin: 0 auto; padding: 18px 16px 30px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }
:root[data-theme="light"] .portal-body { background-image: radial-gradient(1000px 500px at 85% -10%, rgba(43, 123, 201, .12), transparent 60%), linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: auto, 32px 32px, 32px 32px; }
@media (max-width: 760px) {
  .portal-top { padding: 8px 12px; gap: 8px; }
  .portal-logo { height: 30px; }
  .portal-top-title { display: none; }
  .portal-top .badge { display: none; }
  .portal-hero { padding: 20px; }
  .portal-hero h1 { font-size: 28px; }
  .hero-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 8px; }
  .hero-kpis div { padding: 10px; }
  .hero-kpis b { font-size: 24px; }
  .hero-kpis span { font-size: 11px; white-space: normal; }
  .pipeline.pc-pipe { grid-template-columns: repeat(7, minmax(84px, 1fr)); padding-bottom: 6px; overflow-x: auto; }
  .pipeline.pc-pipe .lbl { font-size: 10.5px; overflow-wrap: anywhere; }
  .pc-head .ring { width: 72px !important; height: 72px !important; }
  .pc-title { font-size: 19px; }
  .pc-tiles { grid-template-columns: 1fr; }
  .pc-count { width: 100%; }
  .portal-card { padding: 16px; }
}
@media print {
  .portal-top .icon-btn, .portal-top .btn, .portal-top .badge, .pc-foot .btn, .portal-foot { display: none !important; }
  .portal-top { position: static; display: flex !important; background: #fff; border-bottom: 2px solid #2b7bc9; padding: 0 0 10px; }
  .portal-hero { background: #0f2c56 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
  .print-one .portal-hero, .print-one .portal-h2, .print-one .portal-card:not(.printing), .print-one .list-row, .print-one .card.pad-0 { display: none !important; }
  .portal-card { break-inside: avoid-page; box-shadow: none !important; border: 1px solid #d0d8e4 !important; animation: none !important; }
  .pc-sec { break-inside: auto; }
  .badge, .progress i, .pipeline .node, .pc-count { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .portal { padding: 10px 0; }
}

/* ------------------------------------------------------------------ Giriş ekranı */
.login-body { min-height: 100vh; overflow: hidden; background: #02060f; }
.login-bg { position: fixed; inset: 0; z-index: 0; }
.login-bg video, .login-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2, 6, 15, .92) 0%, rgba(2, 6, 15, .7) 38%, rgba(2, 6, 15, .1) 75%), linear-gradient(0deg, rgba(2, 6, 15, .7), transparent 40%); }
.login-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; padding: 40px 7vw; }
.login-card { width: min(430px, 100%); padding: 34px; border-radius: 24px; background: rgba(8, 16, 32, .62); border: 1px solid rgba(120, 170, 230, .2); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 40px 100px rgba(0, 0, 0, .55); color: #e7eef9; animation: loginIn .9s var(--ease) both; }
.login-card .logo { width: 220px; display: block; margin-bottom: 8px; animation: fadeUp .8s .15s var(--ease) both; }
.login-card h1 { font-family: var(--display); font-size: 34px; letter-spacing: .03em; margin: 10px 0 2px; animation: fadeUp .8s .25s var(--ease) both; }
.login-card h1 span { color: #4aa3ff; }
.login-card p.lead { color: #9fb3d4; margin: 0 0 24px; animation: fadeUp .8s .32s var(--ease) both; }
.login-card form { display: flex; flex-direction: column; gap: 14px; animation: fadeUp .8s .4s var(--ease) both; }
.login-card .input { background: rgba(2, 8, 20, .55); border-color: rgba(120, 170, 230, .25); color: #fff; height: 48px; }
.login-card .field > span { color: #b8c9e6; }
.login-err { color: #ff8a80; font-size: 13px; min-height: 18px; }
.login-foot { position: fixed; z-index: 1; bottom: 18px; left: 7vw; right: 7vw; display: flex; justify-content: space-between; color: rgba(200, 215, 240, .55); font-size: 12px; }
.login-stats { position: fixed; z-index: 1; right: 5vw; bottom: 60px; display: flex; gap: 14px; }
.login-stats .s { padding: 12px 16px; border-radius: 14px; background: rgba(8, 16, 32, .5); border: 1px solid rgba(120, 170, 230, .18); backdrop-filter: blur(10px); color: #cfe0f7; font-size: 12px; animation: fadeUp 1s var(--ease) both; }
.login-stats .s b { display: block; font-family: var(--display); font-size: 22px; color: #fff; }

/* Basit sayfalar */
.simple-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.simple-card { max-width: 440px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.simple-logo { width: 180px; margin-bottom: 14px; }

/* ------------------------------------------------------------------ Kiosk */
.kiosk-body { min-height: 100vh; overflow: hidden; background: #02060f; color: #e7eef9; user-select: none; }
.kiosk-bg { position: fixed; inset: 0; z-index: 0; }
.kiosk-bg video { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) saturate(1.1) blur(2px); transform: scale(1.04); }
.kiosk { position: relative; z-index: 1; height: 100vh; display: flex; flex-direction: column; padding: 22px 28px; }
.kiosk-top { display: flex; align-items: center; gap: 18px; }
.kiosk-top img { height: 52px; }
.kiosk-clock { margin-left: auto; text-align: right; }
.kiosk-clock .t { font-family: var(--display); font-size: 64px; font-weight: 700; line-height: .9; letter-spacing: .02em; text-shadow: 0 0 30px rgba(74, 163, 255, .45); }
.kiosk-clock .d { color: #9fb3d4; font-size: 16px; }
.kiosk-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; align-content: start; padding: 22px 4px; }
.kcard { position: relative; border-radius: 22px; padding: 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: rgba(10, 20, 40, .62); border: 1px solid rgba(120, 170, 230, .2); backdrop-filter: blur(12px); cursor: pointer; transition: transform .25s var(--spring), box-shadow .25s; animation: fadeUp .5s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.kcard:active { transform: scale(.96); }
.kcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px rgba(74, 163, 255, .5), 0 18px 40px rgba(0, 0, 0, .45); }
.kcard.in { border-color: rgba(34, 197, 94, .55); box-shadow: 0 0 0 1px rgba(34, 197, 94, .3), 0 0 30px rgba(34, 197, 94, .18); }
.kcard .nm { font-size: 18px; font-weight: 700; text-align: center; }
.kcard .ti { font-size: 12.5px; color: #9fb3d4; }
.kcard .stt { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: rgba(148, 163, 184, .18); }
.kcard.in .stt { background: rgba(34, 197, 94, .2); color: #6ee79a; }
.pinpad { display: grid; grid-template-columns: repeat(3, 84px); gap: 12px; justify-content: center; }
.pinpad button { height: 72px; border-radius: 18px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: 700 26px var(--display); cursor: pointer; transition: transform .12s, background .2s; }
.pinpad button:active { transform: scale(.93); background: var(--hover); }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 14px 0 20px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); transition: all .2s var(--spring); }
.pin-dots i.on { background: var(--brand-2); border-color: var(--brand-2); transform: scale(1.15); box-shadow: 0 0 12px var(--brand-2); }
.pin-dots.shake { animation: shake .45s; }
.punch-result { text-align: center; padding: 20px 10px; }
.punch-result .big { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; animation: pop .6s var(--spring) both; }
.punch-result .big svg { width: 64px; height: 64px; color: #fff; }
.punch-result .big.in { background: radial-gradient(circle, #34d36c, #15803d); box-shadow: 0 0 0 12px rgba(34, 197, 94, .18), 0 0 60px rgba(34, 197, 94, .5); }
.punch-result .big.out { background: radial-gradient(circle, #fb923c, #c2410c); box-shadow: 0 0 0 12px rgba(249, 115, 22, .18), 0 0 60px rgba(249, 115, 22, .5); }
.punch-result h2 { font-family: var(--display); font-size: 34px; }

/* QR ekranı */
.qr-screen { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.qr-box { background: #fff; padding: 22px; border-radius: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 0 10px rgba(74, 163, 255, .25); position: relative; }
.qr-box img { width: min(62vmin, 460px); height: auto; display: block; }
.qr-timer { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; margin-top: 18px; }
.qr-timer i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--ok)); }

/* ------------------------------------------------------------------ Animasyonlar */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinFast { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px) scale(.995); filter: blur(3px); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes drawerIn { from { transform: translateX(100%); } }
@keyframes drawerOut { to { transform: translateX(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes loginIn { from { opacity: 0; transform: translateX(-30px) scale(.98); filter: blur(6px); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes skel { to { background-position: -200% 0; } }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 0%, rgba(34, 197, 94, .55)); } 70% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
@keyframes nodePulse { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 8%, transparent); } }
@keyframes stepFill { from { transform: translateX(-70%); } to { transform: translateX(0); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes headMove { 0%, 100% { transform: translateX(-26px); } 50% { transform: translateX(26px); } }
@keyframes zMove { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes latheTool { 0%, 100% { transform: translateX(-30px); } 50% { transform: translateX(22px); } }
@keyframes chip { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx, 14px), 26px) rotate(220deg); } }
@keyframes coolant { 0% { opacity: .9; transform: translateY(0); } 100% { opacity: 0; transform: translateY(18px); } }
@keyframes spark { 0% { opacity: 1; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
@keyframes beacon { 50% { opacity: .25; } }
@keyframes screenScan { from { transform: translateY(0); } to { transform: translateY(16px); } }
@keyframes truck { 0%, 100% { transform: translateX(-8px); } 50% { transform: translateX(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ Duyarlı tasarım */
@media (max-width: 1280px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  :root { --sidebar: 78px; }
  .brand-name, .nav a span, .nav-group, .user-chip .who, .nav .count { display: none; }
  .brand { justify-content: center; padding: 4px 0 18px; }
  .nav a { justify-content: center; padding: 12px; }
  .nav a.active::before { left: -10px; }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(3, minmax(260px, 1fr)); overflow-x: auto; }
  .list-row { grid-template-columns: minmax(180px, 2fr) 130px 1fr auto; }
  .list-row .hide-md { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 14px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 0 14px; height: 58px; }
  .topbar h1 { font-size: 21px; }
  .topbar .crumb, .clock { display: none; }
  .content { padding: 16px 16px 100px; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .page-head h2 { font-size: 24px; }
  .page-head .tools { margin-left: 0; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; overflow: visible; }
  .shop-floor { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(7, minmax(56px, 1fr)); overflow-x: auto; }
  .pipeline .lbl { font-size: 10px; }
  .list-row { grid-template-columns: 1fr auto; }
  .list-row .hide-sm { display: none; }
  .slip { grid-template-columns: 1fr; }
  .slip > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 40;
    background: color-mix(in srgb, var(--panel-solid) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--line-2); border-radius: 20px; padding: 6px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 2px; border-radius: 14px; color: var(--muted); font: 600 10.5px var(--font); background: none; border: 0; cursor: pointer; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .active { color: var(--brand-2); background: var(--hover); }
  .menu-btn { display: inline-grid; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .overlay:not(.drawer-overlay) { place-items: end stretch; padding: 0; }
  .overlay:not(.drawer-overlay) .modal { width: 100%; animation: sheetIn .38s var(--ease) both; }
  .toasts { left: 12px; right: 12px; bottom: 92px; }
  .toast { max-width: none; }
  .login-card { padding: 26px 22px; }
  .login-wrap { padding: 20px; justify-content: center; }
  .login-stats { display: none; }
  .kiosk { padding: 14px; }
  .kiosk-clock .t { font-size: 40px; }
  .kiosk-top img { height: 38px; }
  .kiosk-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .table.responsive thead { display: none; }
  .table.responsive tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; }
  .table.responsive td::before { content: attr(data-l); color: var(--muted); font-size: 12px; font-weight: 600; }
  .table.responsive td.full { display: block; }
  .table.responsive td.full::before { display: none; }
  .cal .d { min-height: 56px; }
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 58px - 112px); border-radius: 16px; }
  .chat.has-active .chat-side { display: none; }
  .chat:not(.has-active) .chat-main { display: none; }
  .chat-back { display: inline-grid; }
  .chat-msgs { padding: 10px 10px 14px; }
  .bubble { max-width: 86%; }
  .content:has(.chat) { padding: 8px 8px 100px; }
  .cal .ev { font-size: 9.5px; padding: 0 3px; }
}
@keyframes sheetIn { from { transform: translateY(100%); } }

@media print {
  body { background: #fff !important; color: #000; }
  .sidebar, .topbar, .bottom-nav, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .card { box-shadow: none; border-color: #ccc; background: #fff; backdrop-filter: none; }
}
