/*
 * KobiMES theme — the LioxMES look (assets/css/lioxmes-theme.css) 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 LioxMES' 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 header: navy band like the sidebar (AdminLTE .modal-header.bg-primary) */

.fi-modal-window > .fi-modal-header {
  padding-bottom: 1rem;
  background-image: linear-gradient(165deg, var(--sm-navy-900) 0%, var(--sm-navy-700) 70%, var(--sm-primary) 100%);
  border-radius: 0.75rem 0.75rem 0 0;
}
.fi-modal-window-has-content > .fi-modal-header { margin-bottom: 1rem; }
.fi-modal-window > .fi-modal-header .fi-modal-heading { color: #fff; }
.fi-modal-window > .fi-modal-header .fi-modal-description { color: rgba(255, 255, 255, 0.75); }
.fi-modal-window > .fi-modal-header .fi-modal-close-btn { color: rgba(255, 255, 255, 0.8); }
.fi-modal-window > .fi-modal-header .fi-modal-close-btn:hover { color: #fff; background-color: rgba(255, 255, 255, 0.1); }
.dark .fi-modal-window > .fi-modal-header { background-image: linear-gradient(165deg, #16181b 0%, #1d2024 55%, #262a2f 100%); }

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

.sm-wordmark { display: inline-flex; align-items: center; gap: 0.6rem; color: inherit; white-space: nowrap; }
.sm-wordmark-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 8px; background: #fff; color: var(--sm-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.sm-wordmark-mark svg { width: 1.3rem; height: 1.3rem; }
.sm-wordmark-text { font-size: 1.35rem; font-weight: 300; letter-spacing: 0.01em; line-height: 1; }
.sm-wordmark-text b { font-weight: 700; }
.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; }

/* 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: linear-gradient(150deg, var(--sm-navy-900) 0%, var(--sm-navy-700) 55%, #1f5fbf 100%);
}
.sm-auth-brand::before,
.sm-auth-brand::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sm-auth-brand::before { width: 520px; height: 520px; right: -220px; top: -160px; box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.025); }
.sm-auth-brand::after { width: 340px; height: 340px; left: -140px; bottom: -120px; box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.03); }
.sm-auth-brand .sm-wordmark-mark { width: 3.5rem; height: 3.5rem; border-radius: 14px; }
.sm-auth-brand .sm-wordmark-mark svg { width: 2.2rem; height: 2.2rem; }
.sm-auth-brand .sm-wordmark-text { font-size: 2.2rem; }
.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-brand::before, .sm-auth-brand::after, .sm-auth-tagline { display: none; }
  .sm-auth-brand .sm-wordmark-mark { width: 2.4rem; height: 2.4rem; border-radius: 10px; }
  .sm-auth-brand .sm-wordmark-mark svg { width: 1.5rem; height: 1.5rem; }
  .sm-auth-brand .sm-wordmark-text { font-size: 1.6rem; }
  .sm-auth-clock-time { font-size: 1.5rem; text-align: right; }
  .sm-auth-clock-date { font-size: 0.75rem; margin-top: 2px; text-align: right; }
}

/* ================================================================== LioxMES components (lx-*)
 * Blade components in resources/views/components/lx/. Ported from LioxMES mes_kpi / canli / operasyon. */

/* ------------------------------------------------------------------ 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-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-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; }

/* 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 as in LioxMES main.tpl: 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; }

.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; }


/* ================================================================== LioxMES 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 the LioxMES 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: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 14rem; padding: 0.5rem 0;
  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; }
.fi-main-sidebar .fi-sidebar-header .sm-wordmark-text { font-size: 1.4rem; }
.sm-sidebar-mark { display: flex; justify-content: center; width: 100%; }

/* 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-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-scrap { background: rgba(220, 53, 69, .2); color: #ff8787; }

/* ================================================================== MES KPI (mes_kpi.tpl), 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-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 (home.tpl) */

.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-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; } }

/* ================================================================== Denetim kaydı (audit.tpl), 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 { display: inline-block; margin-top: 1rem; font-size: .8rem; color: rgba(255, 255, 255, .7); text-decoration: underline; }
.sm-auth-legal:hover { color: #fff; }
/* 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-bottom: 1rem; 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);
}
.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. */

.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; }

.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; overflow: hidden; isolation: isolate;
  background: linear-gradient(155deg, var(--sm-navy-900) 0%, var(--sm-navy-700) 60%, var(--sm-primary) 100%);
  box-shadow: 0 16px 34px -18px rgba(15, 35, 71, .7);
  animation: sm-plan-in .5s cubic-bezier(.2, .8, .2, 1) .1s backwards;
}
.sm-reg-summary::after {
  content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; right: -90px; top: -90px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 0 0 30px rgba(255, 255, 255, .03);
}
.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; }
