/*
 * KobiMES theme — the Klasik look (AdminLTE 3 style) on Filament.
 * Loaded after Filament's CSS by the panel providers; it only overrides, it never replaces.
 * Colours: primary #1f5fbf (dark #2f6fd0), navy #0f2347 / #163a73. Chart.js: #1f5fbf / #4c8dff.
 */

:root {
  --sm-navy-900: #0f2347;
  --sm-navy-700: #163a73;
  --sm-primary: #1f5fbf;
  --sm-primary-rgb: 31, 95, 191;
  --sm-radius: 10px;
  --sm-surface-alt: #f8f9fb;
  --sm-shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
}

html.dark {
  --sm-primary: #2f6fd0;
  --sm-primary-rgb: 47, 111, 208;
  --sm-surface-alt: #3a4047;
  --sm-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
  /* AdminLTE dark-mode greys instead of Filament's zinc. Filament paints the page with gray-950 and every
     surface (cards, tables, modals, dropdowns, topbar) with gray-900, so this gives the AdminLTE page #454d55,
     cards #343a40, muted text #adb5bd. 950 is lighter than 900 on purpose, as in AdminLTE. */
  --gray-50: #f8f9fa;
  --gray-100: #e9ecef;
  --gray-200: #dee2e6;
  --gray-300: #ced4da;
  --gray-400: #adb5bd;
  --gray-500: #8f979e;
  --gray-600: #6c757d;
  --gray-700: #56606a;
  --gray-800: #3f474e;
  --gray-900: #343a40;
  --gray-950: #454d55;
}
/* gray-950 is no longer dark enough for backdrops (AdminLTE .modal-backdrop) */
.dark .fi-modal > .fi-modal-close-overlay,
.dark .fi-sidebar-close-overlay { background-color: rgba(0, 0, 0, 0.5); }

/* ------------------------------------------------------------------ Modal = card: 3px top line like the cards, plain header and footer
 * (LioxMES modal option C, 23.10.2026). Slide-overs and full-screen modals too; the terminal's op-modal is its own look. */

.fi-modal > .fi-modal-window-ctn > .fi-modal-window { border-top: 3px solid var(--sm-primary); }
.fi-modal > .fi-modal-window-ctn > .fi-modal-window .fi-modal-heading { font-size: 1.125rem; }
/* a long form scrolls between a fixed header and footer: hairlines keep them apart */
.fi-modal.fi-modal-has-sticky-header > .fi-modal-window-ctn > .fi-modal-window > .fi-modal-header { border-bottom: 1px solid var(--gray-200); padding-bottom: 1rem; }
.fi-modal.fi-modal-has-sticky-footer > .fi-modal-window-ctn > .fi-modal-window > .fi-modal-footer { border-top: 1px solid var(--gray-200); padding-top: 1rem; }
.dark .fi-modal.fi-modal-has-sticky-header > .fi-modal-window-ctn > .fi-modal-window > .fi-modal-header,
.dark .fi-modal.fi-modal-has-sticky-footer > .fi-modal-window-ctn > .fi-modal-window > .fi-modal-footer { border-color: var(--gray-700); }

/* ------------------------------------------------------------------ Text logo */

.sm-wordmark { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; white-space: nowrap; }
/* x-logo: the height is the tile T, the width follows; sizes per surface below (sidebar 32, login 56) */
.sm-logo { display: block; flex: none; height: 2rem; width: auto; }
.sm-wordmark-suffix { font-size: 0.75rem; font-weight: 600; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }

/* ------------------------------------------------------------------ Sidebar: navy gradient */

.fi-body .fi-main-sidebar {
  background-color: var(--sm-navy-900);
  background-image: linear-gradient(165deg, #0f2347 0%, #163a73 55%, #1f5fbf 100%);
  overflow: hidden;
  isolation: isolate;
}
/* the decorative circles of the login brand panel, scaled to the sidebar */
.fi-body .fi-main-sidebar::before,
.fi-body .fi-main-sidebar::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.fi-body .fi-main-sidebar::before { width: 220px; height: 220px; right: -95px; top: -70px; box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.025); }
.fi-body .fi-main-sidebar::after { width: 150px; height: 150px; left: -60px; bottom: -50px; box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.03); }

