/* WINCON — Agregator & Monitorizare Stație */
/* Design Tokens & Identitate Vizuală WINCON (Layout cu Sidebar Stânga) */
:root {
  --brand: #E10431;
  --brandink: #b3032a;
  --dark: #2D3E50;
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #f9f9f9;
  --surface: #ffffff;
  --line: #e2e8f0;
  --line2: #cbd5e1;
  --hdr: #e5e7eb;
  --ok: #047857;
  --okbg: #ecfdf5;
  --warn: #b45309;
  --warnbg: #fffbeb;
  --danger: #E10431;
  --dangerbg: #fef2f2;
  --tint: rgba(225, 4, 49, 0.06);
  --r: 3px;
  --sidebar-w: 260px;
  --font: "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  margin: 0;
  padding: 0;
  font: 15px/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

/* Shell Layout ERP (Sidebar Stânga + Conținut Dreapta) */
.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* SIDEBAR STÂNGA */
aside.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 110;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapse-btn {
  position: absolute;
  right: -12px;
  top: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s ease;
  padding: 0;
}

.sidebar-collapse-btn:hover {
  background: #f8fafc;
  color: var(--dark);
  border-color: var(--brand);
  transform: scale(1.1);
}

.sidebar-collapse-btn .collapse-icon {
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.brand-logo {
  height: 34px;
  width: auto;
  max-width: 195px;
  display: block;
  transition: all 0.25s ease;
}

.brand-monogram {
  display: none;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1;
  margin-bottom: 2px;
}

.app-title {
  font-size: 13.5px;
  font-weight: 700;
  margin: 0;
  color: var(--dark);
  letter-spacing: -0.01em;
}

/* Selector Stație în Sidebar */
.sidebar-station {
  margin-top: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 10px;
}

.sidebar-station label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}

.sidebar-station .station-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
}

.sidebar-station .station-site {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Meniu Navigare Vertical */
nav.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-section-title {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 8px 10px 4px;
}

nav.sidebar-nav a.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  color: #4b5563;
  text-decoration: none;
  border-radius: var(--r);
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

nav.sidebar-nav a.nav-item:hover {
  background: #f1f5f9;
  color: var(--dark);
}

nav.sidebar-nav a.nav-item.active {
  background: var(--tint);
  color: var(--brand);
  border-left-color: var(--brand);
  font-weight: 700;
}

nav.sidebar-nav a.nav-item .nav-label {
  flex: 1;
}

nav.sidebar-nav a.nav-item .badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

nav.sidebar-nav a.nav-item.active .badge {
  background: rgba(225, 4, 49, 0.12);
  color: var(--brand);
}

/* Sidebar Footer (Status & Acțiuni Sistem) */
.sidebar-footer {
  padding: 14px 12px;
  border-top: 1px solid var(--line);
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sync-status {
  font-size: 11.5px;
  color: var(--ok);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  padding: 0 4px;
}

.sync-status::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--ok);
  border-radius: 50%;
}
.sidebar-footer #btnWhatsApp, .sidebar-footer #btnNavSetari {
  width: 100%;
  justify-content: center;
}

.sidebar-footer .btn.active, .sidebar-footer a.btn.active {
  background: var(--dark) !important;
  color: #ffffff !important;
  border-color: var(--dark) !important;
}

.sidebar-footer .btn.active .footer-btn-icon, .sidebar-footer a.btn.active .footer-btn-icon {
  color: #ffffff !important;
}

.sidebar-actions-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.sidebar-actions-row .btn {
  flex: 1;
  justify-content: center;
}

.sidebar-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.sidebar-footer .footer-btn-icon {
  flex-shrink: 0;
  color: currentColor;
}
/* Nav Item Icon */
nav.sidebar-nav a.nav-item .nav-icon {
  flex-shrink: 0;
  color: #64748b;
  transition: all 0.15s ease;
}

nav.sidebar-nav a.nav-item:hover .nav-icon {
  color: var(--dark);
}

nav.sidebar-nav a.nav-item.active .nav-icon {
  color: var(--brand);
}

/* Sidebar Minimizat / Collapsed (ca la WINCON ERP) */
aside.app-sidebar.collapsed {
  width: 68px;
}

aside.app-sidebar.collapsed .sidebar-collapse-btn .collapse-icon {
  transform: rotate(180deg);
}

aside.app-sidebar.collapsed .sidebar-header {
  padding: 18px 8px 14px;
  align-items: center;
  display: flex;
  flex-direction: column;
}

aside.app-sidebar.collapsed .brand-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-bottom: 0;
  padding: 4px 0;
}

aside.app-sidebar.collapsed .brand-logo {
  display: none !important;
}

aside.app-sidebar.collapsed .brand-monogram {
  display: block !important;
  width: 42px;
  height: 26px;
  margin: 0 auto;
  filter: drop-shadow(0 1px 3px rgba(225, 4, 49, 0.25));
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

aside.app-sidebar.collapsed .brand-monogram:hover {
  transform: scale(1.1);
}

aside.app-sidebar.collapsed .eyebrow,
aside.app-sidebar.collapsed .app-title,
aside.app-sidebar.collapsed .sidebar-station,
aside.app-sidebar.collapsed .sidebar-section-title,
aside.app-sidebar.collapsed .nav-label,
aside.app-sidebar.collapsed .sync-status,
aside.app-sidebar.collapsed .sidebar-footer button span {
  display: none !important;
}

aside.app-sidebar.collapsed nav.sidebar-nav {
  padding: 14px 6px;
  align-items: center;
  gap: 6px;
}

aside.app-sidebar.collapsed nav.sidebar-nav a.nav-item {
  width: 44px;
  height: 44px;
  padding: 0;
  justify-content: center;
  border-left: none;
  border-radius: var(--r);
  position: relative;
}

aside.app-sidebar.collapsed nav.sidebar-nav a.nav-item.active {
  background: var(--brand);
  color: #ffffff;
}

aside.app-sidebar.collapsed nav.sidebar-nav a.nav-item.active .nav-icon {
  color: #ffffff;
  stroke: #ffffff;
}

aside.app-sidebar.collapsed nav.sidebar-nav a.nav-item .badge {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 8px;
  padding: 1px 3px;
  min-width: 14px;
  text-align: center;
  line-height: 1;
}

aside.app-sidebar.collapsed .sidebar-footer {
  padding: 14px 6px;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

aside.app-sidebar.collapsed .sync-status {
  display: none !important;
}

aside.app-sidebar.collapsed .sidebar-actions-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 6px;
}

aside.app-sidebar.collapsed .sidebar-footer .btn {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px;
  flex: none !important;
  box-sizing: border-box;
}

aside.app-sidebar.collapsed .sidebar-footer .btn span {
  display: none !important;
}

aside.app-sidebar.collapsed .sidebar-footer .footer-btn-icon {
  margin: 0 !important;
  width: 18px !important;
  height: 18px !important;
}

/* ERP Sidebar Tooltip */
.erp-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background: #111827;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.35), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 280px;
  width: max-content;
  font-family: var(--font);
  opacity: 0;
  transform: translateY(-50%) translateX(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.erp-tooltip.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.erp-tooltip .tooltip-title {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

.erp-tooltip .tooltip-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.35;
  font-weight: 400;
}

.erp-tooltip::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #111827;
  border-radius: 1px;
}

/* Tooltip Interactiv Grafic COGS */
.chart-tooltip {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 15px;
  border-radius: 6px;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.55), 0 8px 16px -4px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 330px;
  min-width: 240px;
  font-family: var(--font);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.chart-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.chart-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 6px;
  gap: 8px;
}

