:root {
  --orange: #f26522;
  --orange-dark: #d94b0d;
  --orange-soft: #fff0e8;
  --slate-950: #0f172a;
  --slate-900: #111827;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #d97706;
  --blue: #2563eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
.ls-selection-toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:16px 0; }
.ls-selection-toolbar button:disabled { opacity:.45; cursor:default; }
.loading-sheets input[type="checkbox"] { width:18px; height:18px; accent-color:var(--orange); }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--slate-900); background: #eef2f7; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #f7f7f7, #fff1e8 48%, #f1f5f9); }
.login-card { width: min(430px, 100%); background: white; border-radius: 26px; box-shadow: var(--shadow); padding: 28px; border: 1px solid rgba(15, 23, 42, .08); }
.login-logo { width: 260px; max-width: 100%; display: block; margin-bottom: 22px; border-radius: 8px; }
.login-card h1 { margin: 0; font-size: 28px; }
.login-card p { color: var(--slate-500); line-height: 1.5; }
.form-grid { display: grid; gap: 14px; }
.field label { display: block; color: var(--slate-700); font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.input, .select, .textarea { width: 100%; border: 1px solid #dbe3ec; border-radius: 12px; padding: 11px 12px; background: white; color: var(--slate-900); outline: none; }
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(242, 101, 34, .12); }
.btn { border: 0; border-radius: 12px; padding: 10px 14px; background: var(--slate-900); color: white; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; }
.btn.primary { background: var(--orange); }
.btn.primary:hover { background: var(--orange-dark); }
.btn.secondary { background: white; color: var(--slate-900); border: 1px solid #dbe3ec; }
.btn.danger { background: var(--red); }
.btn.small { min-height: 32px; padding: 6px 10px; font-size: 12px; border-radius: 9px; }
.btn.link { background: transparent; color: var(--orange); padding: 0; min-height: auto; }
.error { color: var(--red); font-size: 13px; margin-top: 10px; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { background: white; border-right: 1px solid #dbe3ec; padding: 18px 16px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand img { width: 240px; max-width: 100%; border-radius: 8px; display: block; }
.nav { margin-top: 26px; display: grid; gap: 7px; }
.nav button { border: 0; background: transparent; color: var(--slate-700); padding: 12px 14px; border-radius: 12px; text-align: left; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.nav button.active { background: var(--orange); color: white; box-shadow: 0 10px 18px rgba(242, 101, 34, .22); }
.nav button:hover:not(.active) { background: var(--slate-100); }
.sync-card { margin-top: 28px; border: 1px solid #dbe3ec; border-radius: 18px; padding: 16px; background: #fff; }
.sync-card h3 { margin: 0 0 8px; font-size: 15px; }
.sync-card p { margin: 6px 0; color: var(--slate-500); font-size: 13px; line-height: 1.45; }
.status-dot { width: 9px; height: 9px; border-radius: 99px; display: inline-block; background: var(--green); margin-right: 6px; }
.main { min-width: 0; }
.topbar { height: 74px; background: white; border-bottom: 1px solid #dbe3ec; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 10; }
.top-left { display: flex; align-items: center; gap: 18px; }
.mobile-menu { display: none; border: 0; background: var(--slate-100); border-radius: 10px; padding: 9px; }
.page-title { font-size: 24px; margin: 0; }
.user-box { display: flex; align-items: center; gap: 12px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--slate-100); display: grid; place-items: center; font-weight: 900; color: var(--slate-700); }
.content { padding: 24px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.search-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { grid-column: span 1; background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(15, 23, 42, .06); padding: 18px; min-height: 126px; }
.kpi .label { color: var(--slate-500); font-weight: 800; font-size: 13px; }
.kpi .value { margin-top: 18px; font-size: 27px; font-weight: 900; letter-spacing: -.02em; }
.kpi .note { margin-top: 7px; color: var(--slate-500); font-size: 12px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: 1.2fr 1fr; }
.grid.three { grid-template-columns: 1.25fr 1fr 1fr; }
.panel { background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(15, 23, 42, .06); padding: 18px; min-width: 0; }
.panel h2 { margin: 0 0 16px; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; }
.table-wrap { overflow: auto; border: 1px solid #e2e8f0; border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 780px; }
th { text-align: left; color: var(--slate-500); background: var(--slate-50); padding: 12px; white-space: nowrap; }
td { border-top: 1px solid #edf2f7; padding: 12px; vertical-align: middle; }
tr:hover td { background: #fffaf7; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 900; border: 1px solid transparent; white-space: nowrap; }
.pill.green { color: #15803d; background: #dcfce7; border-color: #bbf7d0; }
.pill.red { color: #b91c1c; background: #fee2e2; border-color: #fecaca; }
.pill.orange { color: #c2410c; background: #ffedd5; border-color: #fed7aa; }
.pill.blue { color: #1d4ed8; background: #dbeafe; border-color: #bfdbfe; }
.pill.gray { color: #475569; background: #f1f5f9; border-color: #e2e8f0; }
.money { font-weight: 900; white-space: nowrap; }
.money.red { color: var(--red); }
.money.green { color: var(--green); }
.alert-list { display: grid; gap: 10px; }
.alert { border-left: 4px solid var(--red); border-radius: 12px; padding: 12px; background: #fff7f7; display: flex; justify-content: space-between; gap: 12px; }
.alert strong { display: block; font-size: 13px; }
.alert span { color: var(--slate-500); font-size: 12px; }
.chart { height: 260px; width: 100%; display: block; }
.donut-box { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { width: 180px; height: 180px; border-radius: 50%; background: conic-gradient(#16a34a 0 42%, #f59e0b 42% 63%, #ef4444 63% 100%); display: grid; place-items: center; }
.donut-inner { width: 105px; height: 105px; border-radius: 50%; background: white; display: grid; place-items: center; text-align: center; font-weight: 900; }
.legend { display: grid; gap: 10px; font-size: 13px; }
.legend-item { display: flex; align-items: center; gap: 10px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; }
.swatch.green { background: #16a34a; }
.swatch.yellow { background: #f59e0b; }
.swatch.red { background: #ef4444; }
.client-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.client-card { background: white; border: 1px solid #e2e8f0; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.client-card h3 { margin: 0 0 8px; font-size: 15px; }
.client-card p { margin: 6px 0; color: var(--slate-500); font-size: 13px; }
.client-card .box { margin-top: 12px; padding: 12px; border-radius: 13px; background: var(--slate-50); font-size: 13px; display: grid; gap: 7px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: grid; place-items: center; z-index: 100; padding: 18px; }
.modal { width: min(760px, 100%); max-height: 90vh; overflow: auto; background: white; border-radius: 22px; box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.modal-head { padding: 18px 20px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px; }
.form-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-cols .full { grid-column: 1 / -1; }
.product2-toggle-row { display: flex; justify-content: flex-start; padding: 2px 0; }
.product2-fields { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; border: 1px dashed #fdba74; border-radius: 16px; background: #fffdfa; }
.product2-fields.open { display: grid; }
.modal-actions { padding: 16px 20px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 10px; }
.permission-help { margin: 0 0 10px; }
.permission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 12px; border: 1px solid #dbe4ef; border-radius: 14px; background: #f8fafc; }
.permission-option { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 10px; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; cursor: pointer; font-size: 13px; }
.permission-option input { width: 17px; height: 17px; accent-color: #f97316; }
.permission-option.disabled { opacity: .55; cursor: not-allowed; }
.user-client-assignment.hidden, .client-assignment-option.hidden { display: none; }
.client-assignment-search { margin: 8px 0 10px; }
.client-assignment-all { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border: 1px solid #fdba74; border-radius: 12px; background: #fff7ed; cursor: pointer; }
.client-assignment-all input, .client-assignment-option input { width: 18px; height: 18px; accent-color: #f97316; flex: 0 0 auto; }
.client-assignment-list { max-height: 320px; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; padding: 10px; border: 1px solid #dbe4ef; border-radius: 14px; background: #f8fafc; }
.client-assignment-option { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; cursor: pointer; }
.client-assignment-option span { min-width: 0; display: grid; gap: 3px; }
.client-assignment-option strong { overflow: hidden; text-overflow: ellipsis; }
.client-assignment-option small { color: var(--slate-500); }
.client-agent-checkboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; border: 1px solid #dbe4ef; border-radius: 12px; background: #f8fafc; }
.client-agent-option { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid #dbe4ef; border-radius: 10px; background: #fff; cursor: pointer; }
.client-agent-option input { width: 18px; height: 18px; margin-top: 1px; accent-color: #f97316; flex: 0 0 auto; }
.client-agent-option span { min-width: 0; display: grid; gap: 2px; }
.client-agent-option small { color: var(--slate-500); overflow-wrap: anywhere; }
@media (max-width: 700px) { .permission-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .client-assignment-list { grid-template-columns: 1fr; max-height: 280px; } }
@media (max-width: 700px) { .client-agent-checkboxes { grid-template-columns: 1fr; } }
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--slate-900); color: white; padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 200; }
.winmentor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.export-list { display: grid; gap: 10px; }
.footer { color: var(--slate-500); font-size: 12px; padding: 18px 24px; display: flex; justify-content: space-between; }
@media (max-width: 1500px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .client-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .shell { grid-template-columns: 1fr; } .sidebar { display: none; position: fixed; z-index: 50; width: 280px; box-shadow: var(--shadow); } .sidebar.open { display: block; } .mobile-menu { display: inline-flex; } .grid.two, .grid.three, .winmentor-grid { grid-template-columns: 1fr; } .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .cards, .client-cards { grid-template-columns: 1fr; } .content { padding: 14px; } .topbar { padding: 0 14px; } .user-box .user-meta { display: none; } .form-cols, .product2-fields { grid-template-columns: 1fr; } }
.readonly-banner { margin-bottom: 18px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.muted { color: var(--slate-500); font-size: 13px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { margin: 0; }

.dashboard-price-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.dashboard-price-panel { min-width: 0; }
.dashboard-price-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dashboard-price-head h2 { margin: 0; }
.dashboard-price-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.dashboard-price-legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--slate-500); font-size: 12px; font-weight: 700; }
.dashboard-price-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dashboard-price-legend i { width: 17px; height: 4px; border-radius: 99px; }
.dashboard-price-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.dashboard-price-filters label { display: grid; gap: 5px; color: var(--slate-500); font-size: 11px; font-weight: 800; }
.dashboard-price-filters .input { min-width: 0; height: 39px; padding: 7px 9px; font-size: 12px; }
.dashboard-price-point { cursor: pointer; }
.dashboard-series-point,.dashboard-manager-donut-segment { cursor: pointer; }
.dashboard-manager-donut-segment { transition: stroke-width .15s ease, opacity .15s ease; }
.dashboard-manager-donut-segment:hover,.dashboard-manager-donut-segment:focus { stroke-width: 42; opacity: .9; outline: none; }
.dashboard-manager-total { fill: #172033; font-size: 16px; font-weight: 900; }
.dashboard-manager-total-note { fill: #64748b; font-size: 10px; font-weight: 700; }
.dashboard-manager-legend { fill: #334155; font-size: 22px; font-weight: 700; }
.dashboard-price-point-label { display: none; pointer-events: none; font-size: 10px; font-weight: 800; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.dashboard-price-point-label.visible { display: block; }
.dashboard-price-svg-wrap { width: 100%; overflow-x: auto; }
.dashboard-price-svg { display: block; width: 100%; min-width: 540px; height: auto; }
.dashboard-price-svg text { fill: #64748b; font-size: 11px; }
.dashboard-chart-empty { display: grid; place-items: center; min-height: 220px; color: var(--slate-500); border: 1px dashed var(--line); border-radius: 12px; }
@media (max-width: 1100px) { .dashboard-price-charts { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .dashboard-price-charts { gap: 12px; }
  .dashboard-price-head { align-items: flex-start; flex-direction: column; }
  .dashboard-price-filters { grid-template-columns: 1fr; }
  .dashboard-price-svg { min-width: 500px; }
}

.toolbar-buttons{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
.proforma-filter-toolbar{flex-wrap:wrap;align-items:center;gap:12px}
.proforma-filter-row{flex:1 1 auto;display:flex;flex-wrap:wrap;align-items:flex-end;gap:7px;min-width:0}
.proforma-filter-row .input{height:36px;min-height:36px;padding:7px 9px;border-radius:9px;font-size:12px}
.proforma-filter-row .btn{min-height:36px;padding:7px 10px;white-space:nowrap}
.proforma-filter-search{width:220px!important;flex:0 1 220px}
.proforma-filter-client{width:230px!important;flex:0 1 230px}
.proforma-filter-date-field{width:132px;flex:0 0 132px;display:grid;gap:3px;color:var(--muted);font-size:10px;font-weight:800;line-height:1}
.proforma-filter-date-field .proforma-filter-date{width:100%!important}
.proforma-filter-toolbar .toolbar-buttons{flex:0 0 auto;flex-wrap:nowrap}
@media(max-width:1250px){.proforma-filter-toolbar{flex-wrap:wrap}.proforma-filter-toolbar .toolbar-buttons{width:100%;justify-content:flex-start}}
@media(max-width:760px){.proforma-filter-toolbar,.proforma-filter-row{display:grid;grid-template-columns:1fr 1fr;width:100%}.proforma-filter-row .input,.proforma-filter-row .btn,.proforma-filter-search,.proforma-filter-client,.proforma-filter-date,.proforma-filter-date-field{width:100%!important;min-width:0}.proforma-filter-search,.proforma-filter-client{grid-column:1/-1}.proforma-filter-toolbar .toolbar-buttons{display:grid;grid-template-columns:1fr 1fr;width:100%;grid-column:1/-1}.proforma-filter-toolbar .toolbar-buttons .btn{width:100%}}
.orders-new-sticky {
  position: sticky;
  top: 74px;
  z-index: 45;
  display: flex;
  justify-content: flex-end;
  padding: 0 0 12px;
  pointer-events: none;
}
.orders-new-button {
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(234, 88, 12, .28);
}
@media (max-width: 900px) {
  .orders-new-sticky {
    top: 70px;
    padding: 8px 0 12px;
  }
  .orders-new-button {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 13px;
    border-radius: 11px;
  }
}

/* v5.93.7 - administrare puncte de lucru client */
.work-points-editor, .contact-values-editor { gap: 9px; }
.work-points-list, .contact-values-list { display: grid; gap: 8px; }
.work-point-row, .contact-value-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.work-point-row .btn, .contact-value-row .btn { min-width: 38px; }
.data-link { border: 0; padding: 0; background: transparent; color: #d95715; font: inherit; font-weight: 700; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.data-link:hover { color: #a83d0b; }
.report-compact .table-wrap th, .report-compact .table-wrap td { padding: 7px 9px; line-height: 1.25; vertical-align: middle; }
.report-compact .table-wrap small { color: var(--slate-500); font-size: 11px; }
.reports-grid { gap: 12px; }

/* Dashboard BI pentru rapoarte */
.reports-dashboard {
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background: #e5e7eb;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .13);
}
.reports-dashboard-head {
  padding: 18px 20px 0;
  color: #fff;
  background: #30343b;
}
.reports-dashboard-head h2 { margin: 2px 0 14px; font-size: 24px; color: #fff; }
.reports-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: #fdba74; }
.reports-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.reports-tabs a {
  flex: 0 0 auto;
  min-width: 112px;
  padding: 10px 15px;
  color: #e5e7eb;
  border-radius: 7px 7px 0 0;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}
.reports-tabs a:hover, .reports-tabs a.active { color: #fff; background: var(--orange); }
.reports-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 9px;
  background: #d1d5db;
}
.reports-kpis > div { min-height: 78px; padding: 12px 14px; background: #f8fafc; border-left: 4px solid #60a5fa; }
.reports-kpis > div:nth-child(2) { border-color: #38bdf8; background: #eff9ff; }
.reports-kpis > div:nth-child(3) { border-color: #0e7490; background: #edf7fa; }
.reports-kpis > div:nth-child(4) { border-color: #f59e0b; background: #fffbeb; }
.reports-kpis > div.warning { border-color: #ef4444; background: #fff7ed; }
.reports-kpis small { display: block; margin-bottom: 7px; color: #64748b; font-weight: 700; }
.reports-kpis strong { display: block; color: #111827; font-size: 21px; line-height: 1.15; }
.reports-bi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 9px 9px; }
.report-bi-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #d1d5db; }
.report-bi-card.report-wide { grid-column: 1 / -1; }
.report-bi-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border-bottom: 1px solid #d1d5db; background: #f8fafc; }
.report-bi-head h2 { margin: 0; font-size: 14px; color: #1f2937; }
.report-bi-card .table-wrap { margin: 0; border: 0; border-radius: 0; max-height: 360px; overflow: auto; }

/* În aplicația Windows, bara de derulare superioară nu mai acoperă
   antetul tabelelor din Rapoarte. Antetul rămâne fix în zona tabelului. */
.reports-dashboard .table-scroll-top {
  position: static;
  z-index: auto;
  height: 12px;
  margin: 0;
  padding: 0 4px;
  background: #f8fafc;
  border-bottom: 1px solid #d1d5db;
}
.reports-dashboard .table-scroll-top::-webkit-scrollbar { height: 8px; }
.reports-dashboard .table-scroll-top::-webkit-scrollbar-thumb { border-width: 1px; }
.reports-dashboard .table-wrap { scrollbar-gutter: stable both-edges; }
.reports-dashboard .table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f8fafc;
  box-shadow: 0 1px 0 #cbd5e1, 0 5px 8px rgba(15, 23, 42, .04);
}
.report-bi-card table { font-size: 11.5px; }
.report-bi-card thead { position: sticky; top: 0; z-index: 1; }
.report-bi-card th { background: #e5e7eb; color: #374151; }
.report-bi-card tbody tr:nth-child(even) td { background: #f3f4f6; }
.report-bar-chart { display: grid; gap: 10px; padding: 16px 14px 18px; }
.report-bar-row { display: grid; grid-template-columns: minmax(90px, 145px) minmax(100px, 1fr) minmax(90px, auto); gap: 10px; align-items: center; }
.report-bar-row > span, .report-agent-link { overflow: hidden; color: #334155; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.report-agent-link { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.report-agent-link:hover, .report-agent-link:focus-visible { color: var(--orange-dark); text-decoration: underline; }
.report-bar-row > strong { color: #0f172a; font-size: 11px; text-align: right; }
.report-bar-track { height: 17px; overflow: hidden; border-radius: 2px; background: #e2e8f0; }
.report-bar-track i { display: block; height: 100%; background: linear-gradient(90deg, #075985, #38bdf8); }
.report-bar-track i.alt { background: linear-gradient(90deg, #0f766e, #2dd4bf); }
.report-order-link { font-weight: 800; }
.report-detail-modal { width: min(1180px, 95vw); }
.report-detail-modal .modal-body { overflow: auto; }
.report-detail-summary { display: grid; grid-template-columns: 2fr 1fr 1.5fr; gap: 10px; margin-bottom: 14px; }
.report-detail-summary > div, .report-order-detail-grid > div { padding: 12px; border: 1px solid #dbe3ed; border-radius: 10px; background: #f8fafc; }
.report-detail-summary small, .report-order-detail-grid small, .report-order-notes small { display: block; margin-bottom: 5px; color: #64748b; font-weight: 700; }
.report-detail-summary strong, .report-order-detail-grid strong { color: #172033; }
.report-order-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.report-order-notes { margin-top: 14px; padding: 13px; border: 1px solid #dbe3ed; border-radius: 10px; background: #fff7ed; }
.report-order-notes p { margin: 0; white-space: pre-wrap; }
.price-email-config-summary { display: flex; align-items: center; gap: 10px; margin: 10px 0 14px; padding: 11px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid #dbe3ed; }

/* Flux mobil curse șoferi */
.trip-toolbar > div:first-child { display: grid; gap: 3px; }
.trip-toolbar > div:first-child small { color: var(--slate-500); }
.driver-trip-filters { display: grid; grid-template-columns: minmax(180px, 1fr) 170px; gap: 10px; align-items: end; }
.driver-trip-filters label { display: grid; gap: 5px; color: var(--slate-600); font-size: 12px; font-weight: 800; }
.driver-trip-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 66px; padding: 14px 16px; border: 1px solid #cbd5e1; border-left: 5px solid var(--orange); border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.06); color: var(--slate-900); text-align: left; cursor: pointer; }
.driver-trip-notice:hover { border-color: #fb923c; background: #fffaf5; }
.driver-trip-notice:focus-visible { outline: 3px solid rgba(249,115,22,.3); outline-offset: 2px; }
.driver-trip-notice span { font-size: 16px; font-weight: 900; }
.driver-trip-notice time { color: var(--slate-600); font-size: 14px; font-weight: 800; white-space: nowrap; }
.driver-trips-list { display: grid; gap: 14px; }
.driver-trip-card { overflow: hidden; border: 1px solid #cbd5e1; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(15,23,42,.07); }
.driver-trip-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.driver-trip-card > header small { color: #64748b; font-weight: 700; }
.driver-trip-card > header h2 { margin: 3px 0 0; font-size: 18px; }
.trip-change-warning { padding: 10px 16px; color: #9a3412; background: #fff7ed; border-bottom: 1px solid #fed7aa; font-weight: 800; }
.trip-route { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 14px; align-items: center; padding: 16px; }
.trip-route > div { display: grid; gap: 3px; }
.trip-route small, .trip-meta small { color: #64748b; font-weight: 700; }
.trip-route span { color: #475569; }
.trip-route b { color: var(--orange); font-size: 22px; }
.trip-products { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px; }
.trip-products > div { display: flex; gap: 10px; padding: 8px 10px; border-radius: 9px; background: #eff6ff; }
.trip-products > div span { color: #334155; font-weight: 700; }
.trip-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 0 16px 16px; }
.trip-meta > span { display: grid; gap: 3px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 9px; }
.driver-trip-card > footer { display: flex; gap: 8px; flex-wrap: wrap; padding: 13px 16px; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.trip-primary-btn { min-width: 210px; }
.driver-trip-card.trip-closed { opacity: .78; }
.driver-trip-detail-modal h3 { margin: 18px 0 10px; }

@media (max-width: 900px) {
  .reports-dashboard { border-radius: 14px; }
  .reports-dashboard-head { padding: 14px 12px 0; }
  .reports-dashboard-head h2 { font-size: 20px; }
  .reports-tabs { margin: 0 -12px; padding: 0 12px; }
  .reports-tabs a { min-width: 94px; padding: 9px 11px; font-size: 12px; }
  .reports-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports-kpis > div { min-height: 70px; padding: 10px; }
  .reports-kpis > div:last-child { grid-column: 1 / -1; }
  .reports-kpis strong { font-size: 16px; }
  .reports-bi-grid { grid-template-columns: minmax(0, 1fr); }
  .report-bi-card.report-wide { grid-column: auto; }
  .report-bar-row { grid-template-columns: 88px minmax(80px, 1fr); gap: 8px; }
  .report-bar-row > strong { grid-column: 2; margin-top: -7px; text-align: left; }
  .report-detail-modal { width: min(96vw, 760px); }
  .report-detail-summary { grid-template-columns: 1fr; }
  .report-order-detail-grid { grid-template-columns: 1fr; }
  .trip-toolbar { align-items: stretch; }
  .trip-toolbar .search-row { width: 100%; }
  .trip-toolbar .filter-input { width: 100%; }
  .driver-trip-filters { grid-template-columns: 1fr; width: 100%; }
  .driver-trip-notice { min-height: 62px; }
  .trip-route { grid-template-columns: 1fr; gap: 8px; }
  .trip-route b { transform: rotate(90deg); justify-self: center; }
  .trip-meta { grid-template-columns: 1fr; }
  .driver-trip-card > footer { display: grid; grid-template-columns: 1fr 1fr; }
  .driver-trip-card > footer .trip-primary-btn { grid-column: 1 / -1; width: 100%; min-height: 52px; font-size: 16px; }
}
@media (max-width: 680px) {
  .work-point-row, .contact-value-row { grid-template-columns: minmax(0, 1fr) 38px; }
}

.permission-section > label {
  display: block;
  margin-bottom: 8px;
  font-weight: 900;
}
.edit-permission-section {
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

/* v5.93.0 - tabel compact Prețuri zilnice pe mobil */
.fuel-prices-mobile { display: none; }
@media (max-width: 900px) {
  .fuel-prices-desktop { display: none; }
  .fuel-prices-mobile { display: block; }
  .fuel-mobile-date {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 4px 0 12px;
    padding: 10px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
  }
  .fuel-mobile-date span {
    padding: 4px 10px;
    border-radius: 6px;
    background: #f1f5f9;
    font-weight: 800;
  }
  .fuel-mobile-supplier {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid #b9c4d1;
    border-radius: 8px;
    background: #fff;
  }
  .fuel-mobile-supplier h3 {
    margin: 0;
    padding: 7px 10px;
    background: #dcefd3;
    color: #172033;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .02em;
  }
  .fuel-mobile-supplier-2 h3 { background: #f4dfcf; }
  .fuel-mobile-supplier-3 h3 { background: #d5e2fa; }
  .fuel-mobile-supplier-4 h3 { background: #eee0f7; }
  .fuel-mobile-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fuel-mobile-table-scroll table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 10px;
  }
  .fuel-mobile-table-scroll th,
  .fuel-mobile-table-scroll td {
    padding: 6px 4px;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    text-align: center;
    line-height: 1.15;
  }
  .fuel-mobile-table-scroll thead th {
    background: #f8fafc;
    font-weight: 900;
    overflow-wrap: anywhere;
  }
  .fuel-mobile-table-scroll thead th:first-child,
  .fuel-mobile-table-scroll tbody th {
    width: 112px;
  }
  .fuel-mobile-table-scroll tbody th {
    background: #f8fafc;
    text-align: left;
    font-weight: 700;
    overflow-wrap: anywhere;
  }
  .fuel-mobile-table-scroll tbody tr:nth-child(even) td { background: #f8fafc; }
  .fuel-mobile-table-scroll tr > *:last-child { border-right: 0; }
  .fuel-mobile-table-scroll tbody tr:last-child > * { border-bottom: 0; }
  .fuel-price-empty { color: #94a3b8; }
  .fuel-mobile-empty { padding: 18px; text-align: center; color: #64748b; }
}

/* v5.93.1 - Prețuri zilnice mobile în exact trei coloane */
@media (max-width: 900px) {
  .fuel-mobile-three-columns {
    overflow: hidden;
    border: 1px solid #aebac8;
    border-radius: 9px;
    background: #fff;
  }
  .fuel-mobile-three-columns h3 {
    margin: 0;
    padding: 8px 10px;
    background: #dcefd3;
    color: #172033;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
  }
  .fuel-mobile-three-columns table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 11px;
  }
  .fuel-mobile-three-columns th,
  .fuel-mobile-three-columns td {
    padding: 7px 5px;
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    text-align: center;
    line-height: 1.15;
  }
  .fuel-mobile-three-columns thead th {
    background: #fff200;
    color: #111827;
    font-weight: 900;
  }
  .fuel-mobile-three-columns thead th:first-child { width: 38%; }
  .fuel-mobile-three-columns thead th:nth-child(2),
  .fuel-mobile-three-columns thead th:nth-child(3) { width: 23%; }
  .fuel-mobile-three-columns thead th:nth-child(4) { width: 16%; }
  .fuel-mobile-three-columns tbody th {
    background: #f8fafc;
    text-align: left;
  }
  .fuel-mobile-three-columns tbody th strong,
  .fuel-mobile-three-columns tbody th span { display: block; }
  .fuel-mobile-three-columns tbody th strong { font-size: 10px; }
  .fuel-mobile-three-columns tbody th span { margin-top: 3px; color: #64748b; font-size: 9px; }
  .fuel-mobile-three-columns tbody tr:nth-child(even) td { background: #f8fafc; }
  .fuel-mobile-three-columns tr > *:last-child { border-right: 0; }
  .fuel-mobile-three-columns tbody tr:last-child > * { border-bottom: 0; }
  .fuel-mobile-value { font-weight: 800; font-variant-numeric: tabular-nums; }
  .fuel-mobile-actions { white-space: nowrap !important; text-align: center; }
  .fuel-mobile-action-btn {
    min-width: 30px;
    min-height: 34px;
    margin: 1px;
    padding: 3px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #fff;
    color: #ff6b21;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
  }
  .fuel-mobile-action-btn small { display: block; font-size: 8px; line-height: 1; }
  .fuel-mobile-action-btn:active { background: #fff3e8; transform: scale(.96); }
  .fuel-history-mobile { display: grid; gap: 16px; }
  .fuel-history-day .fuel-mobile-date { margin-top: 0; margin-bottom: 7px; }
  .fuel-history-mobile-table thead th:first-child { width: 54%; }
  .fuel-history-mobile-table thead th:nth-child(2),
  .fuel-history-mobile-table thead th:nth-child(3) { width: 23%; }
}
.info-box{margin:0 0 16px;background:#fff7ed;border:1px solid #fed7aa;color:#7c2d12;border-radius:14px;padding:12px 14px;font-size:13px}


.due-overdue {
  color: var(--red);
  font-weight: 900;
  white-space: nowrap;
}

.payment-detail-list { display: grid; gap: 8px; min-width: 260px; }
.payment-detail-row { display: grid; grid-template-columns: minmax(150px, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.payment-detail-row .muted { font-size: 12px; }


.fuel-calc-note { font-size: 12px; color: var(--slate-500); }
.client-card .box span strong { white-space: nowrap; }

.orders-compact-toolbar { align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.orders-compact-row { width: 100%; justify-content: flex-end; gap: 8px; }
.orders-compact-row .input { min-height: 32px; padding: 6px 9px; border-radius: 9px; font-size: 12px; }
.orders-compact-search { width: 230px !important; }
.orders-compact-field { width: 170px; }
.orders-compact-date { width: 135px; }
.orders-mobile-search-toggle { display: none; }
@media (max-width: 900px) {
  .orders-compact-toolbar { display: block; }
  .orders-mobile-search-toggle { display: inline-flex; width: 100%; justify-content: center; }
  .orders-compact-row { display: none; margin-top: 10px; }
  .orders-compact-row.open { display: grid; }
  .orders-compact-row { justify-content: stretch; }
  .orders-compact-search, .orders-compact-field, .orders-compact-date { width: 100% !important; }
}

.anaf-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:-6px 0 14px; }
.anaf-box { margin-bottom:10px; }
.error-box { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; border-radius: 12px; padding: 10px 12px; font-weight: 900; }

.client-detail-list { display: grid; gap: 14px; }
.client-detail-data-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.client-detail-card { border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px; background: #fff; box-shadow: var(--shadow); }
.client-detail-card h3 { margin: 0 0 12px; font-size: 15px; }
.client-detail-card h4 { margin: 0 0 10px; font-size: 13px; color: var(--slate-700); }
.client-detail-card .table-wrap { box-shadow: none; }

/* Mobile UX upgrade v5.11 */
.sidebar-backdrop { display: none; }
.mobile-bottom-nav { display: none; }

@media (max-width: 900px) {
  body { -webkit-text-size-adjust: 100%; background: #f6f7fb; }
  .shell { display: block; min-height: 100dvh; }
  .sidebar {
    display: block !important;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 330px);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .22s ease;
    z-index: 80;
    box-shadow: 24px 0 60px rgba(15, 23, 42, .20);
    border-right: 0;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    border: 0;
    background: rgba(15, 23, 42, .48);
  }
  .brand img { width: 220px; }
  .nav { margin-top: 18px; gap: 5px; }
  .nav button { min-height: 44px; padding: 11px 12px; }
  .sync-card { margin-top: 18px; }

  .main { min-height: 100dvh; padding-bottom: 118px; }
  .topbar {
    min-height: 62px;
    height: auto;
    padding: 10px 12px;
    gap: 8px;
  }
  .top-left { gap: 10px; min-width: 0; }
  .mobile-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    font-size: 21px;
  }
  .page-title {
    font-size: 18px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
  }
  .user-box { gap: 7px; }
  .avatar { width: 34px; height: 34px; font-size: 13px; }
  .user-box .user-meta { display: none; }
  #logoutBtn { min-height: 34px; padding: 6px 9px; }

  .content { padding: 12px 12px 132px; }
  .footer { display: none; }

  .mobile-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
  }
  .mobile-bottom-nav button {
    border: 0;
    background: transparent;
    color: var(--slate-500);
    border-radius: 14px;
    min-width: 0;
    min-height: 44px;
    display: grid;
    place-items: center;
    gap: 2px;
    font-weight: 800;
    padding: 5px 2px;
  }
  .mobile-bottom-nav button span { font-size: 17px; line-height: 1; }
  .mobile-bottom-nav button small {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9.5px;
  }
  .mobile-bottom-nav button.active {
    color: white;
    background: var(--orange);
    box-shadow: 0 8px 18px rgba(242, 101, 34, .25);
  }

  .toolbar,
  .orders-compact-toolbar {
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .search-row,
  .toolbar-buttons,
  .orders-compact-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    justify-content: stretch;
  }
  .toolbar > .btn,
  .toolbar > .toolbar-buttons,
  .toolbar-buttons .btn,
  .search-row .btn,
  .orders-compact-row .btn {
    width: 100%;
  }
  .filter-input,
  .search-row .input,
  .search-row .select,
  .orders-compact-search,
  .orders-compact-field,
  .orders-compact-date {
    width: 100% !important;
    min-width: 0;
  }
  .toolbar .filter-input,
  .orders-compact-search { grid-column: 1 / -1; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { min-height: 104px; padding: 14px; border-radius: 16px; }
  .kpi .label { font-size: 12px; }
  .kpi .value { margin-top: 12px; font-size: 21px; }
  .panel { padding: 13px; border-radius: 16px; }
  .panel h2 { font-size: 14px; margin-bottom: 12px; }
  .grid, .grid.two, .grid.three, .winmentor-grid { gap: 12px; grid-template-columns: 1fr; }
  .info-box, .readonly-banner, .error-box { border-radius: 13px; padding: 10px 12px; }

  .client-cards { grid-template-columns: 1fr; gap: 12px; }
  .client-card { border-radius: 16px; padding: 14px; }
  .client-card h3 { font-size: 16px; }
  .client-card .box { grid-template-columns: 1fr 1fr; gap: 8px; }
  .client-card .btn { flex: 1 1 auto; }

  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .table-wrap table {
    min-width: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    font-size: 13px;
  }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr {
    display: block;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: white;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
  }
  .table-wrap tbody tr:hover td { background: white; }
  .table-wrap td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding: 10px 12px;
    text-align: right;
    line-height: 1.35;
    min-width: 0;
  }
  .table-wrap td:first-child { border-top: 0; }
  .table-wrap td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    color: var(--slate-500);
    font-weight: 900;
    text-align: left;
  }
  .table-wrap td > * { max-width: 58%; }
  .table-wrap td:last-child {
    justify-content: flex-start;
    text-align: left;
    flex-wrap: wrap;
  }
  .table-wrap td:last-child::before { flex-basis: 100%; }
  .table-wrap td:last-child .btn {
    max-width: none;
    flex: 1 1 118px;
    margin: 2px 0;
  }
  .payment-detail-list,
  .payment-detail-row { min-width: 0; width: 100%; max-width: 100%; }
  .payment-detail-row { grid-template-columns: 1fr; }

  .btn { min-height: 44px; padding: 10px 12px; border-radius: 12px; }
  .btn.small { min-height: 38px; padding: 7px 10px; font-size: 12px; }
  .input, .select, .textarea { min-height: 44px; font-size: 16px; }

  .modal-backdrop {
    place-items: end center;
    padding: 0;
  }
  .modal {
    width: 100%;
    max-height: 94dvh;
    border-radius: 22px 22px 0 0;
  }
  .modal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: white;
    padding: 14px 16px;
  }
  .modal-head h2 { font-size: 16px; }
  .modal-body { padding: 14px; }
  .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: white;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .modal-actions .btn { width: 100%; }
  .form-cols { grid-template-columns: 1fr; gap: 11px; }
  .field label { font-size: 12px; }

  .donut-box { justify-content: center; text-align: center; }
  .donut { width: 150px; height: 150px; }
  .donut-inner { width: 92px; height: 92px; }
  .alert { display: grid; }
}

@media (max-width: 420px) {
  .mobile-bottom-nav {
    left: 6px;
    right: 6px;
    bottom: 6px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .main { padding-bottom: 124px; }
  .content { padding-bottom: 138px; }
  .cards { grid-template-columns: 1fr; }
  .search-row,
  .toolbar-buttons,
  .orders-compact-row { grid-template-columns: 1fr; }
  .client-card .box { grid-template-columns: 1fr; }
  .table-wrap td {
    display: grid;
    grid-template-columns: 1fr;
    text-align: left;
  }
  .table-wrap td::before { flex-basis: auto; }
  .table-wrap td > * { max-width: 100%; }
  .page-title { max-width: 42vw; }
}

/* Mobile table refinement v5.12: keep data in compact tables, not cards */
@media (max-width: 900px) {
  .table-wrap {
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06) !important;
  }
  .table-wrap table {
    display: table !important;
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: collapse !important;
    border-spacing: 0 !important;
    font-size: 11.5px !important;
    line-height: 1.2 !important;
  }
  .table-wrap thead {
    display: table-header-group !important;
  }
  .table-wrap tbody {
    display: table-row-group !important;
  }
  .table-wrap tr,
  .table-wrap tbody tr {
    display: table-row !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }
  .table-wrap th,
  .table-wrap td {
    display: table-cell !important;
    vertical-align: middle !important;
    padding: 6px 7px !important;
    border-top: 1px solid #edf2f7 !important;
    text-align: left !important;
    white-space: nowrap !important;
    min-width: 72px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .table-wrap th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc !important;
    color: var(--slate-700);
    font-size: 10.5px !important;
    text-transform: uppercase;
    letter-spacing: .02em;
    border-top: 0 !important;
  }
  .table-wrap td::before {
    display: none !important;
    content: none !important;
  }
  .table-wrap td > * {
    max-width: none !important;
  }
  .table-wrap td:first-child,
  .table-wrap th:first-child {
    min-width: 80px;
  }
  .table-wrap td:last-child,
  .table-wrap th:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    min-width: 126px;
    max-width: 170px;
    white-space: normal !important;
    overflow: visible !important;
    background: #fff !important;
    box-shadow: -8px 0 16px rgba(15, 23, 42, .06);
  }
  .table-wrap th:last-child {
    z-index: 4;
    background: #f8fafc !important;
  }
  .table-wrap td:last-child .btn,
  .table-wrap td .btn.small {
    min-height: 34px !important;
    padding: 6px 8px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    margin: 2px 1px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
  }
  .table-wrap .pill,
  .table-wrap .money,
  .table-wrap .muted {
    font-size: 11px !important;
    white-space: nowrap !important;
  }
  .client-detail-card .table-wrap,
  .panel .table-wrap {
    margin-left: -2px;
    margin-right: -2px;
  }
  .payment-detail-list {
    min-width: 260px;
  }
  .payment-detail-row {
    display: grid !important;
    grid-template-columns: minmax(130px, 1fr) auto auto !important;
    gap: 6px !important;
    padding: 6px !important;
  }
}

@media (max-width: 420px) {
  .table-wrap table { font-size: 10.8px !important; }
  .table-wrap th,
  .table-wrap td {
    padding: 5px 6px !important;
    min-width: 66px;
    max-width: 132px;
  }
  .table-wrap td:last-child,
  .table-wrap th:last-child {
    min-width: 112px;
    max-width: 145px;
  }
  .table-wrap td:last-child .btn,
  .table-wrap td .btn.small {
    min-height: 32px !important;
    padding: 5px 6px !important;
    font-size: 10.5px !important;
  }
}

/* v5.13 - randuri tabel diferentiate prin nuante de gri */
.table-wrap tbody tr:nth-child(6n+1) td { background: #ffffff; }
.table-wrap tbody tr:nth-child(6n+2) td { background: #f8fafc; }
.table-wrap tbody tr:nth-child(6n+3) td { background: #f3f6fa; }
.table-wrap tbody tr:nth-child(6n+4) td { background: #eef2f7; }
.table-wrap tbody tr:nth-child(6n+5) td { background: #f6f7f9; }
.table-wrap tbody tr:nth-child(6n+6) td { background: #edf2f7; }
.table-wrap tbody tr:hover td { background: #fff7ed; }

@media (max-width: 900px) {
  .table-wrap tbody tr:nth-child(6n+1) td,
  .table-wrap tbody tr:nth-child(6n+1) td:last-child { background: #ffffff !important; }
  .table-wrap tbody tr:nth-child(6n+2) td,
  .table-wrap tbody tr:nth-child(6n+2) td:last-child { background: #f8fafc !important; }
  .table-wrap tbody tr:nth-child(6n+3) td,
  .table-wrap tbody tr:nth-child(6n+3) td:last-child { background: #f3f6fa !important; }
  .table-wrap tbody tr:nth-child(6n+4) td,
  .table-wrap tbody tr:nth-child(6n+4) td:last-child { background: #eef2f7 !important; }
  .table-wrap tbody tr:nth-child(6n+5) td,
  .table-wrap tbody tr:nth-child(6n+5) td:last-child { background: #f6f7f9 !important; }
  .table-wrap tbody tr:nth-child(6n+6) td,
  .table-wrap tbody tr:nth-child(6n+6) td:last-child { background: #edf2f7 !important; }
  .table-wrap tbody tr:hover td,
  .table-wrap tbody tr:hover td:last-child { background: #fff7ed !important; }
}


/* v5.16: Prețuri zilnice delimitate și butoane mobile compacte pentru acțiuni principale */
.daily-prices-section .table-wrap {
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
}
.daily-prices-section .table-wrap th,
.daily-prices-section .table-wrap td {
  border-right: 1px solid #dbe3ec;
  border-bottom: 1px solid #e2e8f0;
}
.daily-prices-section .table-wrap th:last-child,
.daily-prices-section .table-wrap td:last-child { border-right: 0; }
.daily-prices-section .table-wrap tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
  .daily-prices-section .table-wrap {
    border: 2px solid #94a3b8 !important;
    border-radius: 12px !important;
  }
  .daily-prices-section .table-wrap th,
  .daily-prices-section .table-wrap td {
    border-right: 1px solid #cbd5e1 !important;
    border-bottom: 1px solid #dbe3ec !important;
  }
  .toolbar > .btn.primary[data-action^="new-"],
  .panel-head .btn.primary[data-action^="new-"],
  .client-card .btn[data-action="edit-client"],
  .client-card .btn[data-action="delete-client"],
  .client-card .btn[data-action="edit-client-macheta"],
  .table-wrap td .btn[data-action^="edit-"],
  .table-wrap td .btn[data-action^="delete-"],
  .table-wrap td .btn[data-action="proforma-to-invoice"],
  .table-wrap td .btn[data-action="create-proforma-from-order"],
  .table-wrap td .btn[data-action="new-proforma-from-order"] {
    min-height: 32px !important;
    padding: 5px 8px !important;
    border-radius: 8px !important;
    font-size: 10.5px !important;
    line-height: 1.1 !important;
    width: auto !important;
    flex: 0 0 auto !important;
  }
  .toolbar > .btn.primary[data-action^="new-"] {
    justify-self: start;
    min-width: 112px;
  }
}

/* v5.19 - meniu mobil cu 4 scurtături + buton Mai mult */
@media (max-width: 900px) {
  .sidebar {
    display: none !important;
  }
  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .top-left {
    gap: 0;
  }
  .mobile-menu {
    display: none !important;
  }
  .page-title {
    max-width: 58vw;
  }
  .mobile-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 7px 6px;
  }
  .mobile-bottom-nav button {
    min-height: 48px;
    padding: 5px 1px;
  }
  .mobile-bottom-nav button span {
    font-size: 18px;
    font-weight: 900;
  }
  .mobile-bottom-nav button small {
    font-size: 9px;
  }
  .mobile-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 78;
    border: 0;
    background: rgba(15, 23, 42, .42);
  }
  .mobile-more-sheet {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 88px;
    z-index: 79;
    border-radius: 24px;
    padding: 12px 12px 14px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid #e2e8f0;
    box-shadow: 0 25px 60px rgba(15, 23, 42, .22);
    backdrop-filter: blur(12px);
  }
  .mobile-more-handle {
    width: 54px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 2px auto 12px;
  }
  .mobile-more-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .mobile-more-item {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 16px;
    min-height: 86px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--slate-800);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  }
  .mobile-more-item span {
    font-size: 24px;
    line-height: 1;
  }
  .mobile-more-item strong {
    font-size: 13px;
    line-height: 1.15;
  }
  .mobile-more-item.active {
    background: #fff7ed;
    border-color: #fdba74;
    color: var(--orange-dark);
  }
  .mobile-more-close {
    width: 100%;
    margin-top: 14px;
    min-height: 44px;
    border-radius: 14px;
    font-weight: 800;
  }
}

@media (max-width: 420px) {
  .mobile-more-sheet {
    left: 8px;
    right: 8px;
    bottom: 80px;
    padding: 10px 10px 12px;
  }
  .mobile-more-grid {
    gap: 8px;
  }
  .mobile-more-item {
    min-height: 80px;
    border-radius: 14px;
    padding: 9px 6px;
  }
  .mobile-more-item strong {
    font-size: 12px;
  }
  .mobile-bottom-nav button small {
    font-size: 8.6px;
  }
}

/* v5.20 - aplicația permite capturi de ecran și are mod dedicat pentru screenshot */
html, body, #app, .shell, .main, .content {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.screenshot-btn {
  white-space: nowrap;
}

.screenshot-mode .topbar,
.screenshot-mode .mobile-more-sheet,
.screenshot-mode .mobile-more-backdrop,
.screenshot-mode .sidebar-backdrop,
.screenshot-mode .toast {
  display: none !important;
}

.screenshot-mode .main,
.screenshot-mode .content {
  padding-bottom: 12px !important;
}

@media (max-width: 900px) {
  .screenshot-btn {
    min-height: 34px;
    padding: 6px 9px;
  }
  .screenshot-mode .content {
    padding-top: 12px !important;
  }
}

@media print {
  .topbar,
  .mobile-bottom-nav,
  .mobile-more-sheet,
  .mobile-more-backdrop,
  .sidebar,
  .sidebar-backdrop,
  .toast {
    display: none !important;
  }
  .main,
  .content {
    padding: 0 !important;
  }
}

/* v5.21 - Clienți modern pe mobil: listă doar cu numele + detalii la click */
.client-mobile-list {
  display: none;
}

@media (max-width: 900px) {
  .client-desktop-cards {
    display: none !important;
  }
  .client-mobile-list {
    display: grid;
    gap: 10px;
  }
  .client-mobile-row {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, .95);
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 18px;
    min-height: 58px;
    padding: 14px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--slate-900);
    text-align: left;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  }
  .client-mobile-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15.5px;
    font-weight: 900;
    letter-spacing: -.01em;
  }
  .client-mobile-row i {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #fff7ed;
    color: var(--orange-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    flex: 0 0 auto;
  }
  .client-mobile-row:active {
    transform: scale(.985);
    background: #fff7ed;
  }
  .client-detail-modal {
    max-height: 96dvh;
    border-radius: 24px 24px 0 0;
  }
  .client-detail-modal .modal-head {
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
  }
  .client-detail-modal .modal-head h2 {
    font-size: 17px;
    line-height: 1.2;
  }
  .client-detail-modal .modal-body {
    background: #f6f7fb;
  }
  .client-detail-modal .panel {
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
  }
  .client-detail-modal .panel h2 {
    font-size: 15px;
    color: var(--slate-900);
  }
}

/* v5.22 - Design modern minimalist pentru desktop si mobil */
:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-soft: #fff7ed;
  --accent-blue: #60a5fa;
  --accent-mint: #34d399;
  --accent-violet: #a78bfa;
  --surface: rgba(255, 255, 255, .92);
  --surface-solid: #ffffff;
  --page-bg: #f5f7fb;
  --line-soft: #e5e7eb;
  --line-strong: #cbd5e1;
  --text-main: #172033;
  --text-muted: #64748b;
  --shadow: 0 14px 42px rgba(15, 23, 42, .07);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, .055);
  --radius: 20px;
}

html { scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 18% 8%, rgba(249, 115, 22, .10), transparent 28%),
    radial-gradient(circle at 84% 2%, rgba(96, 165, 250, .11), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, var(--page-bg) 100%);
}

button, .btn, .nav button, .mobile-bottom-nav button, .mobile-more-item,
.client-card, .panel, .kpi, .table-wrap, .modal, .input, .select, .textarea {
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease;
}

.shell { background: transparent; }
.sidebar {
  background: rgba(255, 255, 255, .90);
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(203, 213, 225, .72);
  padding: 20px 16px;
}
.brand img {
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
}
.nav { gap: 6px; }
.nav button {
  color: #475569;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14px;
}
.nav button:hover:not(.active) {
  background: #f8fafc;
  border-color: #e2e8f0;
  transform: translateX(2px);
}
.nav button.active {
  background: linear-gradient(135deg, var(--orange), #fb923c);
  color: #fff;
  box-shadow: 0 14px 30px rgba(249, 115, 22, .24);
}

.topbar {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(203, 213, 225, .70);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .035);
}
.page-title {
  letter-spacing: -.025em;
  font-weight: 850;
}
.avatar {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  color: #334155;
  border: 1px solid rgba(203, 213, 225, .75);
}
.user-box { color: var(--text-main); }

.content { padding: 26px; }
.panel, .kpi, .client-card, .sync-card, .client-detail-card {
  background: var(--surface);
  border: 1px solid rgba(203, 213, 225, .68);
  box-shadow: var(--shadow-soft);
}
.panel:hover, .kpi:hover, .client-card:hover, .client-detail-card:hover {
  box-shadow: var(--shadow);
}
.panel h2 {
  color: #334155;
  font-size: 14px;
  letter-spacing: .055em;
}
.kpi .value {
  color: #0f172a;
}
.kpi .label, .muted, .footer, .sync-card p, .client-card p {
  color: var(--text-muted);
}
.info-box {
  background: linear-gradient(135deg, #fff7ed, #f8fafc);
  border-color: #fed7aa;
  color: #7c2d12;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.readonly-banner {
  background: #fff7ed;
  border-color: #fed7aa;
}
.error-box {
  background: #fef2f2;
}

.input, .select, .textarea {
  background: rgba(255, 255, 255, .94);
  border: 1px solid #dbe3ec;
  border-radius: 14px;
  color: var(--text-main);
}
.input:hover, .select:hover, .textarea:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .035);
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .13);
}

.btn {
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .075);
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, .11);
}
.btn:active {
  transform: translateY(0) scale(.985);
}
.btn.primary {
  background: linear-gradient(135deg, var(--orange), #fb923c);
  color: #fff;
}
.btn.primary:hover { background: linear-gradient(135deg, var(--orange-dark), var(--orange)); }
.btn.secondary {
  background: #ffffff;
  border-color: #dbe3ec;
  color: #334155;
}
.btn.secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.btn.small { border-radius: 10px; }

.table-wrap {
  border-color: rgba(203, 213, 225, .82);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
table { color: var(--text-main); }
th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  letter-spacing: .025em;
  font-weight: 850;
}
td { border-top-color: #edf2f7; }
tr:hover td { background: #fff7ed !important; }
.pill { border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }

.modal-backdrop { background: rgba(15, 23, 42, .46); backdrop-filter: blur(3px); }
.modal {
  border: 1px solid rgba(255,255,255,.68);
  box-shadow: 0 34px 90px rgba(15, 23, 42, .27);
}
.modal-head, .modal-actions {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
}
.toast {
  border-radius: 16px;
  background: rgba(15, 23, 42, .92);
  backdrop-filter: blur(10px);
}

.client-card {
  border-radius: 22px;
}
.client-card h3 {
  letter-spacing: -.015em;
  font-weight: 850;
}
.client-card .box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.mobile-client-list {
  gap: 10px;
}
.mobile-client-item {
  background: linear-gradient(135deg, #ffffff, #f8fafc);
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .055);
}
.mobile-client-item:active {
  transform: scale(.985);
}
.mobile-client-arrow {
  background: #fff7ed;
  color: var(--orange-dark);
}

@media (max-width: 900px) {
  body {
    background:
      radial-gradient(circle at 12% 1%, rgba(249, 115, 22, .12), transparent 28%),
      linear-gradient(180deg, #f8fafc 0%, #f3f6fb 100%);
  }
  .content { padding: 14px 12px 136px; }
  .topbar {
    min-height: 60px;
    border-radius: 0 0 18px 18px;
  }
  .page-title { font-size: 19px; max-width: 56vw; }
  .panel, .kpi, .client-card, .client-detail-card {
    border-radius: 18px;
  }
  .toolbar, .orders-compact-toolbar { gap: 9px; }
  .mobile-bottom-nav {
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 20px 48px rgba(15, 23, 42, .18);
  }
  .mobile-bottom-nav button {
    border-radius: 17px;
  }
  .mobile-bottom-nav button:hover:not(.active) {
    background: #f8fafc;
  }
  .mobile-bottom-nav button.active {
    background: linear-gradient(135deg, var(--orange), #fb923c);
  }
  .mobile-more-sheet {
    border-radius: 28px;
    background: rgba(255, 255, 255, .97);
  }
  .mobile-more-item {
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border-color: #e2e8f0;
  }
  .mobile-more-item:hover, .mobile-more-item.active {
    border-color: #fdba74;
    background: #fff7ed;
    transform: translateY(-1px);
  }
  .table-wrap {
    border-radius: 16px !important;
  }
  .table-wrap th {
    background: #f8fafc !important;
  }
  .table-wrap td:last-child .btn,
  .table-wrap td .btn.small {
    border-radius: 10px !important;
  }
  .modal {
    border-radius: 26px 26px 0 0;
  }
}

@media (min-width: 901px) {
  .sidebar::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .modal::-webkit-scrollbar { height: 9px; width: 9px; }
  .sidebar::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .modal::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
  .sidebar::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .modal::-webkit-scrollbar-track { background: transparent; }
}


/* v5.23 - ANAF direct in factura proforma */
.proforma-anaf-card {
  border: 1px solid #dbe3ec;
  background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 100%);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.proforma-anaf-card strong { color: var(--slate-900); }
.proforma-anaf-card .muted { margin-top: 4px; }
.proforma-anaf-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}
.proforma-anaf-fields {
  margin-top: 12px;
}
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  font-size: 13px;
  color: var(--slate-700);
  font-weight: 700;
}
.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
  margin-top: 1px;
}
@media (max-width: 760px) {
  .proforma-anaf-card {
    border-radius: 16px;
    padding: 12px;
  }
  .proforma-anaf-actions {
    grid-template-columns: 1fr;
  }
  .proforma-anaf-actions .btn {
    width: 100%;
  }
}


/* v5.24 - Clienți ca butoane moderne pe prima pagină */
.client-directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.client-directory-item {
  border: 1px solid rgba(203, 213, 225, .75);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, .12), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  border-radius: 22px;
  min-height: 78px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  color: var(--text-main, #172033);
  text-align: left;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .065);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.client-directory-item:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, .35);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .095);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, .18), transparent 38%),
    linear-gradient(135deg, #ffffff, #f8fafc);
}

.client-directory-item:active {
  transform: translateY(0) scale(.992);
}

.client-directory-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--orange-dark, #ea580c);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.client-directory-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
  font-size: 15.5px;
  letter-spacing: -.01em;
}

.client-directory-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client-directory-agent {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--slate-500, #64748b);
  font-size: 12px;
  font-weight: 700;
}

.client-assignment-panel {
  border-color: rgba(249, 115, 22, .35) !important;
  background: linear-gradient(135deg, #fffaf5, #ffffff) !important;
}

.client-assignment-panel .panel-head {
  margin-bottom: 10px;
}

.client-assignment-panel .panel-head p {
  margin: 4px 0 0;
}

.client-assignment-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.client-assignment-controls .field {
  margin: 0;
}

@media (max-width: 760px) {
  .client-assignment-controls {
    grid-template-columns: 1fr;
  }
}

.client-directory-arrow {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 247, 237, .95);
  color: var(--orange-dark, #ea580c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  line-height: 1;
  font-weight: 700;
}

.client-detail-head-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .client-mobile-list,
  .client-desktop-cards {
    display: none !important;
  }
  .client-directory {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .client-directory-item {
    min-height: 62px;
    border-radius: 18px;
    padding: 12px 13px;
    grid-template-columns: 40px minmax(0, 1fr) 30px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .065);
  }
  .client-directory-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 12.5px;
  }
  .client-directory-name {
    font-size: 15.5px;
  }
  .client-directory-arrow {
    width: 30px;
    height: 30px;
    font-size: 24px;
  }
  .client-detail-head-actions {
    gap: 6px;
  }
  .client-detail-head-actions .btn {
    min-height: 32px !important;
    padding: 5px 8px !important;
    font-size: 10.5px !important;
  }
}

@media (max-width: 420px) {
  .client-directory-item {
    min-height: 58px;
    padding: 11px 12px;
  }
}

/* v5.26 - filtru clienti dupa prima litera */
.client-letter-filter {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, .75);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(248,250,252,.92));
  box-shadow: 0 10px 28px rgba(15, 23, 42, .055);
}
.client-letter-title {
  margin-bottom: 10px;
  color: var(--slate-700, #334155);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .01em;
}
.client-letter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.client-letter-btn {
  min-width: 38px;
  min-height: 36px;
  border: 1px solid rgba(203, 213, 225, .95);
  border-radius: 12px;
  background: #fff;
  color: var(--slate-700, #334155);
  font-weight: 900;
  font-size: 12px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.client-letter-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 22, .42);
  background: #fff7ed;
  color: var(--orange-dark, #ea580c);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.client-letter-btn.active {
  border-color: var(--orange, #f97316);
  background: linear-gradient(135deg, #fb923c, #f97316);
  color: #fff;
  box-shadow: 0 10px 22px rgba(249, 115, 22, .24);
}
.client-letter-btn.is-empty:not(.active) {
  color: #94a3b8;
  background: #f8fafc;
}
@media (max-width: 900px) {
  .client-letter-filter {
    padding: 12px;
    border-radius: 18px;
    margin-bottom: 12px;
  }
  .client-letter-buttons {
    gap: 6px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .client-letter-btn {
    min-width: 0;
    min-height: 34px;
    border-radius: 10px;
    font-size: 11px;
    padding: 0 4px;
  }
}
@media (max-width: 420px) {
  .client-letter-buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* v5.27 - filtrul pe litere ramane static la derularea clientilor */
.client-letter-filter {
  position: sticky;
  top: 86px;
  z-index: 18;
  backdrop-filter: blur(14px);
}

@media (max-width: 900px) {
  .client-letter-filter {
    top: 66px;
    z-index: 20;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
  }
  .mobile-bottom-nav {
    display: grid !important;
    position: fixed !important;
    z-index: 90;
    visibility: visible !important;
    opacity: 1 !important;
  }
}


/* Alascom CRM 5.37.0 - action icons */
.icon-btn { min-width: 36px; padding-left: 10px; padding-right: 10px; font-size: 16px; line-height: 1; }
.trash-btn { color: #fff !important; background: #dc2626 !important; border-color: #dc2626 !important; }
.trash-btn:hover { background: #b91c1c !important; border-color: #b91c1c !important; }


/* Alascom CRM 5.38.0 - iconite de actiune uniforme */
.icon-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 17px;
  line-height: 1;
  vertical-align: middle;
}
.icon-btn:hover { transform: translateY(-1px); }
.trash-btn {
  color: #fff !important;
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}
.trash-btn:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}
.footer { gap: 12px; }


/* v5.38.1 - bara de derulare orizontala vizibila deasupra tabelelor */
.table-scroll-group { min-width: 0; }
.table-scroll-top {
  position: sticky;
  top: 74px;
  z-index: 9;
  background: #ffffff;
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  margin: 0 3px 6px;
  padding-top: 2px;
  scrollbar-gutter: stable;
}
.table-scroll-top > div { height: 1px; }
.table-scroll-top::-webkit-scrollbar { height: 12px; }
.table-scroll-top::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; border: 2px solid #f8fafc; }
.table-scroll-top::-webkit-scrollbar-track { background: #e2e8f0; border-radius: 10px; }
@media (max-width: 760px) { .table-scroll-top { display: none !important; } }


/* Selector client cu căutare - Comandă nouă */
.client-search-field { position: relative; z-index: 8; }
.client-search-control { position: relative; }
.client-search-input { padding-right: 42px; }
.client-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border: 0; border-radius: 9px; background: #eef2f7; color: #475569; font-size: 22px; line-height: 1; cursor: pointer; }
.client-search-clear:hover { background: #e2e8f0; color: #0f172a; }
.client-search-results { position: absolute; z-index: 120; top: calc(100% - 20px); left: 0; right: 0; max-height: 280px; overflow-y: auto; padding: 6px; background: #fff; border: 1px solid #dbe3ec; border-radius: 12px; box-shadow: 0 18px 45px rgba(15, 23, 42, .18); }
.client-search-option { display: flex; flex-direction: column; width: 100%; gap: 3px; padding: 10px 11px; border: 0; border-radius: 9px; background: transparent; color: #0f172a; text-align: left; cursor: pointer; }
.client-search-option:hover, .client-search-option.active { background: #fff3eb; }
.client-search-option strong { font-size: 14px; }
.client-search-option span { color: #64748b; font-size: 12px; }
.client-search-empty { padding: 13px; color: #64748b; font-size: 13px; }
.client-search-selected { margin-top: 6px; font-size: 12px; min-height: 18px; }
@media (max-width: 680px) {
  .client-search-results { position: absolute; left: 0; right: 0; top: 74px; max-height: 38vh; }
  .client-search-option { padding: 13px 12px; }
}

/* V5.39.4 - căutare rapidă client în Comandă nouă */
.client-picker-field { position: relative; }
.client-picker-field .client-select-label { margin-top: 10px; }
.client-filter-input { width: 100%; }
.client-filter-select { width: 100%; margin-top: 4px; }
.client-filter-info { margin-top: 6px; min-height: 18px; font-size: 12px; }
@media (max-width: 720px) {
  .client-picker-field { grid-column: 1 / -1; }
}

/* V5.39.5 - selector client cu rezultate dropdown */
.client-search-wrap { position: relative; z-index: 2; }
.client-filter-input { position: relative; z-index: 2; background: #fff; color: #0f172a; }
.client-picker-field .client-search-results { top: 74px; }
.client-picker-field .client-filter-select { display: none; }
.client-search-toggle { display: none; }
.client-search-panel { position: relative; z-index: 20; }
.client-search-panel[hidden] { display: none; }
.client-picker-field .client-search-panel .client-search-results { top: calc(100% + 6px); }
.client-search-selected { padding: 10px 12px; border: 1px solid #dbe4ef; border-radius: 11px; background: #f8fafc; font-size: 13px; }
.client-search-selected[hidden] { display: none; }
.info-box { display: none !important; }
.client-search-option span:empty { display: none; }
@media (max-width: 680px) {
  .client-picker-field .client-search-panel .client-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: 38vh; }
}

/* v5.90.2 - căutare comenzi închisă implicit și acțiuni compacte pe mobil */
@media (max-width: 900px) {
  .orders-compact-toolbar [data-orders-search-panel] { display: none !important; }
  .orders-compact-toolbar [data-orders-search-panel].open { display: grid !important; }
  .order-modal .modal-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 7px 8px;
  }
  .order-modal .modal-actions .btn {
    width: auto;
    min-height: 27px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 9px;
    line-height: 1.15;
    white-space: normal;
  }
}

/* v5.93.3 - toate cele trei coloane de preț rămân vizibile pe mobil */
@media (max-width: 900px) {
  .fuel-prices-mobile,
  .fuel-mobile-three-columns {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .fuel-mobile-three-columns table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
  }
  .fuel-mobile-three-columns thead { display: table-header-group !important; }
  .fuel-mobile-three-columns tbody { display: table-row-group !important; }
  .fuel-mobile-three-columns tr { display: table-row !important; }
  .fuel-mobile-three-columns th,
  .fuel-mobile-three-columns td {
    display: table-cell !important;
    position: static !important;
    min-width: 0 !important;
    max-width: none !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    padding: 7px 3px !important;
  }
  .fuel-mobile-three-columns thead th:first-child,
  .fuel-mobile-three-columns tbody th {
    width: 38% !important;
  }
  .fuel-mobile-three-columns thead th:nth-child(2),
  .fuel-mobile-three-columns thead th:nth-child(3),
  .fuel-mobile-three-columns tbody td:nth-child(2),
  .fuel-mobile-three-columns tbody td:nth-child(3) {
    width: 23% !important;
  }
  .fuel-mobile-three-columns thead th:nth-child(4),
  .fuel-mobile-three-columns tbody td:nth-child(4) { width: 16% !important; }
  .fuel-mobile-three-columns thead th {
    font-size: 9px !important;
    line-height: 1.1 !important;
  }
  .fuel-mobile-three-columns .fuel-mobile-value {
    font-size: 10px !important;
    text-align: center !important;
  }
}

/* v5.93.4 - filtrare mobilă după furnizor */
.fuel-mobile-supplier-filter { display: none; }
@media (max-width: 900px) {
  .fuel-price-toolbar .fuel-price-desktop-search { display: none !important; }
  .fuel-mobile-supplier-filter {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border: 1px solid #dbe3ec;
    border-radius: 12px;
    background: #fff;
  }
  .fuel-mobile-supplier-filter label {
    margin: 0;
    color: #334155;
    font-weight: 800;
  }
  .fuel-mobile-supplier-filter select {
    width: 100%;
    min-width: 0;
  }
}

/* Numele clientului ocupă cel mult două rânduri în lista comenzilor. */
.orders-client-table .table-wrap th:nth-child(2),
.orders-client-table .table-wrap td:nth-child(2) {
  width: 170px;
  min-width: 170px;
  max-width: 170px;
  white-space: normal;
}
.order-client-name {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.3;
  max-height: 2.6em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* v5.93.6 - lista comenzilor începe cu Client pe mobil */
@media (max-width: 900px) {
  .orders-client-table .table-wrap th:first-child,
  .orders-client-table .table-wrap td:first-child {
    display: none !important;
  }
  .orders-client-table .table-wrap th:nth-child(2),
  .orders-client-table .table-wrap td:nth-child(2) {
    min-width: 145px !important;
  }
}
.driver-dropdown { margin-top: 8px; }

.client-directory-item { display:flex; align-items:center; gap:10px; }
.client-directory-view { flex:1; min-width:0; align-self:stretch; display:flex; align-items:center; gap:12px; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; }
.client-risk-button { flex:0 0 76px; min-height:52px; padding:7px 8px; border:0; border-radius:13px; color:#fff; cursor:pointer; box-shadow:0 5px 14px rgba(15,23,42,.12); }
.client-risk-button span,.client-risk-button strong { display:block; }
.client-risk-button span { font-size:11px; font-weight:800; }
.client-risk-button strong { margin-top:2px; font-size:17px; }
.risk-green { background:#16a34a !important; color:#fff !important; }
.risk-yellow { background:#eab308 !important; color:#1f2937 !important; }
.risk-red { background:#dc2626 !important; color:#fff !important; }
.risk-modal { width:min(1180px,96vw); }
.risk-detail-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; overflow:hidden; margin-bottom:14px; border-radius:16px; }
.risk-detail-summary > div { padding:18px; background:rgba(255,255,255,.14); }
.risk-detail-summary span,.risk-detail-summary strong { display:block; }
.risk-detail-summary span { margin-bottom:5px; font-size:12px; font-weight:700; opacity:.9; }
.risk-detail-summary strong { font-size:20px; overflow-wrap:anywhere; }
.risk-note,.risk-method { margin:14px 0; padding:14px 16px; border:1px solid var(--line); border-radius:13px; background:#f8fafc; }
.risk-method h3 { margin:0 0 8px; }
.risk-method p { margin:7px 0; line-height:1.5; }
.risk-impact { font-weight:800; }
.risk-impact.negative { color:#dc2626; }
.risk-impact.positive { color:#15803d; }
.risk-dot { display:inline-block; width:11px; height:11px; margin-right:4px; border-radius:50%; vertical-align:-1px; }
.history-price-filters { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin-bottom:16px; padding:12px; border:1px solid var(--line); border-radius:14px; background:#f8fafc; }
.history-price-filters > select { min-width:210px; }
.history-price-filters label { display:grid; gap:5px; color:var(--muted); font-size:12px; font-weight:700; }
.report-head-actions,.report-search,.report-period { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.report-search .input { width:170px; min-height:34px; padding:6px 9px; font-size:12px; }
.report-period label { display:flex; align-items:center; gap:4px; color:var(--muted); font-size:11px; font-weight:700; }
.report-period .input { width:135px; min-height:34px; padding:5px 7px; font-size:11px; }
@media (max-width:720px) {
  .client-directory-item { gap:6px; }
  .client-risk-button { flex-basis:64px; min-height:48px; }
  .risk-detail-summary { grid-template-columns:1fr; }
  .risk-detail-summary > div { padding:13px; }
  .risk-modal { width:100%; }
  .history-price-filters > select,.history-price-filters label,.history-price-filters label .input { width:100%; }
  .history-price-filters .btn { flex:1; }
  .report-bi-head { align-items:flex-start; flex-direction:column; }
  .report-head-actions,.report-search,.report-period { width:100%; }
  .report-search .input { flex:1; width:auto; }
  .report-period label { flex:1 1 130px; display:grid; }
  .report-period .input { width:100%; }
}

.macheta-section { margin: 0 0 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.macheta-section legend { padding: 0 8px; color: var(--navy); font-weight: 800; }
.macheta-live-preview { margin-top: 16px; padding: 16px; border: 1px solid #fdba74; border-radius: 14px; background: #fff7ed; }
.macheta-live-preview h3, .macheta-history-title { margin: 0 0 12px; }
.macheta-result-head { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.macheta-result-head > div { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.macheta-result-head span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.macheta-result-head strong { display: block; font-size: 16px; overflow-wrap: anywhere; }
.macheta-result-head strong.green { color: #15803d; }
.macheta-result-head strong.orange { color: #c2410c; }
.macheta-result-head strong.red { color: #dc2626; }
.macheta-history-title { margin-top: 18px; }
@media (max-width: 720px) {
  .macheta-section { padding: 12px 9px; }
  .macheta-result-head { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .macheta-result-head strong { font-size: 14px; }
}

/* v5.99.0 - Prețuri optimizate pentru un ecran mobil mediu. */
.pump-edit-icon { display: none; }
@media (max-width: 900px) {
  .content:has(.fuel-prices-mobile) {
    padding: 8px 7px 126px;
    overflow-x: hidden;
  }
  .fuel-price-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin-bottom: 7px;
  }
  .fuel-price-toolbar > div:last-child {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    gap: 5px !important;
    overflow: hidden;
  }
  .fuel-price-toolbar .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 32px;
    padding: 5px 4px;
    border-radius: 8px;
    font-size: 9.5px;
    line-height: 1.05;
    white-space: normal;
  }
  .fuel-prices-mobile {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 5px;
    align-items: stretch;
  }
  .fuel-mobile-supplier-filter {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 5px;
    margin: 0;
    padding: 5px 6px;
    border-radius: 8px;
    font-size: 10px;
  }
  .fuel-mobile-supplier-filter select {
    min-height: 31px;
    padding: 4px 22px 4px 6px;
    border-radius: 7px;
    font-size: 10.5px;
  }
  .fuel-mobile-date {
    display: grid;
    grid-template-columns: 1fr;
    place-content: center;
    gap: 2px;
    margin: 0;
    padding: 4px;
    border-radius: 8px;
    font-size: 9px;
    line-height: 1;
  }
  .fuel-mobile-date span {
    padding: 3px 4px;
    font-size: 9.5px;
    white-space: nowrap;
  }
  .fuel-mobile-three-columns {
    grid-column: 1 / -1;
    border-radius: 8px;
  }
  .fuel-mobile-three-columns h3 {
    padding: 4px 6px;
    font-size: 10.5px;
  }
  .fuel-mobile-three-columns table { font-size: 9px; }
  .fuel-mobile-three-columns th,
  .fuel-mobile-three-columns td {
    padding: 3px 2px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }
  .fuel-mobile-three-columns thead th:first-child { width: 35% !important; }
  .fuel-mobile-three-columns thead th:nth-child(2),
  .fuel-mobile-three-columns thead th:nth-child(3),
  .fuel-mobile-three-columns tbody td:nth-child(2),
  .fuel-mobile-three-columns tbody td:nth-child(3) { width: 24% !important; }
  .fuel-mobile-three-columns thead th:nth-child(4),
  .fuel-mobile-three-columns tbody td:nth-child(4) { width: 17% !important; }
  .fuel-mobile-three-columns thead th { font-size: 8px !important; }
  .fuel-mobile-three-columns tbody th strong { font-size: 8.5px; }
  .fuel-mobile-three-columns tbody th span {
    margin-top: 1px;
    font-size: 7.5px;
  }
  .fuel-mobile-three-columns .fuel-mobile-value { font-size: 8.5px !important; }
  .fuel-mobile-action-btn {
    min-width: 22px;
    min-height: 24px;
    margin: 0;
    padding: 1px;
    border-radius: 6px;
    font-size: 12px;
  }
  .fuel-mobile-action-btn small { font-size: 6px; }
  .pump-prices-section {
    margin-top: 7px;
    padding: 6px 4px;
    border-radius: 8px;
  }
  .pump-prices-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    margin-bottom: 5px;
  }
  .pump-prices-head h2 { margin: 0; font-size: 11px; }
  .pump-prices-head span { display: none; }
  .pump-prices-head .btn {
    min-height: 28px;
    padding: 4px 6px;
    border-radius: 7px;
    font-size: 8.5px;
  }
  .pump-prices-table { font-size: 9px; }
  .pump-prices-table th,
  .pump-prices-table td {
    padding: 4px 2px;
    line-height: 1.05;
    overflow-wrap: anywhere;
  }
  .pump-prices-table th:first-child,
  .pump-prices-table td:first-child { width: 31%; }
  .pump-prices-table th:nth-child(2),
  .pump-prices-table th:nth-child(3) { width: 27%; }
  .pump-prices-table .pump-price-actions,
  .pump-prices-table thead th:last-child { width: 15%; }
  .pump-edit-label { display: none; }
  .pump-edit-icon { display: inline; }
  .pump-prices-table .pump-edit-btn {
    min-width: 24px;
    min-height: 24px;
    padding: 1px 3px;
    border-radius: 6px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .fuel-price-toolbar .btn { font-size: 8.5px; }
  .fuel-mobile-three-columns table,
  .pump-prices-table { font-size: 8px; }
  .fuel-mobile-three-columns .fuel-mobile-value { font-size: 8px !important; }
}

.pump-prices-section { margin-top: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.pump-prices-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pump-prices-head h2 { margin: 0 0 3px; font-size: 18px; }
.pump-prices-head span { color: var(--muted); font-size: 13px; }
.pump-prices-wrap { overflow-x: auto; }
.pump-prices-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.pump-prices-table th, .pump-prices-table td { padding: 12px 14px; border: 1px solid var(--line); text-align: left; }
.pump-prices-table thead th { background: #fff200; color: #111827; font-weight: 800; }
.pump-prices-table tbody th { font-weight: 800; }
@media (max-width: 720px) {
  .pump-prices-section { padding: 12px 8px; border-radius: 14px; }
  .pump-prices-wrap { overflow: visible; }
  .pump-prices-table { min-width: 0; table-layout: fixed; font-size: 13px; }
  .pump-prices-table th, .pump-prices-table td { padding: 10px 6px; text-align: center; overflow-wrap: anywhere; }
  .pump-prices-table th:first-child, .pump-prices-table td:first-child { text-align: left; width: 30%; }
  .pump-prices-table th:nth-child(2), .pump-prices-table th:nth-child(3) { width: 24%; }
  .pump-prices-table .pump-price-date { display: none; }
  .pump-prices-table thead th:nth-child(4) { display: none; }
  .pump-prices-table .pump-price-actions, .pump-prices-table thead th:last-child { width: 22%; }
  .pump-prices-table .btn { padding: 7px 8px; font-size: 11px; }
}

/* Păstrat după stilurile de bază pentru ca varianta compactă să aibă prioritate. */
@media (max-width: 900px) {
  .pump-prices-section {
    margin-top: 7px;
    padding: 6px 4px;
    border-radius: 8px;
  }
  .pump-prices-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
  }
  .pump-prices-head h2 { margin: 0; font-size: 11px; }
  .pump-prices-head span { display: none; }
  .pump-prices-head .btn {
    min-height: 28px;
    padding: 4px 6px;
    border-radius: 7px;
    font-size: 8.5px;
  }
  .pump-prices-wrap { overflow: visible; }
  .pump-prices-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 9px;
  }
  .pump-prices-table th,
  .pump-prices-table td {
    padding: 4px 2px;
    line-height: 1.05;
    text-align: center;
    overflow-wrap: anywhere;
  }
  .pump-prices-table th:first-child,
  .pump-prices-table td:first-child { width: 31%; text-align: left; }
  .pump-prices-table th:nth-child(2),
  .pump-prices-table th:nth-child(3) { width: 27%; }
  .pump-prices-table .pump-price-date,
  .pump-prices-table thead th:nth-child(4) { display: none; }
  .pump-prices-table .pump-price-actions,
  .pump-prices-table thead th:last-child { width: 15%; }
  .pump-edit-label { display: none; }
  .pump-edit-icon { display: inline; }
  .pump-prices-table .pump-edit-btn {
    min-width: 24px;
    min-height: 24px;
    padding: 1px 3px;
    border-radius: 6px;
    font-size: 12px;
  }
}
/* Jurnal de audit */
.audit-details { display:block; margin-top:4px; color:var(--muted); max-width:240px; white-space:normal; }
.audit-device { display:block; max-width:260px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.audit-value summary { cursor:pointer; color:#f97316; font-weight:700; white-space:nowrap; }
.audit-value pre { margin:8px 0 0; padding:10px; max-width:360px; max-height:220px; overflow:auto; border-radius:8px; background:#f7f9fc; font-size:11px; white-space:pre-wrap; overflow-wrap:anywhere; }
.audit-table table { min-width:1350px; }
.order-risk-approval { display:none; gap:10px; align-items:flex-start; padding:14px; border:2px solid #dc2626; border-radius:14px; background:#fff1f2; color:#991b1b; }
.order-risk-approval.visible { display:grid; }
.order-risk-approval label { display:flex; gap:8px; align-items:center; font-weight:800; }
.order-risk-approval small { color:#7f1d1d; }
.order-email-options{display:flex;flex-direction:column;gap:7px;margin:2px 0 9px;padding:9px 11px;border:1px solid var(--line);border-radius:12px;background:#f8fafc;max-height:132px;overflow:auto}.order-email-options label{display:flex;align-items:center;gap:8px;font-weight:600;overflow-wrap:anywhere}.order-email-options input{accent-color:var(--orange)}
.client-document-upload{display:grid;grid-template-columns:minmax(220px,2fr) minmax(150px,1fr) minmax(220px,2fr) auto;gap:12px;align-items:end;margin:12px 0 18px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8fafc}.client-document-upload .field{margin:0}.client-document-actions{display:flex;gap:6px;white-space:nowrap}.client-documents-list .table-wrap{margin-top:8px}@media(max-width:760px){.client-document-upload{grid-template-columns:1fr}.client-document-upload .btn{width:100%}.client-documents-list .table-wrap{overflow-x:auto}.client-documents-list table{min-width:850px}}
.compact-business-table table{min-width:980px}.compact-business-table th{white-space:nowrap}.compact-business-table td:last-child{min-width:250px}.email-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.email-kpis>div{padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.email-kpis small{display:block;color:var(--muted);font-weight:700}.email-kpis strong{display:block;margin-top:5px;font-size:24px}.email-kpis .danger{border-color:#fecaca;background:#fff1f2;color:#991b1b}.email-error{display:block;max-width:260px;color:#b91c1c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:760px){.email-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.email-kpis>div{padding:11px}.email-kpis strong{font-size:20px}.compact-business-table .table-wrap{overflow:visible}.compact-business-table table,.compact-business-table thead,.compact-business-table tbody,.compact-business-table tr,.compact-business-table th,.compact-business-table td{display:block;min-width:0;width:100%}.compact-business-table thead{display:none}.compact-business-table tr{margin:0 0 12px;padding:12px;border:1px solid var(--line);border-radius:14px;background:#fff;box-shadow:var(--shadow-sm)}.compact-business-table td{padding:7px 2px;border:0}.compact-business-table td:last-child{min-width:0;padding-top:10px;border-top:1px solid var(--line)}.compact-business-table td:last-child .btn{margin:3px 3px 3px 0}}

/* v6.2.21 - criterii proforme pliabile pe mobil */
.proforma-mobile-search-toggle{display:none}
@media(max-width:760px){
  .proforma-filter-toolbar{display:flex;flex-direction:column;align-items:stretch}
  .proforma-mobile-search-toggle{display:block;width:100%;min-height:42px}
  .proforma-filter-toolbar .proforma-filter-row{display:none}
  .proforma-filter-toolbar .proforma-filter-row.open{display:grid;grid-template-columns:1fr 1fr;width:100%;padding:10px;border:1px solid var(--line);border-radius:12px;background:#fff}
  .proforma-filter-toolbar .proforma-filter-row.open .proforma-filter-search,
  .proforma-filter-toolbar .proforma-filter-row.open .proforma-filter-client{grid-column:1/-1}
}

.bulk-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:-8px 0 12px}
.client-agent-overview{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:-8px 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}.client-agent-overview label{display:grid;gap:4px;color:var(--muted);font-size:11px;font-weight:800}.client-agent-overview .input{width:260px;min-height:36px;padding:7px 9px}.client-agent-overview>strong{font-size:12px;color:var(--slate-600)}
.client-directory-controls{flex-wrap:wrap}
.client-directory-controls label{flex:1 1 180px;min-width:0}
.client-directory-controls .input{width:100%;max-width:100%}
@media(max-width:760px){.client-directory-controls label{flex:0 1 auto}}
.report-sort-button{border:0;background:transparent;color:inherit;font:inherit;font-weight:800;padding:4px 0;cursor:pointer;text-align:left;white-space:nowrap}
.report-sort-button:focus-visible{outline:2px solid #f26522;outline-offset:3px}
.report-sort-button span{color:#f26522}
.document-history-json{max-height:260px;overflow:auto;padding:10px;border-radius:10px;background:#0f172a;color:#e2e8f0;font-size:11px;white-space:pre-wrap}
@media(max-width:760px){.bulk-actions{display:grid;grid-template-columns:1fr 1fr;margin:0 0 10px}.bulk-actions .btn{width:100%}.bulk-actions .btn:last-child{grid-column:1/-1}}
@media(max-width:760px){.client-agent-overview{align-items:stretch;flex-direction:column}.client-agent-overview .input{width:100%}}

/* v6.2.54 – istoric compact pe mobil și liste simplificate pentru agenți. */
@media (max-width: 760px) {
  .history-price-filters.history-mobile-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    margin-bottom: 10px;
    padding: 7px;
  }
  .history-price-filters.history-mobile-filters > select,
  .history-price-filters.history-mobile-filters > label {
    width: 100% !important;
    min-width: 0;
    margin: 0;
  }
  .history-price-filters.history-mobile-filters .input {
    width: 100%;
    min-height: 38px;
    height: 38px;
    padding: 5px 7px;
    border-radius: 10px;
    font-size: 11px;
  }
  .history-mobile-date {
    position: relative;
    display: block !important;
    width: 42px !important;
    height: 38px;
    overflow: hidden;
  }
  .history-mobile-date input[type="date"] {
    width: 42px !important;
    min-width: 42px;
    color: transparent;
    font-size: 0;
    padding: 4px;
    text-indent: -999px;
    cursor: pointer;
  }
  .history-mobile-date input[type="date"]::-webkit-datetime-edit { display: none; }
  .history-mobile-date input[type="date"]::-webkit-calendar-picker-indicator {
    width: 24px;
    height: 24px;
    margin: 0;
    opacity: 1;
    cursor: pointer;
  }

  .agent-mobile-orders .table-wrap table,
  .agent-mobile-proformas .table-wrap table { min-width: 0; }
  .agent-mobile-orders td:last-child,
  .agent-mobile-proformas td:last-child { display: flex; flex-wrap: wrap; gap: 6px; }
  .agent-mobile-orders .agent-mobile-action-icon,
  .agent-mobile-proformas .agent-mobile-action-icon {
    display: inline-flex !important;
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    align-items: center;
    justify-content: center;
    font-size: 17px !important;
  }
  .agent-mobile-orders td:last-child .order-mobile-primary {
    flex: 0 0 34px !important;
  }
  .agent-mobile-proformas td:last-child .btn.primary {
    flex: 1 1 130px;
  }
}

/* v6.2.60 – prioritate finală pentru formulare în aplicația mobilă. */
@media (max-width: 900px) {
  .mobile-bottom-nav { z-index: 80 !important; }
  body:has(.modal-backdrop) .mobile-bottom-nav { display: none !important; }
  .modal-backdrop {
    z-index: 120 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center;
  }
  .modal {
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    height: min(100dvh, 860px) !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  .modal > form,
  .modal > #modalForm {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }
  .modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 18px;
  }
  .modal .modal-actions,
  .order-modal .modal-actions {
    position: relative !important;
    flex: 0 0 auto;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    background: #fff;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .10);
  }
  .modal .modal-actions .btn,
  .order-modal .modal-actions .btn {
    width: 100% !important;
    min-height: 46px !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }
  .modal .modal-actions > .btn:last-child:nth-child(3) { grid-column: 1 / -1; }
}

/* v6.2.59 – formulare mobile: acțiunile rămân accesibile deasupra tastaturii. */
@media (max-width: 900px) {
  .mobile-bottom-nav { z-index: 80 !important; }
  body:has(.modal-backdrop) .mobile-bottom-nav { display: none !important; }
  .modal-backdrop {
    z-index: 120 !important;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  .modal {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    height: min(100dvh, 860px);
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  .modal > form,
  .modal > #modalForm {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }
  .modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 18px;
  }
  .modal .modal-actions,
  .order-modal .modal-actions {
    position: relative;
    flex: 0 0 auto;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    background: #fff;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .10);
  }
  .modal .modal-actions .btn,
  .order-modal .modal-actions .btn {
    width: 100% !important;
    min-height: 46px !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }
  /* La Proformă există și „Salvează și trimite e-mail”; Salvarea simplă rămâne
     pe un rând separat, vizibil permanent. */
  .modal .modal-actions > .btn:last-child:nth-child(3) { grid-column: 1 / -1; }
}

/* v6.2.47 - PWA: pastreaza antetul si meniul in zona sigura pe iPhone. */
@media (max-width:900px) and (display-mode: standalone) {
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .main { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .content { padding-bottom: calc(136px + env(safe-area-inset-bottom)); }
  .mobile-bottom-nav {
    bottom: max(6px, env(safe-area-inset-bottom));
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }
}

/* v6.2.24 - acțiuni comenzi simplificate exclusiv pe mobil */
.mobile-order-detail-actions{display:none}
@media(max-width:760px){
  .orders-client-table .order-mobile-more{display:none!important}
  .orders-client-table td:last-child{display:flex;flex-wrap:wrap;gap:6px}
  .orders-client-table td:last-child .order-mobile-primary{display:inline-flex!important;flex:1 1 calc(33.333% - 6px);justify-content:center;margin:0!important}
  .mobile-order-detail-actions{display:grid;gap:8px;margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}
  .mobile-order-detail-actions>strong{font-size:12px;color:var(--slate-600)}
  .mobile-order-detail-actions>div{display:grid;grid-template-columns:1fr 1fr;gap:7px}
  .mobile-order-detail-actions .btn{width:100%}
}

/* v6.2.55 – aceeași bară de navigare pe toate paginile mobile, inclusiv Clienți. */
@media (max-width: 900px) {
  .main { padding-bottom: 150px !important; }
  .content { padding-bottom: 150px !important; }
  .mobile-bottom-nav {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    align-items: stretch;
    height: 68px !important;
    min-height: 68px !important;
    max-height: 68px !important;
    bottom: 10px !important;
    z-index: 1000 !important;
    isolation: isolate;
    transform: translateZ(0);
  }
  .mobile-bottom-nav button {
    display: grid !important;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    overflow: hidden;
  }
  .client-letter-filter {
    z-index: 15 !important;
  }
}

@media (max-width: 900px) and (display-mode: standalone) {
  .main, .content { padding-bottom: calc(150px + env(safe-area-inset-bottom)) !important; }
  .mobile-bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom)) !important;
    max-height: none !important;
    bottom: max(6px, env(safe-area-inset-bottom)) !important;
    padding-bottom: calc(7px + env(safe-area-inset-bottom)) !important;
  }
}

/* v6.2.56 – poziții fixe ale meniului; bara rămâne peste orice listă. */
@media (max-width: 900px) {
  .mobile-bottom-nav {
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    z-index: 2147483000 !important;
    pointer-events: auto !important;
  }
  .mobile-bottom-nav > button,
  .mobile-bottom-nav > .mobile-bottom-nav-slot {
    min-width: 0 !important;
    min-height: 52px !important;
  }
  .mobile-bottom-nav-slot {
    display: block;
    pointer-events: none;
  }
}

@media (max-width: 900px) and (display-mode: standalone) {
  .mobile-bottom-nav { bottom: max(6px, env(safe-area-inset-bottom)) !important; }
}

/* v6.2.57 – directorul de clienți este optimizat pentru lățimea reală a telefonului. */
@media (max-width: 900px) {
  .client-letter-filter {
    position: sticky;
    top: 60px !important;
    width: 100%;
    margin: 0 0 10px;
    padding: 7px 8px;
    border-radius: 12px;
    box-sizing: border-box;
  }
  .client-letter-title { display: none; }
  .client-letter-buttons {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-bottom: 1px;
  }
  .client-letter-buttons::-webkit-scrollbar { display: none; }
  .client-letter-btn {
    flex: 0 0 34px;
    min-width: 34px !important;
    min-height: 34px;
    height: 34px;
    padding: 0 3px;
    border-radius: 9px;
    font-size: 11px;
  }
  .client-letter-btn:first-child { flex-basis: 44px; min-width: 44px !important; }
  .client-directory {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }
  .client-directory-item {
    min-width: 0;
    min-height: 70px;
    padding: 10px 11px;
    border-radius: 15px;
    grid-template-columns: 38px minmax(0, 1fr) 54px;
    gap: 9px;
  }
  .client-directory-view { min-width: 0; gap: 9px; }
  .client-directory-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 12px;
  }
  .client-directory-name {
    font-size: 14px;
    line-height: 1.2;
  }
  .client-directory-agent {
    max-width: 100%;
    font-size: 10px;
    line-height: 1.2;
  }
  .client-directory-arrow {
    width: 26px;
    height: 26px;
    font-size: 22px;
  }
  .client-risk-button {
    flex: 0 0 54px;
    min-height: 48px;
    padding: 5px 3px;
    border-radius: 11px;
  }
  .client-risk-button span { font-size: 9px; }
  .client-risk-button strong { margin-top: 1px; font-size: 15px; }
}

/* v6.2.63 – acțiunile agentului din Comenzi client sunt pe două rânduri, fără derulare orizontală. */
@media (max-width: 760px) {
  .orders-client-table.agent-mobile-orders td:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    overflow: visible;
  }
  .orders-client-table.agent-mobile-orders td:last-child .order-mobile-primary,
  .orders-client-table.agent-mobile-orders td:last-child .agent-mobile-action-icon {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    margin: 0 !important;
  }
}

/* v6.2.65 – Comenzi client ale agenților: carduri lizibile pe mobil. */
@media (max-width: 760px) {
  .orders-client-table.agent-mobile-orders .table-scroll-top { display: none !important; }
  .orders-client-table.agent-mobile-orders .table-wrap {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  .orders-client-table.agent-mobile-orders .table-wrap table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: auto !important;
    font-size: 12px !important;
  }
  .orders-client-table.agent-mobile-orders .table-wrap thead { display: none !important; }
  .orders-client-table.agent-mobile-orders .table-wrap tbody {
    display: grid !important;
    gap: 10px;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    margin: 0 !important;
    overflow: hidden !important;
    border: 1px solid #dce5ef !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .06) !important;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 8px 10px !important;
    overflow: visible !important;
    border-top: 1px solid #edf2f7 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--slate-700);
    text-align: left !important;
    white-space: normal !important;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:first-child {
    display: block !important;
    grid-column: 1 / -1;
    min-width: 0 !important;
    max-width: none !important;
    padding: 10px !important;
    border-top: 0 !important;
    background: #f8fafc !important;
    color: var(--slate-900);
    font-size: 15px;
    font-weight: 900;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(2) { grid-column: 1; }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(3) { grid-column: 2; }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(2)::before,
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(3)::before,
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(4)::before,
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(5)::before {
    display: block !important;
    margin-bottom: 3px;
    color: var(--slate-500);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(2)::before { content: 'Prod / cant'; }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(3)::before { content: 'Preț'; }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(4)::before { content: 'Data livrare'; }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(4) {
    grid-column: 1 / -1;
    line-height: 1.45;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(4) small {
    display: block;
    margin-top: 2px;
    color: var(--slate-500);
    font-size: 10.5px;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(5) {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    grid-column: 1 / -1;
    position: static !important;
    right: auto !important;
    gap: 6px;
    min-width: 0 !important;
    max-width: none !important;
    padding: 9px 10px 10px !important;
    background: #fff !important;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(5)::before {
    content: 'Acțiuni';
    flex: 0 0 auto;
    margin: 0 2px 0 0;
  }
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(5) .order-mobile-primary,
  .orders-client-table.agent-mobile-orders .table-wrap tbody td:nth-child(5) .agent-mobile-action-icon {
    display: inline-flex !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
  }
}

/* v6.2.60 – prioritate finală pentru formulare în aplicația mobilă. */
@media (max-width: 900px) {
  .mobile-bottom-nav { z-index: 80 !important; }
  body:has(.modal-backdrop) .mobile-bottom-nav { display: none !important; }
  .modal-backdrop {
    z-index: 120 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center;
  }
  .modal {
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    height: min(100dvh, 860px) !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }
  .modal > form,
  .modal > #modalForm {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
  }
  .modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 18px;
  }
  .modal .modal-actions,
  .order-modal .modal-actions {
    position: relative !important;
    flex: 0 0 auto;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    background: #fff;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .10);
  }
  .modal .modal-actions .btn,
  .order-modal .modal-actions .btn {
    width: 100% !important;
    min-height: 46px !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
  }
  .modal .modal-actions > .btn:last-child:nth-child(3) { grid-column: 1 / -1; }
}
.profit-report { padding: 16px; min-width: 0; }
.profit-report > p { font-size: 13px; line-height: 1.5; }
.profit-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 12px 0; }
.profit-controls label { display: grid; gap: 4px; }
.profit-report td { vertical-align: top; }
.google-maps-attribution { font: 14px Arial, sans-serif; color: #5e5e5e; }
@media (max-width: 760px) { .profit-controls > * { flex: 1 1 140px; min-width: 0; } }

/* v6.2.100 – mobile header refresh icon and Alascom brand. */
.header-brand-logo {
  display: block;
  width: 138px;
  max-width: 16vw;
  max-height: 30px;
  height: auto;
  object-fit: contain;
  flex: 0 1 138px;
}
.bnr-rates {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px 12px;
  flex: 0 1 auto;
  min-width: 0;
  padding: 7px 11px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid var(--orange);
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  white-space: nowrap;
}
.bnr-rates-date { color: #64748b; font-weight: 700; }
.bnr-rates strong { color: #172554; font-size: 13px; }
.bnr-rates a { color: #64748b; font-size: 11px; text-decoration: underline; }
.bnr-rates-loading { color: #64748b; font-weight: 700; }
.proformas-new-bar { display: flex; width: 100%; margin: 0 0 14px; }
.proformas-new-button { display: inline-flex !important; align-items: center; justify-content: center; min-height: 46px; padding: 12px 22px; font-size: 15px; }
.bnr-source-frame { display: block; width: 200px; height: 95px; border: 0; border-radius: 8px; }
.bnr-rates:has(.bnr-source-frame) { padding: 0; border: 0; background: transparent; }
@media (min-width: 901px) {
  .topbar:has(.bnr-source-frame) { height: auto; min-height: 105px; }
}
.header-refresh {
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid #dbe3ec;
  border-radius: 50%;
  background: #fff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.header-refresh:hover { background: #fff4ed; color: var(--orange); }
.header-refresh:disabled { opacity: .55; cursor: wait; }
.header-refresh svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .bnr-rates { display: none !important; }
}
@media (max-width: 760px) {
  .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .top-left { flex: 1 1 auto; gap: 0; min-width: 0; }
  .page-title { max-width: 39vw; }
  .header-brand-logo { width: 20vw; max-width: 82px; min-width: 58px; max-height: 24px; flex: 0 1 82px; margin: 0 4px; }
  .user-box { gap: 6px; flex: 0 0 auto; }
  .header-refresh { width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 7px; }
  .header-refresh svg { width: 18px; height: 18px; }
  #logoutBtn, .screenshot-btn { display: none !important; }
}


/* Meniu utilizator pe mobil: păstrează ieșirea accesibilă din avatar. */
.user-box { position: relative; }
.user-avatar-button { border: 1px solid var(--slate-200); padding: 0; cursor: pointer; font: inherit; }
.user-menu { position: absolute; z-index: 150; top: calc(100% + 10px); right: 0; width: min(280px, calc(100vw - 28px)); padding: 12px; border: 1px solid var(--slate-200); border-radius: 14px; background: #fff; box-shadow: 0 14px 36px rgba(15, 23, 42, .2); display: grid; gap: 12px; }
.user-menu-identity { display: grid; gap: 4px; min-width: 0; }
.user-menu-identity strong { color: var(--slate-900); }
.user-menu-identity span { color: var(--slate-500); overflow-wrap: anywhere; font-size: 13px; }
.user-menu-logout { width: 100%; justify-content: center; }
.client-directory-table { margin-top: 10px; min-width: 0; }
.client-directory-table .table-wrap { max-width: 100%; overflow: auto; }
.client-directory-table table { min-width: 1180px; }
.client-directory-table th { white-space: nowrap; }
.client-directory-table td { vertical-align: middle; }
.client-directory-table td:nth-child(1) { min-width: 210px; }
.client-directory-table td:nth-child(6),
.client-directory-table td:nth-child(7),
.client-directory-table td:nth-child(8),
.client-directory-table td:nth-child(10) { min-width: 150px; }
.client-directory-table td:nth-child(8) { overflow-wrap: anywhere; }
.client-directory-table .client-risk-button { min-width: 74px; }
@media (max-width: 760px) {
  .client-directory-table .table-wrap { overflow-x: auto !important; }
  .client-directory-table table { display: table !important; width: max-content !important; min-width: 1180px !important; }
  .client-directory-table thead { display: table-header-group !important; }
  .client-directory-table tbody { display: table-row-group !important; }
  .client-directory-table tr { display: table-row !important; }
  .client-directory-table th,
  .client-directory-table td { display: table-cell !important; min-width: 100px; padding: 8px 10px !important; }
  .client-directory-table td::before { content: none !important; display: none !important; }
}

/* Prețuri zilnice mobile: trei coloane, editare sub prețul corespunzător. */
@media (max-width: 900px) {
  .fuel-mobile-readable thead th:first-child,
  .fuel-mobile-readable tbody th { width: 32% !important; }
  .fuel-mobile-readable thead th:nth-child(2),
  .fuel-mobile-readable thead th:nth-child(3),
  .fuel-mobile-readable tbody td:nth-child(2),
  .fuel-mobile-readable tbody td:nth-child(3) { width: 34% !important; }
  .fuel-mobile-readable th,
  .fuel-mobile-readable td { padding: 10px 4px !important; vertical-align: middle; }
  .fuel-mobile-readable h3 { font-size: 15px; padding: 8px; }
  .fuel-mobile-readable thead th { font-size: 12px !important; }
  .fuel-mobile-readable tbody th strong { font-size: 16px; line-height: 1.2; }
  .fuel-mobile-readable tbody th span { font-size: 14px; line-height: 1.2; margin-top: 5px; }
  .fuel-mobile-readable .fuel-mobile-value { font-size: 21px !important; line-height: 1.25; }
  .fuel-mobile-price-number { display: block; white-space: nowrap; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
  .fuel-mobile-readable .fuel-mobile-action-btn {
    display: block; width: 44px; min-width: 44px; min-height: 44px;
    margin: 7px auto 0; padding: 4px; font-size: 20px; border-radius: 9px;
  }
  .fuel-mobile-readable .fuel-mobile-action-btn small { display: none; }
}
@media (max-width: 380px) {
  .fuel-mobile-readable .fuel-mobile-value { font-size: 18px !important; }
  .fuel-mobile-readable thead th { font-size: 11px !important; }
  .fuel-mobile-readable tbody th strong { font-size: 14px; }
  .fuel-mobile-readable tbody th span { font-size: 12px; }
}

/* Prețuri la pompă: aceeași lizibilitate ca tabelul zilnic pe mobil. */
.pump-mobile-inline-edit { display: none; }
@media (max-width: 900px) {
  .pump-prices-section { padding: 8px 4px; margin-top: 14px; }
  .pump-prices-head h2 { font-size: 16px; }
  .pump-prices-head .btn { min-height: 44px; font-size: 11px; padding: 6px 8px; }
  .pump-prices-table { display: table !important; width: 100%; min-width: 0; table-layout: fixed; }
  .pump-prices-table thead { display: table-header-group !important; }
  .pump-prices-table tbody { display: table-row-group !important; }
  .pump-prices-table tr { display: table-row !important; }
  .pump-prices-table th, .pump-prices-table td {
    display: table-cell !important; padding: 10px 4px !important;
    min-width: 0 !important; vertical-align: middle; text-align: center;
  }
  .pump-prices-table td::before { content: none !important; display: none !important; }
  .pump-prices-table th:first-child { width: 32% !important; text-align: left; }
  .pump-prices-table tbody th { font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
  .pump-prices-table thead th { font-size: 12px; }
  .pump-prices-table th:nth-child(2), .pump-prices-table th:nth-child(3),
  .pump-prices-table td:nth-child(2), .pump-prices-table td:nth-child(3) { width: 34% !important; }
  .pump-prices-table .pump-price-date, .pump-prices-table .pump-price-actions,
  .pump-prices-table thead th:nth-child(4), .pump-prices-table thead th:nth-child(5) { display: none !important; }
  .pump-price-number { display: block; font-size: 21px; line-height: 1.25; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .pump-mobile-inline-edit { display: block; margin-top: 7px; }
  .pump-prices-table .pump-edit-btn { width: 44px; min-width: 44px; min-height: 44px; padding: 4px; font-size: 20px; border-radius: 9px; }
}
@media (max-width: 380px) {
  .pump-price-number { font-size: 18px; }
  .pump-prices-table tbody th { font-size: 14px; }
  .pump-prices-table thead th { font-size: 11px; }
}

.client-list-button { margin-top: 6px; width: 100%; }

.unloading-toolbar { flex-wrap: wrap; gap: 12px; }
.unloading-toolbar .search-row { flex-wrap: wrap; align-items: flex-end; gap: 8px; flex: 1; }
.unloading-toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.unloading-toolbar select { max-width: 240px; }
.unloading-toolbar input[type="date"] { width: 150px; }
@media (max-width: 680px) {
  .unloading-toolbar .search-row { width: 100%; }
  .unloading-toolbar label { flex: 1 1 140px; }
  .unloading-toolbar label .input { width: 100%; max-width: none; }
}

.form-error { color: #c62828; font-weight: 700; padding: 10px 12px; background: #fff1f1; border: 1px solid #efb4b4; border-radius: 8px; }
[data-supplier-product2-fields][hidden], .form-error[hidden] { display: none !important; }

[data-unloading-product2-fields][hidden] { display: none !important; }

/* v6.2.139 - BI financiar WinMENTOR */
.mentor-bi-panel{margin-top:18px;border:1px solid rgba(37,99,235,.16)}
.mentor-bi-head{align-items:flex-start;gap:12px;flex-wrap:wrap}
.mentor-bi-cards{margin-top:14px}
.mentor-bi-table{margin-top:16px;overflow:auto}
.mentor-bi-table table{min-width:980px}
@media (max-width:760px){.mentor-bi-panel{padding:14px}.mentor-bi-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.mentor-bi-table{margin-left:-4px;margin-right:-4px}}

.manager-sales-readable { display:grid; grid-template-columns:minmax(140px,190px) minmax(0,1fr); gap:18px; align-items:center; }
.manager-sales-readable .dashboard-manager-chart { width:100%; height:auto; min-height:0; max-height:220px; }
.manager-sales-readable-legend { min-width:0; display:grid; gap:10px; }
.manager-sales-readable-row { display:grid; grid-template-columns:10px minmax(0,1fr); gap:5px 10px; align-items:center; padding:10px 0; border-bottom:1px solid #e2e8f0; }
.manager-sales-readable-row i { width:10px; height:10px; border-radius:3px; }
.manager-sales-readable-row strong { display:block; font-size:15px; overflow-wrap:anywhere; }
.manager-sales-readable-row small { display:block; color:#64748b; font-size:12px; }
.manager-sales-readable-row b { grid-column:2; font-size:17px; white-space:nowrap; }
@media(max-width:700px) { .manager-sales-readable { grid-template-columns:1fr; } .manager-sales-readable .dashboard-manager-chart { max-width:210px; justify-self:center; } }
/* BI și liste paginate */
.insight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.insight-panel{overflow:hidden}.insight-controls,.fast-pager{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:14px 0}.insight-controls label{flex:1;min-width:160px}.insight-bars{display:grid;gap:12px;margin:18px 0}.insight-bar{display:grid;grid-template-columns:minmax(110px,1fr) minmax(80px,2fr) minmax(90px,1fr);gap:10px;align-items:center;width:100%;border:0;background:transparent;text-align:left;color:inherit;font:inherit}.insight-bar strong{text-align:right}.insight-track{height:13px;background:#edf1f5;border-radius:5px;overflow:hidden}.insight-track i{display:block;height:100%;border-radius:5px}.insight-trend{width:100%;height:auto;min-height:180px}.insight-legend{display:flex;gap:16px;flex-wrap:wrap;font-weight:700}.insight-panel details{margin-top:12px}.insight-panel summary{cursor:pointer}.fast-pager span{margin-right:auto}@media(max-width:760px){.insight-grid{grid-template-columns:1fr}.insight-bar{grid-template-columns:1fr 1fr;}.insight-track{grid-row:2;grid-column:1/-1}.insight-controls label{min-width:100%;}.insight-trend{min-height:160px}}
.loading-sheets .ls-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin:18px 0}
.ls-filters label{display:grid;gap:6px;min-width:180px}
.ls-kpis{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:12px;margin:18px 0}
.ls-kpis>div{display:grid;gap:8px;background:#fff;padding:16px;border:1px solid #e2e8f0;border-radius:12px}
.ls-kpis small{color:#64748b}.ls-kpis strong{font-size:18px}.ls-negative{color:#b42318;font-weight:600}
.ls-header-fields,.ls-line-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.ls-field{display:grid;gap:6px;font-size:13px;font-weight:600;min-width:0}.ls-field input,.ls-field select{width:100%;min-width:0}
.ls-field input[type=checkbox]{width:18px;height:18px}
.ls-modal .modal{width:min(1250px,96vw);max-width:1250px}.ls-editor h3{margin:24px 0 12px}
.ls-line{border:1px solid #dbe3ee;border-radius:12px;margin:14px 0;padding:16px}.ls-line legend{font-weight:700;padding:0 8px}
.ls-line [data-ls-remove]{margin-top:12px}.ls-editor>label{margin-top:18px}.ls-detail-table{overflow-x:auto}
.loading-sheets h2{margin-top:24px}
@media(max-width:800px){.ls-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.ls-header-fields,.ls-line-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.ls-kpis strong{font-size:16px}}
@media(max-width:480px){.ls-header-fields,.ls-line-fields{grid-template-columns:1fr}.ls-modal .modal-body{padding:12px}.ls-filters label{min-width:100%;width:100%}}