.fi-main-sidebar .fi-sidebar-header,
.fi-main-sidebar .fi-sidebar-nav,
.fi-main-sidebar .fi-sidebar-footer { background: transparent; box-shadow: none; border-color: rgba(255, 255, 255, 0.08); }
.fi-main-sidebar .fi-sidebar-header { color: #fff; }

.fi-main-sidebar .fi-sidebar-group-label { color: rgba(255, 255, 255, 0.5); }
.fi-main-sidebar .fi-sidebar-item-btn { border-radius: 8px; }
.fi-main-sidebar .fi-sidebar-item-label,
.fi-main-sidebar .fi-sidebar-item-icon,
.fi-main-sidebar .fi-sidebar-group-collapse-btn { color: rgba(255, 255, 255, 0.78); }
.fi-main-sidebar .fi-sidebar-item-btn:hover,
.fi-main-sidebar .fi-sidebar-item-btn:focus-visible { background-color: rgba(255, 255, 255, 0.08); }
.fi-main-sidebar .fi-sidebar-item-btn:hover .fi-sidebar-item-label,
.fi-main-sidebar .fi-sidebar-item-btn:hover .fi-sidebar-item-icon { color: #fff; }
.fi-main-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
  background-color: #1f5fbf;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.fi-main-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-main-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon { color: #fff; }

/* Tanımlar sub-headings (App\Filament\App\DefinitionsNavigation): a link-less caption; its items keep their
   icons and lose Filament's tree lines, so they look like every other item. Hidden in the collapsed sidebar. */
.fi-main-sidebar .sm-nav-heading > .fi-sidebar-item-btn { cursor: default; justify-content: flex-start; padding: 0.5rem 0.5rem 0.125rem; }
.fi-main-sidebar .sm-nav-heading > .fi-sidebar-item-btn:hover { background: none; }
.fi-main-sidebar .sm-nav-heading > .fi-sidebar-item-btn > .fi-sidebar-item-icon { display: none; }
.fi-main-sidebar .sm-nav-heading > .fi-sidebar-item-btn .fi-sidebar-item-label { font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: rgba(255, 255, 255, 0.42); }
.fi-main-sidebar:not(.fi-sidebar-open) .sm-nav-heading > .fi-sidebar-item-btn { display: none; }
.fi-main-sidebar .sm-nav-heading .fi-sidebar-item-grouped-border { display: none; }
.fi-main-sidebar .sm-nav-heading .fi-sidebar-sub-group-items .fi-sidebar-item-icon { display: block !important; }

/* company switcher at the top of the sidebar */
.fi-main-sidebar .fi-tenant-menu-trigger { color: #fff; border-radius: 8px; }
.fi-main-sidebar .fi-tenant-menu-trigger:hover { background-color: rgba(255, 255, 255, 0.08); }
.fi-main-sidebar .fi-tenant-menu-trigger-current-tenant-label { color: rgba(255, 255, 255, 0.6); }
.fi-main-sidebar .fi-tenant-menu-trigger-tenant-name { color: #fff; }
.fi-main-sidebar .fi-tenant-menu-trigger svg { color: rgba(255, 255, 255, 0.6); }

/* dark mode: anthracite gradient, blue accent stays */
.dark .fi-body .fi-main-sidebar {
  background-color: #16181b;
  background-image: linear-gradient(165deg, #16181b 0%, #1d2024 55%, #262a2f 100%);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.04);
}
.dark .fi-body .fi-main-sidebar::before { border-color: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.012); }
.dark .fi-body .fi-main-sidebar::after { border-color: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.015); }
.dark .fi-main-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background-color: #2f6fd0; }

/* ------------------------------------------------------------------ Top bar */

.fi-topbar { box-shadow: 0 1px 0 rgba(16, 24, 40, 0.06), 0 2px 6px rgba(16, 24, 40, 0.04); }

/* ------------------------------------------------------------------ Cards: 3px coloured top line, soft shadow */

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn {
  border-radius: var(--sm-radius);
  box-shadow: var(--sm-shadow);
  border-top: 3px solid var(--sm-primary);
}
.fi-section-header-heading { font-weight: 600; }

/* ------------------------------------------------------------------ Tables */

.fi-ta-header-cell { background-color: var(--sm-surface-alt); font-weight: 600; }
.fi-ta-row:hover { background-color: rgba(var(--sm-primary-rgb), 0.05); }

/* ------------------------------------------------------------------ Login / sign-up / invitation: brand panel + form */

.fi-simple-layout:has(.sm-auth-brand) { flex-direction: row; align-items: stretch; padding: 0; }
.fi-simple-layout:has(.sm-auth-brand) .fi-simple-main-ctn { flex: 1 1 auto; }
.fi-simple-layout:has(.sm-auth-brand) .fi-simple-header .fi-logo { display: none; }

.sm-auth-brand {
  flex: 0 0 42%; max-width: 560px; min-height: 100vh; position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 44px; color: #fff;
  background: var(--sm-navy-900); /* brand v1.0: plain navy behind the logo, no gradient or circles */
}
/* 3.5rem tall, narrower when the panel is (sign-up's 300px panel) instead of running into its padding */
.sm-auth-brand .sm-wordmark { max-width: 100%; }
.sm-auth-brand .sm-logo { width: 16.75rem; max-width: 100%; height: auto; }
.sm-auth-tagline h1 { font-size: 2.1rem; font-weight: 700; line-height: 1.2; margin: 0 0 12px; }
.sm-auth-tagline p { color: rgba(255, 255, 255, 0.72); font-size: 1rem; margin: 0; max-width: 360px; }
.sm-auth-clock-time { font-size: 3rem; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.sm-auth-clock-date { color: rgba(255, 255, 255, 0.72); margin-top: 6px; }

/* mobile: the brand panel becomes a thin strip on top */
@media (max-width: 767.98px) {
  .fi-simple-layout:has(.sm-auth-brand) { flex-direction: column; }
  .fi-simple-layout:has(.sm-auth-brand) .fi-simple-main-ctn { align-items: flex-start; }
  .sm-auth-brand { flex: 0 0 auto; max-width: none; min-height: 0; padding: 16px 20px; flex-direction: row; align-items: center; }
  .sm-auth-tagline { display: none; }
  .sm-auth-brand .sm-logo { width: auto; height: 2rem; }
  /* the strip holds the logo and the legal links only; room on the right for the signed-in user's avatar */
  .sm-auth-clock, .sm-auth-brand .sm-version { display: none; }
  .sm-auth-legal-links { flex-direction: column; align-items: flex-end; gap: 2px; margin: 0 0 0 auto; }
  .fi-simple-layout:has(.fi-simple-user-menu-ctn) .sm-auth-brand { padding-right: 64px; }
}

/* ================================================================== Klasik components (lx-*)
 * Blade components in resources/views/components/lx/ (KPI tile, live station card, terminal timer). */

/* ------------------------------------------------------------------ KPI tile (mes_kpi .mk-kpi) */

.lx-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem; }
.lx-kpi {
  --lx-accent: #1f5fbf;
  display: flex; flex-direction: column; background: #fff;
  border-radius: var(--sm-radius); border-top: 3px solid var(--lx-accent); box-shadow: var(--sm-shadow);
  padding: 12px 14px 10px;
}
.lx-kpi-volume { --lx-accent: #17a2b8; }
.lx-kpi-loss { --lx-accent: #dc3545; }
.lx-kpi-time { --lx-accent: #1f5fbf; }
.lx-kpi-target { --lx-accent: #28a745; }
.lx-kpi.is-warn { --lx-accent: #fd7e14; }
.lx-kpi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lx-kpi-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6c757d;
  line-height: 1.25; min-height: 2.5em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lx-kpi-icon {
  flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--lx-accent); background: color-mix(in srgb, var(--lx-accent) 12%, transparent);
}
.lx-kpi-icon svg { width: 1rem; height: 1rem; }
.lx-kpi-value { font-size: 1.75rem; font-weight: 700; line-height: 1.1; margin: 6px 0 12px; color: #343a40; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lx-kpi.is-warn .lx-kpi-value { color: #d9480f; }
.lx-kpi-foot {
  margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  border-top: 1px solid #e9ecef; padding-top: 7px; font-size: 0.78rem; color: #6c757d;
}
.lx-kpi-foot b { color: #343a40; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dark .lx-kpi { background: #343a40; }
.dark .lx-kpi-label, .dark .lx-kpi-foot { color: #adb5bd; }
.dark .lx-kpi-value, .dark .lx-kpi-foot b { color: #f8f9fa; }
.dark .lx-kpi-foot { border-top-color: rgba(255, 255, 255, 0.1); }
.dark .lx-kpi.is-warn .lx-kpi-value { color: #ff922b; }

/* ------------------------------------------------------------------ Station card (canli .station-card) */

.lx-station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; align-items: start; }
.lx-station-wrap { display: flex; }
.lx-station-wrap.is-dragging { opacity: .55; }
.lx-station {
  width: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: .25rem;
  background: #e9edf2; color: #212529; border: 1px solid #ced4da;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .10), 0 1px 2px rgba(16, 24, 40, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.lx-station:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1rem rgba(16, 24, 40, .16); }
.lx-station.is-active { border-color: #a9d3b5; }
.lx-station-head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 52px;
  padding: .45rem .75rem; color: #fff; background: #6c757d; cursor: pointer; font-size: 1.08rem;
}
.lx-station.is-active .lx-station-head { background: #28a745; }
.lx-station-title { min-width: 0; }
.lx-station-title strong { font-size: 1.12rem; }
.lx-station-name { font-size: .96rem; }
.lx-station-head-end { flex: 0 1 60%; max-width: 60%; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; text-align: right; }
.lx-station-wo { display: inline-flex; align-items: center; gap: .25rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #fff; }
a.lx-station-wo:hover { text-decoration: underline; }
.lx-station-wo svg { width: .8em; height: .8em; opacity: .85; flex: 0 0 auto; }
.lx-station-wo-row { display: inline-flex; align-items: center; gap: .15rem; max-width: 100%; min-width: 0; }
.lx-copy { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: .2rem; border: 0; border-radius: .25rem; background: transparent; color: inherit; opacity: .6; cursor: pointer; vertical-align: middle; }
.lx-copy:hover { opacity: 1; background: rgba(127, 127, 127, .15); }
.lx-copy svg { width: 1rem; height: 1rem; }
.lx-station-copy { color: #fff; opacity: .85; }
.lx-station-copy:hover { background: rgba(255, 255, 255, .2); }
/* terminal pairing code toast: copy icon on the title line, next to the code */
.fi-no-notification-main:has(.sm-copy-code) { display: grid; grid-template-columns: max-content 1fr; align-items: center; column-gap: .25rem; }
.fi-no-notification-main:has(.sm-copy-code) .fi-no-notification-text { display: contents; }
.fi-no-notification-main:has(.sm-copy-code) .fi-no-notification-body { grid-column: 1 / -1; }
.fi-no-notification-main:has(.sm-copy-code) .fi-no-notification-actions { grid-row: 1; grid-column: 2; margin: 0; }
.lx-station-break { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; font-size: .8rem; font-weight: 700; padding: .2em .45em; border-radius: .25rem; background: #ffc107; color: #1f2d3d; }
.lx-station-break svg { width: .9em; height: .9em; }
.lx-station-break.is-long { background: #dc3545; color: #fff; }
.lx-station-idle { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; font-size: .8rem; font-weight: 600; padding: .2em .45em; border-radius: .25rem; background: rgba(255, 255, 255, .25); color: #fff; }
.lx-station-idle svg { width: .9em; height: .9em; }
.lx-station-idle.is-online { background: #fff; color: #1e7e34; }
.lx-station-idle.is-offjob { background: #dc3545; color: #fff; }
.lx-live-offjob { color: #c82333; }
.lx-station-body { padding: .5rem .75rem; font-size: .9rem; border-top: 1px solid rgba(0, 0, 0, .06); }
.lx-station-body > div { margin-bottom: .25rem; }
.lx-station-target { padding: .5rem .75rem; border-top: 1px solid rgba(0, 0, 0, .1); }
.lx-station-target-row { display: flex; justify-content: space-between; align-items: center; height: 18px; line-height: 18px; margin-bottom: .25rem; font-size: .8rem; color: #6c757d; }
.lx-station-target-row strong { white-space: nowrap; font-weight: 600; }
.lx-station-target-row.is-metrics { font-size: .75rem; }
.lx-station-target-row .is-overdue { color: #dc3545; }
.lx-progress { height: 8px; border-radius: .25rem; background: #cfd6de; overflow: hidden; }
.lx-progress > span { display: block; height: 100%; background: #28a745; }
.lx-progress.is-warn > span { background: #ffc107; }
.lx-progress.is-danger > span { background: #dc3545; }
.lx-progress.is-muted > span { background: #6c757d; }
.lx-progress.is-missing { background: #adb5bd; }
.lx-progress.is-animated > span {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem; animation: lx-stripes 1s linear infinite;
}
@keyframes lx-stripes { from { background-position: 1rem 0; } to { background-position: 0 0; } }
.dark .lx-station { background: #3f474e; color: #f8f9fa; border-color: #56606a; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .3); }
.dark .lx-station:hover { box-shadow: 0 .65rem 1.1rem rgba(0, 0, 0, .4); }
.dark .lx-station.is-active { border-color: #3f9e5f; }
.dark .lx-station-head { background: #5a636c; }
.dark .lx-station.is-active .lx-station-head { background: #218838; }
.dark .lx-station-idle { background: rgba(255, 255, 255, .15); }
.dark .lx-station-idle.is-online { background: #d4edda; color: #155724; }
.dark .lx-station-idle.is-offjob { background: #c92a2a; color: #fff; }
.dark .lx-live-offjob { color: #ff8787; }
.dark .lx-station-body, .dark .lx-station-target { border-top-color: rgba(255, 255, 255, .1); }
.dark .lx-station-target-row { color: #ced4da; }
.dark .lx-station-target-row .is-overdue { color: #ff8787; }
.dark .lx-progress { background: rgba(255, 255, 255, .16); }
.dark .lx-progress.is-missing { background: #6c757d; }

/* KobiMES IoT machine row on a Canlı card (x-lx.machine, both packages): state badge, parts or a red mismatch note (Live::machines), program */
.lx-machine { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .4rem .75rem; border-top: 1px solid rgba(0, 0, 0, .06); font-size: .8rem; }
.lx-machine-state { display: inline-flex; align-items: center; gap: .25rem; flex: none; padding: .1em .5em; border: 1px solid; border-radius: 999px; font-weight: 600; }
.lx-machine-state svg { width: 1em; height: 1em; }
.lx-machine-state.is-run { color: #1e7e34; border-color: #28a745; background: #e8f6ec; }
.lx-machine-state.is-idle { color: #b35c00; border-color: #fd7e14; background: #fff4e6; }
.lx-machine-state.is-alarm { color: #fff; border-color: #dc3545; background: #dc3545; }
.lx-machine-state.is-off { color: #6c757d; border-color: #ced4da; background: transparent; }
.lx-machine-state.is-none { color: #adb5bd; border-color: #e9ecef; border-style: dashed; background: transparent; font-weight: 500; }
.lx-machine-parts { flex: none; font-variant-numeric: tabular-nums; color: #495057; }
.lx-machine-note { flex: none; color: #b35c00; }
.lx-machine-prog { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: #6c757d; }
.lx-machine.is-mismatch { background: #fdecee; }
.lx-machine.is-mismatch .lx-machine-note { color: #c82333; }
.dark .lx-machine { border-top-color: rgba(255, 255, 255, .1); }
.dark .lx-machine-state.is-run { color: #8ce99a; border-color: #2f9e44; background: rgba(47, 158, 68, .15); }
.dark .lx-machine-state.is-idle { color: #ffc078; border-color: #fd7e14; background: rgba(253, 126, 20, .12); }
.dark .lx-machine-state.is-off { color: #adb5bd; border-color: #6c757d; }
.dark .lx-machine-state.is-none { color: #868e96; border-color: #56606a; }
.dark .lx-machine-parts { color: #dee2e6; }
.dark .lx-machine-note { color: #ffc078; }
.dark .lx-machine-prog { color: #adb5bd; }
.dark .lx-machine.is-mismatch { background: rgba(220, 53, 69, .15); }
.dark .lx-machine.is-mismatch .lx-machine-note { color: #ff8787; }

/* Canlı page */
.lx-live-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; font-size: .875rem; }
.lx-live-tools label { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.lx-live-footer { display: flex; justify-content: space-between; gap: 1rem; color: #6c757d; font-size: .875rem; }
.lx-live-empty { grid-column: 1 / -1; text-align: center; color: #6c757d; padding: 1.5rem 0; }
.dark .lx-live-footer, .dark .lx-live-empty { color: #adb5bd; }

/* ------------------------------------------------------------------ Target-time ring (operasyon .op-timer) */

.lx-timer { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1 / 1; margin: 0 auto; }
.lx-timer svg { width: 100%; height: 100%; display: block; transform: rotate(-90deg); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .15)); }
.lx-timer-bg { stroke: #e3e7ec; }
.lx-timer-progress { stroke: #1f5fbf; transition: stroke-dashoffset .3s linear, stroke .3s; }
.lx-timer.is-ok .lx-timer-progress { stroke: #28a745; }
.lx-timer.is-warn .lx-timer-progress { stroke: #ffc107; }
.lx-timer.is-danger .lx-timer-progress { stroke: #dc3545; }
.lx-timer-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lx-timer-text { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: 1px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; color: #1f5fbf; }
.lx-timer.is-ok .lx-timer-text { color: #28a745; }
.lx-timer.is-warn .lx-timer-text { color: #ff9800; }
.lx-timer.is-danger .lx-timer-text { color: #dc3545; }
.lx-timer.is-break .lx-timer-progress { stroke: #fd7e14; }
.lx-timer.is-break .lx-timer-text { color: #fd7e14; }
.lx-timer-sub { font-size: .8rem; font-weight: 600; color: #6c757d; text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.dark .lx-timer-bg { stroke: rgba(255, 255, 255, .12); }
.dark .lx-timer-sub { color: #adb5bd; }

/* ================================================================== Iframe tabs (public/js/kobimes-tabs.js)
 * AdminLTE 3 IFrame mode: red × menu, scroll arrows, tabs, fullscreen. */

/* a page shown inside a tab, and fullscreen tabs: no sidebar, no topbar */
.sm-iframe .fi-body,
.sm-tabs-fullscreen .fi-body { --topbar-height: 0px; }
.sm-iframe .fi-main-sidebar,
.sm-iframe .fi-topbar-ctn,
.sm-iframe .fi-sidebar-close-overlay,
.sm-iframe .fi-layout-sidebar-toggle-btn-ctn,
.sm-tabs-fullscreen .fi-main-sidebar,
.sm-tabs-fullscreen .fi-topbar-ctn,
.sm-tabs-fullscreen .fi-layout-sidebar-toggle-btn-ctn { display: none !important; }

.sm-tabs-bar {
  position: sticky; top: var(--topbar-height); z-index: 20;
  display: flex; align-items: stretch; height: 2.75rem;
  background: #fff; border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}
.sm-tabs-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.75rem;
  color: #495057; background: #f8f9fa; border-right: 1px solid rgba(16, 24, 40, 0.06);
}
.sm-tabs-btn:hover { color: #1f2d3d; background: #e9ecef; }
.sm-tabs-btn[hidden] { display: none; }
.sm-tabs-btn svg { width: 1.1rem; height: 1.1rem; }
.sm-tabs-btn-danger, .sm-tabs-btn-danger:hover { color: #fff; background: #dc3545; }
.sm-tabs-btn-danger:hover { background: #c82333; }
.sm-tabs-fullscreen-btn { border-right: 0; border-left: 1px solid rgba(16, 24, 40, 0.06); }
.sm-tabs-scroll[data-scroll="1"] { border-left: 1px solid rgba(16, 24, 40, 0.06); border-right: 0; }
/* Atölye 3D over the panel (kobimes-tabs.js openFullscreenFrame), also when the browser gives no fullscreen */
.sm-fullscreen-frame { position: fixed; inset: 0; z-index: 1000; width: 100%; height: 100dvh; border: 0; background: #0b1220; }
/* installed as a web app (manifest display: standalone) the page already fills the screen: no browser fullscreen
   (topbar-end) and no tab fullscreen */
@media (display-mode: standalone) {
  .sm-navbar-fullscreen, .sm-tabs-fullscreen-btn { display: none !important; }
}

.sm-tabs-menu { position: relative; display: flex; }
.sm-tabs-dropdown {
  position: absolute; top: 100%; left: 0; z-index: 30; min-width: 11rem; padding: 0.35rem 0;
  background: #fff; border-radius: 0 0 8px 8px; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.18);
}
.sm-tabs-dropdown[hidden] { display: none; }
.sm-tabs-dropdown button { display: block; width: 100%; text-align: left; padding: 0.45rem 1rem; font-size: 0.875rem; color: #212529; }
.sm-tabs-dropdown button:hover { background: #f1f3f5; }

.sm-tabs-list { flex: 1 1 auto; display: flex; align-items: stretch; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sm-tabs-list::-webkit-scrollbar { display: none; }
.sm-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.35rem; max-width: 15rem;
  padding: 0 0.6rem 0 0.9rem; font-size: 0.875rem; color: #6c757d; white-space: nowrap; cursor: pointer;
}
.sm-tab-title { overflow: hidden; text-overflow: ellipsis; }
.sm-tab:hover { color: #1f2d3d; background: rgba(0, 0, 0, 0.03); }
.sm-tab.is-active { color: var(--sm-primary); font-weight: 600; box-shadow: inset 0 -2px 0 var(--sm-primary); }
.sm-tab-close { display: inline-flex; padding: 2px; border-radius: 4px; opacity: 0; }
.sm-tab:hover .sm-tab-close, .sm-tab.is-active .sm-tab-close { opacity: 0.55; }
.sm-tab-close:hover { opacity: 1 !important; background: rgba(0, 0, 0, 0.08); }
.sm-tab-close svg { width: 0.85rem; height: 0.85rem; }

.sm-tabs-panes { position: relative; }
.sm-tabs-panes:not(.is-active) .sm-tabs-loading { display: none; }
.sm-tabs-pane { display: block; width: 100%; height: calc(100dvh - var(--topbar-height) - 2.75rem); border: 0; }

/* "Sayfa yükleniyor" / "Açık sekme yok" (AdminLTE .tab-loading / .tab-empty, display-4 heading) */
.sm-tabs-loading, .sm-tabs-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: calc(100dvh - var(--topbar-height) - 2.75rem); background: #f4f6f9; color: #343a40;
}
.sm-tabs-loading { position: absolute; inset: 0; z-index: 5; }
.sm-tabs-loading[hidden], .sm-tabs-empty[hidden] { display: none; }
.sm-tabs-loading h2, .sm-tabs-empty h2 { font-size: 2.5rem; font-weight: 300; line-height: 1.2; display: flex; align-items: center; gap: 0.75rem; }
.sm-tabs-empty p { color: #6c757d; margin-top: 0.5rem; }
.sm-spin { display: inline-flex; color: var(--sm-primary); }
.sm-spin svg { width: 2.2rem; height: 2.2rem; animation: sm-spin 1s linear infinite; }
@keyframes sm-spin { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) { .sm-tabs-loading h2, .sm-tabs-empty h2 { font-size: 1.6rem; } }

.dark .sm-tabs-bar { background: var(--gray-900, #18181b); border-bottom-color: rgba(255, 255, 255, 0.08); }
.dark .sm-tabs-btn { color: #ced4da; background: #343a40; border-color: rgba(255, 255, 255, 0.06); }
.dark .sm-tabs-btn:hover { color: #fff; background: #3f474e; }
.dark .sm-tabs-btn-danger { color: #fff; background: #dc3545; }
.dark .sm-tabs-dropdown { background: #343a40; }
.dark .sm-tabs-dropdown button { color: #f8f9fa; }
.dark .sm-tabs-dropdown button:hover { background: #3f474e; }
.dark .sm-tab { color: #adb5bd; }
.dark .sm-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.dark .sm-tab.is-active { color: #9cc7ff; box-shadow: inset 0 -2px 0 #6ea8ff; }
.dark .sm-tab-close:hover { background: rgba(255, 255, 255, 0.1); }
.dark .sm-tabs-loading, .dark .sm-tabs-empty { background: #454d55; color: #f8f9fa; }
.dark .sm-tabs-empty p { color: #adb5bd; }


/* ================================================================== Navbar + sidebar brand
 * resources/views/filament/topbar-start / topbar-end / sidebar-mark.blade.php (AppPanelProvider hooks). */

/* Filament's own collapse/open buttons, topbar logo and user menu are replaced by our own navbar */
.fi-topbar-collapse-sidebar-btn-ctn,
.fi-topbar-open-sidebar-btn,
.fi-topbar-close-sidebar-btn,
.fi-topbar-start > a:has(> .fi-logo),
.fi-topbar-start > .fi-logo,
.fi-topbar-end > .fi-user-menu { display: none !important; }
/* Filament hides the topbar start below lg (its own mobile button lives elsewhere); ours must always show */
.fi-topbar-start { display: flex; }

.sm-navbar { display: flex; align-items: center; gap: 0.25rem; }
.sm-navbar-link {
  display: inline-flex; align-items: center; gap: 0.4rem; height: 2.5rem; padding: 0 0.75rem;
  border-radius: 8px; color: rgba(0, 0, 0, 0.55); font-size: 0.95rem; white-space: nowrap; cursor: pointer;
}
.sm-navbar-link:hover { color: rgba(0, 0, 0, 0.8); background: rgba(0, 0, 0, 0.04); }
.sm-navbar-link svg { width: 1.25rem; height: 1.25rem; }
.sm-navbar-link > span { display: inline-flex; }
@media (max-width: 575.98px) { .sm-navbar-home { display: none; } }        /* d-none d-sm-inline-block */
@media (max-width: 767.98px) { .sm-navbar-user-name { display: none !important; } } /* d-none d-md-inline */

.sm-navbar-dropdown { position: relative; }
.sm-navbar-menu {
  position: fixed; z-index: 40; min-width: 14rem; padding: 0.5rem 0; /* top / right set from the button (topbar-end) */
  max-height: calc(100dvh - 5rem); overflow-y: auto; -webkit-overflow-scrolling: touch; /* a long company list */
  background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.18); border: 1px solid rgba(0, 0, 0, 0.06);
}
.sm-navbar-menu-text { display: block; padding: 0.25rem 1rem 0.4rem; font-size: 0.8rem; color: #6c757d; line-height: 1.4; }
.sm-navbar-menu-divider { height: 1px; margin: 0.4rem 0; background: #e9ecef; }
.sm-navbar-menu-item {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.45rem 1rem;
  font-size: 0.9rem; color: #212529; text-align: left;
}
.sm-navbar-menu-item:hover { background: #f1f3f5; }
.sm-navbar-menu-item svg { width: 1rem; height: 1rem; color: #6c757d; }
.sm-navbar-menu-item.is-danger, .sm-navbar-menu-item.is-danger svg { color: #dc3545; }

.dark .sm-navbar-link { color: rgba(255, 255, 255, 0.75); }
.dark .sm-navbar-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.dark .sm-navbar-menu { background: #343a40; border-color: rgba(255, 255, 255, 0.08); }
.dark .sm-navbar-menu-item { color: #f8f9fa; }
.dark .sm-navbar-menu-item:hover { background: #3f474e; }
.dark .sm-navbar-menu-text { color: #adb5bd; }
.dark .sm-navbar-menu-divider { background: rgba(255, 255, 255, 0.1); }

/* AdminLTE brand-link: the logo sits at the top of the sidebar, also on desktop */
.fi-body .fi-main-sidebar .fi-sidebar-header { display: flex; background: transparent; box-shadow: none; padding-inline: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.fi-main-sidebar .fi-sidebar-header .fi-logo { color: #fff; }
.sm-sidebar-mark { display: flex; justify-content: center; width: 100%; }
/* uploaded company logo / icon, straight on the dark sidebar (light / white logos read best, see CompanyFields::branding).
   The logo is as wide as the menu buttons below it (16px each side) and centred in the topbar-high header; a wide logo
   is width-bound, so the leftover goes above and below it in equal parts. */
.fi-main-sidebar .fi-sidebar-header:has(.sm-brand-logo) { padding: 12px 16px; }
.fi-sidebar-header-logo-ctn:has(.sm-brand-logo),
.fi-sidebar-header-logo-ctn:has(.sm-brand-logo) > a,
.fi-sidebar-header .fi-logo:has(.sm-brand-logo) { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; }
.fi-sidebar-header .fi-logo:has(.sm-brand-logo) { height: 100% !important; } /* beats Filament's inline brandLogoHeight */
.sm-brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; } /* a small file is scaled up to fill too */
.sm-brand-mark { width: 2.4rem; height: 2.4rem; object-fit: contain; }
/* the company menu is in the topbar (⚙), so the menu starts right under the header, its first item level with the
   bottom of the tab bar */
.fi-main-sidebar .fi-sidebar-nav { padding-top: 2.75rem; }

/* AdminLTE layout: on desktop the sidebar runs from the very top of the page and the navbar starts
   to its right (Filament puts a full-width topbar above the sidebar). */
@media (min-width: 64rem) {
  .fi-body .fi-main-sidebar { top: 0; height: 100dvh; margin-top: calc(-1 * var(--topbar-height)); z-index: 35; }
  .fi-body .fi-topbar-ctn { padding-inline-start: var(--sidebar-width); }
  .fi-body:has(.fi-main-sidebar:not(.fi-sidebar-open)) .fi-topbar-ctn { padding-inline-start: var(--collapsed-sidebar-width); }
}

/* ================================================================== Plain data table (table table-sm table-bordered)
 * For read-only tables inside modals and custom pages, e.g. the work order detail. */

.lx-table { width: 100%; border-collapse: collapse; font-size: .875rem; margin-bottom: 1rem; }
.lx-table th, .lx-table td { padding: .45rem .6rem; border: 1px solid #dee2e6; text-align: left; vertical-align: top; }
.lx-table th { background: var(--sm-surface-alt); font-weight: 600; white-space: nowrap; }
.lx-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lx-table tbody tr:hover { background: rgba(var(--sm-primary-rgb), .05); }
.dark .lx-table th, .dark .lx-table td { border-color: rgba(255, 255, 255, .1); }

/* ------------------------------------------------------------------ Work order detail modal (work-order-detail.blade.php) */
.lx-wo { display: flex; flex-direction: column; gap: 1rem; }
.lx-wo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lx-wo-head b { font-size: 1.15rem; margin-right: .4rem; }
.lx-wo-head span { color: #6c757d; }
.lx-wo-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; margin: .25rem 0 -.5rem; }
.lx-wo-title small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.lx-wo-scroll { overflow-x: auto; }
/* exactly 4 tiles: share the modal width (the shared grid is auto-fill and would leave an empty 5th slot) */
.lx-wo .lx-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .lx-wo .lx-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lx-wo-empty { color: #6c757d; text-align: center; padding: 1.25rem .6rem !important; }

/* the route: one row per step, progress on the right */
.lx-route { list-style: none; margin: 0; padding: 0; border: 1px solid #e3e7ec; border-radius: var(--sm-radius); overflow: hidden; }
.lx-route-step { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; }
.lx-route-step + .lx-route-step { border-top: 1px solid #edf0f3; }
.lx-route-seq {
  flex: 0 0 2.1rem; height: 2.1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; background: #e9ecef; color: #495057; font-variant-numeric: tabular-nums;
}
.lx-route-step.is-started .lx-route-seq { background: rgba(var(--sm-primary-rgb), .12); color: var(--sm-primary); }
.lx-route-step.is-done .lx-route-seq { background: #28a745; color: #fff; }
.lx-route-main { flex: 1 1 auto; min-width: 0; }
.lx-route-name { font-size: .95rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; }
.lx-route-station { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; color: #495057; }
.lx-route-station svg { width: .9rem; height: .9rem; color: #6c757d; }
.lx-route-meta { margin-top: .2rem; font-size: .78rem; color: #6c757d; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.lx-route-progress { flex: 0 0 12rem; }
.lx-route-count { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; font-size: .85rem; margin-bottom: .3rem; font-variant-numeric: tabular-nums; }
.lx-route-ok { width: 1.05rem; height: 1.05rem; color: #28a745; }
@media (max-width: 640px) {
  .lx-route-step { flex-wrap: wrap; }
  .lx-route-progress { flex: 1 1 100%; padding-left: 3rem; }
}

/* small status chips */
.lx-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .45rem; border-radius: 6px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.lx-chip.is-running { background: rgba(40, 167, 69, .14); color: #1e7e34; }
.lx-chip.is-break { background: rgba(255, 193, 7, .2); color: #8a6100; }
.lx-chip.is-plan { background: rgba(31, 95, 191, .1); color: var(--sm-primary); }
.lx-chip.is-plan svg { width: .85rem; height: .85rem; display: inline; vertical-align: -2px; }
.lx-chip.is-scrap { background: rgba(220, 53, 69, .12); color: #c82333; }

/* runs: two-line cells, note row */
.lx-wo-runs td .sub { display: block; font-size: .78rem; color: #6c757d; }
.lx-wo-runs tr.is-open td:first-child { box-shadow: inset 3px 0 0 #28a745; }
.lx-wo-runs tr.is-cancelled td { opacity: .55; text-decoration: line-through; }
.lx-wo-runs tr.is-cancelled .lx-chip { text-decoration: none; }
.lx-icon-inline { width: .9rem; height: .9rem; display: inline; vertical-align: -2px; color: #fd7e14; }
.lx-corrections { font-size: .8rem; }
.lx-corrections li { padding: .4rem 0; border-top: 1px solid #e9ecef; }
.lx-corrections li:first-child { border-top: 0; }
.lx-corrections .sub { color: #6c757d; }
.lx-corrections pre { white-space: pre-wrap; font: inherit; margin: .2rem 0 0; }
.dark .lx-corrections li { border-color: #4b545c; }
.dark .lx-corrections .sub { color: #adb5bd; }
.lx-wo-runs tr.lx-note td { border-top: 0; padding-top: 0; font-size: .78rem; color: #6c757d; }
.lx-wo-runs tr.lx-note svg { width: .9rem; height: .9rem; display: inline; vertical-align: -2px; }

.dark .lx-wo-head span, .dark .lx-wo-title, .dark .lx-wo-empty, .dark .lx-route-meta, .dark .lx-wo-runs td .sub, .dark .lx-wo-runs tr.lx-note td { color: #adb5bd; }
.dark .lx-route { border-color: #4b545c; }
.dark .lx-route-step + .lx-route-step { border-top-color: #4b545c; }
.dark .lx-route-seq { background: #3f474e; color: #dee2e6; }
.dark .lx-route-step.is-started .lx-route-seq { background: rgba(76, 141, 255, .2); color: #9cc7ff; }
.dark .lx-route-step.is-done .lx-route-seq { background: #218838; color: #fff; }
.dark .lx-route-station { color: #ced4da; }
.dark .lx-route-station svg { color: #adb5bd; }
.dark .lx-chip.is-running { background: rgba(40, 167, 69, .2); color: #6fdc8c; }
.dark .lx-chip.is-break { background: rgba(255, 193, 7, .15); color: #ffd75e; }
.dark .lx-chip.is-plan { background: rgba(76, 141, 255, .18); color: #9fc1ff; }
.dark .lx-chip.is-scrap { background: rgba(220, 53, 69, .2); color: #ff8787; }

/* ================================================================== MES KPI, filled by public/js/kobimes-kpi.js */

.mes-kpi { display: flex; flex-direction: column; gap: 1.25rem; }
.mes-kpi .text-left { text-align: left !important; }
.mk-topline { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: -.75rem; }
.mk-muted { color: #6c757d; font-weight: 400; font-size: .85em; }
.mk-label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .3rem; }
.mk-input {
  display: block; width: 100%; min-height: 2.25rem; padding: .35rem .65rem; font-size: .875rem;
  border: 1px solid #ced4da; border-radius: 8px; background: #fff; color: inherit;
}
.mk-input:focus { outline: none; border-color: var(--sm-primary); box-shadow: 0 0 0 3px rgba(var(--sm-primary-rgb), .2); }
.mk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.25rem; padding: .35rem .85rem;
  border: 1px solid #ced4da; border-radius: 8px; background: #fff; color: #495057; font-size: .875rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.mk-btn svg { width: 1rem; height: 1rem; }
.mk-btn.is-primary { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; width: 100%; }
.mk-btn:disabled { opacity: .6; cursor: default; }
.mk-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem 1rem; align-items: end; }
.mk-filter-sub { margin-top: .75rem; padding-top: .75rem; border-top: 1px solid #e9ecef; }
.mk-filter-button .mk-btn { width: 100%; }
.mk-count { font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 6px; background: var(--sm-surface-alt); color: #495057; white-space: nowrap; }
.mk-ms { position: relative; }
.mk-ms-btn { text-align: left; cursor: pointer; overflow: hidden; }
.mk-ms-btn:disabled { cursor: default; color: #6c757d; }
.mk-ms-val { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-ms-btn.is-filtered { border-color: var(--sm-primary); color: var(--sm-primary); font-weight: 600; }
.mk-ms-pop {
  display: none; position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 280px; max-width: 90vw; padding: .6rem;
  background: #fff; border: 1px solid #dee2e6; border-radius: 8px; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.mk-ms-pop.is-open { display: block; }
.mk-ms-links { display: flex; justify-content: space-between; margin-bottom: .5rem; font-size: .8rem; }
.mk-ms-links a { color: var(--sm-primary); }
.mk-ms-search { margin-bottom: .5rem; }
.mk-ms-list { max-height: 240px; overflow-y: auto; }
.mk-ms-item { display: flex; align-items: center; gap: .4rem; padding: .15rem 0; font-size: .875rem; white-space: nowrap; cursor: pointer; }
.mk-status { padding: .5rem .85rem; border-radius: 8px; font-size: .875rem; }
.mk-status.is-loading { background: #d1ecf1; color: #0c5460; }
.mk-status.is-error { background: #f8d7da; color: #721c24; }
.mk-status.is-warning { background: #fff3cd; color: #856404; grid-column: 1 / -1; }
.mk-status.is-ok { padding: 0; color: #6c757d; font-size: .8rem; }
.mk-kpis { grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); }
.mk-kpi-flag { font-size: .8rem; color: #fd7e14; vertical-align: middle; }
.mk-findings { margin: 0; padding-left: 1.2rem; list-style: disc; }
.mk-findings li { margin: 4px 0; line-height: 1.45; }
.mk-issues:not(:empty) { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid #e9ecef; }
.mk-issues-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: .5rem; }
.mk-issues-title { font-weight: 700; margin-right: 6px; }
.mk-issues-scroll { max-height: 360px; overflow: auto; border: 1px solid #dee2e6; border-radius: .25rem; }
.mk-issues-scroll .mk-dt { margin: 0; }
.mk-issues-scroll .mk-dt thead th { position: sticky; top: 0; z-index: 1; }
.mk-ok { color: #28a745; font-size: .875rem; }
.mk-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mk-chip {
  --c: #343a40; display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .55rem; border-radius: 999px;
  border: 1px solid var(--c); background: transparent; color: var(--c); font-size: .75rem; font-weight: 600; cursor: pointer;
}
.mk-chip.is-active { background: var(--c); color: #fff; }
.mk-chip-n { font-variant-numeric: tabular-nums; padding: 0 .35rem; border-radius: 999px; background: rgba(0, 0, 0, .08); }
.mk-chip.is-danger, .mk-badge.is-danger { --c: #dc3545; }
.mk-chip.is-warning, .mk-badge.is-warning { --c: #e0a800; }
.mk-chip.is-secondary, .mk-badge.is-secondary { --c: #6c757d; }
.mk-badge { --c: #6c757d; display: inline-block; padding: .2em .5em; border-radius: .25rem; background: var(--c); color: #fff; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.mk-badge.is-warning { color: #1f2d3d; background: #ffc107; }
.mk-badge.is-success { --c: #28a745; }
.mk-badge.is-info { --c: #17a2b8; }
.mk-badge.is-primary { --c: var(--sm-primary); }
.mk-badge.is-light { color: #1f2d3d; background: #e9ecef; }
.dark .mk-badge.is-light { color: #dee2e6; background: #4b545c; }
.mk-chart-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 1024px) { .mk-chart-grid { grid-template-columns: 1fr 1fr; } }
.mk-chart { position: relative; height: 300px; }
.mk-flush .fi-section-content { padding: 0; }
.mk-flush .lx-table { margin: 0; }
.mk-scroll-x { overflow-x: auto; }
.mk-empty { margin: 1rem; color: #6c757d; }
.mk-dt { font-size: .8rem; }
.mk-dt th, .mk-dt td { white-space: nowrap; text-align: right; vertical-align: middle; }
.mk-dt td.text-left { white-space: normal; min-width: 7rem; } /* names wrap, numbers stay on one line */
.mk-dt thead th[data-k] { cursor: pointer; user-select: none; }
.mk-sort { font-size: .65rem; opacity: .6; }
.mk-dt tfoot td { font-weight: 700; background: rgba(var(--sm-primary-rgb), .06); border-top: 2px solid #dee2e6; }
.mk-dt tr.mk-clickable { cursor: pointer; }
.mk-dt tr.is-selected td { background: rgba(var(--sm-primary-rgb), .1); }
.mk-dt tr.mk-muted-row td { color: #6c757d; font-style: italic; }
.mk-bad { color: #dc3545; font-weight: 700; }
.mk-good { color: #28a745; }
.mk-warn { color: #d9480f; font-weight: 600; }
.dark .mk-warn { color: #ff922b; }
/* Makine ↔ Kayıt table: one line per run, the work order cell with its item under it */
.mr-table td { white-space: nowrap; vertical-align: top; }
.mr-table th { white-space: normal; vertical-align: bottom; }
.mr-table td .mk-muted, .mr-table td div { font-size: .75rem; }
.mr-table .mr-prog { display: inline-block; max-width: 9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.mk-text-warning { color: #d9480f; }
.mk-tsearch { width: 200px; min-height: 2rem; }
.mk-seg { display: inline-flex; border: 1px solid #ced4da; border-radius: 6px; overflow: hidden; }
.mk-seg button { padding: .15rem .6rem; font-size: .75rem; background: transparent; border: 0; cursor: pointer; color: inherit; }
.mk-seg button + button { border-left: 1px solid #ced4da; }
.mk-seg button.is-active { background: var(--sm-primary); color: #fff; font-weight: 700; }
.mk-heat th, .mk-heat td { text-align: center; padding: .3rem .25rem; }
.mk-heat td.mk-heat-cell { min-width: 44px; }
.mk-heat .mk-heat-st { position: sticky; left: 0; z-index: 1; text-align: left; background: #fff; font-weight: 600; }
.mk-heat .mk-heat-tot { font-weight: 700; background: rgba(0, 0, 0, .03); }
.mk-heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 12px; font-size: .75rem; color: #6c757d; border-top: 1px solid #dee2e6; }
.mk-heat-bar { width: 120px; height: 10px; border-radius: 2px; }
.mk-defs { margin: 0; padding-left: 1.2rem; list-style: disc; font-size: .85rem; }
.mk-defs li { margin: 4px 0; }
.mk-print-header { display: none; }

.dark .mk-muted, .dark .mk-heat-legend, .dark .mk-empty, .dark .lx-live-footer { color: #adb5bd; }
.dark .mk-input, .dark .mk-btn:not(.is-primary), .dark .mk-ms-pop { background: #343a40; border-color: #6c757d; color: #f8f9fa; }
.dark .mk-filter-sub, .dark .mk-issues:not(:empty) { border-top-color: rgba(255, 255, 255, .1); }
.dark .mk-count { color: #dee2e6; }
.dark .mk-status.is-loading { background: rgba(23, 162, 184, .2); color: #9ee6f2; }
.dark .mk-status.is-error { background: rgba(220, 53, 69, .2); color: #ffb3bb; }
.dark .mk-status.is-warning { background: rgba(255, 193, 7, .15); color: #ffd75e; }
.dark .mk-issues-scroll { border-color: #56606a; }
.dark .mk-chip { --c: #dee2e6; }
.dark .mk-chip.is-danger { --c: #ff6b6b; }
.dark .mk-chip.is-warning { --c: #ffd75e; }
.dark .mk-chip.is-secondary { --c: #adb5bd; }
.dark .mk-chip.is-active { color: #1f2d3d; }
.dark .mk-dt tfoot td { background: rgba(63, 106, 216, .15); border-top-color: #6c757d; }
.dark .mk-heat .mk-heat-st { background: #343a40; }
.dark .mk-heat .mk-heat-tot { background: rgba(255, 255, 255, .05); }
.dark .mk-heat-legend { border-top-color: #56606a; }
.dark .mk-seg, .dark .mk-seg button + button { border-color: #6c757d; }

@media print {
  @page { size: A4 landscape; margin: 14mm; }
  .fi-main-sidebar, .fi-topbar-ctn, .sm-tabs, .fi-header, .mk-noprint, .mk-filter-card, #mkStatus, .mk-topline { display: none !important; }
  .mk-print-header { display: block; border-bottom: 2px solid #1f5fbf; padding-bottom: 6px; margin-bottom: 10px; }
  .mk-print-header h2 { font-size: 18px; font-weight: 700; margin: 0 0 2px; }
  .mk-print-header div { font-size: 11px; color: #495057; }
  .mes-kpi .fi-section, .lx-kpi { box-shadow: none; break-inside: avoid; }
  .mk-chart { height: 230px !important; }
  .mk-kpis { grid-template-columns: repeat(6, 1fr); }
  .mk-dt { font-size: 8.5px; }
}

/* ================================================================== Home */

.hp { display: flex; flex-direction: column; gap: 1.25rem; }
.hp-hero {
  position: relative; overflow: hidden; color: #fff; border-radius: var(--sm-radius); padding: 26px 28px 20px;
  background: linear-gradient(150deg, var(--sm-navy-900) 0%, var(--sm-navy-700) 55%, #1f5fbf 100%); box-shadow: var(--sm-shadow);
}
.hp-hero::before, .hp-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; border: 1px solid rgba(255, 255, 255, .08); }
.hp-hero::before { width: 340px; height: 340px; right: -110px; top: -170px; box-shadow: 0 0 0 40px rgba(255, 255, 255, .025); }
.hp-hero::after { width: 220px; height: 220px; left: -90px; bottom: -140px; box-shadow: 0 0 0 28px rgba(255, 255, 255, .03); }
.hp-hero > * { position: relative; z-index: 1; }
.hp-hero-main { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.hp-greeting { color: rgba(255, 255, 255, .72); font-size: .95rem; }
.hp-name { font-size: 1.9rem; font-weight: 700; margin: 2px 0 6px; color: #fff; }
.hp-shift { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: rgba(255, 255, 255, .78); font-size: .9rem; }
.hp-shift svg { width: 1rem; height: 1rem; }
.hp-clock { text-align: right; }
.hp-clock-time { font-size: 2.4rem; font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.hp-clock-date { color: rgba(255, 255, 255, .72); margin-top: 6px; font-size: .9rem; }
.hp-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hp-quick-link {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: .9rem;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); color: #fff; transition: background .15s;
}
.hp-quick-link:hover { background: rgba(255, 255, 255, .2); }
.hp-quick-link svg { width: 1rem; height: 1rem; }
.hp-empty { padding: .75rem 1rem; border: 1px solid #dee2e6; border-radius: 8px; color: #6c757d; }
.hp-updated { font-size: .75rem; padding: .15rem .5rem; border-radius: 6px; background: var(--sm-surface-alt); color: #495057; white-space: nowrap; }
.hp-open { display: inline-flex; color: #6c757d; }
.hp-open svg { width: 1rem; height: 1rem; }
.hp-kpis { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-bottom: 1rem; }
.hp-kpis .lx-kpi { border-top: 0; border-left: 3px solid var(--lx-accent); background: var(--sm-surface-alt); box-shadow: none; }
.hp-accent-run { --lx-accent: #28a745; }
.hp-accent-break { --lx-accent: #fd7e14; }
.hp-accent-idle { --lx-accent: #6c757d; }
.hp-accent-offjob { --lx-accent: #dc3545; }
.hp-accent-offline { --lx-accent: #343a40; }
.dark .hp-accent-offline { --lx-accent: #adb5bd; }
.hp-section-title { font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #6c757d; margin-bottom: 8px; }
.hp-chart { position: relative; height: 240px; }
.hp-note, .hp-muted { font-size: .8rem; color: #6c757d; margin-bottom: .5rem; }
.hp-chips { margin-bottom: .75rem; }
.hp-chips .mk-chip { cursor: default; }
.hp-ok { color: #28a745; font-size: .875rem; }
.hp-danger { color: #dc3545; font-weight: 700; }
.hp-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 1024px) { .hp-row:has(> :nth-child(2)) { grid-template-columns: 2fr 1fr; } }
.hp-admin-stat { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #dee2e6; }
.hp-admin-stat:last-of-type { border-bottom: 0; }
.hp-admin-stat b { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.hp-admin-stat b.hp-danger { color: #dc3545; }
.hp-fail-table { margin: .25rem 0 0; font-size: .8rem; }
.hp-fail-table td { padding: .25rem .4rem; border-width: 0 0 1px; }
.hp-fail-table .hp-muted { margin: 0; white-space: nowrap; }
@media (max-width: 575.98px) { .hp-hero { padding: 20px 18px 16px; } .hp-name { font-size: 1.5rem; } .hp-clock { display: none; } }
.dark .hp-hero { background: linear-gradient(150deg, #0a1730 0%, #0f2649 55%, #173a73 100%); }
.dark .hp-kpis .lx-kpi { background: #3a4047; }
.dark .hp-section-title, .dark .hp-note, .dark .hp-muted, .dark .hp-open, .dark .hp-empty { color: #adb5bd; }
.dark .hp-updated { color: #dee2e6; }
.dark .hp-admin-stat { border-bottom-color: #4b545c; }

/* ================================================================== AdminLTE small-box (grafik_rapor summary boxes) */

.lx-smallbox {
  position: relative; overflow: hidden; display: flex; min-height: 104px; border-radius: .25rem; color: #fff;
  box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
}
.lx-smallbox-inner { position: relative; z-index: 1; flex: 1; padding: 10px 56px 10px 12px; }
.lx-smallbox h3 { margin: 0 0 6px; font-size: 1.55rem; font-weight: 700; line-height: 1.15; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lx-smallbox p { margin: 0; line-height: 1.15; }
.lx-smallbox-icon { position: absolute; top: 12px; right: 10px; width: 64px; height: 64px; opacity: .2; transition: transform .3s; }
.lx-smallbox:hover .lx-smallbox-icon { transform: scale(1.1); }
.lx-smallbox.is-info { background: #17a2b8; }
.lx-smallbox.is-success { background: #28a745; }
.lx-smallbox.is-primary { background: var(--sm-primary); }
.lx-smallbox.is-warning { background: #ffc107; color: #1f2d3d; }
.lx-smallbox.is-danger { background: #dc3545; }
.lx-smallbox.is-secondary { background: #6c757d; }
.lx-smallbox.is-dark { background: #343a40; }
.dark .lx-smallbox.is-dark { background: #1f2327; }

/* ================================================================== Grafik Rapor */

.gr { display: flex; flex-direction: column; gap: 1.25rem; }
.gr-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .75rem 1rem; align-items: end; margin-bottom: 1rem; }
.gr-pickers { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .gr-pickers { grid-template-columns: 1fr 1fr; } }
.gr-picker { border: 1px solid #dee2e6; border-radius: 8px; padding: .75rem; }
.gr-picker-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.gr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .5rem; }
.gr-search { margin-bottom: .5rem; }
.gr-list { max-height: 320px; overflow-y: auto; border: 1px solid #e5e7eb; border-radius: 4px; padding: 10px; }
.gr-option { display: block; margin-bottom: 8px; cursor: pointer; font-size: .875rem; }
.gr-option:last-child { margin-bottom: 0; }
.gr-option small { display: block; color: #6c757d; margin-left: 22px; }
.mk-btn.is-xs { min-height: 1.6rem; padding: .1rem .5rem; font-size: .75rem; }
.mk-btn.is-xs svg { width: .85rem; height: .85rem; }
.gr-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.gr-work { min-height: 104px; }
.gr-work-details { display: flex; gap: 1rem; margin-top: .4rem; font-size: .8rem; }
.gr-work-details span { opacity: .8; margin-right: .25rem; }
.gr-chart { position: relative; min-height: 360px; height: 360px; }
.gr-msg { margin-bottom: .75rem; }
.gr-hint { margin: .5rem 0 0; font-size: .75rem; color: #6c757d; }
.dark .gr-picker, .dark .gr-list { border-color: #4b545c; }
.dark .gr-option small, .dark .gr-hint { color: #adb5bd; }

/* ================================================================== Üretim İzleme (station Gantt), filled by public/js/kobimes-timeline.js */
.tl-live { display: flex; align-items: center; gap: .4rem; font-size: .85rem; min-height: 2.25rem; cursor: pointer; }
.tl-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-bottom: .75rem; font-size: .8rem; color: #6c757d; }
.tl-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.tl-swatch { display: inline-block; width: 1.4rem; height: .8rem; border-radius: 3px; background: var(--sm-primary); }
.tl-swatch.is-break, .tl-break { background: repeating-linear-gradient(135deg, rgba(220, 53, 69, .9) 0 4px, rgba(220, 53, 69, .55) 4px 8px); }
.tl-swatch.is-planned, .tl-break.is-planned { background: repeating-linear-gradient(135deg, rgba(108, 117, 125, .9) 0 4px, rgba(108, 117, 125, .55) 4px 8px); }
.tl-swatch.is-open { background: transparent; border: 2px dashed var(--sm-primary); }
.tl-swatch.is-now { width: 2px; height: 1rem; border-radius: 0; background: #dc3545; }
.tl-scroll { overflow-x: auto; max-height: calc(100vh - 220px); overflow-y: auto; }
.tl-grid { font-size: .78rem; }
.tl-row { display: flex; border-bottom: 1px solid #e5e7eb; }
.tl-label { position: sticky; left: 0; z-index: 3; flex: 0 0 11rem; padding: .3rem .6rem; background: var(--sm-surface-alt); border-right: 1px solid #dee2e6; overflow: hidden; }
.tl-label b { display: block; white-space: nowrap; }
.tl-label small { display: block; color: #6c757d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; flex: 1 1 auto; background-image: linear-gradient(to right, #e5e7eb 1px, transparent 1px); }
.tl-head { position: sticky; top: 0; z-index: 4; background: #fff; font-weight: 600; }
.tl-head .tl-label { display: flex; align-items: center; }
.tl-head .tl-track { height: 2.2rem; }
.tl-head .tl-track span { position: absolute; top: 0; bottom: 0; display: flex; align-items: flex-end; padding-bottom: .3rem; padding-left: .3rem; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.tl-head .tl-track b { position: absolute; top: .05rem; left: .3rem; font-size: .62rem; line-height: 1; color: var(--sm-primary); }
.tl-bar { position: absolute; height: 20px; min-width: 2px; border-radius: 4px; background: var(--tl-color); color: #fff; overflow: hidden; cursor: default; box-shadow: 0 1px 2px rgba(16, 24, 40, .2); }
.tl-bar:hover { filter: brightness(1.1); z-index: 2; }
.tl-bar span { position: relative; z-index: 1; display: block; padding: 0 .35rem; line-height: 20px; font-size: .72rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px rgba(0, 0, 0, .3); }
.tl-bar.is-open { outline: 2px dashed var(--tl-color); outline-offset: 1px; animation: tl-pulse 2s ease-in-out infinite; }
@keyframes tl-pulse { 50% { opacity: .75; } }
.tl-break { position: absolute; top: 0; bottom: 0; }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: #dc3545; z-index: 2; pointer-events: none; }
.tl-empty { padding: 1rem; color: #6c757d; }
.dark .tl-row { border-color: #4b545c; }
.dark .tl-label { border-color: #4b545c; }
.dark .tl-label small, .dark .tl-legend, .dark .tl-empty { color: #adb5bd; }
.dark .tl-track { background-image: linear-gradient(to right, #4b545c 1px, transparent 1px); }
.dark .tl-head { background: #343a40; }
@media (prefers-reduced-motion: reduce) { .tl-bar.is-open { animation: none; } }

/* Kapasite Planlama (kobimes-planning.js): the Üretim İzleme Gantt + queue / load / suggestion tables */
.pl-bar { min-width: 3px; cursor: pointer; }
.pl-bar.pl-urgent { box-shadow: 0 0 0 2px #dc3545; }
.pl-bar.pl-moved { background: repeating-linear-gradient(135deg, var(--tl-color) 0 6px, color-mix(in srgb, var(--tl-color) 70%, #fff) 6px 12px); outline: 2px dashed var(--tl-color); outline-offset: 1px; }
.pl-off { position: absolute; top: 0; bottom: 0; background: rgba(108, 117, 125, .12); pointer-events: none; }
.tl-swatch.pl-swatch-urgent { box-shadow: 0 0 0 2px #dc3545; }
.tl-swatch.pl-swatch-moved { background: repeating-linear-gradient(135deg, var(--sm-primary) 0 4px, #8fb0e3 4px 8px); }
.tl-swatch.pl-swatch-off { background: rgba(108, 117, 125, .25); }
.pl-hint { margin: 0; font-size: .8rem; color: #6c757d; }
/* fixed-width fields in one row; nothing appears or disappears, so nothing moves */
.pl-params { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1rem; margin-bottom: 1rem; }
.pl-field { flex: 0 0 11rem; min-width: 0; }
.pl-field:has(.pl-batch) { flex-basis: 15rem; }
.pl-batch { display: flex; align-items: center; gap: .6rem; }
.pl-batch .tl-live { white-space: nowrap; }
.pl-batch .mk-input { flex: 1; min-width: 0; }
.pl-batch .mk-input:disabled { opacity: .5; }
.pl-drafts { white-space: nowrap; }
.pl-run { margin-left: auto; flex: 0 0 11rem; justify-content: center; }
@media (max-width: 640px) { .pl-field, .pl-field:has(.pl-batch), .pl-run { flex-basis: 100%; } .pl-run { margin-left: 0; } }
.pl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; min-height: 2.25rem; margin: 1rem 0; }
.pl-toolbar .mk-status { padding: .3rem .75rem; }
.pl-toolbar .pl-now { margin-left: auto; }
.pl-view button { padding: .35rem .9rem; font-size: .85rem; }
.pl-view button:disabled { opacity: .5; cursor: default; }
.pl-now { font-size: .8rem; color: #6c757d; }
.pl-kpis { margin: 1rem 0; min-height: 128px; } /* the tiles' height, held before the first load */
.pl-kpis .lx-kpi-foot { flex-wrap: nowrap; gap: .5rem; }
.pl-kpis .lx-kpi-foot span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#plWarnings .mk-status { margin-top: .5rem; }
.pl-apply { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .75rem; }
.pl-apply .mk-btn { width: auto; }
.pl-apply .pl-hint { flex: 1 1 18rem; }
.pl-pick { width: 2rem; text-align: center; }
.pl-station-link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pl-detail { margin-top: .75rem; padding: .75rem 1rem; border: 1px solid #dee2e6; border-left: 3px solid var(--sm-primary); border-radius: 8px; background: var(--sm-surface-alt); font-size: .85rem; }
.pl-detail-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.pl-detail-head > span:last-of-type { color: #6c757d; }
.pl-detail-close { margin-left: auto; border: 0; background: transparent; font-size: 1.25rem; line-height: 1; cursor: pointer; color: inherit; }
.pl-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .35rem 1rem; }
.pl-detail-grid span { display: block; font-size: .72rem; color: #6c757d; }
.pl-to { color: var(--sm-primary); }
.pl tr.pl-running td { background: rgba(40, 167, 69, .08); }
.pl-load span { display: inline-block; min-width: 3.2rem; padding: .1rem .35rem; border-radius: 6px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pl-load span.is-ok { background: rgba(40, 167, 69, .15); color: #1e7e34; }
.pl-load span.is-high { background: rgba(255, 193, 7, .25); color: #856404; }
.pl-load span.is-over { background: rgba(220, 53, 69, .15); color: #b02a37; }
.pl-load small { display: block; color: #6c757d; font-size: .7rem; }
.dark .pl-hint, .dark .pl-now, .dark .pl-detail-grid span, .dark .pl-detail-head > span:last-of-type, .dark .pl-load small { color: #adb5bd; }
.dark .pl-detail { border-color: #4b545c; }
.dark .pl-off { background: rgba(0, 0, 0, .25); }
.dark .pl-load span.is-ok { color: #75d68f; }
.dark .pl-load span.is-high { color: #ffd66b; }
.dark .pl-load span.is-over { color: #ff8a95; }
/* Kapasite Planlama → İstasyon Kuyruğu as a calendar (weekly time grid / monthly day grid); the printout has its own CSS (PRINT_CSS in kobimes-planning.js) */
.pl-qview button { display: inline-flex; align-items: center; gap: .3rem; padding: .4rem .75rem; font-size: .85rem; }
.pl-qview svg { width: 1rem; height: 1rem; }
.pl-cal-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.pl-cal-nav .mk-btn { width: auto; padding: .35rem .6rem; }
.pl-cal-nav .mk-btn svg { width: 1rem; height: 1rem; }
.pl-cal-title { margin-left: .25rem; font-size: 1rem; }
.pl-cal-nav .pl-hint { flex: 1 1 14rem; text-align: right; }
.pl-cal { position: relative; overflow-x: auto; border: 1px solid #dee2e6; border-radius: 8px; }
.pl-cal-head, .pl-cal-grid { display: grid; grid-template-columns: 3.5rem repeat(7, minmax(7.5rem, 1fr)); min-width: calc(3.5rem + 7 * 7.5rem); }
.pl-cal-month .pl-cal-head, .pl-cal-days { display: grid; grid-template-columns: repeat(7, minmax(7.5rem, 1fr)); min-width: calc(7 * 7.5rem); }
.pl-cal-head { position: sticky; top: 0; z-index: 3; background: var(--sm-surface-alt); border-bottom: 1px solid #dee2e6; }
.pl-cal-dayhead { display: flex; align-items: baseline; justify-content: center; gap: .35rem; padding: .4rem .25rem; font-size: .8rem; color: #6c757d; }
.pl-cal-dayhead b { color: #212529; font-variant-numeric: tabular-nums; }
.pl-cal-dayhead.is-today b { color: var(--sm-primary); }
.pl-cal-body { max-height: 34rem; overflow-y: auto; }
.pl-cal-gutter { position: relative; border-right: 1px solid #dee2e6; }
.pl-cal-gutter span { position: absolute; right: .35rem; transform: translateY(-50%); font-size: .7rem; color: #6c757d; font-variant-numeric: tabular-nums; }
.pl-cal-gutter span:first-child { transform: none; }
.pl-cal-col { position: relative; border-right: 1px solid #eef0f3; background-image: linear-gradient(to bottom, #eef0f3 1px, transparent 1px); background-size: 100% 40px; } /* 40px = HOUR_PX */
.pl-cal-col:last-child { border-right: 0; }
.pl-cal-col.is-today { background-color: rgba(31, 95, 191, .04); }
.pl-cal-off { position: absolute; left: 0; right: 0; background: rgba(108, 117, 125, .12); pointer-events: none; }
.pl-cal-out { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(108, 117, 125, .1) 0 6px, transparent 6px 12px); pointer-events: none; }
.pl-cal-now { position: absolute; left: 0; right: 0; height: 2px; background: #dc3545; z-index: 2; pointer-events: none; }
.pl-cal-ev { position: absolute; z-index: 1; overflow: hidden; padding: .1rem .3rem; border: 0; border-left: 3px solid color-mix(in srgb, var(--tl-color) 70%, #000); border-radius: 4px; background: var(--tl-color); color: #fff; font: inherit; font-size: .72rem; line-height: 1.25; text-align: left; cursor: pointer; }
.pl-cal-ev:hover { filter: brightness(1.1); z-index: 2; }
.pl-cal-ev b, .pl-cal-ev span, .pl-cal-ev small { white-space: nowrap; }
.pl-cal-week .pl-cal-ev small { display: block; opacity: .9; font-variant-numeric: tabular-nums; }
.pl-cal-ev.is-running { outline: 2px dashed var(--tl-color); outline-offset: 1px; }
.pl-cal-ev.pl-urgent { box-shadow: 0 0 0 2px #dc3545; }
.pl-cal-ev.pl-moved { background: repeating-linear-gradient(135deg, var(--tl-color) 0 6px, color-mix(in srgb, var(--tl-color) 70%, #fff) 6px 12px); }
.pl-cal-cell { display: flex; flex-direction: column; gap: 2px; min-height: 7.5rem; padding: .25rem; border-right: 1px solid #eef0f3; border-bottom: 1px solid #eef0f3; }
.pl-cal-cell:nth-child(7n) { border-right: 0; }
.pl-cal-cell.is-other { opacity: .55; }
.pl-cal-cell.is-off { background: rgba(108, 117, 125, .08); }
.pl-cal-cell.is-out { background: repeating-linear-gradient(135deg, rgba(108, 117, 125, .08) 0 6px, transparent 6px 12px); }
.pl-cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--sm-primary); }
.pl-cal-date { display: flex; align-items: center; justify-content: space-between; gap: .25rem; margin-bottom: 2px; }
.pl-cal-date button { border: 0; background: transparent; padding: 0 .2rem; font: inherit; font-size: .8rem; font-weight: 700; color: inherit; cursor: pointer; border-radius: 4px; font-variant-numeric: tabular-nums; }
.pl-cal-date button:hover { background: rgba(31, 95, 191, .1); }
.pl-cal-cell.is-today .pl-cal-date button { color: var(--sm-primary); }
.pl-cal-load { font-size: .68rem; color: #6c757d; font-variant-numeric: tabular-nums; }
.pl-cal-month .pl-cal-ev { position: static; display: block; width: 100%; padding: .1rem .3rem; text-overflow: ellipsis; white-space: nowrap; }
.pl-cal-month .pl-cal-ev small { font-variant-numeric: tabular-nums; opacity: .9; }
.pl-cal-more { align-self: flex-start; border: 0; background: transparent; padding: 0 .2rem; font: inherit; font-size: .72rem; font-weight: 600; color: var(--sm-primary); cursor: pointer; }
.pl-cal .tl-empty { border-top: 1px solid #dee2e6; }
.dark .pl-cal, .dark .pl-cal-head, .dark .pl-cal-gutter, .dark .pl-cal .tl-empty { border-color: #4b545c; }
.dark .pl-cal-col, .dark .pl-cal-cell { border-color: #454d55; }
.dark .pl-cal-col { background-image: linear-gradient(to bottom, #454d55 1px, transparent 1px); }
.dark .pl-cal-col.is-today { background-color: rgba(47, 111, 208, .1); }
.dark .pl-cal-off, .dark .pl-cal-cell.is-off { background: rgba(0, 0, 0, .25); }
.dark .pl-cal-out, .dark .pl-cal-cell.is-out { background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .25) 0 6px, transparent 6px 12px); }
.dark .pl-cal-dayhead, .dark .pl-cal-gutter span, .dark .pl-cal-load { color: #adb5bd; }
.dark .pl-cal-more { color: #8fb0e3; }
.dark .pl-cal-dayhead b { color: #e9ecef; }
.dark .pl-cal-dayhead.is-today b { color: #8fb0e3; }
@media (max-width: 640px) { .pl-cal-nav .pl-hint { text-align: left; } }

/* ================================================================== Denetim kaydı, filled by public/js/kobimes-audit.js */
.sm-audit .aud-toolbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem 1rem; align-items: end; margin: -.25rem 0 1rem; padding: .6rem .85rem .75rem; border-radius: 8px; background: var(--sm-surface-alt); }
.sm-audit .aud-toolbar .mk-btn.is-primary { width: auto; }
.sm-audit #audError { margin-bottom: .75rem; }
.sm-audit .aud-scroll { max-height: calc(100vh - 260px); min-height: 300px; overflow: auto; }
.sm-audit .aud-table { margin: 0; font-size: .82rem; }
.sm-audit .aud-table th { position: sticky; top: 0; z-index: 1; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: #495057; }
.sm-audit .aud-table td { padding: .4rem .6rem; }
.sm-audit .aud-time, .sm-audit .aud-ip { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sm-audit .aud-ip, .sm-audit .aud-sub { font-size: .75rem; color: #6c757d; }
.sm-audit .aud-detail { font-size: .78rem; color: #495057; word-break: break-word; }
.sm-audit .aud-detail b { font-weight: 600; }
.sm-audit .aud-empty { padding: 1.5rem; text-align: center; color: #6c757d; }
.dark .sm-audit .aud-table th { color: #dee2e6; }
.dark .sm-audit .aud-detail { color: #ced4da; }
.dark .sm-audit .aud-ip, .dark .sm-audit .aud-sub, .dark .sm-audit .aud-empty { color: #adb5bd; }

/* KVKK link under the clock on the login / sign-up brand panel */
.sm-auth-legal-links { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: 1rem; }
.sm-auth-legal { font-size: .8rem; color: rgba(255, 255, 255, .7); text-decoration: underline; }
.sm-auth-legal:hover { color: #fff; }
/* the link in the sign-up / invitation terms checkbox (Register::termsComponent) */
.sm-terms-link { color: var(--sm-primary); text-decoration: underline; }
/* release tag (config kobimes.version): sidebar footer and login brand panel */
.sm-version { padding: .5rem 1rem; font-size: .7rem; color: rgba(255, 255, 255, .5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-auth-brand .sm-version { padding: .25rem 0 0; }

/* ------------------------------------------------------------------ License warning (filament/app/license-banner, Ana Sayfa + Firma ayarları) */

.sm-license-banner {
  --tone: #dc3545; --tone-bg: #fdf1f2;
  display: flex; align-items: center; gap: .9rem; margin-top: 1.5rem; padding: .9rem 1.1rem;
  border-radius: 10px; border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); border-left: 4px solid var(--tone);
  background: var(--tone-bg); box-shadow: var(--sm-shadow);
}
/* the page header below has its own 2rem top padding: even out the gap above and below the banner */
.sm-license-banner + .fi-page-header-main-ctn { padding-top: 1.5rem; }
.sm-license-banner.is-warning { --tone: #fd7e14; --tone-bg: #fff6ec; }
.sm-license-banner.is-info { --tone: var(--sm-primary); --tone-bg: #eef4fc; }
.sm-license-banner-icon { width: 26px; height: 26px; flex: none; color: var(--tone); }
.sm-license-banner-body { flex: 1; display: grid; gap: 2px; font-size: .875rem; color: #343a40; }
.sm-license-banner-body strong { color: var(--tone); font-size: .95rem; }
.sm-license-banner-action {
  display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .5rem .9rem; border-radius: 8px;
  background: var(--tone); color: #fff; font-size: .85rem; font-weight: 600; text-decoration: none;
}
.sm-license-banner-action:hover { filter: brightness(.92); }
.sm-license-banner-action svg { width: 16px; height: 16px; }
.dark .sm-license-banner { --tone-bg: #3a2a2d; }
.dark .sm-license-banner.is-warning { --tone-bg: #3d3326; }
.dark .sm-license-banner.is-info { --tone-bg: #27354a; }
.dark .sm-license-banner-body { color: #dee2e6; }
@media (max-width: 640px) { .sm-license-banner { flex-wrap: wrap; } .sm-license-banner-action { width: 100%; justify-content: center; } }

/* ------------------------------------------------------------------ Sign-up: package pricing cards (RegisterCompany, filament/app/plan-picker)
   Auth pages are always light, so there are no .dark variants. The page is kept compact so the cards sit high. */

@media (min-width: 768px) { /* below that the mobile strip above applies */
  .fi-simple-layout:has(.sm-plan-picker) .sm-auth-brand { flex-basis: 300px; padding: 40px 28px; }
  .fi-simple-layout:has(.sm-plan-picker) .sm-auth-tagline h1 { font-size: 1.6rem; }
}
.fi-simple-main:has(.sm-plan-picker) { margin-block: 1rem; padding: 0 1rem; background: transparent; box-shadow: none; }
/* no big white form card here: the cards sit on the page's gray-50 like panel cards; the step bar is a card */
.fi-simple-main:has(.sm-plan-picker) .fi-sc-wizard-header { background: #fff; border: 1px solid #e3e7ee; border-radius: var(--sm-radius); box-shadow: var(--sm-shadow); margin-bottom: 1rem; }
.fi-simple-main:has(.sm-plan-picker) .fi-sc-wizard-footer { padding-inline: 0; }
.dark .fi-simple-main:has(.sm-plan-picker) .fi-sc-wizard-header { background: #343a40; border-color: #4b545c; }
.fi-simple-main:has(.sm-plan-picker) .fi-simple-header { display: none; }
.fi-simple-main:has(.sm-plan-picker) .fi-sc-wizard-header-step-btn { padding-block: .6rem; }

.sm-plan-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.sm-plan-intro h2 { font-size: 1.2rem; font-weight: 700; color: var(--sm-navy-900); margin: 0; }
.sm-plan-promises { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.sm-plan-promises li {
  display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; color: var(--sm-navy-700); background: #eef3fb; border: 1px solid #dde6f4;
  animation: sm-fade-in .5s ease backwards;
}
.sm-plan-promises li:nth-child(2) { animation-delay: .08s; }
.sm-plan-promises li:nth-child(3) { animation-delay: .16s; }
.sm-plan-promises svg { width: 14px; height: 14px; color: var(--sm-primary); }

.sm-plan-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: stretch; padding-top: 12px; }

.sm-plan {
  position: relative; display: flex; flex-direction: column; gap: .7rem; text-align: left; cursor: pointer; overflow: visible;
  padding: 1.25rem 1.1rem 1rem; border-radius: 14px; background: #fff;
  border: 1.5px solid #e3e7ee; box-shadow: var(--sm-shadow);
  transition: border-color .2s, box-shadow .25s, transform .25s cubic-bezier(.2, .8, .2, 1);
  animation: sm-plan-in .55s cubic-bezier(.2, .8, .2, 1) backwards;
}
.sm-plan:nth-child(2) { animation-delay: .06s; }
.sm-plan:nth-child(3) { animation-delay: .12s; }
.sm-plan:nth-child(4) { animation-delay: .18s; }
.sm-plan:nth-child(n+5) { animation-delay: .24s; }
.sm-plan:hover { border-color: rgba(var(--sm-primary-rgb), .45); box-shadow: 0 16px 34px -14px rgba(16, 24, 40, .3); transform: translateY(-4px); }
.sm-plan:focus-visible { outline: 3px solid rgba(var(--sm-primary-rgb), .35); outline-offset: 2px; }
.sm-plan.is-featured { border-color: rgba(var(--sm-primary-rgb), .45); }
.sm-plan.is-featured::before {
  content: ""; position: absolute; inset: -1.5px -1.5px auto; height: 5px; border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--sm-navy-700), var(--sm-primary), #4c8dff);
}
.sm-plan.is-selected {
  border-color: var(--sm-primary);
  box-shadow: 0 0 0 3px rgba(var(--sm-primary-rgb), .18), 0 16px 34px -14px rgba(var(--sm-primary-rgb), .55);
  animation: sm-plan-in .55s cubic-bezier(.2, .8, .2, 1) backwards, sm-plan-glow 2.4s ease-in-out .6s infinite;
}

.sm-plan-ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap; overflow: hidden; z-index: 1;
  padding: .2rem .8rem; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: linear-gradient(90deg, var(--sm-navy-700), var(--sm-primary));
  box-shadow: 0 4px 10px -4px rgba(var(--sm-primary-rgb), .7);
}
.sm-plan-ribbon::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  animation: sm-shine 4s ease-in-out 1s infinite;
}

.sm-plan-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.sm-plan-name { font-size: 1.1rem; font-weight: 700; color: var(--sm-navy-900); }
.sm-plan-check {
  display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 1.5px solid #ced4da; color: transparent; transition: background .2s, border-color .2s;
}
.sm-plan-check svg { width: 14px; height: 14px; }
.sm-plan.is-selected .sm-plan-check { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; animation: sm-pop .35s cubic-bezier(.2, .8, .2, 1.4); }
.sm-plan-desc { color: #6c757d; font-size: .8rem; line-height: 1.4; min-height: 2.25em; }

.sm-plan-price { display: flex; align-items: flex-end; gap: .4rem; min-height: 2.5rem; }
.sm-plan-price strong { font-size: 1.9rem; line-height: 1; font-weight: 800; color: var(--sm-navy-900); letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: color .25s; }
.sm-plan.is-selected .sm-plan-price strong { color: var(--sm-primary); }
.sm-plan-price small { color: #6c757d; font-size: .68rem; line-height: 1.2; padding-bottom: 2px; }

/* Aylık / Yıllık switch: a checkbox, the cards follow it through :has (no JS, nothing saved) */
.sm-bill { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1rem; font-size: .85rem; font-weight: 600; color: #6c757d; cursor: pointer; user-select: none; }
.sm-bill em { font-style: normal; font-size: .72rem; color: #15803d; background: #e8f6ee; border-radius: 999px; padding: .1rem .5rem; margin-left: .2rem; }
.sm-bill input { appearance: none; margin: 0; width: 42px; height: 24px; border-radius: 999px; background: #cfd7e4; position: relative; cursor: pointer; transition: background .2s; flex: none; }
.sm-bill input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sm-bill input:checked { background: var(--sm-primary); }
.sm-bill input:checked::before { transform: translateX(18px); }
.sm-bill input:focus-visible { outline: 3px solid rgba(var(--sm-primary-rgb), .35); outline-offset: 2px; }
.sm-plan-picker:not(:has(.sm-bill input:checked)) .sm-bill-monthly,
.sm-plan-picker:has(.sm-bill input:checked) .sm-bill-yearly { color: var(--sm-navy-900); }
.sm-plan-picker:has(.sm-bill input:checked) .sm-when-monthly,
.sm-plan-picker:not(:has(.sm-bill input:checked)) .sm-when-yearly { display: none; }
.dark .sm-bill input { background: #4b545c; }
.dark .sm-plan-picker .sm-bill span { color: #adb5bd; }
.dark .sm-plan-picker:not(:has(.sm-bill input:checked)) .sm-bill-monthly,
.dark .sm-plan-picker:has(.sm-bill input:checked) .sm-bill-yearly { color: #f1f3f5; }

.sm-plan-cta {
  position: relative; overflow: hidden; display: block; text-align: center; padding: .5rem; border-radius: 8px; font-size: .85rem; font-weight: 600;
  border: 1.5px solid var(--sm-primary); color: var(--sm-primary); transition: color .25s; isolation: isolate;
}
.sm-plan-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--sm-primary);
  transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sm-plan:hover .sm-plan-cta::before { transform: scaleX(.06); }
.sm-plan.is-selected .sm-plan-cta { color: #fff; }
.sm-plan.is-selected .sm-plan-cta::before { transform: scaleX(1); }

.sm-plan-features { list-style: none; margin: .2rem 0 0; padding: .7rem 0 0; border-top: 1px dashed #e3e7ee; display: grid; gap: .4rem; flex: 1; }
.sm-plan-features li { display: flex; align-items: flex-start; gap: .45rem; font-size: .8rem; color: #343a40; line-height: 1.3; transition: transform .2s; }
.sm-plan:hover .sm-plan-features li:not(.is-off) { transform: translateX(2px); }
.sm-plan-features li svg { width: 16px; height: 16px; flex: none; color: #28a745; margin-top: 1px; }
.sm-plan-features li.is-off { color: #adb5bd; }
.sm-plan-features li.is-off svg { color: #ced4da; }

.sm-plan-foot { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: #6c757d; padding-top: .5rem; }
.sm-plan-foot svg { width: 14px; height: 14px; color: var(--sm-primary); }

@keyframes sm-plan-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sm-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes sm-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes sm-shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes sm-plan-glow {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--sm-primary-rgb), .18), 0 16px 34px -14px rgba(var(--sm-primary-rgb), .55); }
  50% { box-shadow: 0 0 0 5px rgba(var(--sm-primary-rgb), .1), 0 16px 34px -14px rgba(var(--sm-primary-rgb), .55); }
}

@media (prefers-reduced-motion: reduce) {
  .sm-plan, .sm-plan.is-selected, .sm-plan-promises li, .sm-plan-ribbon::after, .sm-plan.is-selected .sm-plan-check { animation: none; }
  .sm-plan, .sm-plan-cta::before, .sm-plan-features li { transition: none; }
  .sm-plan:hover { transform: none; }
}

/* Sign-up step 2 (RegisterCompany): field groups as light cards + the picked package on the right */
.sm-reg { align-items: start; }
.sm-reg .fi-section { border-radius: 12px; box-shadow: none; border: 1px solid #e3e7ee; animation: sm-plan-in .45s cubic-bezier(.2, .8, .2, 1) backwards; }
.sm-reg .fi-section:nth-child(2) { animation-delay: .06s; }
.sm-reg .fi-section:nth-child(3) { animation-delay: .12s; }
.sm-reg .fi-section::before { display: none; } /* no 3px card line inside the form card */
.sm-reg .fi-section-header-icon { color: var(--sm-primary); }
.sm-reg .fi-input-wrp { transition: box-shadow .2s, border-color .2s; }
.sm-reg .fi-input-wrp:focus-within { box-shadow: 0 0 0 3px rgba(var(--sm-primary-rgb), .15); }

.sm-reg-summary {
  position: sticky; top: 1rem; display: grid; gap: .8rem; padding: 1.25rem; border-radius: 14px; color: #fff;
  background: var(--sm-navy-900); /* plain navy like the brand panel next to it (brand v1.0: no gradient, circles or shadow) */
  animation: sm-plan-in .5s cubic-bezier(.2, .8, .2, 1) .1s backwards;
}
.sm-reg-summary-label { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.sm-reg-summary-head { display: flex; align-items: center; gap: .5rem; }
.sm-reg-summary-head > strong { font-size: 1.35rem; }
.sm-plan-ribbon.is-inline { position: relative; top: auto; left: auto; transform: none; background: rgba(255, 255, 255, .16); box-shadow: none; }
.sm-reg-summary .sm-plan-price strong { color: #fff; }
.sm-reg-summary .sm-plan-price small { color: rgba(255, 255, 255, .65); }
.sm-reg-summary-steps { list-style: none; margin: .25rem 0 0; padding: .8rem 0 0; border-top: 1px solid rgba(255, 255, 255, .15); display: grid; gap: .7rem; }
.sm-reg-summary-steps li { display: flex; gap: .6rem; align-items: flex-start; }
.sm-reg-summary-steps svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #8fb8ff; }
.sm-reg-summary-steps span { display: grid; font-size: .78rem; line-height: 1.35; color: rgba(255, 255, 255, .78); }
.sm-reg-summary-steps strong { font-size: .82rem; color: #fff; }
.sm-reg-summary-note { margin: 0; font-size: .72rem; color: rgba(255, 255, 255, .55); }

/* Dark: auth pages are forced light (filament/auth-brand), but keep the cards readable if .dark ever applies */
.dark .sm-plan-intro h2, .dark .sm-plan-name, .dark .sm-plan-price strong { color: #f1f3f5; }
.dark .sm-plan-promises li { background: #2b3a52; border-color: #3a4c69; color: #dbe6f7; }
.dark .sm-plan-promises svg { color: #8fb8ff; }
.dark .sm-plan { background: #343a40; border-color: #4b545c; }
.dark .sm-plan.is-featured { border-color: rgba(var(--sm-primary-rgb), .6); }
.dark .sm-plan.is-selected { border-color: var(--sm-primary); }
.dark .sm-plan.is-selected .sm-plan-price strong { color: #8fb8ff; }
.dark .sm-plan-desc, .dark .sm-plan-price small, .dark .sm-plan-foot { color: #adb5bd; }
.dark .sm-plan-check { border-color: #6c757d; }
.dark .sm-plan-cta { border-color: #4c8dff; color: #8fb8ff; }
.dark .sm-plan.is-selected .sm-plan-cta { color: #fff; }
.dark .sm-plan-features { border-top-color: #4b545c; }
.dark .sm-plan-features li { color: #dee2e6; }
.dark .sm-plan-features li.is-off { color: #6c757d; }
.dark .sm-plan-features li.is-off svg { color: #5a6268; }
.dark .sm-reg .fi-section { border-color: #4b545c; }

/* "İkon alanını seç" (item-icon-cropper.blade.php): picture with the square selection + live icon preview */
.sm-icon-crop { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; gap: 1rem; align-items: start; }
.sm-icon-crop-stage { height: min(60vh, 28rem); background: #f1f3f6; border-radius: 8px; overflow: hidden; } /* fixed: Cropper hides the img, the box must not collapse */
.sm-icon-crop-stage img { display: block; max-width: 100%; max-height: 60vh; }
.sm-icon-crop-side { display: grid; justify-items: center; gap: .4rem; font-size: .75rem; color: #6c757d; }
.sm-icon-crop-preview { width: 96px; height: 96px; overflow: hidden; border-radius: 10px; border: 1px solid #dee2e6; background: #e9eef6; }
.dark .sm-icon-crop-stage { background: #23272b; }
.dark .sm-icon-crop-preview { border-color: #4b545c; background: #2c3136; }
@media (max-width: 640px) { .sm-icon-crop { grid-template-columns: 1fr; } }

/* Stok kartı "Resimler": small preview tiles. FilePond keeps grid tiles square (height = width), so the width sets the size. */
.sm-item-images .filepond--item { width: calc(25% - .5em); }
@media (min-width: 1024px) { .sm-item-images .filepond--item { width: calc(12.5% - .5em); } }

/* ------------------------------------------------------------------ form fields as a compact table
   A Grid with class sm-form-table (ItemResource "Stok bilgileri"): each field label is a header cell,
   inputs are borderless, 1px gaps on a grey background draw the lines. Same look as Filament's compact
   table repeater (->table()->compact()), so single fields and row tables match inside a modal. */
/* container, lines and header use the same values as .fi-fo-table-repeater > table (Filament app.css) */
.sm-form-table {
  --sm-ft-line: var(--gray-200);
  border-radius: var(--radius-xl); overflow: hidden; background: var(--color-white);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent), 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
}
.sm-form-table:focus-within { overflow: visible; } /* an open select dropdown (absolute in modals) must not be clipped */
.sm-form-table > .fi-sc { gap: 1px; background: var(--sm-ft-line); border-radius: inherit; }
.sm-form-table > .fi-sc > .fi-grid-col { background: var(--color-white); min-width: 0; }
.sm-form-table .fi-fo-field { row-gap: 0; height: 100%; }
.sm-form-table .fi-fo-field-label-col { padding: .5rem .75rem; background: var(--gray-50); border-bottom: 1px solid var(--sm-ft-line); }
.sm-form-table .fi-fo-field-label, .sm-form-table .fi-fo-field-label-content { font-size: .875rem; font-weight: 700; color: var(--gray-950); }
.fi-fo-table-repeater > table > thead > tr > th { font-weight: 700; } /* table headers always bold, row tables too */
.sm-form-table .fi-fo-field-label-ctn { justify-content: center; } /* centred like the table repeater's th */
.sm-form-table .fi-fo-field-content-col { padding: .25rem 0; row-gap: .25rem; }
.sm-form-table .fi-input-wrp { box-shadow: none !important; border-radius: 0; background: transparent; }
.sm-form-table .fi-fo-field-wrp-error-message, .sm-form-table .fi-fo-field-content-col .fi-sc-text { display: block; padding: 0 .75rem .35rem; font-size: .75rem; }
.sm-form-table .fi-fo-toggle { margin: .45rem auto; }
.sm-checklist > table > tbody > tr > td { vertical-align: middle; } /* check box level with its text */

/* "Aktif" switch at the right of a create / edit modal footer (filament/app/active-toggle.blade.php) */
.sm-footer-active { order: 99; margin-inline-start: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 600; cursor: pointer; }
.dark .sm-form-table {
  --sm-ft-line: color-mix(in oklab, var(--color-white) 5%, transparent);
  background: var(--gray-900);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-white) 10%, transparent), 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
}
.dark .sm-form-table > .fi-sc > .fi-grid-col { background: var(--gray-900); }
.dark .sm-form-table .fi-fo-field-label-col { background: color-mix(in oklab, var(--color-white) 5%, transparent); }
.dark .sm-form-table .fi-fo-field-label, .dark .sm-form-table .fi-fo-field-label-content { color: var(--color-white); }

/* ------------------------------------------------------------------ /admin Genel Bakış (filament/admin/widgets/*) */
.ad-cols { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 1024px) { .ad-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lx-table.ad-table { margin: 0; }
.ad-table td { vertical-align: middle; }
.ad-sub { display: block; font-size: .75rem; color: #6c757d; font-weight: 400; }
.ad-link { color: var(--sm-primary); font-weight: 600; }
.ad-link:hover { text-decoration: underline; }
a.ad-kpi-link { display: block; color: inherit; }
.ad-warn, .ad-sub.ad-warn { color: #d9480f; }
.ad-bad, .ad-sub.ad-bad, .dark .ad-sub.ad-bad { color: #dc3545; }
.dark .ad-sub { color: #adb5bd; }
.dark .ad-warn, .dark .ad-sub.ad-warn { color: #ff922b; }

/* /admin → Menü düzeni (filament/admin/menu-settings) */
.ad-menu-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; align-items: start; }
.ad-menu-group { background: var(--color-white); border: 1px solid var(--gray-200); border-top: 3px solid var(--sm-primary); border-radius: 10px; }
.ad-menu-handle { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; font-weight: 600; cursor: grab; border-bottom: 1px solid var(--gray-200); }
.ad-menu-list { list-style: none; margin: 0; padding: .5rem; min-height: 2.5rem; }
.ad-menu-list.is-children { margin: .25rem 0 .25rem 1.25rem; padding: .25rem; border-left: 2px solid var(--gray-200); min-height: 2rem; }
.ad-menu-item { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border-radius: 6px; cursor: grab; }
.ad-menu-item:hover { background: var(--gray-50); }
.is-heading > .ad-menu-item { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--gray-500); }
.ad-menu-grip { width: 1rem; height: 1rem; color: var(--gray-400); flex: none; }
.ad-menu-foot { margin-top: 1rem; }
.ad-menu-list .sortable-ghost { opacity: .4; }
.dark .ad-menu-group { background: var(--gray-900); border-color: var(--gray-700); border-top-color: var(--sm-primary); }
.dark .ad-menu-handle { border-color: var(--gray-700); }
.dark .ad-menu-list.is-children { border-color: var(--gray-700); }
.dark .ad-menu-item:hover { background: var(--gray-800); }
.dark .ad-cols .hp-empty { border-color: rgba(255, 255, 255, .1); }

/* ------------------------------------------------------------------ Partner panel (filament/partner/*) */
.pt-link { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.pt-share-url { font-size: .9rem; padding: .25rem .5rem; border-radius: 6px; background: var(--sm-surface-alt); word-break: break-all; }
.pt-share { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.pt-share-qr { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 8px; }
.pt-share-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.pt-share-note { font-size: .8rem; color: #6c757d; margin: 0; }
.pt-ico { width: 1.75rem; color: var(--sm-primary); }
.pt-ico svg { width: 1.1rem; height: 1.1rem; }
.pt-gap { margin-top: 1rem; }
/* Ekip (filament/partner/pages/team): the performance period, two date fields in a row */
.pt-team-period { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
.pt-team-period label { display: flex; flex-direction: column; gap: .25rem; font-size: .875rem; font-weight: 600; min-width: 10rem; }
.pt-rules { margin: 0; padding-left: 1.1rem; list-style: disc; display: flex; flex-direction: column; gap: .4rem; font-size: .875rem; }
@media (min-width: 1024px) { .ad-cols > .pt-span-2 { grid-column: span 2; } }
.dark .pt-share-note { color: #adb5bd; }
.sm-reg-partner { margin: 0; font-weight: 600; color: var(--sm-primary); }

/* Toplu İşemri Oluştur: a stock row read from a document that still misses something (item, quantity or steps) */
.fi-fo-repeater-item:has(.sm-ocr-issue) { outline: 1px solid #dc3545; outline-offset: -1px; }
.dark .fi-fo-repeater-item:has(.sm-ocr-issue) { outline-color: #f87171; }

/* YZ İşemri Oluştur (filament/app/ocr-*.blade.php): camera · upload · "Belgeyi oku" · info box in one row of equal height */
.sm-ocr-row { align-items: stretch; }
.sm-ocr-row > * { min-height: 6.5rem; }
.sm-ocr-row .filepond--root, .sm-ocr-row .filepond--drop-label { height: 100%; min-height: 6.5rem; margin: 0; }
.sm-ocr-camera { height: 100%; }
.sm-ocr-tile {
    width: 100%; height: 100%; min-height: 6.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    border: 1px dashed rgba(31, 95, 191, .45); border-radius: 10px; background: rgba(31, 95, 191, .05); color: #1f5fbf; cursor: pointer;
}
.sm-ocr-tile:hover { background: rgba(31, 95, 191, .1); }
.sm-ocr-tile span { font-weight: 600; font-size: .875rem; }
.sm-ocr-tile small { font-size: .75rem; opacity: .75; }
.sm-ocr-tile-icon { width: 2rem; height: 2rem; }
.dark .sm-ocr-tile { color: #4c8dff; border-color: rgba(76, 141, 255, .45); background: rgba(76, 141, 255, .07); }
.sm-ocr-read, .sm-ocr-read > div { height: 100%; }
.sm-ocr-read .fi-btn { width: 100%; height: 100%; min-height: 6.5rem; flex-direction: column; }
.sm-ocr-cam-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .7); padding: 1rem; }
.sm-ocr-cam-box { max-width: 720px; width: 100%; background: #fff; border-radius: 12px; padding: .75rem; }
.dark .sm-ocr-cam-box { background: #1d2024; }
.sm-ocr-cam-box video { width: 100%; border-radius: 8px; background: #000; }
.sm-ocr-cam-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .75rem; }

.sm-ocr-info { height: 100%; border: 1px solid rgba(0, 0, 0, .1); border-radius: 10px; padding: .75rem 1rem; display: flex; align-items: center; font-size: .875rem; }
.dark .sm-ocr-info { border-color: rgba(255, 255, 255, .1); }
.sm-ocr-info > div { display: flex; gap: .75rem; align-items: flex-start; width: 100%; }
.sm-ocr-info b { display: block; font-weight: 600; }
.sm-ocr-info small { display: block; opacity: .7; margin-top: .15rem; }
.sm-ocr-info ul { margin: .35rem 0 0; padding-left: 1.1rem; list-style: disc; }
.sm-ocr-status-icon { width: 1.5rem; height: 1.5rem; flex: none; }
.sm-ocr-tone-success { color: #198754; } .dark .sm-ocr-tone-success { color: #4ade80; }
.sm-ocr-tone-warning { color: #b45309; } .dark .sm-ocr-tone-warning { color: #fbbf24; }
.sm-ocr-tone-danger { color: #dc3545; } .dark .sm-ocr-tone-danger { color: #f87171; }
.sm-ocr-tone-idle { opacity: .85; }
.sm-ocr-reading { color: #1f5fbf; } .dark .sm-ocr-reading { color: #4c8dff; }
.sm-ocr-spin { width: 1.5rem; height: 1.5rem; flex: none; }

/* while "Belgeyi oku" runs (its button has data-loading): the rotating steps instead of the last result */
.sm-ocr .sm-ocr-reading { display: none; }
.sm-ocr:has(.sm-ocr-read [data-loading]) .sm-ocr-reading { display: flex; }
.sm-ocr:has(.sm-ocr-read [data-loading]) .sm-ocr-status { display: none; }

/* ---- Ürün ağacı editor (Pages\ProductTreeEditor, public/js/kobimes-product-tree.js) ---------------------------- */
.pt { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: 1rem; align-items: start; }
.pt-catalog, .pt-tree { background: #fff; border-top: 3px solid var(--sm-primary); border-radius: var(--sm-radius); box-shadow: var(--sm-shadow); padding: .75rem; }
.pt-catalog { position: sticky; top: .5rem; max-height: calc(100vh - 6rem); display: flex; flex-direction: column; gap: .5rem; }
.pt-head { font-weight: 700; }
.pt-search, .pt-qty, .pt-add { border: 1px solid #ced4da; border-radius: 8px; padding: .35rem .5rem; background: #fff; color: inherit; font-size: .875rem; }
.pt-types { display: flex; flex-wrap: wrap; gap: .25rem; }
.pt-types button { border: 1px solid #ced4da; border-radius: 6px; padding: .15rem .5rem; font-size: .75rem; }
.pt-types button.is-on { background: var(--sm-primary); border-color: var(--sm-primary); color: #fff; }
.pt-list { overflow: auto; display: flex; flex-direction: column; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.pt-card { display: flex; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 1px solid #e3e6ea; border-radius: 8px; background: var(--sm-surface-alt); font-size: .85rem; cursor: grab; }
.pt-card.is-root { border-color: var(--sm-primary); }
.pt-card-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-open { padding: 0 .35rem; border-radius: 6px; color: var(--sm-primary); font-weight: 700; }
.pt-open:hover { background: rgba(31, 95, 191, .1); }
.pt-grip { color: #adb5bd; cursor: grab; letter-spacing: -2px; user-select: none; }
.pt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding-bottom: .5rem; border-bottom: 1px solid #e3e6ea; }
.pt-title { font-size: 1rem; }
.pt-spacer { flex: 1; }
.pt-save { background: var(--sm-primary); color: #fff; border-radius: 8px; padding: .4rem .9rem; font-weight: 600; font-size: .875rem; }
.pt-save:disabled { opacity: .5; cursor: default; }
.pt-sarf-toggle { font-size: .85rem; display: inline-flex; align-items: center; gap: .25rem; }
.pt-hint, .pt-muted, .pt-empty { color: #6c757d; font-size: .8rem; margin: .5rem 0; }
.pt-root, .pt-children, .pt-sarf { list-style: none; margin: 0; padding: 0; }
.pt-children { margin-left: 1.25rem; padding-left: .75rem; border-left: 1px dashed #ced4da; min-height: .75rem; }
.pt-children.is-collapsed { display: none; }
.pt-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .3rem .4rem; margin: .2rem 0; border-radius: 8px; font-size: .875rem; }
.pt-row:hover { background: var(--sm-surface-alt); }
.pt-row.is-passive { opacity: .55; }
.pt-toggle, .pt-toggle-space { width: 1rem; display: inline-block; color: #6c757d; transition: transform .15s; }
.pt-toggle.is-open { transform: rotate(90deg); }
.pt-type { border-radius: 6px; padding: 0 .4rem; font-size: .7rem; font-weight: 600; background: #e7f0fd; color: #1f5fbf; }
.pt-type.is-semi_finished { background: #e6f6ec; color: #1e7e34; }
.pt-type.is-raw { background: #eef0f2; color: #6c757d; }
.pt-shared { border-radius: 6px; padding: 0 .4rem; font-size: .7rem; background: #fff4e5; color: #d9480f; }
.pt-warn { font-size: .7rem; color: #dc3545; }
.pt-qty { width: 6rem; text-align: right; font-variant-numeric: tabular-nums; }
.pt-qty-text { font-variant-numeric: tabular-nums; font-weight: 600; }
.pt-unit { color: #6c757d; font-size: .8rem; min-width: 2.5rem; }
.pt-add { max-width: 11rem; }
.pt-remove { color: #dc3545; font-size: 1.1rem; line-height: 1; padding: 0 .3rem; border-radius: 6px; }
.pt-remove:hover { background: rgba(220, 53, 69, .1); }
.pt-sarf { margin-left: 2.75rem; }
.pt-sarf li { color: #6c757d; font-size: .78rem; padding: .05rem 0; }
.pt .sortable-ghost { opacity: .4; }
.pt-children .pt-card { cursor: default; }
@media (max-width: 900px) {
    .pt { grid-template-columns: 1fr; }
    .pt-catalog { position: static; max-height: 18rem; }
}
.dark .pt-catalog, .dark .pt-tree { background: #343a40; }
.dark .pt-search, .dark .pt-qty, .dark .pt-add { background: #3a4047; border-color: #4b545c; }
.dark .pt-card, .dark .pt-types button { border-color: #4b545c; }
.dark .pt-toolbar { border-bottom-color: #4b545c; }
.dark .pt-children { border-left-color: #4b545c; }
.dark .pt-type { background: rgba(47, 111, 208, .25); color: #9ec0f5; }
.dark .pt-type.is-semi_finished { background: rgba(40, 167, 69, .2); color: #8fd19e; }
.dark .pt-type.is-raw { background: #454d55; color: #adb5bd; }
.dark .pt-shared { background: rgba(255, 146, 43, .18); color: #ff922b; }
.dark .pt-hint, .dark .pt-muted, .dark .pt-empty, .dark .pt-sarf li, .dark .pt-unit { color: #adb5bd; }

/* Record info box (Üretim kaydını düzelt, right column: filament/app/run-info.blade.php) */
.sm-info { display: grid; gap: .55rem; margin: 0; font-size: .875rem; }
.sm-info > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .75rem; align-items: baseline; }
.sm-info dt { color: #6c757d; }
.sm-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sm-info dd .sub { display: block; font-size: .75rem; color: #6c757d; }
.sm-info dd.num { font-variant-numeric: tabular-nums; }
.sm-info dd .fi-badge { display: inline-flex; }
.sm-info hr { border: 0; border-top: 1px solid var(--gray-200); margin: .25rem 0; }
.dark .sm-info dt, .dark .sm-info dd .sub { color: #adb5bd; }
.dark .sm-info hr { border-top-color: rgba(255, 255, 255, .1); }
.sm-info .sub.sm-info-bad { color: #dc3545; }
.sm-info-empty { margin: 0; color: #6c757d; font-size: .875rem; }
.sm-info-link { color: var(--sm-primary); font-weight: 600; }
.sm-info-link:hover { text-decoration: underline; }
.sm-info-steps { margin: 0; padding-left: 1.1rem; display: grid; gap: .5rem; font-size: .875rem; list-style: decimal; }
.dark .sm-info-empty { color: #adb5bd; }

/* Record page left column built from a view (run-detail, outsource-step-detail): titled blocks one under another */
.sm-detail { display: grid; gap: 1.5rem; }
.sm-detail h3 { margin: 0 0 .6rem; font-size: .95rem; font-weight: 600; }
.sm-detail .lx-table { margin: 0; }

/* Stok kartı summary (filament/app/item-summary.blade.php: ViewItem page and the eye-icon modal):
   icon + code / name / status, four facts in a row, the route table, the pictures as a square-thumbnail grid */
.sm-item-summary { display: grid; gap: 1.25rem; }
.sm-item-head { display: flex; align-items: center; gap: 1rem; }
.sm-item-thumb { width: 88px; height: 88px; flex: none; object-fit: cover; border-radius: 12px; border: 1px solid #e3e6ea; background: var(--sm-surface-alt); }
.sm-item-code { display: flex; align-items: center; gap: .6rem; font-size: 1.25rem; font-weight: 600; color: #1f2d3d; }
.sm-item-name { margin-top: .15rem; font-size: .95rem; color: #6c757d; }
.sm-status { font-size: .72rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: #eef0f2; color: #6c757d; }
.sm-status.is-on { background: #e6f6ec; color: #1e7e34; }
.sm-item-facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.sm-item-facts > div { padding: .6rem .8rem; border: 1px solid #e3e6ea; border-radius: 10px; min-width: 0; }
.sm-item-facts dt { font-size: .72rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #6c757d; }
.sm-item-facts dd { margin: .2rem 0 0; font-size: .95rem; overflow-wrap: anywhere; }
.sm-item-sub { margin: 0 0 -.5rem; font-size: .8rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #6c757d; }
.sm-item-summary .lx-table { margin: 0; }
.sm-item-muted { margin: 0; color: #6c757d; font-size: .875rem; }
.sm-item-summary .sm-item-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; }
.sm-item-summary .sm-item-images a { display: block; aspect-ratio: 1; border: 1px solid #e3e6ea; border-radius: 10px; overflow: hidden; background: var(--sm-surface-alt); }
.sm-item-summary .sm-item-images img { width: 100%; height: 100%; object-fit: contain; transition: transform .2s; }
.sm-item-summary .sm-item-images a:hover img { transform: scale(1.04); }
@media (max-width: 640px) { .sm-item-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dark .sm-item-code { color: #f8f9fa; }
.dark :is(.sm-item-thumb, .sm-item-facts > div, .sm-item-summary .sm-item-images a) { border-color: #4b545c; }
.dark :is(.sm-item-name, .sm-item-facts dt, .sm-item-sub, .sm-item-muted) { color: #adb5bd; }
.dark .sm-status { background: #454d55; color: #adb5bd; }
.dark .sm-status.is-on { background: rgba(40, 167, 69, .2); color: #8fd19e; }

/* OEE page: the six tiles stretch over the whole row (auto-fit drops the empty columns auto-fill keeps) */
#oeKpis.lx-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }

/* Topbar search results (App\Filament\App\GlobalSearch): the module on the left, its results on the right,
   a primary line between modules. */
.fi-topbar .fi-global-search-results-ctn { max-height: min(32rem, 75vh); }
@media (min-width: 640px) {
  .fi-topbar .fi-global-search-results-ctn { max-width: 36rem; }
}
.fi-global-search-results > .fi-global-search-result-group {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  border-top: 2px solid var(--sm-primary);
  border-bottom: 0;
}
.fi-global-search-results > .fi-global-search-result-group:first-child { border-top: 0; }
.fi-global-search-result-group-header {
  position: static;
  border-bottom: 0;
  border-inline-end: 1px solid var(--gray-200);
  background: var(--sm-surface-alt);
  padding: .65rem .75rem;
  font-size: .75rem;
  line-height: 1.25rem;
  font-weight: 600;
  text-transform: none;
  color: var(--sm-primary);
  overflow-wrap: anywhere;
}
.dark .fi-global-search-result-group-header { border-inline-end-color: rgba(255, 255, 255, .1); color: #8fb6ff; }
.fi-global-search-result-link { padding: .55rem .75rem; }
.fi-global-search-result-details { margin-top: .1rem; }
.fi-global-search-result-detail { display: inline; font-size: .75rem; }
.fi-global-search-result-detail + .fi-global-search-result-detail::before { content: " · "; }
@media (max-width: 639px) {
  .fi-global-search-results > .fi-global-search-result-group { grid-template-columns: 6.5rem minmax(0, 1fr); }
}

/* Acil / Öncelikli iş (work_orders.is_urgent): list mark under the status, badges in the detail head */
.sm-urgent { color: #dc3545; font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.dark .sm-urgent { color: #f87171; }
.lx-wo-badges { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------------------------------------------ Mesajlar (sm-chat-*)
   One chat layout for the panel page (Pages\Messages) and the terminal modal (.is-terminal): list | thread.
   Plain surfaces and hairlines, own messages in the primary blue. Below 768 px one side at a time (.has-open). */
.sm-navbar-messages { display: inline-flex; }
.sm-navbar-messages .sm-navbar-link { position: relative; }
.sm-navbar-badge {
  position: absolute; top: .2rem; right: .2rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem; border-radius: 999px;
  background: #dc3545; color: #fff; font-size: .68rem; font-weight: 700; line-height: 1.1rem; text-align: center; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #fff;
}
.dark .sm-navbar-badge { box-shadow: 0 0 0 2px #343a40; }

.sm-chat {
  --ch-surface: #fff; --ch-alt: #f6f8fb; --ch-line: #e3e8f0; --ch-text: #1e2a3d; --ch-muted: #6b7a90;
  --ch-accent: var(--sm-primary); --ch-accent-soft: #eaf1fb; --ch-theirs: #fff;
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr); /* the row is the box height: list and messages scroll inside, the composer stays */
  height: calc(100dvh - 12rem); min-height: 440px;
  background: var(--ch-surface); color: var(--ch-text);
  border: 1px solid var(--ch-line); border-radius: var(--sm-radius); box-shadow: var(--sm-shadow); overflow: hidden;
}
.dark .sm-chat {
  --ch-surface: #2b3036; --ch-alt: #23272c; --ch-line: #434a52; --ch-text: #dfe4ea; --ch-muted: #adb5bd;
  --ch-accent-soft: #2c3a52; --ch-theirs: #343a40;
}

/* list */
.sm-chat-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--ch-line); }
.sm-chat-search { display: flex; align-items: center; gap: .5rem; margin: .75rem; padding: 0 .75rem; height: 2.4rem; border: 1px solid var(--ch-line); border-radius: 999px; background: var(--ch-alt); }
.sm-chat-search svg { width: 1rem; height: 1rem; color: var(--ch-muted); flex: none; }
.sm-chat-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: inherit; font-size: .9rem; outline: none; box-shadow: none; padding: 0; }
.sm-chat-items { flex: 1; overflow-y: auto; min-height: 0; }
.sm-chat-item {
  display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .7rem; align-items: center; width: 100%;
  padding: .7rem .9rem; border: 0; border-bottom: 1px solid var(--ch-line); background: none; color: inherit; text-align: left; cursor: pointer;
}
.sm-chat-item:hover { background: var(--ch-alt); }
.sm-chat-item.is-active { background: var(--ch-accent-soft); box-shadow: inset 3px 0 0 var(--ch-accent); }
.sm-chat-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--ch-accent-soft); color: var(--ch-accent); font-size: .85rem; font-weight: 700; letter-spacing: .02em;
}
.sm-chat-avatar svg { width: 1.2rem; height: 1.2rem; }
.sm-chat-avatar.is-record { border-radius: 10px; }
.sm-chat-item-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.sm-chat-item-top, .sm-chat-item-bottom { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.sm-chat-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: .92rem; }
.sm-chat-item-time { flex: none; font-size: .72rem; color: var(--ch-muted); font-variant-numeric: tabular-nums; }
.sm-chat-item-preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--ch-muted); }
.sm-chat-item.is-unread .sm-chat-item-title { font-weight: 700; }
.sm-chat-item.is-unread .sm-chat-item-preview { color: var(--ch-text); }
.sm-chat-item.is-unread .sm-chat-item-time { color: var(--ch-accent); font-weight: 600; }
.sm-chat-unread {
  flex: none; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem; border-radius: 999px; background: var(--ch-accent); color: #fff;
  font-size: .7rem; font-weight: 700; line-height: 1.25rem; text-align: center; font-variant-numeric: tabular-nums;
}
.sm-chat-empty, .sm-chat-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; padding: 2rem 1rem;
  color: var(--ch-muted); font-size: .9rem; text-align: center;
}
.sm-chat-empty svg, .sm-chat-placeholder svg { width: 2.2rem; height: 2.2rem; opacity: .6; }
.sm-chat-placeholder { flex: 1; }
.sm-chat-placeholder p { margin: 0; }

/* thread */
.sm-chat-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sm-chat-head { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--ch-line); }
.sm-chat-head-main { flex: 1; min-width: 0; }
.sm-chat-head-title { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-weight: 600; font-size: 1rem; }
.sm-chat-head-people { font-size: .78rem; color: var(--ch-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-chat-chip {
  display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: 999px;
  background: var(--ch-accent-soft); color: var(--ch-accent); font-size: .75rem; font-weight: 600; text-decoration: none;
}
.sm-chat-chip svg { width: .85rem; height: .85rem; }
a.sm-chat-chip:hover { text-decoration: underline; }
.sm-chat-back { display: none; flex: none; padding: .3rem; border: 0; border-radius: 8px; background: none; color: var(--ch-muted); cursor: pointer; }
.sm-chat-back svg { width: 1.2rem; height: 1.2rem; }

.sm-chat-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.25rem; background: var(--ch-alt); display: flex; flex-direction: column; }
.sm-chat-day { align-self: center; margin: .75rem 0 .35rem; }
/* a short chat sits right above the composer (the first child is always a day line; the empty state and a draft stay put) */
.sm-chat-messages > .sm-chat-day:first-child { margin-top: auto; }
.sm-chat-day span { padding: .15rem .6rem; border-radius: 999px; background: var(--ch-surface); border: 1px solid var(--ch-line); color: var(--ch-muted); font-size: .72rem; font-weight: 600; }
.sm-chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(72%, 560px); margin-top: .6rem; }
.sm-chat-msg.is-grouped { margin-top: .15rem; }
.sm-chat-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.sm-chat-msg-sender { display: flex; align-items: center; gap: .35rem; margin: 0 .25rem .2rem; font-size: .75rem; font-weight: 600; color: var(--ch-muted); }
.sm-chat-tag { padding: 0 .35rem; border-radius: 4px; background: rgba(23, 162, 184, .12); color: #138496; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.dark .sm-chat-tag { color: #3fc3d8; }
.sm-chat-bubble {
  padding: .45rem .7rem .3rem; border-radius: 14px 14px 14px 4px; background: var(--ch-theirs); border: 1px solid var(--ch-line);
  font-size: .92rem; line-height: 1.4; overflow-wrap: anywhere;
}
.sm-chat-msg.is-mine .sm-chat-bubble { border-radius: 14px 14px 4px 14px; background: var(--ch-accent); border-color: var(--ch-accent); color: #fff; }
.sm-chat-text { white-space: pre-wrap; }
/* time + ticks float to the bottom right of the bubble, in this order */
.sm-chat-meta { float: right; display: inline-flex; align-items: center; gap: .25rem; margin: .35rem 0 0 .6rem; }
.sm-chat-time { font-size: .68rem; line-height: 1; color: var(--ch-muted); font-variant-numeric: tabular-nums; }
.sm-chat-msg.is-mine .sm-chat-time { color: rgba(255, 255, 255, .75); }

.sm-chat-composer { display: flex; align-items: flex-end; gap: .5rem; padding: .65rem .75rem; border-top: 1px solid var(--ch-line); background: var(--ch-surface); }
.sm-chat-input {
  flex: 1; min-height: 2.5rem; max-height: 10rem; padding: .5rem .85rem; resize: none; overflow-y: auto;
  border: 1px solid var(--ch-line); border-radius: 1.25rem; background: var(--ch-alt); color: inherit; font: inherit; font-size: .92rem; line-height: 1.4;
}
.sm-chat-input:focus { outline: none; border-color: var(--ch-accent); box-shadow: 0 0 0 3px rgba(var(--sm-primary-rgb), .15); }
.sm-chat-send {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: var(--ch-accent); color: #fff; cursor: pointer;
}
.sm-chat-send:hover { filter: brightness(1.08); }
.sm-chat-send:disabled { opacity: .6; cursor: default; }
.sm-chat-send svg { width: 1.1rem; height: 1.1rem; }
.sm-chat-error { padding: .3rem 1rem .5rem; color: #dc3545; font-size: .8rem; }

@media (min-width: 768px) and (max-width: 1099.98px) { .sm-chat { grid-template-columns: minmax(220px, 260px) minmax(0, 1fr); } }
@media (max-width: 767.98px) {
  .sm-chat { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 9rem); }
  .sm-chat.has-open .sm-chat-list, .sm-chat:not(.has-open) .sm-chat-thread { display: none; }
  .sm-chat-list { border-right: 0; }
  .sm-chat-back { display: inline-flex; }
  .sm-chat-msg { max-width: 85%; }
  /* the head's actions (Grubu güncelle, Kişi ekle) are icons here, so the title keeps its room; the label stays for screen readers */
  .sm-chat-head .fi-btn { flex: none; gap: 0; padding: .45rem; font-size: 0; }
  .sm-chat-head .fi-btn svg { width: 1.25rem; height: 1.25rem; }
  /* panel tab (html.sm-iframe): an open chat is the whole tab, as chat apps do: no page title or padding above it (the back
     arrow leads to the list, where they are), the composer at the bottom, only the messages scroll */
  html.sm-iframe body:has(.fi-page .sm-chat.has-open) .fi-header { display: none; }
  html.sm-iframe body:has(.fi-page .sm-chat.has-open) :is(.fi-main, .fi-page, .fi-page-main, .fi-page-content, .fi-page-header-main-ctn) { padding: 0; gap: 0; }
  html.sm-iframe .fi-page .sm-chat.has-open { height: 100dvh; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
}

/* Mesajlar: read ticks on own messages (✓ sent, blue ✓✓ read by everyone, "3/5" in a group) and the readers list */
.sm-chat-tick { display: inline-flex; align-items: center; gap: .2rem; margin: 0 -.15rem 0 0; padding: 0; border: 0; background: none; color: rgba(255, 255, 255, .7); font-size: .66rem; line-height: 1; cursor: pointer; font-variant-numeric: tabular-nums; }
.sm-chat-tick svg { width: 1.05rem; height: .65rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sm-chat-tick.is-read { color: #9fe1ff; }
.sm-chat-receipts {
  min-width: 12rem; max-width: 18rem; margin-top: .3rem; padding: .45rem .6rem; border: 1px solid var(--ch-line); border-radius: 10px;
  background: var(--ch-surface); box-shadow: var(--sm-shadow); font-size: .78rem;
}
.sm-chat-receipts-title { margin: .2rem 0 .15rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ch-muted); }
.sm-chat-receipts-row { display: flex; justify-content: space-between; gap: .75rem; padding: .1rem 0; }
.sm-chat-receipts-row time { color: var(--ch-muted); font-variant-numeric: tabular-nums; }
.sm-chat-receipts-row.is-unread { color: var(--ch-muted); }
.sm-chat-head-groups { display: flex; flex-wrap: wrap; gap: .3rem; margin: .15rem 0; }
.sm-chat-chip.is-group { background: rgba(23, 162, 184, .12); color: #138496; }
.dark .sm-chat-chip.is-group { color: #3fc3d8; }

/* Mesajlar: @-mentions in the text and the composer's mention list */
.sm-chat-mention { padding: 0 .2rem; border-radius: 4px; background: var(--ch-accent-soft); color: var(--ch-accent); font-weight: 600; }
.sm-chat-mention.is-me { background: #fff3cd; color: #8a5300; }
.sm-chat-msg.is-mine .sm-chat-mention { background: rgba(255, 255, 255, .2); color: #fff; }
.dark .sm-chat-mention.is-me { background: rgba(255, 193, 7, .2); color: #ffd75e; }
.sm-chat-composer { position: relative; }
.sm-chat-mentions {
  position: absolute; left: .75rem; right: 4rem; bottom: calc(100% - .25rem); z-index: 5; max-width: 22rem; padding: .3rem;
  border: 1px solid var(--ch-line); border-radius: 10px; background: var(--ch-surface); box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
}
.sm-chat-mentions-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; width: 100%; padding: .45rem .6rem;
  border: 0; border-radius: 6px; background: none; color: inherit; text-align: left; cursor: pointer;
}
.sm-chat-mentions-item.is-active { background: var(--ch-accent-soft); }
.sm-chat-mentions-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-chat-mentions-hint { flex: none; font-size: .75rem; color: var(--ch-muted); }

/* Mesajlar: the panel's new chat (draft) — recipients so far as chips */
.sm-chat-draft { justify-content: flex-start; }
.sm-chat-recipients { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.sm-chat-recipients .sm-chat-chip { padding-right: .25rem; font-size: .8rem; }
.sm-chat-recipients .sm-chat-chip button { padding: 0 .3rem; border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; opacity: .7; }
.sm-chat-recipients .sm-chat-chip button:hover { opacity: 1; }

/* Mesajlar: hidden message ("Bu mesaj silindi") and "Mesajı sil" in the own-message popover */
.sm-chat-msg.is-mine:not(.is-hidden) .sm-chat-bubble { cursor: pointer; }
.sm-chat-msg.is-hidden .sm-chat-bubble { background: transparent; border-style: dashed; border-color: var(--ch-line); color: var(--ch-muted); font-style: italic; }
.sm-chat-msg.is-hidden .sm-chat-bubble .sm-chat-time { color: var(--ch-muted); }
.sm-chat-msg.is-hidden .sm-chat-text svg { width: .9rem; height: .9rem; vertical-align: -.1rem; }
.sm-chat-receipts-delete {
  display: flex; align-items: center; gap: .35rem; width: 100%; margin-top: .4rem; padding: .4rem .25rem 0;
  border: 0; border-top: 1px solid var(--ch-line); background: none; color: #dc3545; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.sm-chat-receipts-delete svg { width: .95rem; height: .95rem; }
.sm-chat.is-terminal .sm-chat-receipts-delete { min-height: 44px; font-size: .95rem; }
/* Mesajlar: the ⋮ menu of the open chat (Sohbetten çık, Sohbeti sil) */
.sm-chat-menu { position: relative; flex: none; }
.sm-chat-menu-btn { display: inline-flex; padding: .35rem; border: 0; border-radius: 8px; background: none; color: var(--ch-muted); cursor: pointer; }
.sm-chat-menu-btn:hover { background: var(--ch-alt); }
.sm-chat-menu-btn svg { width: 1.25rem; height: 1.25rem; }
.sm-chat-menu-list {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; min-width: 12rem; padding: .3rem;
  border: 1px solid var(--ch-line); border-radius: 10px; background: var(--ch-surface); box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
}
.sm-chat-menu-list button { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 6px; background: none; color: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.sm-chat-menu-list button:hover { background: var(--ch-alt); }
.sm-chat-menu-list button.is-danger { color: #dc3545; }
.sm-chat-menu-list svg { width: 1rem; height: 1rem; }
.sm-chat.is-terminal .sm-chat-menu-btn { padding: .6rem; }
.sm-chat.is-terminal .sm-chat-menu-list button { min-height: 48px; font-size: 1rem; }
/* <x-sm-confirm> (panel): Vazgeç | confirm, side by side */
.sm-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

/* ------------------------------------------------------------------ Maliyet (Dönem giderleri, Üretim maliyeti) */

.sm-cost { display: grid; gap: 1rem; }
.sm-cost-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
  background: #fff; border-radius: var(--sm-radius); box-shadow: var(--sm-shadow); padding: .6rem .75rem;
}
.sm-cost-month { display: inline-flex; align-items: center; gap: .25rem; }
.sm-cost-month input {
  height: 2.25rem; padding: 0 .5rem; border: 1px solid #d0d7e2; border-radius: 8px; background: transparent; font: inherit; font-size: .875rem; color: inherit;
}
.sm-cost-nav {
  width: 2.25rem; height: 2.25rem; display: inline-grid; place-items: center; border: 1px solid #d0d7e2; border-radius: 8px;
  background: transparent; color: inherit; cursor: pointer;
}
.sm-cost-nav:hover { background: var(--sm-surface-alt); }
.sm-cost-nav svg { width: 1rem; height: 1rem; }
.sm-cost-note { font-size: .8rem; color: #6c757d; }
.sm-cost-state { display: inline-flex; align-items: center; gap: .3rem; height: 1.9rem; padding: 0 .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e8f5ec; color: #1e7a3a; }
.sm-cost-state svg { width: .95rem; height: .95rem; }
.sm-cost-state.is-closed { background: #fdecec; color: #b42318; }
.dark .sm-cost-state { background: rgba(40, 167, 69, .15); color: #6ee7a0; }
.dark .sm-cost-state.is-closed { background: rgba(220, 53, 69, .15); color: #ff9b9b; }
.sm-cost-sheet td.cell input:disabled { color: inherit; cursor: default; }
.sm-cost-sums { margin-inline-start: auto; display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .8rem; color: #6c757d; }
.sm-cost-sums b { color: #0f2347; font-variant-numeric: tabular-nums; font-weight: 600; }
.sm-cost-sums .is-total b { color: var(--sm-primary); font-size: .95rem; }

.sm-cost-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1200px) {
  .sm-cost-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm-cost-grid .sm-cost-sheet td.cell { width: 8.5rem; min-width: 8.5rem; }
  .sm-cost-grid .sm-cost-sheet :is(th, td) { padding-inline: .45rem; }
}
.sm-cost-card { background: #fff; border-radius: var(--sm-radius); border-top: 3px solid var(--sm-primary); box-shadow: var(--sm-shadow); overflow: hidden; }
.sm-cost-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .55rem .75rem; border-bottom: 1px solid #e3e8f0; }
.sm-cost-head h3 { font-size: .9rem; font-weight: 600; margin: 0; }
.sm-cost-head .sm-cost-hint { flex-basis: 100%; font-size: .75rem; color: #6c757d; margin: -.15rem 0 0; }
.sm-cost-pct { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .25rem; }
.sm-cost-pct input { width: 4.5rem; height: 1.85rem; padding: 0 .4rem; border: 1px solid #d0d7e2; border-radius: 6px; background: transparent; font: inherit; font-size: .8rem; text-align: right; color: inherit; }
.sm-cost-pct button:not(.fi-btn) { height: 1.85rem; padding: 0 .55rem; border: 1px solid #d0d7e2; border-radius: 6px; background: transparent; font-size: .78rem; color: inherit; cursor: pointer; white-space: nowrap; }
.sm-cost-pct button:not(.fi-btn):hover { background: var(--sm-surface-alt); }

/* spreadsheet-like rows: one line each, the amount cell is the input */
.sm-cost-sheet { width: 100%; border-collapse: collapse; font-size: .82rem; }
.sm-cost-sheet th, .sm-cost-sheet td { padding: 0 .6rem; height: 2rem; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; }
.sm-cost-sheet th { height: 1.8rem; font-size: .72rem; font-weight: 600; color: #6c757d; background: var(--sm-surface-alt); }
.sm-cost-sheet td.name { white-space: normal; width: 100%; }
.sm-cost-sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.sm-cost-sheet td.cell { padding: 0; width: 11rem; min-width: 11rem; border-inline-start: 1px solid #edf0f5; }
.sm-cost-sheet td.cell input {
  width: 100%; height: 2rem; padding: 0 .6rem; border: 0; background: transparent; font: inherit; text-align: right;
  font-variant-numeric: tabular-nums; color: inherit; -moz-appearance: textfield; appearance: textfield;
}
.sm-cost-sheet td.cell input::-webkit-inner-spin-button, .sm-cost-sheet td.cell input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sm-cost-sheet td.cell input:focus { outline: 2px solid var(--sm-primary); outline-offset: -2px; background: rgba(var(--sm-primary-rgb), .06); }
.sm-cost-sheet tbody tr:hover { background: rgba(var(--sm-primary-rgb), .04); }
.sm-cost-sheet tfoot td { font-weight: 600; background: var(--sm-surface-alt); border-bottom: 0; }
.sm-cost-sheet .muted { font-size: .72rem; color: #98a4b8; }
.sm-cost-tag { display: inline-block; margin-inline-start: .3rem; padding: 0 .4rem; border-radius: 6px; font-size: .68rem; line-height: 1.15rem; white-space: nowrap; color: #6c757d; background: var(--sm-surface-alt); border: 1px solid #e3e8f0; vertical-align: 1px; }
.dark .sm-cost-tag { color: #adb5bd; border-color: rgba(255, 255, 255, .12); }
.sm-cost-empty { padding: .75rem; font-size: .82rem; color: #6c757d; }

/* report */
.sm-cost-kpis.lx-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 700px) { .sm-cost-kpis.lx-kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .sm-cost-kpis.lx-kpi-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
.sm-cost-kpis .lx-kpi-value { font-size: 1.25rem; white-space: nowrap; }
.sm-cost-alerts { margin: 0; padding: .6rem .75rem .6rem 2rem; font-size: .82rem; background: #fff8e6; border: 1px solid #f5deb0; border-radius: var(--sm-radius); color: #6b4e00; }
.sm-cost-alerts li + li { margin-top: .2rem; }
.sm-cost-report td { height: 2.1rem; }
.sm-cost-report td.name { min-width: 14rem; }
.sm-cost-report th.num { text-align: right; }
.sm-cost-report tr.item { cursor: pointer; }
.sm-cost-report tr.item td.name::before { content: "▸"; display: inline-block; width: 1rem; color: #98a4b8; transition: transform .15s; }
.sm-cost-report tbody.is-open tr.item td.name::before { transform: rotate(90deg); }
.sm-cost-report tr.step td { height: 1.75rem; font-size: .76rem; color: #6c757d; background: var(--sm-surface-alt); }
.sm-cost-report tr.step td.name { padding-inline-start: 1.6rem; }
.sm-cost-report .strong { font-weight: 600; color: #0f2347; }
.sm-cost-report .warn { color: #d9480f; }
.sm-cost-fason { table-layout: fixed; }
.sm-cost-fason td.wrap { white-space: normal; line-height: 1.25; padding-block: .35rem; }
.sm-cost-fason td.orders { white-space: normal; padding-block: .3rem; font-size: .74rem; color: #6c757d; }
.sm-cost-fason td.orders span { display: inline-block; white-space: nowrap; margin-inline-end: .45rem; font-variant-numeric: tabular-nums; }
.sm-cost-fason td.orders .more { font-weight: 600; }
.sm-cost-fason td.cell { width: auto; min-width: 0; }
.sm-transfer td { height: auto; padding-block: .55rem; }
.sm-transfer td.name { white-space: normal; }
.sm-transfer td.name .sm-cost-note { display: block; margin-top: .1rem; }
.sm-transfer td.actions { text-align: right; white-space: nowrap; }
.sm-transfer td.actions > * { margin-inline-start: .35rem; }
.sm-cost-defs { margin: 0; padding-inline-start: 1.1rem; font-size: .8rem; color: #6c757d; display: grid; gap: .2rem; }

.dark .sm-cost-bar, .dark .sm-cost-card { background: #343a40; }
.dark :is(.sm-cost-month input, .sm-cost-nav, .sm-cost-pct input, .sm-cost-pct button:not(.fi-btn)) { border-color: rgba(255, 255, 255, .15); }
.dark .sm-cost-sums b, .dark .sm-cost-report .strong { color: #f1f4f8; }
.dark .sm-cost-head, .dark :is(.sm-cost-sheet) :is(th, td), .dark .sm-cost-sheet td.cell { border-color: rgba(255, 255, 255, .08); }
.dark .sm-cost-alerts { background: rgba(255, 193, 7, .1); border-color: rgba(255, 193, 7, .25); color: #ffd666; }
.dark .sm-cost-month input { color-scheme: dark; }

/* KobiMES IoT · Nabız Ajanı kurulumu (filament/app/iot-install, components/copy-command): a copy of kobimes-iot
   public/css/kobimes-iot.css (same screen in both products); its --iot-* tokens are set on the modal only. */
.iot-setup { --iot-primary: #1f5fbf; --iot-card: #fff; --iot-border: rgba(15, 35, 71, .12); --iot-muted: #6b7280; --iot-running: #16a34a; --iot-radius: 10px; }
.dark .iot-setup { --iot-primary: #2f6fd0; --iot-card: #1f2937; --iot-border: rgba(255, 255, 255, .1); --iot-muted: #9ca3af; }
.iot-setup { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.iot-setup__intro { display: flex; align-items: center; gap: 1rem; color: var(--iot-muted); font-size: .9rem; line-height: 1.5; }
.iot-setup__logo { flex: none; width: 3.5rem; height: 3.5rem; }
.iot-setup__logo svg { display: block; width: 100%; height: 100%; }
.iot-setup__label { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--iot-muted); margin-bottom: .4rem; }
.iot-setup__keyrow {
    contain: inline-size;
    display: flex; align-items: center; gap: .25rem; padding: .5rem .5rem .5rem .9rem; border-radius: var(--iot-radius);
    background: rgba(31, 95, 191, .07);
}
.dark .iot-setup__keyrow { background: rgba(255, 255, 255, .05); }
.iot-setup__keyvalue {
    flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem; font-weight: 600; letter-spacing: .03em;
}
.iot-setup__note { display: flex; gap: .4rem; align-items: flex-start; margin-top: .5rem; color: var(--iot-muted); font-size: .8rem; line-height: 1.45; }
.iot-setup__note .fi-icon, .iot-setup__done .fi-icon { flex: none; width: 1rem; height: 1rem; margin-top: .1rem; }
.iot-setup__steps { display: flex; flex-direction: column; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.iot-setup__step { position: relative; display: flex; gap: .9rem; min-width: 0; }
.iot-setup__step:not(:last-child)::before {
    content: ""; position: absolute; left: .875rem; top: 2.1rem; bottom: -1.2rem; width: 1px; background: var(--iot-border);
}
.iot-setup__num {
    flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 999px;
    background: var(--iot-primary); color: #fff; font-size: .85rem; font-weight: 600;
}
.iot-setup__body, .iot-setup__os { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .5rem; padding-top: .15rem; }
.iot-setup__title { margin: 0; font-size: .95rem; font-weight: 600; line-height: 1.5rem; }
.iot-setup__hint { margin: 0; color: var(--iot-muted); font-size: .85rem; line-height: 1.45; }
.iot-setup__seg { display: inline-flex; align-self: flex-start; max-width: 100%; padding: 3px; gap: 2px; border-radius: 9px; background: rgba(15, 35, 71, .06); }
.dark .iot-setup__seg { background: rgba(255, 255, 255, .06); }
.iot-setup__seg button {
    padding: .4rem 1rem; border: 0; border-radius: 7px; background: transparent; color: var(--iot-muted);
    font-size: .875rem; font-weight: 500; cursor: pointer;
}
.iot-setup__seg button:hover { color: inherit; }
.iot-setup__seg button.is-active { background: var(--iot-card); color: var(--iot-primary); box-shadow: 0 1px 2px rgba(15, 35, 71, .15); }
.dark .iot-setup__seg button.is-active { background: #374151; color: #fff; }
.iot-setup__seg button:focus-visible, .iot-cmd__copy:focus-visible { outline: 2px solid var(--iot-primary); outline-offset: 2px; }
.iot-setup__done { display: flex; gap: .5rem; align-items: flex-start; margin: 0; color: var(--iot-muted); font-size: .85rem; line-height: 1.45; }
.iot-setup__done .fi-icon { color: var(--iot-running); }

.iot-cmd { display: flex; align-items: stretch; min-width: 0; contain: inline-size; border-radius: 8px; background: #0f172a; color: #e5e7eb; }
.dark .iot-cmd { background: #0b1120; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.iot-cmd__code {
    flex: 1; min-width: 0; margin: 0; padding: .75rem 1rem; overflow-x: auto; white-space: pre;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5;
}
.iot-cmd__code code { font: inherit; color: inherit; background: none; }
.iot-cmd__copy {
    flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: 0 .85rem; border: 0;
    border-left: 1px solid rgba(255, 255, 255, .1); border-radius: 0 8px 8px 0; background: transparent; color: #94a3b8;
    font-size: .8rem; font-weight: 500; cursor: pointer;
}
.iot-cmd__copy:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.iot-cmd__copy.is-done { color: #4ade80; }
.iot-cmd__copy .fi-icon { width: 1.1rem; height: 1.1rem; }
.iot-cmd__copy--plain { padding: .4rem; border: 0; border-radius: 7px; color: var(--iot-muted); }
.iot-cmd__copy--plain:hover { color: var(--iot-primary); background: rgba(31, 95, 191, .08); }
.iot-cmd__copy--plain.is-done { color: var(--iot-running); }
.sm-iot-result { margin: .25rem 0 0; max-height: 22rem; overflow: auto; font-size: .75rem; background: #f1f3f5; border: 1px solid #dee2e6; border-radius: 6px; padding: .5rem .65rem; white-space: pre; }
.dark .sm-iot-result { background: #1f2933; border-color: #374151; color: #e5e7eb; }

/* IoT Raporları header: title left, the tab bar centred on the same row (filament/app/iot-report-tabs) */
.sm-iot-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.sm-iot-head .fi-tabs { margin: 0; }
@media (max-width: 900px) { .sm-iot-head { grid-template-columns: 1fr; } .sm-iot-head .fi-tabs { justify-self: start; max-width: 100%; } }