.chart-tooltip-recipe {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.chart-tooltip-date {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
}

.chart-tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chart-tooltip-component {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.chart-tooltip-bullet {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
}

.chart-tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  gap: 8px;
}

.chart-tooltip-row .label,
.chart-tooltip-row .lbl {
  color: #94a3b8;
  font-weight: 500;
}

.chart-tooltip-row .val {
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.chart-tooltip-hint {
  font-size: 10.5px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 5px;
  margin-top: 4px;
  line-height: 1.35;
}

.chart-segment {
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.chart-segment:hover {
  opacity: 0.85;
  filter: brightness(1.1);
}

/* ZONA PRINCIPALĂ DE CONȚINUT */
.app-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Topbar Minimal Conținut */
header.content-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  height: 52px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.breadcrumb-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.breadcrumb-root {
  color: var(--muted);
  font-weight: 600;
}

.breadcrumb-sep {
  color: #cbd5e1;
}

.breadcrumb-current {
  color: var(--dark);
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Main Area */
main.app-main {
  flex: 1;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.view-section {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.view-section.active {
  display: block;
  width: 100%;
}
/* Butoane Standard */
button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.btn {
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn:hover {
  border-color: var(--brand);
  color: var(--brandink);
  background: var(--tint);
}

.btn.primary {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.btn.primary:hover {
  filter: brightness(0.92);
  color: #ffffff;
}

.btn.sm {
  font-size: 11.5px;
  padding: 4px 8px;
}

.btn.danger {
  color: var(--danger);
  border-color: #fca5a5;
}

.btn.danger:hover {
  background: var(--dangerbg);
}

/* Sub-header Pagină */
.view-header {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.view-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.view-header h2 .title-brand {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.view-header p.sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  gap: 4px;
}

.kpi-card span.label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card b.val {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.kpi-card small.sub {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-card.highlight {
  border-left: 3px solid var(--brand);
}

.kpi-card.warn {
  border-left: 3px solid var(--warn);
  background: var(--warnbg);
}

.kpi-card.ok {
  border-left: 3px solid var(--ok);
}

/* Carduri / Panouri */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title .hint {
  font-size: 12px;
  font-weight: normal;
  color: var(--muted);
}

/* Smart Dropzone */
.smart-dropzone {
  background: #ffffff;
  border: 2px dashed var(--line2);
  border-radius: var(--r);
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.smart-dropzone:hover, .smart-dropzone.dragover {
  border-color: var(--brand);
  background: var(--tint);
}

.dropzone-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand);
  background: var(--tint);
  border: 1px solid rgba(225, 4, 49, 0.2);
  border-radius: var(--r);
  padding: 3px 8px;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.dropzone-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 12.5px;
  color: var(--muted);
}

/* Tabele Tehnice */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

table.data-table th, table.data-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line2);
  white-space: nowrap;
  user-select: none;
  position: sticky;
  top: 0;
  z-index: 10;
}

table.data-table th.l, table.data-table td.l {
  text-align: left;
}

table.data-table th.c, table.data-table td.c {
  text-align: center;
}

table.data-table tbody td {
  color: #334155;
  transition: background-color 0.08s ease;
}

table.data-table tbody tr:hover td {
  background-color: #f8fafc;
}

table.data-table tr.sum td {
  background: #f8fafc;
  font-weight: 700;
  color: var(--dark);
  border-top: 1px solid var(--line2);
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 12.5px;
}

table.data-table td.id-col {
  font-weight: 600;
  color: var(--dark);
}

table.data-table input.cell-input {
  width: 76px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font: inherit;
  font-size: 12.5px;
  text-align: right;
  background: #ffffff;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
  transition: all 0.15s ease;
}

table.data-table input.cell-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(225, 4, 49, 0.12);
  outline: none;
}

/* Status Flags / Pills (Sleek Micro-Capsules) */
.flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.25;
  white-space: nowrap;
}

.flag.ok {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

.flag.warn {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
}

.flag.danger, .flag.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.flag.brand {
  background: rgba(225, 4, 49, 0.08);
  color: var(--brand);
  border: 1px solid rgba(225, 4, 49, 0.2);
}
/* WINCON Transport Type Pills (Clean, Industrial, High-Contrast) */
.wincon-tp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--r);
  line-height: 1.35;
  letter-spacing: 0.15px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.wincon-tp-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.wincon-tp-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* 1. WINCON Intern */
.wincon-tp-pill.tp-wincon {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.wincon-tp-pill.tp-wincon .dot {
  background: #0284c7;
}

/* 2. Cărăuș Contractat (HERACLES, EUROLIANT, MC CONCRETE etc.) */
.wincon-tp-pill.tp-contractat {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}
.wincon-tp-pill.tp-contractat .dot {
  background: #d97706;
}

/* 3. Transport Preluat de Client */
.wincon-tp-pill.tp-client {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}
.wincon-tp-pill.tp-client .dot {
  background: #94a3b8;
}

.wincon-tp-pill .pill-cycle-hint {
  font-size: 9px;
  opacity: 0.55;
  margin-left: 2px;
}
/* Grile Formulare & Câmpuri Configurare */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark);
}

.form-group input, .form-group select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13.5px;
  background: #ffffff;
  color: var(--dark);
  transition: border-color 0.15s ease;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--brand);
  outline: none;
}

.form-group .hint {
  font-size: 11px;
  color: var(--muted);
}

.storage-bar-wrap {
  background: #e2e8f0;
  border-radius: 4px;
  height: 12px;
  overflow: hidden;
  margin: 10px 0 16px;
}

.storage-bar-fill {
  background: var(--ok);
  height: 100%;
  transition: width 0.3s ease, background 0.3s ease;
}
/* Modale */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-box {
  background: #ffffff;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--dark);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 13.5px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* Rezervor Motorină (Industrial WINCON Tank Dashboard) */
.wincon-tank-dashboard {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .wincon-tank-dashboard {
    grid-template-columns: 1fr;
  }
}

.wincon-tank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 14px 14px;
}

.tank-visual-container {
  width: 100%;
  max-width: 270px;
  display: flex;
  justify-content: center;
}

.wincon-tank-svg {
  width: 100%;
  height: auto;
  display: block;
}

.tank-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
}

.tank-stat-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.tank-stat-box .stat-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.3px;
}

.tank-stat-box .stat-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
  margin-top: 2px;
}

