  * { box-sizing: border-box; margin: 0; padding: 0; }
  :root { --green:#1b6b32; --green-d:#124a23; --green-dd:#0e3a1c;
          --ink:#1f2937; --muted:#6b7280; --line:#e8eaed; --bg:#eef1f4; }
  body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
         background: var(--bg); color: var(--ink); display: flex; flex-direction: column;
         min-height: 100vh; -webkit-font-smoothing: antialiased; }
  /* Appbar global (sus, peste tot) */
  .appbar { display: flex; align-items: center; height: 54px; padding: 0 14px;
    background: linear-gradient(180deg,#124a23,#0e3a1c); color: #e8f5e9;
    box-shadow: 0 1px 3px rgba(0,0,0,.15); flex-shrink: 0; gap: 4px; position: relative; z-index: 50; }
  .appbar-toggle { background: rgba(255,255,255,.07); color: #fff; border: none;
    width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px; }
  .appbar-toggle:hover { background: rgba(255,255,255,.15); }
  .appbar-brand { font-weight: 700; font-size: 16px; padding: 0 14px 0 8px;
    border-right: 1px solid rgba(255,255,255,.1); height: 34px; line-height: 34px; }
  .appbar-spacer { flex: 1; }
  .appbar-modules { display: flex; gap: 2px; flex: 0 0 auto; flex-wrap: wrap; justify-content: center; }
  .appbar-modules a { color: #cfe6d3; text-decoration: none; padding: 8px 14px;
    border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 500;
    transition: background .12s, color .12s; }
  .appbar-modules a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .appbar-modules a.active { background: rgba(124,214,138,.22); color: #fff; font-weight: 700; }
  .appbar-right { display: flex; gap: 6px; align-items: center; }
  .appbar-menu { position: relative; }
  .appbar-menu-btn { background: rgba(255,255,255,.07); color: #fff; border: none;
    padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 5px; }
  .appbar-menu-btn:hover { background: rgba(255,255,255,.15); }
  .appbar-menu-btn .caret { font-size: 10px; opacity: .7; }
  .appbar-badge { background:#dc2626; color:#fff; font-size:11px; font-weight:700;
    padding:1px 7px; border-radius:10px; min-width:18px; text-align:center;
    margin: 0 2px; line-height: 16px; }
  .appbar-dropdown { position: absolute; top: 100%; right: 0; margin-top: 6px;
    background: #fff; color: var(--ink); border-radius: 10px; padding: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.18); min-width: 240px; z-index: 60;
    border: 1px solid var(--line); }
  .appbar-dropdown .dd-sec { font-size: 10.5px; text-transform: uppercase;
    letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; font-weight: 700; }
  .appbar-dropdown .dd-sec:first-child { padding-top: 4px; }
  .appbar-dropdown .dd-item { display: block; padding: 7px 10px; font-size: 13px;
    color: var(--ink); cursor: pointer; border-radius: 6px; text-decoration: none; }
  .appbar-dropdown .dd-item:hover { background: #eef5ee; color: var(--green-d); }
  .appbar-dropdown .dd-divider { height: 1px; background: var(--line); margin: 5px 4px; }
  .appbar-dropdown select { width: 100%; padding: 7px 9px; border-radius: 6px;
    border: 1px solid var(--line); font-size: 13px; background: #fff; }
  /* Layout flex (sidebar + main) */
  .layout { display: flex; flex: 1; min-height: 0; }
  /* Sidebar contextual */
  aside { width: 232px; background: linear-gradient(180deg,#124a23,#0e3a1c);
          color: #e8f5e9; flex-shrink: 0; display: flex; flex-direction: column;
          transition: margin-left .2s ease; }
  body.sidebar-hidden aside { margin-left: -232px; }
  aside .brand { padding: 16px 22px; border-bottom: 1px solid rgba(255,255,255,.09); }
  aside .brand b { font-size: 15px; letter-spacing: .2px; }
  aside .brand span { font-size: 11px; opacity: .65; display: block; margin-top: 2px; }
  aside.empty .brand { opacity: .5; }
  aside.empty nav { display: none; }
  nav { padding: 8px 0 20px; overflow-y: auto; flex: 1; }
  nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
             color: #6fae7b; padding: 16px 22px 6px; font-weight: 600; }
  nav a { display: block; padding: 9px 22px; color: #cfe6d3; text-decoration: none;
          font-size: 14px; cursor: pointer; border-left: 3px solid transparent;
          transition: background .12s, color .12s; }
  nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
  nav a.active { background: rgba(124,214,138,.16); border-left-color: #7cd68a;
                 color: #fff; font-weight: 600; }
  /* Main */
  main { flex: 1; overflow-x: auto; display: flex; flex-direction: column; }
  .topbar { background: #fff; color: var(--ink); padding: 14px 30px;
            display: flex; align-items: center; justify-content: space-between; gap: 16px;
            border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
  .topbar h1 { font-size: 18px; font-weight: 700; }
  .firma-sel { display: flex; align-items: center; gap: 8px; }
  .firma-sel label { font-size: 12px; color: var(--muted); }
  .firma-sel select { background: #f3f5f7; color: var(--ink); border: 1px solid #d6dade;
    padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; min-width: 200px; }
  .firma-sel select:focus { outline: 2px solid #a7d3ab; border-color: var(--green); }
  .content { padding: 26px 30px; max-width: 1500px; flex: 1; }
  .cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
  .card { background: #fff; border-radius: 14px; padding: 20px 22px;
          box-shadow: 0 1px 3px rgba(16,40,24,.06); flex: 1; min-width: 170px;
          border: 1px solid var(--line); }
  .card .val { font-size: 27px; font-weight: 800; color: var(--green); }
  .card .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
  section { background: #fff; border-radius: 14px; padding: 22px 24px;
            box-shadow: 0 1px 3px rgba(16,40,24,.06); margin-bottom: 22px;
            border: 1px solid var(--line); }
  .sec-head { display: flex; align-items: center; justify-content: space-between;
              margin-bottom: 16px; gap: 12px; }
  .sec-head h2 { font-size: 16px; color: #111827; font-weight: 700;
                 border-left: 4px solid var(--green); padding-left: 11px; }
  table { width: 100%; border-collapse: collapse; font-size: 13px; }
  th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line);
           white-space: nowrap; }
  th { background: #f7f9f8; font-weight: 600; color: #4b5563; font-size: 11px;
       text-transform: uppercase; letter-spacing: .03em; }
  tbody tr:hover td { background: #f5faf6; }
  td.num { text-align: right; font-variant-numeric: tabular-nums; }
  .btn { background: var(--green); color: #fff; border: 0; padding: 9px 18px;
         border-radius: 9px; font-size: 14px; cursor: pointer; font-weight: 600;
         transition: background .12s, transform .04s; }
  .btn:hover { background: var(--green-d); }
  .btn:active { transform: translateY(1px); }
  .btn.sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
  .btn.gray { background: #eef0f2; color: #374151; }
  .btn.gray:hover { background: #e2e5e8; }
  .btn.danger { background: #fde8e8; color: #b91c1c; }
  .btn.danger:hover { background: #f9d0d0; }
  .badge { display: inline-block; padding: 3px 10px; border-radius: 999px;
           font-size: 12px; font-weight: 600; }
  .b-activ { background: #dcfce7; color: #166534; }
  .b-partial { background: #fef9c3; color: #854d0e; }
  .b-cumparare { background: #dbeafe; color: #1e40af; }
  .b-vanzare { background: #fae8ff; color: #86198f; }
  .empty { color: #9ca3af; padding: 18px 0; font-style: italic; }
  .err { color: #b91c1c; padding: 10px 0; }
  /* Modal */
  /* z-index 2000 ca să fie peste Leaflet (panel-urile lui ajung la 700) */
  .ovl { position: fixed; inset: 0; background: rgba(15,30,20,.5);
         display: none; align-items: flex-start; justify-content: center;
         padding: 40px 16px; overflow-y: auto; z-index: 2000; backdrop-filter: blur(2px); }
  .ovl.show { display: flex; }
  .modal { background: #fff; border-radius: 16px; width: 100%; max-width: 760px;
           padding: 26px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
           animation: pop .14s ease-out; }
  @keyframes pop { from { transform: translateY(8px) scale(.99); opacity: .6 } }
  .modal h3 { font-size: 18px; margin-bottom: 4px; font-weight: 700; }
  .modal .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
  .form-section { margin-bottom: 18px; }
  .form-section > h4 { font-size: 12px; text-transform: uppercase;
    letter-spacing: .05em; color: var(--green); font-weight: 700;
    margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px 18px; align-items: start; }
  .grid.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .grid.c4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .grid.c5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .grid.c6 { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .grid .fld { min-width: 0; }
  .grid input, .grid select, .grid textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .fld { display: flex; flex-direction: column; }
  .fld.full { grid-column: 1 / -1; }
  .modal.arenda-wide { max-width: 1120px; }
  @media (max-width: 980px) { .modal.arenda-wide { max-width: 760px; } .grid.c3, .grid.c4 { grid-template-columns: 1fr 1fr; } }
  /* Hartă */
  .harta-wrap { display: flex; flex-direction: column; height: calc(100vh - 130px); min-height: 480px; }
  .harta-bar { display: flex; gap: 10px; align-items: center; padding: 8px 12px;
               background: #fff; border: 1px solid var(--line); border-radius: 12px 12px 0 0;
               border-bottom: none; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
  .harta-bar b { color: var(--ink); }
  .harta-main { flex: 1; position: relative; min-height: 360px; border: 1px solid var(--line); border-top: none; border-radius: 0 0 12px 12px; overflow: hidden; }
  #harta { position: absolute; top: 0; left: 0; bottom: 0; right: 280px; background: #e7eef0; }
  .harta-side { position: absolute; top: 0; right: 0; bottom: 0; width: 280px; background: #fff; border-left: 1px solid var(--line); overflow-y: auto; overflow-x: hidden; padding: 12px 13px; }
  .harta-side-sec { margin-bottom: 16px; }
  .harta-side-tt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #5b6b60; margin-bottom: 7px; }
  .harta-side input[type=color] { -webkit-appearance: none; appearance: none; border: 1px solid var(--line); border-radius: 4px; }
  @media (max-width: 760px) {
    .harta-main { position: static; display: block; }
    #harta { position: relative; right: 0; height: 55vh; }
    .harta-side { position: relative; width: auto; border-left: none; border-top: 1px solid var(--line); }
  }
  .harta-legenda-box { background: #fff; padding: 9px 11px; border-radius: 10px; box-shadow: 0 1px 6px rgba(0,0,0,.25); width: 220px; max-width: 60vw; }
  .harta-legenda-box input[type=color] { -webkit-appearance: none; appearance: none; border-radius: 4px; }
  .leaflet-popup-content h4 { font-size: 13px; margin-bottom: 6px; color: var(--green); }
  .leaflet-popup-content p { font-size: 12px; margin: 2px 0; }
  .leaflet-popup-content a.btn-edit { display: inline-block; margin-top: 8px;
    padding: 4px 10px; background: var(--green); color: #fff; border-radius: 6px;
    text-decoration: none; font-size: 12px; }
  /* Badge BLOCAT */
  .blocat-banner { background:#fef3c7; border:1px solid #f59e0b; color:#78350f;
    padding:10px 14px; border-radius:8px; margin-bottom:14px;
    font-size:13px; font-weight:600; display:flex; align-items:center; gap:8px; }
  /* Editor contract — arendatori & cote */
  .contract-box { background:#f7faf7; border:1px solid var(--line); border-radius:8px; padding:12px; }
  .contract-box .pers { display:flex; align-items:center; gap:8px; padding:6px 10px;
    background:#fff; border:1px solid var(--line); border-radius:6px; margin-bottom:6px; }
  .contract-box .pers b { font-size:13px; }
  .contract-box .pers .meta { font-size:11px; color:var(--muted); flex:1; }
  .contract-box .pers .x { background:none; border:none; color:#b91c1c; cursor:pointer;
    font-size:14px; padding:2px 8px; border-radius:4px; }
  .contract-box .pers .x:hover { background:#fee2e2; }
  .contract-box .controls { display:flex; gap:8px; align-items:center;
    margin-top:10px; flex-wrap:wrap; padding-top:10px; border-top:1px dashed var(--line); }
  .contract-box .controls select { flex:1; min-width:200px; padding:7px 10px;
    border:1px solid var(--line); border-radius:6px; font-size:13px; }
  .contract-box table.cote-tbl { width:100%; font-size:12px; }
  .contract-box table.cote-tbl td { padding:6px 8px; border-bottom:1px solid var(--line); }
  .contract-box table.cote-tbl tr:last-child td { border-bottom:none; }
  .contract-box .empty-note { color:var(--muted); font-size:12px; padding:14px;
    text-align:center; background:#fff; border:1px dashed var(--line); border-radius:6px; }
  /* Picker UAT */
  .uat-wrap { display:flex; gap:10px; flex-wrap:wrap; background:#f7faf7;
    border:1px solid var(--line); padding:10px; border-radius:8px; }
  .uat-col { flex:1; min-width:220px; position:relative; }
  .uat-col label { font-size:12px; color:var(--muted); display:block; margin-bottom:4px; }
  .uat-col input { width:100%; padding:7px 10px; border:1px solid var(--line);
    border-radius:6px; font-size:14px; }
  .uat-col input:disabled { background:#f3f4f6; color:#9ca3af; }
  .uat-list { position:absolute; top:100%; left:0; right:0; max-height:220px;
    overflow-y:auto; background:#fff; border:1px solid var(--line);
    border-top:none; border-radius:0 0 8px 8px; z-index:100;
    box-shadow:0 6px 16px rgba(0,0,0,0.15); }
  .uat-item { padding:6px 10px; cursor:pointer; font-size:13px; }
  .uat-item:hover, .uat-item.active { background:#e6f4ea; }
  .uat-pick { font-size:12px; margin-top:6px; color:var(--green); }
  /* Bara filtre listă */
  .filt-bar { display:flex; flex-wrap:wrap; gap:10px; align-items:center;
    background:#fff; padding:10px 12px; border:1px solid var(--line);
    border-radius:10px; margin-bottom:12px; }
  .filt-bar input[type="text"], .filt-bar select {
    padding:7px 10px; border:1px solid var(--line); border-radius:6px;
    font-size:13px; background:#fff; }
  .filt-bar input[type="text"] { flex:1; min-width:220px; }
  .filt-bar .cnt { margin-left:auto; font-size:12px; color:var(--muted); }
  /* Câmp de dată românesc (zz.ll.aaaa) — înlocuiește input[type=date] */
  .filt-bar input.data-ro { flex:0 0 auto; min-width:0; width:112px; }
  input.data-ro-err { border-color:#b91c1c !important; background:#fef2f2; }
  .data-ro-msg { font-size:11px; color:#b91c1c; margin-top:3px; }
  .filt-bar .clear { background:none; border:none; color:var(--green);
    cursor:pointer; font-size:12px; text-decoration:underline; }
  /* Tab-bar (Recepții / Calculații / Stocuri) */
  .tab-bar { display:flex; gap:4px; margin-bottom:14px; border-bottom:1px solid var(--line); padding-bottom:0; }
  .tab-bar .tab { background:transparent; border:none; padding:9px 16px; cursor:pointer;
    font-size:13px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent;
    margin-bottom:-1px; transition:color .12s, border-color .12s; }
  .tab-bar .tab:hover { color:var(--green); }
  .tab-bar .tab.active { color:var(--green-d); border-bottom-color:var(--green); }
  .fld label { font-size: 12px; color: #4b5563; margin-bottom: 5px; font-weight: 600; }
  .fld label .req { color: #dc2626; }
  .fld input, .fld select, .fld textarea {
    border: 1px solid #d6dade; border-radius: 9px; padding: 9px 11px;
    font-size: 14px; font-family: inherit; background: #fcfdfc; transition: border .1s; }
  .fld input:hover, .fld select:hover, .fld textarea:hover { border-color: #b9c0c7; }
  .fld input:focus, .fld select:focus, .fld textarea:focus {
    outline: 2px solid #a7d3ab; border-color: var(--green); background: #fff; }
  .fld .hint { font-size: 11px; color: var(--muted); margin-top: 3px; }
  .fkbox { position: relative; }
  .fkbox .fk-inp { width: 100%; border: 1px solid #d6dade; border-radius: 9px;
    padding: 9px 11px; font-size: 14px; font-family: inherit; background: #fcfdfc; }
  .fkbox .fk-inp:focus { outline: 2px solid #a7d3ab; border-color: var(--green); background: #fff; }
  .fk-list { display: none; position: absolute; z-index: 60; left: 0; right: 0;
    top: calc(100% + 3px); background: #fff; border: 1px solid #d6dade;
    border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.14);
    max-height: 240px; overflow-y: auto; }
  .fk-opt, .fk-add { padding: 8px 11px; font-size: 14px; cursor: pointer; }
  .fk-opt:hover { background: #f1f6f1; }
  .fk-clear { color: #9ca3af; }
  .fk-add { color: var(--green); font-weight: 600; border-top: 1px solid var(--line);
    background: #f7faf7; }
  .fk-add:hover { background: #e8f3e9; }
  .mpbox { position: relative; }
  .mp-head { width: 100%; box-sizing: border-box; min-height: 39px;
    border: 1px solid #d6dade; border-radius: 9px;
    padding: 9px 11px; font-size: 14px; background: #fcfdfc; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center; gap: 8px; }
  .mp-head:hover { border-color: #b9c0c7; }
  .mpbox.open .mp-head { outline: 2px solid #a7d3ab; border-color: var(--green); background: #fff; }
  .mp-lbl { color: var(--ink); }
  .mp-lbl.empty { color: #9ca3af; }
  .mp-list { display: none; position: absolute; z-index: 60; left: 0; right: 0;
    top: calc(100% + 3px); background: #fff; border: 1px solid #d6dade;
    border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.14);
    max-height: 240px; overflow-y: auto; padding: 4px; }
  .mpbox.open .mp-list { display: block; }
  .mp-list label { display: flex; align-items: center; gap: 9px; padding: 8px 10px;
    font-size: 14px; cursor: pointer; border-radius: 7px; }
  .mp-list label:hover { background: #f1f6f1; }
  .mp-list input { width: auto; }
  .chk { flex-direction: row; align-items: center; gap: 9px; }
  .chk input { width: 17px; height: 17px; accent-color: var(--green); }
  .adv-toggle { display: inline-flex; align-items: center; gap: 6px;
    background: none; border: 0; color: var(--green); font-weight: 600;
    font-size: 13px; cursor: pointer; padding: 6px 0; margin-bottom: 6px; }
  .adv-wrap { display: none; }
  .adv-wrap.show { display: block; }
  .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px;
    border-top: 1px solid var(--line); padding-top: 18px; }
  .modal .merr { color: #b91c1c; font-size: 13px; margin-top: 12px; }
  footer { text-align: center; color: #9ca3af; font-size: 12px; padding: 16px; }

  /* ===== MOD ÎNTUNECAT ===== */
  body.dark { --ink:#e5e9ef; --muted:#9aa4b2; --line:#2b333f; --bg:#0f141b;
    --faint:#7c8794; --hair:#232b36; --panel:#1a212c; --hover:#222b37; }
  body.dark .topbar, body.dark .card, body.dark section, body.dark .modal { background:#1a212c !important; color:var(--ink); }
  body.dark .sec-head h2, body.dark h2, body.dark h3 { color:#eef2f6 !important; }
  body.dark th { background:#222b37 !important; color:#aab4c2 !important; }
  body.dark td { border-color:var(--line); color:var(--ink); }
  body.dark table tr:hover td { background:#222b37; }
  body.dark input, body.dark select, body.dark textarea,
  body.dark .fkbox .fk-inp, body.dark .mp-head,
  body.dark .contract-box .controls select {
    background:#10161e !important; color:var(--ink) !important; border-color:var(--line) !important; }
  body.dark input::placeholder, body.dark textarea::placeholder { color:#6b7682; }
  body.dark .btn.gray { background:#2b333f !important; color:#d6dce4 !important; }
  body.dark .btn.gray:hover { background:#353f4d !important; }
  body.dark .contract-box { background:#141a22 !important; }
  body.dark .contract-box .pers, body.dark .contract-box .empty-note { background:#1a212c !important; }
  body.dark .empty { color:#7c8794; }
  body.dark .appbar-dropdown { background:#1a212c !important; color:var(--ink); border-color:var(--line); }
  body.dark .dd-item:hover { background:#222b37; }
  /* compensare stiluri inline din conținutul generat */
  body.dark [style*="background:#fff"], body.dark [style*="background: #fff"],
  body.dark [style*="background:#f9fafb"], body.dark [style*="background:#f7faf7"],
  body.dark [style*="background:#f6f8f6"], body.dark [style*="background:#f7f9f8"],
  body.dark [style*="background:#f0fdf4"], body.dark [style*="background:#f0faf4"] { background:#1a212c !important; }
  body.dark [style*="background:#fffbeb"] { background:#2c2510 !important; }
  body.dark [style*="background:#fef9c3"], body.dark [style*="background:#fef3c7"] { background:#3a3212 !important; }
  body.dark [style*="background:#dcfce7"] { background:#11321d !important; }
  body.dark [style*="background:#fee2e2"], body.dark [style*="background:#fef2f2"] { background:#3a1718 !important; }
  body.dark [style*="color:#14401a"], body.dark [style*="color:#166534"] { color:#7cd68a !important; }
  body.dark [style*="color:#111827"], body.dark [style*="color:#1f2937"], body.dark [style*="color:#374151"] { color:#dbe2ea !important; }
  body.dark [style*="color:#6b7280"], body.dark [style*="color:#4b5563"] { color:#9aa4b2 !important; }
  body.dark [style*="color:#92400e"] { color:#e0b070 !important; }
  body.dark [style*="color:#991b1b"], body.dark [style*="color:#9a3412"] { color:#f08a8a !important; }

  /* ===========================================================================
     AGRIA re-skin — drop-in (restyles existing classes only; no markup logic).
     Loaded last so later source order wins. Token redefinitions are global;
     light-only component colors are reconciled for dark mode at the bottom.
     =========================================================================== */
  :root{
    --green:#0E9E63; --green-d:#0B7E4F; --green-dd:#0B7E4F;
    --brand-50:#E7F6EE; --brand-100:#CFEEDD;
    --ink:#16241C; --muted:#5E6E63; --faint:#94A399;
    --line:#E3E9E3; --hair:#EEF2EE; --bg:#EEF2EE;
    --warn:#CC7A2B; --danger:#DC4C4C; --info:#3A6FB0; --purple:#8A5BC2;
    --panel:#ffffff; --hover:#F4F7F4;
  }
  body{ font-family:'Hanken Grotesk', system-ui, -apple-system, sans-serif;
    background:var(--bg); color:var(--ink); -webkit-font-smoothing:antialiased; }

  /* APPBAR — single fresh-green bar */
  .appbar{ background:linear-gradient(180deg,#10A567,#0C8A54); box-shadow:0 1px 0 rgba(0,0,0,.06); }
  .appbar-brand{ color:#F2FBF5; border-right-color:rgba(255,255,255,.16); font-weight:700; letter-spacing:.01em; }
  .appbar-modules a{ color:#D6F0DF; font-weight:500; border-radius:9px;
    display:inline-flex; align-items:center; gap:7px; }
  .appbar-modules a svg{ width:17px; height:17px; flex:0 0 auto; }
  .appbar-modules a:hover{ background:rgba(255,255,255,.12); color:#fff; }
  .appbar-modules a.active{ background:rgba(255,255,255,.20); color:#fff; font-weight:700; }
  .appbar-toggle, .appbar-menu-btn{ background:rgba(255,255,255,.12); color:#fff; border-radius:9px; }
  .appbar-toggle:hover, .appbar-menu-btn:hover{ background:rgba(255,255,255,.20); }
  .appbar-toggle svg{ width:17px; height:17px; display:block; }
  .appbar-badge{ background:#E2604A; }

  /* SIDEBAR — white & airy */
  aside{ background:#fff; color:var(--ink); border-right:1px solid var(--line); }
  aside .brand{ border-bottom:1px solid var(--hair); }
  aside .brand b{ color:var(--ink); }
  aside .brand span{ color:var(--faint); opacity:1; }
  #sidebar-head{ color:var(--ink); }
  nav .grp{ color:var(--faint); font-weight:700; }
  nav a{ color:var(--muted); border-left:3px solid transparent; font-weight:500; }
  nav a:hover{ background:#F4F7F4; color:var(--ink); }
  nav a.active{ background:var(--brand-50); border-left-color:var(--green); color:var(--green-d); font-weight:600; }

  /* TOPBAR */
  .topbar{ background:#fff; border-bottom:1px solid var(--line); box-shadow:0 1px 2px rgba(16,40,28,.03); }
  .topbar h1{ color:var(--ink); font-weight:800; letter-spacing:-.01em; }
  .firma-sel label{ color:var(--faint); }
  .firma-sel select{ background:#fff; border:1px solid var(--line); color:var(--ink); border-radius:9px; font-weight:600; }
  .firma-sel select:focus{ outline:2px solid var(--brand-100); border-color:var(--green); }

  /* KPI CARDS */
  .card{ background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 1px 2px rgba(16,40,28,.04); }
  .card .val{ color:var(--green); font-weight:800; letter-spacing:-.01em; font-variant-numeric:tabular-nums; }
  .card .lbl{ color:var(--muted); }

  /* SECTIONS */
  section{ background:#fff; border:1px solid var(--line); border-radius:14px; box-shadow:0 1px 2px rgba(16,40,28,.04); }
  .sec-head h2{ color:var(--ink); border-left:3px solid var(--green); font-weight:700; }

    /*LICO-START — iconuri line (mask, inlocuiesc emoji din chrome) */
  .lico{display:inline-block;width:1.05em;height:1.05em;vertical-align:-0.17em;margin-right:.2em;flex:0 0 auto;line-height:0}
  .lico-search{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'11'%20cy%3D'11'%20r%3D'7'%2F%3E%3Cpath%20d%3D'm21%2021-4.3-4.3'%2F%3E%3C%2Fsvg%3E")}
  .lico-alert{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M10.3%203.9%201.8%2018a2%202%200%200%200%201.7%203h16.9a2%202%200%200%200%201.7-3L13.7%203.9a2%202%200%200%200-3.4%200Z'%2F%3E%3Cpath%20d%3D'M12%209v4M12%2017h.01'%2F%3E%3C%2Fsvg%3E")}
  .lico-paperclip{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M21.4%2011%2012.3%2020.2a5%205%200%200%201-7.1-7.1l9.2-9.1a3%203%200%200%201%204.2%204.2l-9.2%209.2a1%201%200%200%201-1.4-1.4l8.5-8.5'%2F%3E%3C%2Fsvg%3E")}
  .lico-file{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M14%203H6a2%202%200%200%200-2%202v14a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8Z'%2F%3E%3Cpath%20d%3D'M14%203v5h5'%2F%3E%3C%2Fsvg%3E")}
  .lico-clipboard{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'8'%20y%3D'3'%20width%3D'8'%20height%3D'4'%20rx%3D'1'%2F%3E%3Cpath%20d%3D'M9%205H6a2%202%200%200%200-2%202v12a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V7a2%202%200%200%200-2-2h-3'%2F%3E%3C%2Fsvg%3E")}
  .lico-folder{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M3%207a2%202%200%200%201%202-2h4l2%202h8a2%202%200%200%201%202%202v8a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-home{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M3%2011l9-7%209%207'%2F%3E%3Cpath%20d%3D'M5%2010v10h14V10'%2F%3E%3C%2Fsvg%3E")}
  .lico-globe{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'9'%2F%3E%3Cpath%20d%3D'M3%2012h18'%2F%3E%3Cpath%20d%3D'M12%203a15%2015%200%200%201%200%2018M12%203a15%2015%200%200%200%200%2018'%2F%3E%3C%2Fsvg%3E")}
  .lico-sprout{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M7%2020h10M12%2020V9'%2F%3E%3Cpath%20d%3D'M12%209C9%209%206%207%206%204c3%200%206%202%206%205Zm0%200c3%200%206-2%206-5-3%200-6%202-6%205Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-phone{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'6'%20y%3D'2'%20width%3D'12'%20height%3D'20'%20rx%3D'2'%2F%3E%3Cpath%20d%3D'M11%2019h2'%2F%3E%3C%2Fsvg%3E")}
  .lico-bank{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M3%2021h18M5%2021V10M9%2021V10M15%2021V10M19%2021V10M3%2010l9-6%209%206Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-ruler{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M3%2017%2017%203l4%204L7%2021Z'%2F%3E%3Cpath%20d%3D'M9%2011l2%202M13%207l2%202'%2F%3E%3C%2Fsvg%3E")}
  .lico-user{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'12'%20cy%3D'8'%20r%3D'4'%2F%3E%3Cpath%20d%3D'M5%2021a7%207%200%200%201%2014%200'%2F%3E%3C%2Fsvg%3E")}
  .lico-users{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'9'%20cy%3D'8'%20r%3D'3.5'%2F%3E%3Cpath%20d%3D'M2%2021a7%207%200%200%201%2014%200'%2F%3E%3Cpath%20d%3D'M17%205.2a3.5%203.5%200%200%201%200%206.6M22%2021a7%207%200%200%200-4.5-6.5'%2F%3E%3C%2Fsvg%3E")}
  .lico-settings{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'3'%2F%3E%3Cpath%20d%3D'M19.4%2015a1.6%201.6%200%200%200%20.3%201.8%202%202%200%201%201-2.8%202.8%201.6%201.6%200%200%200-2.7%201.1%202%202%200%201%201-4%200%201.6%201.6%200%200%200-2.6-1.1%202%202%200%201%201-2.8-2.8A1.6%201.6%200%200%200%204.6%2015a2%202%200%201%201%200-4%201.6%201.6%200%200%200%201.4-2.6%202%202%200%201%201%202.8-2.8A1.6%201.6%200%200%200%2011.4%204.6a2%202%200%201%201%204%200%201.6%201.6%200%200%200%202.6%201.4%202%202%200%201%201%202.8%202.8A1.6%201.6%200%200%200%2019.4%2011'%2F%3E%3C%2Fsvg%3E")}
  .lico-save{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M5%203h11l3%203v13a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2Z'%2F%3E%3Cpath%20d%3D'M7%203v5h8M7%2021v-7h10v7'%2F%3E%3C%2Fsvg%3E")}
  .lico-box{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'm12%202%209%205v10l-9%205-9-5V7Z'%2F%3E%3Cpath%20d%3D'M12%2012%2021%207M12%2012v10M12%2012%203%207'%2F%3E%3C%2Fsvg%3E")}
  .lico-link{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M9%2015l6-6M10%206l1-1a4%204%200%200%201%206%206l-1%201M14%2018l-1%201a4%204%200%200%201-6-6l1-1'%2F%3E%3C%2Fsvg%3E")}
  .lico-pen{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%2020h9M16.5%203.5a2.1%202.1%200%200%201%203%203L7%2019l-4%201%201-4Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-map{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M9%204%203%206v14l6-2%206%202%206-2V4l-6%202Z'%2F%3E%3Cpath%20d%3D'M9%204v14M15%206v14'%2F%3E%3C%2Fsvg%3E")}
  .lico-shuffle{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M16%203h5v5M4%2020%2021%203M21%2016v5h-5M15%2015l6%206M4%204l5%205'%2F%3E%3C%2Fsvg%3E")}
  .lico-refresh{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M21%2012a9%209%200%201%201-2.6-6.3M21%204v5h-5'%2F%3E%3C%2Fsvg%3E")}
  .lico-bulb{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M9%2018h6M10%2021h4M12%203a6%206%200%200%201%204%2010.5c-.6.6-1%201.3-1%202.1H9c0-.8-.4-1.5-1-2.1A6%206%200%200%201%2012%203Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-pin{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%2021s-6-5.3-6-10a6%206%200%200%201%2012%200c0%204.7-6%2010-6%2010Z'%2F%3E%3Ccircle%20cx%3D'12'%20cy%3D'11'%20r%3D'2.2'%2F%3E%3C%2Fsvg%3E")}
  .lico-ban{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Ccircle%20cx%3D'12'%20cy%3D'12'%20r%3D'9'%2F%3E%3Cpath%20d%3D'm5%205%2014%2014'%2F%3E%3C%2Fsvg%3E")}
  .lico-star{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'm12%203%202.6%205.6%206%20.8-4.4%204.2%201.1%206-5.3-2.9-5.3%202.9%201.1-6L3.4%209.4l6-.8Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-image{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Crect%20x%3D'3'%20y%3D'3'%20width%3D'18'%20height%3D'18'%20rx%3D'2'%2F%3E%3Ccircle%20cx%3D'9'%20cy%3D'9'%20r%3D'2'%2F%3E%3Cpath%20d%3D'm21%2016-5-5L5%2021'%2F%3E%3C%2Fsvg%3E")}
  .lico-pie{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%203v9l8%204A9%209%200%201%200%2012%203Z'%2F%3E%3C%2Fsvg%3E")}
  .lico-palette{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%203a9%209%200%201%200%200%2018c1%200%201.5-.8%201.5-1.5%200-1.5%201-2%202.5-2H18a3%203%200%200%200%203-3c0-5-4-8.5-9-8.5Z'%2F%3E%3Ccircle%20cx%3D'7.5'%20cy%3D'12'%20r%3D'1'%2F%3E%3Ccircle%20cx%3D'10'%20cy%3D'8'%20r%3D'1'%2F%3E%3Ccircle%20cx%3D'14'%20cy%3D'8'%20r%3D'1'%2F%3E%3Ccircle%20cx%3D'16.5'%20cy%3D'12'%20r%3D'1'%2F%3E%3C%2Fsvg%3E")}
  .lico-crown{--licm:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M3%207l4%205%205-7%205%207%204-5-2%2012H5Z'%2F%3E%3C%2Fsvg%3E")}
  /*LICO-END*/

  /* TABLES */
  th{ background:#F7FAF7; color:var(--faint); font-weight:700; letter-spacing:.04em; }
  td{ border-bottom:1px solid var(--hair); }
  tbody tr:hover td{ background:#F4F7F4; }
  td.num{ font-variant-numeric:tabular-nums; }

  /* LISTĂ generică îmbunătățită (#4: sticky header, sortare, căutare, selecție în masă) */
  .list-enh .lst-toolbar{ display:flex; align-items:center; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
  .list-enh .lst-search input{ padding:8px 11px; border:1px solid var(--line); border-radius:9px; font-size:13px; min-width:240px; background:#fff; font-family:inherit; }
  .list-enh .lst-search input:focus{ outline:2px solid var(--brand-100); border-color:var(--green); }
  .list-enh .lst-count{ font-size:12.5px; color:var(--muted); font-weight:600; }
  .list-enh .lst-bulk{ display:flex; align-items:center; gap:8px; }
  .list-enh .lst-selinfo{ font-size:12.5px; font-weight:700; color:var(--green-d); }
  .list-enh .lst-scroll{ overflow:auto; max-height:calc(100vh - 240px); border:1px solid var(--line); border-radius:12px; background:#fff; }
  .list-enh table{ width:100%; border-collapse:collapse; }
  .list-enh thead th{ position:sticky; top:0; z-index:2; background:#F7FAF7; white-space:nowrap; box-shadow:inset 0 -1px 0 var(--line); }
  .list-enh th.lst-sort{ cursor:pointer; user-select:none; }
  .list-enh th.lst-sort:hover{ background:#EEF4EE; color:var(--green-d); }
  .list-enh .lst-ind{ color:var(--green); font-size:11px; }
  .list-enh tr.lst-selrow td{ background:var(--brand-50) !important; }
  .list-enh td.lst-cb, .list-enh th.lst-cbh{ text-align:center; width:34px; }
  .list-enh td.lst-act{ white-space:nowrap; }
  /* trunchiere celule lungi (adresă, email) — fără scroll orizontal; textul integral la hover (title) */
  .list-enh tbody td{ max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .list-enh tbody td.lst-cb, .list-enh tbody td.lst-act{ max-width:none; overflow:visible; }
  /* listele folosesc toată lățimea ecranului (tabele late) */
  .content:has(.list-enh){ max-width:none; }
  .content:has(.acte-full){ max-width:none; }
  /* coloane lungi din lista de acte — trunchiate cu „…", text integral la hover */
  .acte-full td.trunc{ max-width:240px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  /* bară de filtre dinamică (dropdown-uri bifabile tip Excel) */
  .msbar{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:10px 0 12px; }
  .ms-searchbox{ flex:1; min-width:220px; }
  .ms-searchbox input{ width:100%; padding:8px 11px; border:1px solid #d4d7da; border-radius:8px; font:inherit; font-size:13.5px; box-sizing:border-box; }
  .ms{ position:relative; }
  .ms-btn{ padding:8px 12px; border:1px solid #d4d7da; border-radius:8px; background:#fff; cursor:pointer; font:inherit; font-size:13px; display:inline-flex; align-items:center; gap:6px; white-space:nowrap; max-width:280px; overflow:hidden; text-overflow:ellipsis; }
  .ms-btn::after{ content:'▾'; opacity:.55; }
  .ms-btn.active{ border-color:#0E9E63; color:#0b6b44; background:#eef8f2; font-weight:600; }
  .ms-pop{ position:absolute; z-index:60; top:calc(100% + 4px); left:0; width:280px; background:#fff; border:1px solid #d4d7da; border-radius:10px; box-shadow:0 10px 30px rgba(20,40,20,.16); padding:8px; }
  .ms-search{ width:100%; padding:6px 9px; border:1px solid #e2e2dc; border-radius:7px; margin-bottom:6px; font:inherit; font-size:13px; box-sizing:border-box; }
  .ms-tools{ display:flex; gap:14px; padding:2px 4px 6px; font-size:12px; }
  .ms-tools a{ color:#0E9E63; cursor:pointer; text-decoration:underline; }
  .ms-list{ max-height:300px; overflow:auto; }
  .ms-opt{ display:flex; align-items:center; gap:8px; padding:5px 6px; border-radius:6px; cursor:pointer; font-size:13px; }
  .ms-opt:hover{ background:#f2f7f3; }
  .ms-opt > span:first-of-type{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ms-opt .sub{ margin-left:auto; color:#9ca3af; font-size:11px; flex:0 0 auto; }
  .acte-total{ margin:0 0 12px; padding:9px 14px; background:#f0f9f4; border:1px solid #cdeadd; border-radius:10px; font-size:13.5px; color:#14401a; }
  body.dark .ms-btn, body.dark .ms-pop, body.dark .ms-searchbox input, body.dark .ms-search{ background:#1a212c; color:#e5e7eb; border-color:#33404f; }
  body.dark .ms-opt:hover{ background:#222b37; }
  body.dark .ms-btn.active{ background:#14301f; color:#7fe0aa; border-color:#0E9E63; }
  body.dark .acte-total{ background:#14301f; border-color:#1e5738; color:#cdeadd; }
  body.dark .list-enh thead th{ background:#222b37; }
  body.dark .list-enh .lst-scroll{ background:#1a212c; }

  /* BUTTONS */
  .btn{ background:var(--green); border-radius:9px; font-weight:600; box-shadow:0 2px 8px rgba(14,158,99,.22); }
  .btn:hover{ background:var(--green-d); }
  .btn:active{ transform:translateY(1px); }
  .btn.sm{ border-radius:7px; }
  .btn.gray{ background:#fff; color:var(--muted); border:1px solid var(--line); box-shadow:none; }
  .btn.gray:hover{ background:#F4F7F4; }
  .btn.danger{ background:#FBEAEA; color:#C0392B; box-shadow:none; }
  .btn.danger:hover{ background:#F6D8D8; }

  /* BADGES */
  .badge{ font-weight:600; }
  .b-activ{ background:var(--brand-50); color:var(--green-d); }
  .b-partial{ background:#FBEFDD; color:#9A5B12; }
  .b-cumparare{ background:#EAF1FA; color:#2C5C9E; }
  .b-vanzare{ background:#F2EAFB; color:#6B3FA0; }

  /* MODALS / FORMS */
  .modal{ border-radius:16px; box-shadow:0 20px 60px rgba(16,40,28,.28); }
  .form-section > h4{ color:var(--green); border-bottom:1px solid var(--line); }
  .grid input, .grid select, .grid textarea,
  .fld input, .fld select, .fld textarea{ border:1px solid var(--line); border-radius:9px; }
  .fld input:focus, .fld select:focus, .fld textarea:focus,
  .grid input:focus, .grid select:focus, .grid textarea:focus{ outline:2px solid var(--brand-100); border-color:var(--green); }

  /* Marker flotă (divIcon) — fără cutia albă implicită Leaflet */
  .flota-pin{ background:none; border:none; }
  /* Etichetă permanentă pe marker flotă (nume mașină) */
  .flota-lbl{ background:rgba(16,40,28,.82); color:#F2FBF5; border:none; border-radius:5px;
    padding:1px 7px; font:700 11px 'Hanken Grotesk',sans-serif; white-space:nowrap;
    box-shadow:0 1px 3px rgba(0,0,0,.45); }
  .flota-lbl::before{ display:none !important; }
  body.dark .flota-lbl{ background:rgba(0,0,0,.72); }

  /* ── MOD PERETE (kiosk) — utilizator care vede DOAR Command Center + Camere, fără meniuri ── */
  body.kiosk aside,
  body.kiosk .topbar,
  body.kiosk footer,
  body.kiosk #firma-menu,
  body.kiosk #theme-toggle,
  body.kiosk .appbar > .appbar-toggle { display: none !important; }
  body.kiosk .content { padding: 0; max-width: none; }
  body.kiosk .cc-wrap { height: calc(100vh - 52px); min-height: 0; }
  body.kiosk .appbar-modules a { font-size: 14px; padding: 9px 16px; }
  body.kiosk .appbar-modules a.active { background: rgba(255,255,255,.22); }
  /* Player camere (go2rtc) */
  video-stream{ display:block; width:100%; height:100%; }
  video-stream video{ width:100%; height:100%; object-fit:contain; background:#000; }
  /* Inline icons in page content (buttons/titles) */
  .licon{ width:15px; height:15px; vertical-align:-2px; flex:0 0 auto; }
  .sec-head h2 .licon, h2 .licon, h3 .licon{ width:17px; height:17px; vertical-align:-3px; margin-right:4px; color:var(--green); }
  .btn .licon, .btn.sm .licon{ vertical-align:-2px; margin-right:3px; }

  /* MAP popups */
  .leaflet-popup-content h4{ color:var(--green); }
  .leaflet-popup-content a.btn-edit{ background:var(--green); border-radius:7px; }

  /* DARK-MODE reconciliation — keep the toggle working after the light re-skin.
     Dark redefines tokens; here we re-assert the few hardcoded light surfaces. */
  body.dark{ --green:#2bb87a; --green-d:#37c98a; --brand-50:rgba(124,214,138,.16); }
  body.dark aside{ background:#1a212c; color:var(--ink); border-right-color:var(--line); }
  body.dark aside .brand{ border-bottom-color:var(--line); }
  body.dark aside .brand b{ color:var(--ink); }
  body.dark aside .brand span{ color:#7c8794; }
  body.dark #sidebar-head{ color:var(--ink); }
  body.dark nav .grp{ color:#7c8794; }
  body.dark nav a{ color:var(--muted); }
  body.dark nav a:hover{ background:#222b37; color:#fff; }
  body.dark nav a.active{ background:rgba(124,214,138,.16); border-left-color:#37c98a; color:#fff; }
  body.dark tbody tr:hover td{ background:#222b37; }
  body.dark td{ border-bottom-color:var(--line); }
  body.dark .card .val{ color:#37c98a; }
  body.dark .btn.gray{ background:#2b333f; color:#d6dce4; border-color:var(--line); }
  body.dark .btn.gray:hover{ background:#353f4d; }
  .rec-meas-tip{ background:#E0A800; color:#1a1500; border:none; font-weight:600; font-size:12px; text-align:center; box-shadow:0 1px 4px rgba(0,0,0,.3); }
  .rec-meas-tip::before{ display:none; }
  .only-print{ display:none; }
  @media print {
    body * { visibility:hidden; }
    #foaie-print, #foaie-print * { visibility:visible; }
    #foaie-print { position:absolute; left:0; top:0; width:100%; }
    #foaie-print table { font-size:11px; }
    .no-print { display:none !important; }
    .only-print { display:inline !important; }
  }

  /* ═══ #5 MOBIL — vedere de teren (doar sub 720px; desktopul neatins) ═══ */
  @media (max-width: 720px) {
    .appbar { height: 50px; padding: 0 8px; gap: 2px; flex-wrap: nowrap; }
    .appbar-brand { font-size: 14px; padding: 0 8px 0 4px; white-space: nowrap; }
    .appbar-modules { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; }
    .appbar-modules::-webkit-scrollbar { display: none; }
    .appbar-modules a { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
    .appbar-menu-btn { padding: 8px 9px; }

    /* sidebar = overlay glisant peste conținut (nu mai înghesuie) */
    aside { position: fixed; top: 50px; bottom: 0; left: 0; z-index: 45;
            box-shadow: 4px 0 24px rgba(0,0,0,.28); transition: transform .2s ease, margin-left .2s ease; }

    .topbar { padding: 11px 14px; }
    .topbar h1 { font-size: 16px; }
    .content { padding: 14px 13px; }

    .cards { gap: 11px; }
    .card { flex: 1 1 100%; padding: 15px 16px; }

    /* formulare → o coloană */
    .grid, .grid.c3, .grid.c4, .grid.c5, .grid.c6 { grid-template-columns: 1fr; }
    .fld input, .fld select, .fld textarea,
    .grid input, .grid select, .grid textarea { font-size: 16px; padding: 11px 12px; }  /* 16px = fără zoom pe iOS */

    /* ținte de atins ≥ deget */
    .btn { min-height: 44px; padding: 12px 16px; }
    .btn.sm { min-height: 36px; padding: 8px 11px; font-size: 12.5px; }

    .modal { max-width: 100%; margin: 8px; max-height: 92vh; overflow: auto; }

    /* tabele */
    .list-enh .lst-scroll { max-height: calc(100vh - 250px); }
    .list-enh .lst-search input { min-width: 0; width: 100%; }
    .list-enh .lst-toolbar { gap: 8px; }

    /* dashboard + fișe → o coloană */
    .db2 .db2-kpis { grid-template-columns: 1fr 1fr; }
    .db2 .db2-grid { grid-template-columns: 1fr; }
    .lt-chain { grid-template-columns: 1fr; }
    .prt-kpis { width: 100%; }

    /* launcher mod teren */
    .teren-grid { grid-template-columns: 1fr 1fr; }
  }

  /* ===========================================================================
     MODUL CEREALE (trading) — componente noi, izolate sub .cer
     Design: handoff Claude design. Folosește tokenii Agria (var(--...)) => dark-safe.
     =========================================================================== */
  /* badge-uri semantice (globale, aditive) */
  .badge.b-ok{ background:var(--brand-50); color:var(--green-d); }
  .badge.b-warn{ background:#FBEFDD; color:#9A5B12; }
  .badge.b-info{ background:#EAF1FA; color:#2C5C9E; }
  .badge.b-bad{ background:#FBEAEA; color:#C0392B; }
  .badge.b-mut{ background:var(--hair); color:var(--muted); }
  body.dark .badge.b-warn{ background:#3a3212; color:#e0b070; }
  body.dark .badge.b-info{ background:#16283f; color:#8fb4e6; }
  body.dark .badge.b-bad{ background:#3a1718; color:#f08a8a; }

  /* hint sub itemele de meniu */
  .nav-hint{ font-size:11px; color:var(--faint); padding:1px 22px 8px 22px; line-height:1.4; margin-top:-3px; }

  /* ---- utilitare (scoped) ---- */
  .cer .fx{ display:flex; } .cer .ac{ align-items:center; } .cer .jb{ justify-content:space-between; }
  .cer .wrap{ flex-wrap:wrap; } .cer .f1{ flex:1; } .cer .gap8{ gap:8px; } .cer .gap12{ gap:12px; }
  .cer .mb8{ margin-bottom:8px; } .cer .mb16{ margin-bottom:16px; }
  .cer .fs12{ font-size:12px; } .cer .fs13{ font-size:13px; }
  .cer .num{ font-variant-numeric:tabular-nums; font-weight:700; }
  .cer .mut{ color:var(--muted); } .cer .fnt{ color:var(--faint); }
  .cer .link{ color:var(--green-d); font-weight:600; cursor:pointer; }
  .cer .link:hover{ text-decoration:underline; }
  .cer .sct{ font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--faint); margin:0 0 8px; }
  .cer .note{ font-size:12px; color:var(--faint); margin-top:10px; line-height:1.5; }

  /* ---- bandă pipeline flux ---- */
  .cer .flux{ display:flex; gap:8px; align-items:center; margin-bottom:24px; }
  .cer .fstage{ flex:1; background:var(--panel); border:1px solid var(--line); border-radius:14px;
    padding:13px 16px; cursor:pointer; box-shadow:0 1px 2px rgba(16,40,28,.04); transition:border-color .12s; }
  .cer .fstage:hover{ border-color:var(--green); }
  .cer .fstage.on{ border-color:var(--green); }
  .cer .fk{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--faint); }
  .cer .fv{ font-size:21px; font-weight:800; letter-spacing:-.01em; font-variant-numeric:tabular-nums; margin-top:2px; }
  .cer .fs2{ font-size:12px; color:var(--muted); margin-top:2px; }
  .cer .farr{ color:#C2CCC2; flex:none; }

  /* ---- grid + secțiuni ---- */
  .cer .g2{ display:grid; grid-template-columns:1.2fr 1fr; gap:22px; align-items:start; }
  .cer .sec{ background:var(--panel); border-radius:14px; padding:20px 22px; border:1px solid var(--line);
    box-shadow:0 1px 2px rgba(16,40,28,.04); margin-bottom:22px; }
  .cer .shead{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; gap:12px; }
  .cer .shead h2{ font-size:16px; font-weight:700; border-left:3px solid var(--green); padding-left:11px; margin:0; }

  /* ---- rânduri listă + carduri contract ---- */
  .cer .lrow{ display:flex; align-items:center; gap:10px; padding:10px 2px; border-bottom:1px solid var(--hair); font-size:13px; }
  .cer .lrow:last-child{ border-bottom:none; }
  .cer .lrow.click{ cursor:pointer; }
  .cer .lrow.click:hover{ background:var(--hover); }
  .cer .crow{ background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:12px 14px; margin-bottom:10px; }
  .cer .crow.click{ cursor:pointer; transition:border-color .12s; }
  .cer .crow.click:hover{ border-color:var(--green); }

  /* ---- progress bar ---- */
  .cer .pb{ height:8px; border-radius:99px; background:var(--hair); overflow:hidden; min-width:60px; }
  .cer .pb i{ display:block; height:100%; background:var(--green); border-radius:99px; }
  .cer .pb.warn i{ background:var(--warn); }

  /* ---- KPI boxes + rail (fișe/borderou, faze următoare) ---- */
  .cer .kbox{ background:var(--panel); border:1px solid var(--line); border-radius:12px; padding:12px 16px; flex:1; min-width:140px; }
  .cer .kbox .v{ font-size:19px; font-weight:800; font-variant-numeric:tabular-nums; }
  .cer .kbox .k{ font-size:11px; color:var(--faint); font-weight:700; text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }
  .cer .hrow{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
  .cer .hrow h2{ font-size:21px; font-weight:800; letter-spacing:-.01em; margin:0; }
  .cer .bk{ display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:13px; font-weight:600; cursor:pointer; margin-bottom:12px; }
  .cer .bk:hover{ color:var(--green-d); }

  /* ---- borderou BCAR (fișă recepție) ---- */
  .cer .gb{ display:grid; grid-template-columns:1.6fr 1fr; gap:22px; align-items:start; }
  .cer .avz{ display:flex; align-items:center; gap:12px; background:var(--panel); border:1px solid var(--line);
    border-radius:12px; padding:11px 14px; margin-bottom:8px; flex-wrap:wrap; }
  .cer .avz .net{ font-size:19px; font-weight:800; font-variant-numeric:tabular-nums; margin-left:auto; }
  .cer .qc{ display:inline-block; border:1px solid var(--line); border-radius:6px; padding:2px 7px; font-size:11px;
    color:var(--muted); background:var(--hair); font-variant-numeric:tabular-nums; white-space:nowrap; }
  .cer .qc.hot{ background:#FBEFDD; border-color:#EAD9BC; color:#9A5B12; }
  body.dark .cer .qc.hot{ background:#3a3212; border-color:#5a4a1e; color:#e0b070; }
  .cer .addbox{ border:1.5px dashed #C6D4C9; border-radius:12px; padding:14px 16px; background:var(--hover); }
  body.dark .cer .addbox{ border-color:#3a4a3e; }
  .cer .agrid{ display:grid; grid-template-columns:repeat(6,1fr); gap:10px; margin-bottom:12px; }
  .cer .afld{ display:flex; flex-direction:column; gap:4px; min-width:0; }
  .cer .afld .al{ font-size:11px; font-weight:600; color:var(--muted); }
  .cer .afld .ai{ border:1px solid var(--line); border-radius:8px; padding:8px 10px; font-size:14px;
    font-family:inherit; background:var(--panel); color:var(--ink); width:100%; box-sizing:border-box; }
  .cer .afld .ai:focus{ outline:2px solid var(--brand-100); border-color:var(--green); }
  .cer .rail{ background:var(--hover); border:1px solid var(--line); border-radius:14px; padding:16px 18px; }
  .cer .krow{ display:flex; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px dashed var(--line); font-size:13px; }
  .cer .krow.tot{ border-bottom:none; padding-top:9px; font-size:14px; }

  /* ---- matrice stoc (rânduri expandabile) ---- */
  .cer .srow{ border:1px solid var(--line); border-radius:12px; background:var(--panel); margin-bottom:10px; overflow:hidden; }
  .cer .ssum{ display:flex; align-items:center; gap:12px; padding:13px 16px; cursor:pointer; list-style:none; font-size:13.5px; flex-wrap:wrap; }
  .cer .ssum::-webkit-details-marker{ display:none; }
  .cer .ssum:hover{ background:var(--hover); }
  .cer .scar{ margin-left:6px; color:var(--faint); transition:transform .15s; flex:none; }
  .cer .srow[open] .scar{ transform:rotate(90deg); }
  .cer .sbody{ border-top:1px solid var(--hair); padding:12px 16px; background:var(--hover); }
  .cer .sbody .lrow:last-child{ border-bottom:none; }

  /* ---- mobil ---- */
  @media (max-width:720px){
    .cer .flux{ flex-wrap:wrap; } .cer .flux .farr{ display:none; }
    .cer .fstage{ min-width:44%; }
    .cer .g2{ grid-template-columns:1fr; }
    .cer .gb{ grid-template-columns:1fr; }
    .cer .agrid{ grid-template-columns:1fr 1fr; }
  }