.wincon-tank-lots {
  min-width: 0;
}

/* Grilă de butoane filtru / chip-uri */
.chips-bar, .date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--dark);
}

.chip-btn:hover {
  border-color: var(--brand);
}

.chip-btn.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* Legenda Grafic COGS Rafinată */
.chart-legend-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 14px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 5px 10px;
  border-radius: var(--r);
  font-size: 11.5px;
  color: var(--dark);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.legend-chip:hover {
  border-color: #cbd5e1;
  background: #fbfcfe;
}

.legend-bullet {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}

.legend-chip .name {
  font-weight: 600;
  color: var(--dark);
}

.legend-chip .pct {
  background: #f1f5f9;
  color: #475569;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* SVG Charts Responsive Full Width */
.chart-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  overflow-x: auto;
  width: 100%;
  box-sizing: border-box;
}

.chart-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-box svg text {
  font-family: var(--font);
}
/* Responsive Tablet & Mobile */
@media (max-width: 992px) {
  .app-shell {
    flex-direction: column;
  }
  aside.app-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  nav.sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px;
  }
  .sidebar-section-title {
    display: none;
  }
  .sidebar-footer {
    display: none;
  }
  main.app-main {
    padding: 16px;
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================ */
/* TUR INTERACTIV (FOCUS ZONE / SPOTLIGHT) & MANUAL DRAWER     */
/* ============================================================ */
.tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: auto;
}

.tour-spotlight-box {
  position: absolute;
  border: 2px solid var(--brand);
  border-radius: var(--r);
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.65), 0 0 15px rgba(225, 4, 49, 0.5);
  pointer-events: none;
  z-index: 1001;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tour-card {
  position: absolute;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  width: 360px;
  max-width: calc(100vw - 32px);
  z-index: 1002;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25);
  transition: all 0.25s ease;
}

.tour-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tour-step-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tour-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 14px;
  padding: 0;
  cursor: pointer;
}

.tour-close-btn:hover {
  color: var(--dark);
}

.tour-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 6px;
}

.tour-card-body {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  margin: 0 0 14px;
}

.tour-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

/* MANUAL DRAWER (Panou Explicativ Retractabil Lateral) */
.manual-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.manual-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.manual-drawer {
  position: fixed;
  top: 0;
  right: -460px;
  width: 440px;
  max-width: 90vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--line);
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.manual-drawer.open {
  right: 0;
}

.manual-drawer-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.manual-drawer-title {
  margin: 4px 0 0;
  font-size: 17px;
  color: var(--dark);
  font-weight: 700;
}

.manual-drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  font-size: 13.5px;
  color: #374151;
  line-height: 1.6;
}

.manual-drawer-body h4 {
  font-size: 14.5px;
  color: var(--dark);
  margin: 16px 0 6px;
}

.manual-drawer-body h4:first-child {
  margin-top: 0;
}

.manual-drawer-body p {
  margin: 0 0 10px;
}

.manual-drawer-body ul, .manual-drawer-body ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.manual-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

/* ============================================================ */
/* SELECTOR CALENDAR & INTERVAL DE DATE (WINCON DATE PICKER)    */
/* ============================================================ */
.wincon-date-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font);
}

.date-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

.date-picker-trigger:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.date-picker-trigger.active,
.date-picker-trigger:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(225, 4, 49, 0.12);
  outline: none;
}

.date-picker-trigger.is-filtered {
  border-color: var(--brand);
  background: #fff5f5;
}

.date-picker-trigger .trigger-icon {
  color: var(--brand);
  flex-shrink: 0;
}

.date-picker-trigger .trigger-label {
  font-weight: 600;
  color: var(--dark);
}

.date-picker-trigger .trigger-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  background: #f1f5f9;
  color: #475569;
  border-radius: var(--r);
}

.date-picker-trigger .trigger-badge.active {
  background: var(--brand);
  color: #ffffff;
}

.date-picker-trigger .trigger-arrow {
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.date-picker-trigger.active .trigger-arrow {
  transform: rotate(180deg);
}

/* ============================================================ */
/* THEME FLATPICKR — WINCON DESIGN SYSTEM (GEIST / INDUSTRIAL)  */
/* ============================================================ */
.flatpickr-calendar {
  font-family: var(--font) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
  box-shadow: 0 14px 28px -4px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.06) !important;
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
  background: #ffffff !important;
  padding: 0 !important;
  overflow: hidden;
  z-index: 500 !important;
}

.flatpickr-calendar.open {
  z-index: 1000 !important;
}

.flatpickr-calendar::before,
.flatpickr-calendar::after {
  display: none !important;
}

/* Header Presets Bar */
.wincon-cal-presets {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.cal-preset-btn {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
  color: #475569;
  transition: all 0.15s ease;
}

.cal-preset-btn:hover {
  background: #e2e8f0;
  color: var(--dark);
}

.cal-preset-btn.active {
  background: var(--dark);
  color: #ffffff;
  border-color: var(--dark);
}

/* Legend Bar */
.wincon-cal-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  padding: 6px 12px;
  background: #fafafa;
  border-bottom: 1px solid var(--line);
}

.wincon-cal-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wincon-cal-legend .dot-prod {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.wincon-cal-legend .dot-idle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
}

/* Flatpickr Month Header */
.flatpickr-months {
  position: relative !important;
  padding: 6px 0 4px !important;
  background: #ffffff !important;
  align-items: center !important;
}

.flatpickr-month {
  color: var(--dark) !important;
  height: 34px !important;
}

.flatpickr-current-month {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  padding: 4px 0 0 0 !important;
  color: var(--dark) !important;
}

.flatpickr-current-month .cur-month {
  font-weight: 700 !important;
  color: var(--dark) !important;
}

.flatpickr-current-month input.cur-year {
  font-weight: 700 !important;
  color: var(--dark) !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--dark) !important;
  padding: 6px !important;
  height: 28px !important;
  width: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 4px !important;
  z-index: 10 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.flatpickr-prev-month {
  left: 8px !important;
}

.flatpickr-next-month {
  right: 8px !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  background: #f1f5f9 !important;
  color: var(--brand) !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
  width: 14px !important;
  height: 14px !important;
  stroke: currentColor !important;
  fill: none !important;
}

/* Weekdays */
.flatpickr-weekdays {
  height: 26px !important;
  background: #ffffff !important;
}

span.flatpickr-weekday {
  font-weight: 700 !important;
  font-size: 11px !important;
  color: #94a3b8 !important;
}

/* Days Container & Day Cells */
.flatpickr-days {
  width: auto !important;
  padding: 4px 6px 8px !important;
}

.dayContainer {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  padding: 0 4px !important;
}
.flatpickr-day {
  max-width: 44px !important;
  height: 42px !important;
  line-height: 1 !important;
  border-radius: var(--r) !important;
  margin: 1px 0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  transition: all 0.12s ease !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #cbd5e1 !important;
}

/* Zile CU Producție Activă */
.flatpickr-day.wincon-day-active {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: var(--dark) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.flatpickr-day.wincon-day-active .day-num {
  font-weight: 700 !important;
  color: var(--dark) !important;
}

.flatpickr-day.wincon-day-active:hover {
  border-color: var(--brand) !important;
  background: #ffffff !important;
}

.wincon-vol-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  margin-top: 2px;
}

/* Zile FĂRĂ Producție */
.flatpickr-day.wincon-day-idle {
  color: #94a3b8 !important;
}

.flatpickr-day.wincon-day-idle:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.wincon-idle-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #f59e0b;
  margin-top: 3px;
}

.flatpickr-day.wincon-day-weekend {
  color: #cbd5e1 !important;
}

/* Stări de Selecție Range & Single */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #ffffff !important;
}

.flatpickr-day.selected .day-num,
.flatpickr-day.startRange .day-num,
.flatpickr-day.endRange .day-num {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.flatpickr-day.selected .wincon-vol-badge,
.flatpickr-day.startRange .wincon-vol-badge,
.flatpickr-day.endRange .wincon-vol-badge {
  color: #ffe4e6 !important;
}

.flatpickr-day.selected .wincon-idle-dot,
.flatpickr-day.startRange .wincon-idle-dot,
.flatpickr-day.endRange .wincon-idle-dot {
  background: #ffffff !important;
}

.flatpickr-day.inRange {
  background: rgba(225, 4, 49, 0.08) !important;
  border-color: rgba(225, 4, 49, 0.22) !important;
  color: var(--dark) !important;
  box-shadow: -5px 0 0 rgba(225, 4, 49, 0.08), 5px 0 0 rgba(225, 4, 49, 0.08) !important;
}

/* Subsol Flatpickr */
.wincon-cal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
  border-bottom-left-radius: var(--r);
  border-bottom-right-radius: var(--r);
}

/* ==========================================================================
   WINCON TABLE MANAGER (TOOLBAR, SEARCH, PAGINATION)
   ========================================================================== */
.wincon-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.wincon-table-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 380px;
  width: 100%;
}

.wincon-table-search .search-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  pointer-events: none;
}

.wincon-table-search input {
  width: 100%;
  height: 32px;
  padding: 0 28px 0 32px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #ffffff;
  color: var(--dark);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wincon-table-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(225, 4, 49, 0.12);
}

.wincon-table-search input::placeholder {
  color: #94a3b8;
}

.wincon-table-search .clear-btn {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 16px;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  padding: 0;
}

.wincon-table-search .clear-btn:hover {
  color: var(--brand);
  background: #f1f5f9;
}

.wincon-table-pagesize {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.wincon-table-pagesize label {
  font-size: 12px;
  color: #64748b;
}

.wincon-table-pagesize select {
  height: 32px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #ffffff;
  color: var(--dark);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.wincon-table-pagesize select:focus {
  outline: none;
  border-color: var(--brand);
}

.wincon-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 6px 2px 2px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.wincon-table-info {
  font-size: 12px;
  color: #64748b;
}

.wincon-table-info b {
  color: var(--dark);
  font-weight: 600;
}

.wincon-pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wincon-pagination .pag-btn {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--dark);
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.wincon-pagination .pag-btn:hover:not(:disabled) {
  border-color: var(--brand);
  color: var(--brand);
  background: #fef2f2;
}

.wincon-pagination .pag-btn.active {
  background: var(--dark, #243342) !important;
  color: #ffffff !important;
  border-color: var(--dark, #243342) !important;
}

.wincon-pagination .pag-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.wincon-pagination .pag-ellipsis {
  padding: 0 4px;
  color: #94a3b8;
  font-weight: 600;
  font-size: 13px;
}

.row-absent {
  opacity: 0.55;
  background: #f8fafc;
}

/* ============================================================= */
/* WINCON GANTT TIMELINE TABLE & PRODUCTION HISTORY               */
/* ============================================================= */
.gantt-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
}
.gantt-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.gantt-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}
.gantt-legend-swatch.wincon {
  background: var(--brand);
}
.gantt-legend-swatch.external {
  background: var(--dark);
}
.gantt-legend-swatch.peak {
  background: #f59e0b;
}

.gantt-table-wrap {
  position: relative;
  overflow-x: auto;
  border-radius: 3px;
  background: #ffffff;
}

table.wincon-gantt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  min-width: 1380px;
}
table.wincon-gantt-table th,
table.wincon-gantt-table td {
  box-sizing: border-box;
  padding: 6px 4px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

/* Sticky First Column: Client Information */
table.wincon-gantt-table .gantt-col-client {
  position: sticky;
  left: 0;
  background: #ffffff;
  z-index: 10;
  width: 195px;
  min-width: 190px;
  max-width: 200px;
  padding: 5px 8px !important;
  border-right: 1px solid var(--line);
  box-shadow: 2px 0 4px rgba(0, 0, 0, 0.03);
}
table.wincon-gantt-table thead th.gantt-col-client {
  background: #f8fafc !important;
  z-index: 20 !important;
}
table.wincon-gantt-table tfoot td.gantt-col-client {
  background: #f8fafc !important;
  z-index: 15 !important;
}
table.wincon-gantt-table tbody tr:hover .gantt-col-client {
  background: #f8fafc;
}

/* Sticky Last Column: Total m³ */
table.wincon-gantt-table .gantt-col-total {
  position: sticky;
  right: 0;
  background: #ffffff;
  z-index: 10;
  width: 100px;
  min-width: 95px;
  max-width: 105px;
  text-align: right;
  padding-right: 12px !important;
  border-left: 1px solid var(--line);
  box-shadow: -2px 0 4px rgba(0, 0, 0, 0.03);
}
table.wincon-gantt-table thead th.gantt-col-total {
  background: #f8fafc !important;
  z-index: 20 !important;
}
table.wincon-gantt-table tfoot td.gantt-col-total {
  background: #f8fafc !important;
  z-index: 15 !important;
}
table.wincon-gantt-table tbody tr:hover .gantt-col-total {
  background: #f8fafc;
}

/* Hide pagination controls for Gantt table */
#v-istoric .wincon-table-pagination,
#v-istoric .wincon-table-pagesize {
  display: none !important;
}

/* Year Header Rows */
table.wincon-gantt-table thead th.gantt-year-hdr {
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
table.wincon-gantt-table thead th.gantt-month-hdr {
  background: #f8fafc;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  color: var(--dark);
  padding: 6px 2px;
  width: 60px;
  min-width: 60px;
}
.gantt-month-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--dark);
}
.gantt-month-vol {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 1px;
}

/* Gantt Timeline Cell */
.gantt-cell {
  padding: 4px 1px !important;
  text-align: center;
  position: relative;
  width: 60px;
  min-width: 60px;
}
.gantt-track-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  width: 100%;
  box-sizing: border-box;
}
.gantt-track-line {
  height: 1px;
  background: #e2e8f0;
  width: 100%;
}

/* Gantt Bar Capsule */
.gantt-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 28px;
  padding: 0 4px;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}
.gantt-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  z-index: 5;
}
.gantt-bar.wincon {
  background: #E10431;
  color: #ffffff;
}
.gantt-bar.external {
  background: #243342;
  color: #ffffff;
}
.gantt-bar.is-start {
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}
.gantt-bar.is-end {
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}
.gantt-val {
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}
.gantt-intensity-bar {
  width: 80%;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1px;
  margin-top: 2px;
  overflow: hidden;
}
.gantt-intensity-bar .fill {
  height: 100%;
  background: #ffffff;
  border-radius: 1px;
}

/* Client Meta in Sticky Column */
.gantt-client-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gantt-client-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-client-sub {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gantt-pill {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.gantt-pill.wincon {
  background: rgba(225, 4, 49, 0.1);
  color: var(--brand);
}
.gantt-pill.external {
  background: #f1f5f9;
  color: #475569;
}

/* Sum Row Styling */
table.wincon-gantt-table tr.sum td {
  background: #f8fafc;
  font-weight: 700;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.gantt-sum-month {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 0;
}
.gantt-sum-val {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
}
.gantt-sum-bar {
  width: 80%;
  height: 3px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 3px;
  overflow: hidden;
}
.gantt-sum-bar .fill {
  height: 100%;
  background: var(--dark);
  border-radius: 2px;
}
.gantt-sum-bar .fill.peak {
  background: var(--brand);
}
.gantt-peak-tag {
  font-size: 8px;
  font-weight: 800;
  background: var(--brand);
  color: #ffffff;
  padding: 0 3px;
  border-radius: 2px;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* ============================================================= */
/* ELEGANT WINCON FLOATING GANTT TOOLTIP                          */
/* ============================================================= */
.wincon-gantt-tooltip {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 4px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.4;
  min-width: 250px;
  max-width: 320px;
  opacity: 0;
  transform: translate(-50%, -100%) scale(0.96);
  transition: opacity 0.12s ease, transform 0.12s ease;
  backdrop-filter: blur(8px);
}
.wincon-gantt-tooltip.visible {
  opacity: 1;
  transform: translate(-50%, -100%) scale(1);
}
.gantt-tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 6px;
  margin-bottom: 8px;
}
.gantt-tt-month {
  font-weight: 700;
  font-size: 12.5px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gantt-tt-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.gantt-tt-badge.wincon {
  background: var(--brand);
  color: #ffffff;
}
.gantt-tt-badge.external {
  background: #334155;
  color: #cbd5e1;
}
.gantt-tt-client {
  font-weight: 700;
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gantt-tt-vol-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.gantt-tt-vol-val {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.gantt-tt-vol-share {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 700;
}
.gantt-tt-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  color: #cbd5e1;
  margin-top: 4px;
}
.gantt-tt-meta-label {
  color: #64748b;
  font-weight: 600;
  min-width: 52px;
}
.gantt-tt-meta-val {
  color: #e2e8f0;
  flex: 1;
}
.gantt-tt-recipes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.gantt-tt-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 4px;
  border-radius: 2px;
  font-size: 9.5px;
  font-weight: 700;
  color: #e2e8f0;
}

/* ============================================================= */
/* PREZENTARE EXECUTIVĂ & PITCH DECK MULTI-STEP WINCON */
/* ============================================================= */

.btn.brand-highlight {
  background: #fef2f2;
  color: var(--brand);
  border-color: rgba(225, 4, 49, 0.35);
  font-weight: 700;
}

.btn.brand-highlight:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(225, 4, 49, 0.25);
}

.intro-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  padding: 20px;
  box-sizing: border-box;
}

.intro-modal-backdrop.visible {
  opacity: 1;
}

.intro-modal-box {
  background: #ffffff;
  width: 940px;
  max-width: 96vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.2s ease;
}

.intro-modal-backdrop.visible .intro-modal-box {
  transform: scale(1);
}

.intro-progress-track {
  height: 3px;
  background: #f1f5f9;
  width: 100%;
  position: relative;
}

.intro-progress-bar {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.intro-modal-header {
  background: #0f172a;
  color: #ffffff;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.intro-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.intro-monogram {
  flex-shrink: 0;
}

.intro-category-badge {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(225, 4, 49, 0.2);
  color: #ff6b81;
  border: 1px solid rgba(225, 4, 49, 0.4);
  padding: 1px 7px;
  border-radius: 2px;
  margin-bottom: 2px;
  display: inline-block;
}

.intro-brand-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.intro-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-step-counter {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  margin-right: 6px;
}

.intro-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.intro-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.intro-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
  background: #fcfcfd;
}

.intro-slide-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 5px 0;
  line-height: 1.25;
}

.intro-slide-subtitle {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin: 0 0 20px 0;
}

.intro-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.intro-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.intro-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.intro-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.intro-card.highlighted {
  border-color: rgba(225, 4, 49, 0.35);
  background: #fffafa;
}

.intro-card-icon {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.intro-card h4 {
  margin: 0 0 6px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--dark);
}

.intro-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #475569;
}

.intro-card.problem-card {
  border-left: 3.5px solid var(--brand);
}

.problem-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: 0.05em;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 6px;
  display: inline-block;
}

.intro-card.solution-card {
  border-left: 3.5px solid #10b981;
}

.solution-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.05em;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 6px;
  display: inline-block;
}

.intro-table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  margin-bottom: 14px;
}

.intro-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.intro-compare-table th {
  background: #f8fafc;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: #475569;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.intro-compare-table th.l {
  text-align: left;
}

.intro-compare-table th.brand-th {
  background: #fef2f2;
  color: var(--brand);
}

.intro-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  text-align: center;
}

.intro-compare-table td.l {
  text-align: left;
}

.intro-compare-table td.brand-td {
  background: #fffafa;
  font-weight: 600;
  color: var(--dark);
}

.gain-pill {
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10.5px;
  display: inline-block;
  white-space: nowrap;
}

.intro-role-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.role-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.role-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.role-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--dark);
}

.role-bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
  color: #475569;
}

.role-bullets li {
  margin-bottom: 5px;
}

.intro-modules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.intro-module-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 12px;
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
}

.mod-num {
  background: var(--dark);
  color: #ffffff;
  font-weight: 800;
  font-size: 10px;
  width: 19px;
  height: 19px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.intro-cta-box {
  background: #0f172a;
  color: #ffffff;
  padding: 18px 22px;
  border-radius: var(--r);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.intro-cta-text h3 {
  margin: 0 0 4px 0;
  font-size: 15px;
  color: #ffffff;
}

.intro-cta-text p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.4;
}

.intro-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 4px;
}

.intro-highlight-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: var(--r);
  padding: 12px 16px;
  font-size: 12.5px;
  color: #991b1b;
  line-height: 1.45;
}

.intro-modal-footer {
  background: #ffffff;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.intro-remember-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

.intro-step-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.intro-chip-step {
  width: 26px;
  height: 26px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.intro-chip-step:hover {
  border-color: #94a3b8;
  color: var(--dark);
}

.intro-chip-step.active {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 1px 3px rgba(225, 4, 49, 0.3);
}

.intro-chip-step.done {
  background: #f1f5f9;
  color: var(--dark);
  border-color: #cbd5e1;
}

@media (max-width: 820px) {
  .intro-grid-3, .intro-grid-2, .intro-modules-grid {
    grid-template-columns: 1fr;
  }
  .intro-cta-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .intro-modal-footer {
    flex-direction: column;
    gap: 10px;
  }
}

/* ---------- Banner actualizare PWA ---------- */
.pwa-update-banner {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: #243342;
  color: #ffffff;
  border-radius: 3px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pwa-update-text {
  white-space: nowrap;
}

.pwa-update-btn {
  appearance: none;
  border: 0;
  border-radius: 3px;
  background: #E10431;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 120ms ease;
}

.pwa-update-btn:hover {
  background: #c0032a;
}

@media (max-width: 640px) {
  .pwa-update-banner {
    left: 14px;
    right: 14px;
    bottom: 14px;
    justify-content: space-between;
  }
}

/* ---------- Ecran de instalare PWA ---------- */
body.install-gate-open {
  overflow: hidden;
}

#installGate {
  position: fixed;
  inset: 0;
  z-index: 2000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #F9F9F9;
}

@media (display-mode: standalone),
       (display-mode: fullscreen),
       (display-mode: minimal-ui) {
  #installGate {
    display: none !important;
  }
}

.install-card {
  width: 100%;
  max-width: 460px;
  padding: 40px 36px 32px;
  background: #ffffff;
  border: 1px solid #e6e8ec;
  border-radius: 3px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
  text-align: center;
}

.install-monogram {
  display: block;
  margin: 0 auto 20px;
  width: 61px;
  height: 38px;
}

.install-title {
  margin: 0 0 6px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #243342;
}

.install-title span {
  color: #E10431;
  font-weight: 800;
}

.install-sub {
  margin: 0 0 26px;
  font-size: 13px;
  line-height: 1.5;
  color: #64748b;
}

.install-points {
  margin: 0 0 28px;
  padding: 18px 0 0;
  border-top: 1px solid #eef0f3;
  list-style: none;
  text-align: left;
}

.install-points li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
}

.install-points li:last-child {
  margin-bottom: 0;
}

.install-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  background: #E10431;
  border-radius: 1px;
}

.install-btn {
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 3px;
  background: #E10431;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease;
}

.install-btn:hover:not(:disabled) {
  background: #c0032a;
}

.install-btn:disabled {
  background: #cbd3dd;
  color: #f8fafc;
  cursor: default;
}

.install-hint {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #7b8794;
  min-height: 18px;
}

.install-skip {
  margin-top: 18px;
  padding: 6px 4px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  color: #8a95a3;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.install-skip:hover {
  color: #243342;
}

@media (max-width: 480px) {
  .install-card {
    padding: 32px 22px 26px;
  }
  .install-title {
    font-size: 22px;
  }
}

/* ---------- Avertismente de calitate a datelor ---------- */
.data-warn-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 3px;
}

.data-warn-strip[hidden] {
  display: none;
}

.data-warn-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #92400e;
}

.data-warn-item {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #7c2d12;
}

.data-warn-item::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  background: #d97706;
  border-radius: 1px;
}

.data-warn-item b {
  font-weight: 700;
}

/* ---------- Tabel jurnal transport (12 coloane, layout fix) ---------- */
table.journal-table {
  table-layout: fixed;
}

table.journal-table th,
table.journal-table td {
  padding: 9px 8px;
}

table.journal-table th {
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: normal;
  line-height: 1.25;
  vertical-align: bottom;
}

table.journal-table td.l {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.journal-table td:nth-child(2) {
  white-space: normal;
}

table.journal-table td:nth-child(6) {
  white-space: normal;
  font-size: 12px;
}

table.journal-table input.cell-input {
  width: 100%;
  min-width: 0;
  padding: 4px 6px;
}

/* Coloana Tarif Aplicat: nume pe un rând, preț dedesubt */
table.journal-table td.tariff-cell {
  line-height: 1.25;
  white-space: normal;
}

table.journal-table td.tariff-cell .t-name {
  display: block;
  font-size: 12px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

table.journal-table td.tariff-cell .t-price {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

/* ---------- Tabel utilități (13 coloane) ---------- */
table.utilities-table {
  table-layout: fixed;
}

table.utilities-table th,
table.utilities-table td {
  padding: 9px 8px;
}

table.utilities-table th {
  font-size: 10px;
  letter-spacing: 0.03em;
  white-space: normal;
  line-height: 1.25;
  vertical-align: bottom;
}

/* ------------------------------------------------------------------
   PIN — ecran de blocare a dispozitivului (Capitolul 4)
   ------------------------------------------------------------------ */
.pin-gate {
  position: fixed;
  inset: 0;
  z-index: 2100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #f9f9f9);
  padding: 24px;
}

.pin-gate[hidden] {
  display: none;
}

.pin-box {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 48px rgba(36, 51, 66, 0.12);
}

.pin-monogram {
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 800;
  color: var(--brand, #E10431);
}

.pin-box h2 {
  margin: 0;
  font-size: 20px;
  color: var(--dark, #243342);
  letter-spacing: -0.01em;
}

.pin-station {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted, #6b7280);
}

.pin-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #6b7280);
  margin-top: 4px;
}

.pin-input {
  width: 100%;
  padding: 11px 12px;
  font-size: 18px;
  letter-spacing: 4px;
  text-align: center;
  border: 1px solid var(--line2, #cbd5e1);
  border-radius: 3px;
  font-family: inherit;
  color: var(--ink, #1f2937);
  background: #fff;
}

.pin-input[type="text"] {
  font-size: 14px;
  letter-spacing: 2px;
}

.pin-input:focus {
  outline: none;
  border-color: var(--brand, #E10431);
  box-shadow: 0 0 0 3px rgba(225, 4, 49, 0.12);
}

.pin-msg {
  min-height: 16px;
  font-size: 12px;
  color: var(--muted, #6b7280);
}

.pin-msg-error {
  color: var(--brand, #E10431);
  font-weight: 600;
}

.pin-submit {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.pin-link {
  background: none;
  border: 0;
  padding: 6px 0 0;
  font-size: 12px;
  color: var(--muted, #6b7280);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.pin-link:hover {
  color: var(--brand, #E10431);
}

.pin-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 22px;
  letter-spacing: 4px;
  text-align: center;
  padding: 16px 10px;
  margin: 12px 0;
  background: #f8fafc;
  border: 1px dashed var(--line2, #cbd5e1);
  border-radius: 3px;
  color: var(--dark, #243342);
  user-select: all;
}

body.pin-locked {
  overflow: hidden;
}

/* ------------------------------------------------------------------
   Ziua mea — checklist operațional (B14)
   ------------------------------------------------------------------ */
.ziua-progress {
  height: 8px;
  background: #eef2f7;
  border-radius: 3px;
  overflow: hidden;
}

.ziua-progress-bar {
  height: 100%;
  width: 0;
  background: var(--brand, #E10431);
  transition: width 0.2s ease;
}

.ziua-progress-bar.ok { background: var(--ok, #047857); }
.ziua-progress-bar.warn { background: var(--warn, #b45309); }
.ziua-progress-bar.danger { background: var(--danger, #E10431); }

.ziua-progress-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted, #6b7280);
}

.ziua-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.ziua-row:last-child { border-bottom: 0; }

.ziua-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  flex: 0 0 auto;
}

.ziua-dot.ok { background: var(--ok, #047857); }
.ziua-dot.missing { background: var(--brand, #E10431); }
.ziua-dot.na { background: #cbd5e1; }

.ziua-row-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ziua-row-main b {
  font-size: 13px;
  color: var(--dark, #243342);
}

.ziua-row-why {
  font-size: 11.5px;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}

.ziua-readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.ziua-readout {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ziua-readout .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}

.ziua-readout .v {
  font-size: 18px;
  color: var(--dark, #243342);
}

.ziua-readout .s {
  font-size: 11px;
  color: var(--muted, #6b7280);
}

.ziua-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Eticheta de build demo — trebuie imposibil de confundat cu o instalare reală */
.demo-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--warn, #b45309);
  background: var(--warnbg, #fffbeb);
  border: 1px solid #fcd34d;
  border-radius: 3px;
  padding: 4px 8px;
  white-space: nowrap;
}

/* Bara de sus: butonul de blocare rămâne vizibil, dar nu împinge layout-ul */
.topbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 8px;
}

@media (max-width: 1280px) {
  #btnLockNow span {
    display: none;
  }
  #btnLockNow {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* ------------------------------------------------------------------
   Profil dispozitiv: Operator stație (fără cifre financiare)
   Ascunderea este de interfață, nu de securitate.
   ------------------------------------------------------------------ */
body[data-profile="operator"] [data-admin-only],
body[data-profile="operator"] .hr-money {
  display: none !important;
}

/* ------------------------------------------------------------------
   Administrare owner — intrare doar pe ecranul de blocare PIN
   ------------------------------------------------------------------ */
.admin-entry {
  display: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2100005;
  padding: 9px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  background: #fff;
  color: var(--dark, #243342);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(36, 51, 66, .12);
}

body.pin-locked .admin-entry { display: inline-flex; align-items: center; }
.admin-entry:hover { border-color: var(--brand, #E10431); color: var(--brand, #E10431); }

.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 2200000;
  overflow: auto;
  background: var(--bg, #F9F9F9);
  color: var(--dark, #243342);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.admin-shell { min-height: 100%; display: flex; flex-direction: column; }

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.admin-brand { display: flex; align-items: center; gap: 12px; }
.admin-brand > div { display: flex; flex-direction: column; gap: 1px; }
.admin-brand b { font-size: 15px; color: var(--dark, #243342); }
.admin-brand span { font-size: 12px; color: var(--muted, #6b7280); }
.admin-monogram {
  font-size: 12px;
  letter-spacing: 3px;
  font-weight: 800;
  color: var(--brand, #E10431);
}

.admin-topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-who { font-size: 12px; color: var(--muted, #6b7280); }

.admin-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 24px 40px; }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-toolbar-tight { margin-bottom: 4px; }
.admin-toolbar h1 { margin: 0; font-size: 20px; }
.admin-toolbar h2 { margin: 0; font-size: 15px; }

.admin-login { display: flex; align-items: center; justify-content: center; padding: 48px 20px; }
.admin-login-box {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  padding: 28px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 18px 48px rgba(36, 51, 66, .12);
}
.admin-login-box h2 { margin: 0; font-size: 20px; color: var(--dark, #243342); }
.admin-login-box label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #6b7280); margin-top: 6px; }
.admin-login-box input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #fff;
  color: #1f2937;
  font: inherit;
}
.admin-login-box input:focus { outline: none; border-color: var(--brand, #E10431); box-shadow: 0 0 0 3px rgba(225, 4, 49, .12); }

.admin-hint { margin: 0 0 10px; font-size: 12px; color: var(--muted, #6b7280); line-height: 1.55; }
.admin-replacement-note {
  padding: 8px 10px;
  background: #FFF8EC;
  border: 1px solid #F2D7A8;
  border-left: 3px solid var(--warn, #b45309);
  border-radius: 3px;
  color: #6B4A00;
}
.admin-hint-inline { font-size: 11px; color: var(--muted, #6b7280); }

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  background: #fff;
  color: var(--dark, #243342);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.admin-btn:hover { border-color: var(--dark, #243342); }
.admin-btn:disabled { opacity: .55; cursor: default; }
.admin-btn-primary { background: var(--brand, #E10431); border-color: var(--brand, #E10431); color: #fff; }
.admin-btn-primary:hover { filter: brightness(.94); }
.admin-btn-small { padding: 4px 9px; font-size: 12px; }
.admin-btn-ghost { background: transparent; }
.admin-btn-danger { color: var(--brand, #E10431); border-color: #E7B5BE; }

.admin-msg { min-height: 18px; margin-top: 8px; font-size: 12px; color: var(--muted, #6b7280); }
.admin-msg.err { color: var(--brand, #E10431); font-weight: 600; }
.admin-msg.ok { color: var(--ok, #047857); }

.admin-stations {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.admin-station {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-station-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.admin-station-name { font-weight: 700; font-size: 15px; }
.admin-station-site { color: var(--muted, #6b7280); font-size: 12px; word-break: break-word; }

.admin-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  background: #EEF2F5;
  color: var(--muted, #6b7280);
  white-space: nowrap;
}
.admin-pill.ok { background: #E4F5EC; color: var(--ok, #047857); }
.admin-pill.warn { background: #FFF3DF; color: var(--warn, #b45309); }
.admin-pill.err { background: #FBE7EA; color: var(--brand, #E10431); }

.admin-station-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted, #6b7280); }

.admin-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-kpis > div { border: 1px solid var(--line, #e2e8f0); border-radius: 3px; padding: 8px 10px; }
.admin-kpis b { display: block; font-size: 16px; color: var(--dark, #243342); }
.admin-kpis span { font-size: 11px; color: var(--muted, #6b7280); }

.admin-station-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.admin-card {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  padding: 18px;
  margin-top: 16px;
}
.admin-card h2 { margin: 0 0 10px; font-size: 15px; }
.admin-card h3 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #6b7280); }

.admin-notice {
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #BFD3E6;
  border-left: 3px solid var(--dark, #243342);
  border-radius: 3px;
  background: #F1F6FA;
  font-size: 12px;
  color: var(--dark, #243342);
}

.admin-file-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-file-row input[type="file"] {
  flex: 1;
  min-width: 220px;
  width: auto;
  padding: 7px 9px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  background: #fff;
  font: inherit;
}
.admin-file-row input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 5px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  background: #F4F6F8;
  color: var(--dark, #243342);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.admin-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; margin-top: 4px; }
.admin-fields label { display: block; margin: 10px 0 4px; font-size: 12px; font-weight: 600; }
.admin-fields input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  background: #fff;
  color: var(--dark, #243342);
  font: inherit;
}
.admin-fields input:focus { outline: none; border-color: var(--brand, #E10431); box-shadow: 0 0 0 3px rgba(225, 4, 49, .12); }

.admin-onboarding-cols { display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px; margin-top: 16px; }
@media (max-width: 760px) { .admin-onboarding-cols { grid-template-columns: 1fr; } }

.admin-modules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-modules > li { padding: 10px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 3px; font-size: 12px; }
.admin-modules > li.admin-empty, .admin-empty { border: 1px dashed var(--line, #e2e8f0); background: #FBFCFD; padding: 8px 12px; border-radius: 3px; color: var(--muted, #6b7280); font-size: 13px; }
.admin-module-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.admin-module-head b { font-size: 12px; word-break: break-word; }
.admin-module-meta { color: var(--muted, #6b7280); font-size: 11px; margin-top: 2px; }
.admin-module-details { margin: 6px 0 0; padding-left: 16px; color: var(--muted, #6b7280); }
.admin-module-warning { margin-top: 6px; padding: 6px 8px; border-radius: 3px; background: #FFF3DF; color: var(--warn, #b45309); font-size: 11px; }

.admin-summary { display: flex; flex-direction: column; gap: 6px; }
.admin-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 10px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 3px;
  font-size: 12px;
}
.admin-summary-row span { color: var(--muted, #6b7280); }
.admin-summary-row b { font-size: 15px; }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.admin-key-box { margin-top: 14px; padding: 12px; border: 1px dashed var(--line, #e2e8f0); border-radius: 3px; }
.admin-key-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 24px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--dark, #243342);
  user-select: all;
}

.admin-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.admin-devices { display: flex; flex-direction: column; gap: 8px; }
.admin-device { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line, #e2e8f0); }
.admin-device:last-child { border-bottom: none; }
.admin-device-name { font-weight: 600; }
.admin-device-meta { font-size: 11px; color: var(--muted, #6b7280); }

@media (max-width: 640px) {
  .admin-topbar { padding: 12px 14px; }
  .admin-main { padding: 18px 14px 32px; }
  .admin-brand span { display: none; }
  .admin-who { display: none; }
}
