/* ==========================================================================
   Achiziții — sistemul vizual Autonom (2026)
   Culorile, fonturile și formele sunt preluate din machetele „Autonom PRM”.
   Fișierul stilizează și componentele Bootstrap 3 folosite de ecranele vechi,
   ca toată aplicația să arate unitar până la refacerea fiecărui modul.
   ========================================================================== */

/* ---------- 1. Tokeni ---------- */
:root {
  --indigo-900: #0D0770;
  --indigo-800: #190FA4;
  --indigo-700: #1E13BC;
  --blue-500: #1A8CFF;
  --blue-600: #0074D9;
  --blue-700: #005CAD;
  --blue-50: #EAF5FF;
  --purple-500: #844DC7;
  --green-500: #17CB65;
  --pink-500: #F9598C;
  --pink-200: #FBB3C3;
  --pink-50: #FFF0F4;

  --text: #373B47;
  --text-muted: #777F94;
  --text-subtle: #A2A9BB;
  --border: #CED2DB;
  --border-soft: #F0F0F0;
  --bg: #FAFAFB;
  --surface: #FFFFFF;
  --table-head: #F0F0F0;
  --icon: #343330;

  /* statusuri (paleta PRM) */
  --st-trimisa: #00B9CD;
  --st-confirmata: #00C65E;
  --st-anulata: #444B4B;
  --st-asteptare: #FF8000;
  --st-refuzat: #993D64;
  --st-info: #5E76FE;

  --r-pill: 999px;
  --r-card: 20px;
  --r-area: 16px;
  --r-sm: 8px;
  --shadow-card: 0 12px 32px rgba(55, 59, 71, .08);
  --shadow-pop: 0 10px 28px rgba(55, 59, 71, .16);

  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-head: 'Titillium Web', 'Figtree', system-ui, sans-serif;
  --container: 1240px;
}

/* ---------- 2. Bază ---------- */
[hidden] { display: none !important; }
html, body { background: var(--bg); }
body {
  font-family: var(--f-body);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}
a { color: var(--blue-500); }
a:hover, a:focus { color: var(--blue-700); text-decoration: none; }
h1, h2, h3, h4, h5 { font-family: var(--f-head); color: var(--indigo-700); font-weight: 600; }
hr { border-top-color: var(--border-soft); }
.text-muted { color: var(--text-muted) !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.az-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

svg.az-i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
svg.az-i.sm { width: 18px; height: 18px; }

/* ---------- 3. Header ---------- */
.az-header { background: var(--surface); }
.az-header .az-container { height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.az-brand { display: flex; align-items: center; gap: 14px; color: var(--indigo-700); }
.az-brand img { height: 40px; width: auto; display: block; }
.az-brand .az-app-name {
  font-family: var(--f-head); font-weight: 600; font-size: 20px; color: var(--indigo-700);
  padding-left: 14px; border-left: 1.5px solid var(--border); line-height: 28px; margin-top: 10px;
}
.az-tools { display: flex; align-items: center; gap: 20px; }
.az-tools > a, .az-tools > .dropdown > a {
  color: var(--indigo-700); display: inline-flex; align-items: center; gap: 8px; position: relative;
}
.az-tools .az-who { font-size: 14px; color: var(--text); line-height: 1.2; text-align: left; }
.az-tools .az-who small { display: block; color: var(--text-muted); font-size: 12px; }
.az-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--blue-50); }
.az-dot {
  position: absolute; top: -6px; right: -9px; background: var(--pink-500); color: #fff; font-size: 10px;
  font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}
.az-tools .dropdown-menu { right: 0; left: auto; margin-top: 12px; }

/* ---------- 4. Meniu principal ---------- */
.az-nav { background: var(--bg); }
.az-nav .az-container { display: flex; gap: 32px; align-items: flex-end; height: 72px; }
.az-nav .az-menu { display: flex; gap: 32px; align-items: flex-end; height: 100%; margin: 0; padding: 0; list-style: none; }
.az-nav .az-menu > li { position: relative; }
.az-nav .az-menu > li > a {
  font-family: var(--f-head); font-weight: 600; font-size: 18px; color: var(--indigo-700);
  padding-bottom: 12px; border-bottom: 3px solid transparent; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.az-nav .az-menu > li.active > a, .az-nav .az-menu > li > a:hover { border-bottom-color: var(--indigo-700); }
.az-nav .dropdown-menu { margin-top: 0; }
/* Meniul agenției (fără liste derulante) poate avea multe intrări: pe ecrane mai înguste se derulează pe orizontală, fără să lărgească pagina */
.az-nav-simplu .az-container { overflow-x: auto; scrollbar-width: none; }
.az-nav-simplu .az-container::-webkit-scrollbar { display: none; }
.az-nav-simplu .az-menu > li { flex-shrink: 0; }
@media (max-width: 1279px) { .az-nav .az-menu { gap: 22px; } }
.az-badge {
  background: var(--blue-500); color: #fff; font-family: var(--f-body); font-size: 11px; font-weight: 600;
  border-radius: var(--r-pill); padding: 1px 8px; line-height: 16px;
}
.az-badge.alert-count { background: var(--pink-500); }

/* ---------- 5. Pagina ---------- */
.az-main { padding: 36px 0 56px; min-height: calc(100vh - 84px - 72px - 61px); }
.az-pagehead { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.az-title { font-family: var(--f-head); font-weight: 600; font-size: 38px; line-height: 1.15; color: var(--indigo-700); margin: 0; }
/* Mascota de pe Acasă (theme/js/mascota.js): planșe 3x3, câte o celulă afișată; butonul nu are fundal sau chenar */
.az-salut { display: flex; align-items: center; gap: 12px; }
.az-mascota { position: relative; display: block; flex-shrink: 0; width: 64px; height: 64px; padding: 0; border: 0; background: transparent;
  -webkit-appearance: none; appearance: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.az-mascota:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; border-radius: 12px; }
.az-mascota > span { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 78%; }
.az-mascota > span > span { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-size: 300% 300%; background-repeat: no-repeat; }
.az-subtitle { font-size: 15px; color: var(--text); margin: 6px 0 0; }
.az-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.az-content { padding: 28px 30px; }
.az-section-title { font-family: var(--f-head); font-weight: 600; font-size: 24px; color: var(--indigo-700); margin: 36px 0 16px; }

/* titlurile vechi din ecrane devin titluri de secțiune */
.page-header {
  border: 0; margin: 0 0 18px; padding: 0; font-family: var(--f-head); font-weight: 600;
  font-size: 24px; color: var(--indigo-700); display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.page-header small { color: var(--text-muted); font-size: 15px; }

/* ---------- 6. Mesaje (flash) ---------- */
.az-flash { margin-bottom: 18px; }
.alert, .alert-info, .alert-success, .alert-danger, .alert-warning {
  border: 0; border-radius: 12px; padding: 14px 18px !important; font-size: 15px; height: auto !important;
  text-align: left !important; margin-bottom: 18px;
}
.alert-success { background: #E9F9F0; color: #0B6B37; }
.alert-info { background: var(--blue-50); color: var(--blue-700); }
.alert-warning { background: #FFF4E5; color: #8A4B00; }
.alert-danger { background: var(--pink-50); color: #A3214B; }
.alert .fa { margin-right: 6px; }

/* ---------- 7. Butoane ---------- */
.btn {
  border: 0; border-radius: var(--r-pill); font-family: var(--f-body); font-weight: 500; font-size: 15px;
  padding: 10px 22px; line-height: 1.4; transition: background .15s, box-shadow .15s, color .15s;
  box-shadow: none; text-shadow: none; background-image: none;
}
.btn:focus, .btn:active:focus { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.btn-lg { padding: 14px 30px; font-size: 17px; }
.btn-sm { padding: 7px 16px; font-size: 14px; }
/* butoane mici: rotunde când au doar iconiță, pastilă când au și text */
.btn-xs {
  padding: 0 11px; min-width: 32px; height: 32px; font-size: 13px; line-height: 32px; text-align: center;
  border-radius: var(--r-pill); margin: 1px; white-space: nowrap;
}
.btn-xs .fa, .btn-xs .glyphicon { line-height: 32px; }

.btn-primary, .btn-primary:focus { background: var(--blue-500); color: #fff; }
.btn-primary:hover, .btn-primary:active, .btn-primary.active { background: var(--blue-600); color: #fff; }

.btn-cta, .btn-cta:focus {
  color: #fff; background: linear-gradient(90deg, var(--indigo-800), var(--indigo-900));
  padding: 14px 30px; font-size: 17px;
}
.btn-cta:hover { color: #fff; box-shadow: 0 8px 20px rgba(25, 15, 164, .30); }

.btn-default, .btn-default:focus, .btn-secondary {
  background: transparent; color: var(--indigo-700); box-shadow: inset 0 0 0 2px var(--indigo-700);
}
.btn-default:hover, .btn-secondary:hover { background: var(--blue-50); color: var(--indigo-700); }

.btn-success, .btn-success:focus { background: var(--st-confirmata); color: #fff; }
.btn-success:hover { background: #00A84F; color: #fff; }
.btn-info, .btn-info:focus { background: var(--blue-50); color: var(--blue-700); }
.btn-info:hover { background: #D5EBFF; color: var(--blue-700); }
.btn-warning, .btn-warning:focus { background: var(--st-asteptare); color: #fff; }
.btn-warning:hover { background: #E67300; color: #fff; }
.btn-danger, .btn-danger:focus { background: var(--pink-500); color: #fff; }
.btn-danger:hover { background: #E8467A; color: #fff; }
.btn[disabled], .btn.disabled { background: var(--border) !important; color: #fff !important; box-shadow: none !important; opacity: 1; }

/* butoanele mici doar cu iconiță: fundal discret, iconiță colorată */
.btn-xs.btn-primary { background: var(--blue-50); color: var(--blue-500); }
.btn-xs.btn-primary:hover { background: var(--blue-500); color: #fff; }
.btn-xs.btn-success { background: #E9F9F0; color: #00A84F; }
.btn-xs.btn-success:hover { background: var(--st-confirmata); color: #fff; }
.btn-xs.btn-danger { background: var(--pink-50); color: var(--pink-500); }
.btn-xs.btn-danger:hover { background: var(--pink-500); color: #fff; }
.btn-xs.btn-info { background: #EEF1FF; color: var(--st-info); }
.btn-xs.btn-info:hover { background: var(--st-info); color: #fff; }
.btn-xs.btn-secondary, .btn-xs.btn-default { background: var(--border-soft); color: var(--icon); box-shadow: none; }
.btn-xs.btn-secondary:hover, .btn-xs.btn-default:hover { background: var(--border); color: var(--icon); }

/* ---------- 8. Formulare ---------- */
.form-control, .form-control.input-sm, .input-sm {
  height: 46px; padding: 10px 20px; font-size: 15px; color: var(--text); background: var(--surface);
  border: 2px solid var(--border); border-radius: var(--r-pill); box-shadow: none; font-family: var(--f-body);
  transition: border-color .15s;
}
textarea.form-control, textarea.input-sm { border-radius: var(--r-area); height: auto; min-height: 110px; padding: 12px 18px; }
select.form-control, select.input-sm {
  appearance: none; -webkit-appearance: none; padding-right: 44px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23343330' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 18px center;
}
select[multiple].form-control { border-radius: var(--r-area); height: auto; background-image: none; }
.form-control:focus { border-color: var(--blue-500); box-shadow: none; outline: 0; }
.form-control[readonly], .form-control[disabled] { background-color: var(--bg); border-color: var(--border-soft); color: var(--text); }
.form-control::placeholder { color: var(--text-muted); }
input[type="file"] { font-size: 14px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue-500); }

.form-group { margin-bottom: 18px; }
label, .control-label { font-weight: 500; color: var(--text); font-size: 14px; }
.form-horizontal .control-label { padding-top: 12px; color: var(--text-muted); }
.has-error .form-control { border-color: var(--pink-200); }
.help-block { color: var(--text-muted); font-size: 13px; }

/* ---------- 9. Tabele ---------- */
.table { background: transparent; margin-bottom: 0; }
.table > thead > tr > th, table.dataTable thead th {
  background: var(--table-head); color: var(--text); font-size: 13px; font-weight: 500;
  border: 0 !important; padding: 16px 14px; white-space: nowrap; vertical-align: middle;
}
.table > tbody > tr > td, table.dataTable tbody td {
  border-top: 0 !important; border-bottom: 1px solid var(--border) !important; border-left: 0 !important; border-right: 0 !important;
  padding: 14px 14px; vertical-align: middle; font-size: 14px;
}
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > tbody > tr > td { border: 0; }
.table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
.table-hover > tbody > tr:hover, table.dataTable tbody tr:hover { background: #FCFCFE; }
.table-responsive { border: 0; }

/* DataTables */
table.dataTable { border-collapse: collapse !important; width: 100% !important; }
table.dataTable.no-footer { border-bottom: 0; }
.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter { margin-bottom: 16px; color: var(--text-muted); font-size: 14px; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
  border: 2px solid var(--border); border-radius: var(--r-pill); padding: 8px 16px; margin-left: 8px; font-family: var(--f-body); outline: 0;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--blue-500); }
.dataTables_wrapper .dataTables_info { color: var(--text-muted); font-size: 13px; padding-top: 18px !important; }
.dataTables_wrapper .dataTables_paginate { padding-top: 14px !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 0 !important; border-radius: var(--r-pill) !important; color: var(--indigo-700) !important; padding: 6px 13px !important; background: transparent !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover:not(.disabled) {
  background: var(--blue-50) !important; color: var(--blue-500) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { color: var(--text-subtle) !important; }
table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc { background-color: var(--table-head); }

/* ---------- 10. Etichete de status ---------- */
.label, .az-pill {
  display: inline-block; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; line-height: 20px;
  padding: 0 10px; color: #fff; white-space: nowrap; vertical-align: middle;
}
.label-default { background: var(--text-subtle); }
.label-primary { background: var(--blue-500); }
.label-success { background: var(--st-confirmata); }
.label-info { background: var(--st-trimisa); }
.label-warning { background: var(--st-asteptare); }
.label-danger { background: var(--st-refuzat); }
.az-pill.trimis { background: var(--st-trimisa); }
.az-pill.confirmata { background: var(--st-confirmata); }
.az-pill.anulata { background: var(--st-anulata); }
.az-pill.asteptare { background: var(--st-asteptare); }
.az-pill.refuzat { background: var(--st-refuzat); }

/* ---------- 11. Ferestre (modal), tab-uri, dropdown ---------- */
.modal-backdrop.in { opacity: .35; background: #373B47; }
.modal-content { border: 0; border-radius: var(--r-card); box-shadow: var(--shadow-pop); }
.modal-header { border-bottom: 0; padding: 24px 28px 6px; }
.modal-header .modal-title { font-family: var(--f-head); font-weight: 600; font-size: 24px; color: var(--indigo-700); }
.modal-body { padding: 16px 28px; }
.modal-footer { border-top: 0; padding: 10px 28px 26px; }
.close { font-size: 26px; color: var(--indigo-700); opacity: .8; text-shadow: none; }

.nav-tabs { border-bottom: 1.5px solid var(--border); margin-bottom: 20px; }
.nav-tabs > li > a { border: 0 !important; border-bottom: 4px solid transparent !important; color: var(--text); margin: 0 20px -1.5px 0; padding: 10px 2px 12px; background: none !important; font-size: 16px; border-radius: 0; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus { border-bottom-color: var(--blue-500) !important; color: var(--text); }
.nav-tabs > li > a:hover { border-bottom-color: var(--border) !important; }

.dropdown-menu { border: 0; border-radius: 16px; box-shadow: var(--shadow-pop); padding: 8px 0; min-width: 220px; font-size: 15px; }
.dropdown-menu > li > a { padding: 10px 18px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-menu > .active > a { background: var(--blue-50); color: var(--text); }
.dropdown-menu .divider { background: var(--border-soft); margin: 6px 0; }
.dropdown-header { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 8px 18px 4px; }

/* Select2 */
.select2-container--default .select2-selection--single {
  height: 46px; border: 2px solid var(--border); border-radius: var(--r-pill); padding: 0 12px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; color: var(--text); padding-left: 8px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; right: 12px; }
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single { border-color: var(--blue-500); }
.select2-dropdown { border: 0; border-radius: 16px; box-shadow: var(--shadow-pop); overflow: hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--blue-50); color: var(--text); }
.select2-search--dropdown .select2-search__field { border: 2px solid var(--border); border-radius: var(--r-pill); padding: 6px 14px; }

/* ---------- 12. Compatibilitate cu clasele AdminLTE din ecranele vechi ---------- */
.box { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); margin-bottom: 22px; border: 0 !important; }
.box-header { padding: 18px 22px 6px; }
.box-header .box-title { font-family: var(--f-head); font-weight: 600; font-size: 20px; color: var(--indigo-700); margin: 0; }
.box-body { padding: 14px 22px 22px; }
.box-warning { box-shadow: inset 4px 0 0 var(--st-asteptare), var(--shadow-card); }
.box-solid { border: 0; }

.small-box { position: relative; border-radius: 18px; color: #fff; overflow: hidden; margin-bottom: 22px; box-shadow: var(--shadow-card); background: var(--blue-500); }
.small-box .inner { padding: 20px 22px 14px; position: relative; z-index: 1; }
.small-box .inner h3 { font-family: var(--f-head); font-size: 38px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.small-box .inner p { font-size: 15px; margin: 0; }
.small-box .icon { position: absolute; right: 18px; top: 14px; font-size: 64px; opacity: .22; }
.small-box .small-box-footer { display: block; padding: 9px 22px; background: rgba(0, 0, 0, .10); color: #fff; font-size: 14px; position: relative; z-index: 1; }
.small-box .small-box-footer:hover { background: rgba(0, 0, 0, .18); color: #fff; }
.bg-aqua { background: var(--st-trimisa) !important; color: #fff; }
.bg-green { background: var(--st-confirmata) !important; color: #fff; }
.bg-yellow { background: var(--st-asteptare) !important; color: #fff; }
.bg-red { background: var(--pink-500) !important; color: #fff; }
.bg-blue { background: var(--blue-500) !important; color: #fff; }
.bg-purple { background: var(--purple-500) !important; color: #fff; }
.content-header { padding: 0; }
.content-header h1 { margin: 0 0 16px; }
.content-header .breadcrumb { display: none; }

/* ---------- 13. Footer (intern: doar versiune și linkuri utile) ---------- */
.az-footer { background: transparent; color: var(--text-muted); border-top: 1px solid var(--border-soft); }
.az-footer .az-container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; font-size: 13px; }
.az-footer .az-footer-links { display: flex; gap: 22px; }
.az-footer a { color: var(--text-muted); }
.az-footer a:hover { color: var(--indigo-700); }
/* inima din subsol („Made with ♥ in Piatra Neamț.”): roșie, bate ca o inimă; fără animație cu „mai puțină mișcare” */
.az-inima { display: inline-block; width: 14px; height: 14px; fill: #E5484D; vertical-align: -2px; margin: 0 1px; transform-origin: 50% 55%; animation: az-puls 1.4s ease-in-out infinite; }
@keyframes az-puls { 0%, 40%, 100% { transform: scale(1); } 12% { transform: scale(1.25); } 24% { transform: scale(1.05); } 32% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .az-inima { animation: none; } }

/* ---------- 13b. Titlul ecranului (mutat deasupra cardului de layout) ---------- */
.az-pagehead-ecran .page-header {
  font-size: 34px; line-height: 1.15; margin: 0; width: 100%;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.az-pagehead-ecran .page-header > .btn:first-of-type,
.az-pagehead-ecran .page-header > a.btn:first-of-type { margin-left: auto; }
.az-pagehead-ecran .page-header .btn,
.az-pagehead-ecran .page-header .btn-xs {
  font-family: var(--f-body); font-size: 15px; font-weight: 500; height: auto; line-height: 1.4;
  padding: 11px 22px; min-width: 0; border-radius: var(--r-pill);
}
.az-pagehead-ecran .page-header .btn-xs.btn-primary { background: var(--blue-500); color: #fff; }
.az-pagehead-ecran .page-header .btn-xs.btn-primary:hover { background: var(--blue-600); color: #fff; }

/* ---------- 13c. Formularele vechi: etichetă deasupra câmpului, pe două coloane ---------- */
.az-content .form-horizontal {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; align-items: start;
}
.az-content .form-horizontal > :not(.form-group),
.az-content .form-horizontal > .form-group:has(textarea),
.az-content .form-horizontal > .form-group:has(.btn),
.az-content .form-horizontal > .form-group:has(input[type="file"]),
.az-content .form-horizontal > .form-group:has(.alert),
.az-content .form-horizontal > .form-group:has(table) { grid-column: 1 / -1; }
.form-horizontal .form-group { margin: 0 0 16px !important; }
/* blocurile vechi cu coloane plutitoare (ex. „Fișiere atașate” deasupra formularului) se închid,
   ca formularul de dedesubt să nu curgă lângă ele într-o coloană îngustă */
.az-content .form-group::after, .az-content .center::after { content: ""; display: table; clear: both; }
.az-content .row { clear: both; }
.form-horizontal .form-group [class*="col-xs-"],
.form-horizontal .form-group [class*="col-sm-"],
.form-horizontal .form-group [class*="col-md-"],
.form-horizontal .form-group [class*="col-lg-"] { width: 100%; float: none; padding-left: 0; padding-right: 0; }
.form-horizontal .control-label {
  display: block; text-align: left !important; padding: 0 0 6px 20px !important; margin: 0;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
}
.form-horizontal .control-label:empty { display: none; }
.form-horizontal .form-group:has(.btn) .btn { margin-right: 10px; }
.az-content .span6, .az-content .features, .az-content .container { width: auto; max-width: 100%; float: none; padding-left: 0; padding-right: 0; }
.az-content > section, .az-content .transparent-bg { padding: 0; background: none; }

/* câmpurile din ecranele vechi care nu au clasa form-control primesc același aspect */
/* specificitate zero (doar :where), ca să nu bată componentele noi (.az-field, .az-search, .az-qty) */
:where(.az-content) :where(input[type="text"], input[type="date"], input[type="number"], input[type="email"], input[type="tel"], input[type="password"], input:not([type]), select, textarea):where(:not(.form-control, .select2-search__field, .az-field *, .az-search *, .az-qty *)) {
  height: 46px; padding: 10px 20px; font: inherit; font-size: 15px; color: var(--text); background-color: var(--surface);
  border: 2px solid var(--border); border-radius: var(--r-pill); outline: 0; max-width: 100%;
}
:where(.az-content) textarea:where(:not(.form-control, .az-field *)) { height: auto; min-height: 110px; border-radius: var(--r-area); width: 100%; }
:where(.az-content) :where(input, select, textarea):where(:not(.form-control, .az-field *, .az-search *, .az-qty *)):focus { border-color: var(--blue-500); }

/* textul din listele derulante stătea lăsat jos (moștenea line-height de 30px din Bootstrap) */
select.form-control, select.input-sm, :where(.az-content) select:where(:not(.az-field *)) { line-height: 1.4 !important; padding-top: 10px; padding-bottom: 10px; }
.form-control.input-sm { line-height: 1.4; }

/* ---------- 13d. Tabele: fără derulare orizontală ---------- */
.az-content .table-responsive { overflow-x: visible; }
.az-content table th, .az-content table td { white-space: normal !important; overflow-wrap: break-word; }
.az-content table td:has(.btn), .az-content table th:last-child { white-space: nowrap !important; }
.az-content table td:has(.btn) { width: 1%; }
.az-content .dataTables_wrapper { overflow: visible; }

/* ---------- 14. Componente noi (pagini refăcute) ---------- */
.az-field { position: relative; display: block; margin: 0; }
.az-field input, .az-field select, .az-field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 2px solid var(--border); border-radius: var(--r-pill); height: 54px; padding: 20px 22px 4px; outline: none;
  transition: border-color .15s;
}
.az-field textarea { border-radius: var(--r-area); height: auto; min-height: 140px; padding: 30px 22px 12px; resize: vertical; }
.az-field label {
  position: absolute; left: 24px; top: 8px; font-size: 12px; font-weight: 400; color: var(--text-muted); pointer-events: none; transition: all .12s;
}
/* centrul câmpului (54px), nu 50% din bloc: sub câmp poate apărea un mesaj de eroare */
.az-field input:placeholder-shown:not(:focus) + label { top: 27px; transform: translateY(-50%); font-size: 16px; }
.az-field-sm input:placeholder-shown:not(:focus) + label { top: 25px; }
.az-field input:focus, .az-field select:focus, .az-field textarea:focus { border-color: var(--blue-500); }
.az-field.error input { border-color: var(--pink-200); }

.az-stat { display: block; padding: 22px 24px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); transition: transform .12s, box-shadow .12s; height: 100%; }
a.az-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); color: var(--text); }
.az-stat .az-stat-num { font-family: var(--f-head); font-weight: 700; font-size: 40px; line-height: 1; color: var(--indigo-700); }
.az-stat .az-stat-label { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 15px; }
.az-stat .az-dot-st { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.az-stat .az-stat-num-sm { font-size: 28px; line-height: 1.15; }
.az-stat .az-stat-num-sm small { font-size: 15px; font-family: var(--f-body); font-weight: 500; color: var(--text-muted); }
.az-stat .az-stat-sub { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.az-up { color: #00A84F; font-weight: 600; }
.az-down { color: var(--pink-500); font-weight: 600; }

.az-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 18px; margin-top: 22px; }
.az-quick .az-quick-title { font-family: var(--f-head); font-weight: 600; font-size: 17px; color: var(--indigo-700); margin-right: 8px; }
.az-quick a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-pill); background: var(--blue-50); color: var(--blue-700); font-size: 14px; font-weight: 500; }
.az-quick a:hover { background: var(--blue-500); color: #fff; }

.az-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.az-card-head h2 { font-size: 21px; margin: 0; }
.az-card-head > a, .az-card-head > span { font-size: 14px; }

.az-mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.az-mini-stats a { display: block; padding: 14px 16px; border-radius: 14px; background: var(--bg); color: var(--text); }
.az-mini-stats a:hover { background: var(--blue-50); }
.az-mini-stats b { display: block; font-family: var(--f-head); font-size: 28px; line-height: 1.1; color: var(--indigo-700); }
.az-mini-stats span { font-size: 13px; color: var(--text-muted); }
.az-mini-title { font-family: var(--f-body); font-size: 14px; font-weight: 600; color: var(--text); margin: 20px 0 8px; }
.az-list { list-style: none; margin: 0; padding: 0; }
.az-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); font-size: 14px; }
.az-list li:last-child { border-bottom: 0; }

.az-grid { display: grid; gap: 22px; }
.az-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.az-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.az-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.az-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.az-bars li { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 48px; align-items: center; gap: 14px; font-size: 14px; }
.az-bars .az-bar { height: 10px; border-radius: var(--r-pill); background: var(--blue-50); overflow: hidden; }
.az-bars .az-bar span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--blue-500); }
.az-bars .az-bar-num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.az-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- 14a. Butoane-iconiță, filtre, chip-uri de status ---------- */
.icon-btn {
  background: none; border: 0; color: var(--indigo-700); width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center; cursor: pointer; padding: 0; transition: background .12s;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--blue-50); color: var(--indigo-700); }
.icon-btn.ok { color: #00A84F; }
.icon-btn.ok:hover { background: #E9F9F0; }
.icon-btn.danger { color: var(--pink-500); }
.icon-btn.danger:hover { background: var(--pink-50); }
.icon-btn.off, .icon-btn.off:hover { color: var(--text-subtle); background: none; cursor: not-allowed; }
.az-inline { display: inline; margin: 0; }
.btn .az-i { width: 18px; height: 18px; }
.btn-sm .az-i { width: 16px; height: 16px; }
.alert > .az-i { width: 18px; height: 18px; margin: -2px 6px 0 0; }

.az-filters { margin-bottom: 22px; }
.az-chips { display: flex; flex-wrap: wrap; gap: 10px 12px; margin-bottom: 20px; }
.az-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px 0 11px; border-radius: var(--r-pill);
  color: #fff; font-size: 14px; font-weight: 500; border: 0; cursor: pointer; background: var(--text-subtle); transition: opacity .12s, box-shadow .12s;
}
.az-chip b { font-weight: 600; opacity: .9; }
.az-chip b::before { content: "|"; margin-right: 6px; opacity: .6; font-weight: 400; }
.az-chip.trimis { background: var(--st-trimisa); }
.az-chip.confirmata { background: var(--st-confirmata); }
.az-chip.anulata { background: var(--st-anulata); }
.az-chip:not(.on) { opacity: .35; }
.az-chip:focus-visible { outline: 2px solid var(--indigo-700); outline-offset: 2px; }
.az-chip-dot { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 2px #fff; display: grid; place-items: center; }
.az-chip.on .az-chip-dot::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

.az-filter-row { display: grid; grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 1fr)); gap: 14px 16px; align-items: center; }
.az-filter-row-end { display: flex; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; }
.az-search { position: relative; display: block; margin: 0; font-weight: 400; }
.az-search .az-i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--icon); pointer-events: none; }
.az-search input {
  width: 100%; height: 50px; border: 2px solid var(--border); border-radius: var(--r-pill); padding: 0 20px 0 50px;
  font: inherit; font-size: 15px; color: var(--text); background: var(--surface); outline: 0;
}
.az-search input:focus { border-color: var(--blue-500); }
.az-search-sm input { height: 44px; padding-left: 44px; }
.az-search-sm .az-i { left: 16px; }
.az-field-sm input, .az-field-sm select { height: 50px; font-size: 15px; }
.az-years { display: flex; gap: 8px; flex-wrap: wrap; }
.az-year {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--blue-50); color: var(--blue-500); font-size: 15px; font-weight: 500;
}
.az-year:hover { background: #D5EBFF; color: var(--blue-700); }
.az-year.on { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue-500); }
.az-year .az-i { width: 16px; height: 16px; }

/* ---------- 14b. Tabelul de comenzi, grupat pe status ---------- */
.az-table-card { padding: 0; overflow: hidden; }
.az-table-card .table > thead > tr > th:first-child, .az-table-card .table > tbody > tr > td:first-child { padding-left: 26px; }
.az-table-card .table > thead > tr > th:last-child, .az-table-card .table > tbody > tr > td:last-child { padding-right: 22px; }
.az-orders tr.az-grp td { background: var(--surface); padding: 6px 14px !important; height: 56px; border-bottom: 1px solid var(--border) !important; }
.az-grp-btn {
  background: none; border: 0; padding: 6px 4px; display: inline-flex; align-items: center; gap: 12px;
  color: var(--indigo-700); font-size: 16px; font-weight: 500; cursor: pointer; font-family: var(--f-body); text-align: left;
}
.az-grp-btn:hover .az-grp-nr { color: var(--indigo-700); }
.az-grp-nr { color: var(--text-muted); font-weight: 400; margin-left: 6px; white-space: nowrap; }
.az-grp-ico { display: inline-flex; }
.az-grp-ico-plus, .az-collapsed .az-grp-ico-minus { display: none; }
.az-collapsed .az-grp-ico-plus { display: inline-flex; }
.az-collapsed tr.az-row, tr.az-hidden { display: none !important; }
.az-sub { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.az-obs { color: var(--text-muted); max-width: 260px; }
.az-row-actions { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.az-th-actions { text-align: right; }
.az-empty-state { text-align: center; padding: 42px 20px; }
.az-empty-state p { margin: 0 0 6px; }
.az-empty-state .btn { margin-top: 12px; }

/* ---------- 14c. Fișa comenzii (fereastră) ---------- */
.az-fisa .modal-dialog { width: auto; max-width: 980px; margin: 40px auto; padding: 0 16px; }
.az-fisa .modal-content { padding: 22px 0 26px; }
.az-fisa-top { display: flex; align-items: center; gap: 12px; padding: 0 22px 0 26px; flex-wrap: wrap; }
.az-fisa-top .az-pill { font-size: 14px; line-height: 30px; padding: 0 16px; }
.az-fisa-chip { font-size: 14px; color: var(--text-muted); }
.az-fisa-sp { flex: 1; }
.az-fisa-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.az-fisa h2 { font-size: 30px; margin: 22px 40px 2px; }
.az-fisa-sub { margin: 0 40px; font-size: 15px; color: var(--text); }
.az-fisa-tabs { display: flex; justify-content: flex-end; margin: 14px 18px 0; padding: 0 22px; }
.az-fisa-body { padding: 22px 40px 0; }
.az-fisa-table td, .az-fisa-table th { font-size: 14px; }
.az-fisa-table tr.az-total td { font-weight: 600; border-bottom: 0 !important; }
.az-ro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.az-ro { border: 2px solid var(--border-soft); background: var(--bg); border-radius: 18px; padding: 9px 20px 10px; }
.az-ro span { display: block; font-size: 12px; color: var(--text-muted); }
.az-ro b { font-weight: 500; font-size: 15px; white-space: pre-line; overflow-wrap: anywhere; }
.az-span-2 { grid-column: 1 / -1; }

/* fereastra de confirmare (Nu / Da) */
.az-confirm .modal-dialog { max-width: 480px; margin: 120px auto; padding: 0 16px; }
.az-confirm .modal-content { padding: 30px 30px 26px; text-align: center; }
.az-confirm .modal-content > p { font-size: 17px; margin: 0 0 22px; }
.az-confirm h2 { font-size: 26px; margin: 0 0 16px; }
.az-confirm-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.az-summary { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; text-align: left; margin: 0 0 24px; font-size: 15px; }
.az-summary dt { color: var(--text-muted); font-weight: 400; }
.az-summary dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- 14d. Comandă nouă ---------- */
.az-steps-bar { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 4px 0 24px; }
.az-steps-bar li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-muted); }
.az-steps-bar li + li::before { content: ""; width: 34px; height: 2px; background: var(--border); margin-right: 6px; }
.az-step-n {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 14px;
  background: var(--border-soft); color: var(--text-muted); flex: none; font-family: var(--f-body);
}
.az-steps-bar li.on { color: var(--indigo-700); font-weight: 600; }
.az-steps-bar li.on .az-step-n { background: var(--indigo-700); color: #fff; }
.az-steps-bar li.done .az-step-n { background: var(--green-500); color: #fff; }
.az-section { margin-bottom: 22px; }
.az-section-h { font-size: 24px; margin: 0 0 18px; display: flex; align-items: center; gap: 12px; }
.az-section-h .az-step-n { background: var(--indigo-700); color: #fff; }
.az-section-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.az-section-head .az-section-h { margin: 0; }
.az-section-head .az-search { min-width: 280px; }
.az-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; align-items: start; }
.az-field select { appearance: none; -webkit-appearance: none; padding-right: 46px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23343330' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 20px center; }
.az-field textarea:placeholder-shown:not(:focus) + label { top: 22px; font-size: 16px; }
.az-hint { font-size: 13.5px; color: var(--text-muted); margin: 10px 0 0; }
.az-supplier { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; margin-top: 20px; padding: 18px 22px; border-radius: 16px; background: var(--bg); }
.az-supplier .nm { font-family: var(--f-head); font-weight: 600; font-size: 21px; color: var(--indigo-700); flex-basis: 100%; }
.az-supplier .kv span { display: block; font-size: 12.5px; color: var(--text-muted); }
.az-supplier .kv b { font-weight: 500; font-size: 14.5px; }
.az-supplier-warn { flex-basis: 100%; margin: 4px 0 0; }
.az-products td { vertical-align: middle; }
.az-products tr.az-ales td { background: #F5FAFF; }
.az-products .num, .az-fisa-table .num { text-align: right; }
.az-th-qty { width: 170px; }
.az-qty { display: inline-flex; align-items: center; border: 2px solid var(--border); border-radius: var(--r-pill); height: 42px; background: var(--surface); }
.az-qty:focus-within { border-color: var(--blue-500); }
.az-qty input { width: 58px; border: 0 !important; height: 38px; text-align: center; font-weight: 600; font-size: 15px; padding: 0 !important; background: transparent; -moz-appearance: textfield; outline: 0; border-radius: 0 !important; }
.az-qty input::-webkit-outer-spin-button, .az-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.az-qty-btn { width: 40px; height: 38px; border: 0; background: none; color: var(--indigo-700); font-size: 20px; cursor: pointer; border-radius: var(--r-pill); line-height: 1; }
.az-qty-btn:hover { background: var(--blue-50); }
.az-cart-summary { margin-top: 18px; padding: 14px 18px; border-radius: 14px; background: var(--blue-50); color: var(--blue-700); font-size: 15px; }
.az-form-actions { margin-top: 26px; }
.az-field.error input { border-color: var(--pink-500); }

/* rezultatul trimiterii */
.az-result { padding: 40px 44px; max-width: 880px; }
.az-result .az-title { font-size: 32px; margin: 10px 0 14px; }
.az-result p { font-size: 16px; margin: 0 0 10px; }
.az-result .az-actions { margin-top: 26px; }
.az-result-ico .az-i { width: 54px; height: 54px; stroke-width: 1.4; }
.az-result.ok .az-result-ico { color: var(--green-500); }
.az-result.warn .az-result-ico { color: var(--st-asteptare); }

/* ---------- 14e. Ghid de utilizare ---------- */
.az-role-tabs { display: inline-flex; gap: 6px; background: var(--surface); border-radius: var(--r-pill); padding: 5px; box-shadow: var(--shadow-card); }
.az-role-tabs a { padding: 9px 20px; border-radius: var(--r-pill); font-size: 15px; color: var(--text); font-weight: 500; }
.az-role-tabs a.on { background: var(--indigo-700); color: #fff; }
.az-guide { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.az-toc { position: sticky; top: 20px; padding: 16px 10px; max-height: calc(100vh - 40px); overflow-y: auto; }
.az-toc h4 { font-family: var(--f-body); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin: 14px 14px 6px; }
.az-toc h4:first-child { margin-top: 4px; }
.az-toc a { display: block; padding: 7px 14px; border-radius: var(--r-pill); color: var(--text); font-size: 14.5px; }
.az-toc a:hover, .az-toc a.on { background: var(--blue-50); color: var(--blue-700); }
.az-flow { padding: 28px 32px; margin-bottom: 22px; scroll-margin-top: 20px; }
.az-flow h2 { font-size: 25px; margin: 0 0 4px; }
.az-flow p { margin: 0 0 14px; }
.az-flow .az-where { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.az-steps { list-style: none; counter-reset: pas; margin: 0; padding: 0; display: grid; gap: 14px; }
.az-steps li { counter-increment: pas; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.az-steps li::before {
  content: counter(pas); width: 30px; height: 30px; border-radius: 50%; background: var(--indigo-700); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 14px; margin-top: -2px;
}
.az-note { display: flex; gap: 12px; align-items: flex-start; background: var(--blue-50); color: var(--text); border-radius: 12px; padding: 13px 16px; margin-top: 18px; font-size: 14.5px; }
.az-note > .fa, .az-note > .az-i { color: var(--blue-500); font-size: 17px; margin-top: 2px; flex: none; }
.az-note-warn { background: #FFF4E5; }
.az-note-warn > .fa, .az-note-warn > .az-i { color: var(--st-asteptare); }
.az-legend { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; align-items: center; font-size: 14.5px; }
.az-legend .az-pill { justify-self: start; }
.az-faq { margin: 0; }
.az-faq dt { font-weight: 600; margin-top: 16px; }
.az-faq dt:first-child { margin-top: 0; }
.az-faq dd { margin: 4px 0 0; color: var(--text); }
.az-guide-table { margin: 4px 0 0; }
.az-guide-table td:first-child { width: 1%; white-space: nowrap !important; }

/* ---------- 14f. Furnizori: listă, fișă, formular ---------- */
/* starea contractului (aceleași culori pe etichete și pe butoanele de filtru) */
.az-pill.activ, .az-chip.activ { background: var(--st-confirmata); }
.az-pill.expira, .az-chip.expira { background: var(--st-asteptare); }
.az-pill.expirat, .az-chip.expirat { background: var(--st-refuzat); }
.az-pill.fara, .az-chip.fara { background: var(--st-anulata); }
.az-link-tare { font-weight: 600; color: var(--indigo-700); }
.az-link-tare:hover { color: var(--blue-500); }
.az-link-tare + .az-pill { margin-left: 6px; }
tr.az-inactiv > td { color: var(--text-muted); }
tr.az-inactiv .az-link-tare { color: var(--text-muted); }
.az-bifa { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0 4px; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer; }
.az-bifa input { width: 18px; height: 18px; margin: 0; }
.az-bifa-sus { margin: 0 0 18px 4px; font-size: 15px; }
/* tipul partenerului la „Partener nou”: firmă din România / firmă străină / persoană fizică */
.az-tip-partener { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 18px 4px; }
.az-tip-partener .az-bifa { margin: 0; font-size: 15px; }

/* ---------- 14g. Cereri de furnizor ---------- */
.az-chip.asteptare { background: var(--st-asteptare); }
.az-chip.refuzat { background: var(--st-refuzat); }
.az-filter-row.az-filter-row-2 { grid-template-columns: minmax(260px, 1fr) auto; }
.az-intro { font-size: 16px; color: var(--text); margin: -4px 0 20px; max-width: 760px; }
.az-upload-err { border-color: var(--pink-500); }
.az-upload .az-field-err { flex-basis: 100%; margin: 0; }

/* fișa furnizorului: card ca în fișele din design (titlu mare, tab-uri la dreapta, câmpuri-pastilă) */
.az-dosar { padding: 22px 0 30px; }
.az-dosar-titlu { font-size: 34px; line-height: 1.2; margin: 22px 40px 2px; overflow-wrap: anywhere; }
.az-dosar .az-fisa-actions { align-items: center; }
.az-dosar .az-fisa-actions .btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; line-height: 1; }
.az-dosar-h { font-family: var(--f-body); font-size: 15px; font-weight: 600; color: var(--text); margin: 26px 0 12px; }
.az-dosar .tab-pane > .az-dosar-h:first-child { margin-top: 4px; }
.az-dosar-intro { margin: 0 0 16px; }
.az-ro-grid.az-ro-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.az-ro-text { padding: 14px 20px; }
.az-ro-text b { font-weight: 400; }
.az-tab-nr { display: inline-block; min-width: 22px; padding: 0 6px; margin-left: 4px; border-radius: var(--r-pill); background: var(--border-soft); color: var(--text-muted); font-size: 12.5px; line-height: 20px; text-align: center; }
.nav-tabs > li.active .az-tab-nr { background: var(--blue-50); color: var(--blue-700); }
.az-mt { margin-top: 14px; }

/* fișiere atașate */
.az-files { list-style: none; margin: 0 0 6px; padding: 0; }
.az-files li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.az-files li > .az-i { width: 18px; height: 18px; color: var(--blue-500); flex: none; }
.az-files li > a { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.az-files-act { display: flex; gap: 2px; flex: none; }
.az-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 18px; padding: 16px 18px; border: 2px dashed var(--border); border-radius: var(--r-area); }
.az-upload-alege { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; margin: 0; border-radius: var(--r-pill); background: var(--blue-50); color: var(--blue-700); font-weight: 500; cursor: pointer; }
.az-upload-alege:hover, .az-upload-alege:focus-within { background: #D5EBFF; }
.az-upload-alege input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.az-upload-nume { flex: 1; min-width: 160px; font-size: 14px; color: var(--text-muted); overflow-wrap: anywhere; }
.az-upload .az-hint { flex-basis: 100%; margin: 0; }

/* formular: câmp cu buton alături și mesajele de eroare de sub câmpuri */
.az-field-buton { display: flex; gap: 10px; align-items: flex-start; }
.az-field-buton .az-field { flex: 1; min-width: 0; }
.az-field-buton .btn { height: 54px; flex: none; }
.az-field-err { display: block; color: var(--st-refuzat); font-size: 13px; margin: 6px 0 0 22px; }
.az-field.error input, .az-field.error select, .az-field.error textarea { border-color: var(--pink-500); }

/* ---------- 14h. Administrare: profil, date de conectare noi, setări ---------- */
.az-profil { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.az-profil-card { text-align: center; padding: 30px 24px; }
.az-profil-card h2 { font-size: 24px; margin: 14px 0 8px; overflow-wrap: anywhere; }
.az-profil-card .az-summary { margin: 18px 0 0; }
.az-profil-poza { position: relative; display: block; width: 132px; height: 132px; margin: 0 auto; padding: 0; border: 0; border-radius: 50%; overflow: hidden; background: var(--border-soft); cursor: pointer; }
.az-profil-poza img { width: 100%; height: 100%; object-fit: cover; display: block; }
.az-profil-poza.implicita { background: var(--blue-50); }
.az-profil-poza.implicita img { object-fit: contain; padding: 26px; }
.az-profil-poza span { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0 14px; background: rgba(13, 7, 112, .72); color: #fff; font-size: 12.5px; opacity: 0; transition: opacity .15s; }
.az-profil-poza:hover span, .az-profil-poza:focus-visible span { opacity: 1; }

/* datele de conectare ale unui cont nou: afișate o singură dată, după creare sau resetare */
.az-cont-nou { padding: 22px 26px; margin-bottom: 22px; border-left: 6px solid var(--green-500); }
.az-cont-nou h2 { font-size: 20px; margin: 0 0 14px; }
.az-cont-nou .az-summary { margin: 0; align-items: center; }
/* utilizatori, căi de fișiere: aceeași „pastilă” peste tot, nu roz-ul din Bootstrap */
code { padding: 2px 8px; background: var(--blue-50); color: var(--indigo-800); border-radius: var(--r-sm); font-size: 90%; }
.alert code { background: rgba(255, 255, 255, .6); }
.az-cont-nou code { font-size: 16px; padding: 3px 10px; user-select: all; }
.az-cont-nou p { margin: 14px 0 12px; max-width: 760px; }

/* ---------- 14i. Facturi SPV ---------- */
.az-pill.info, .az-chip.info { background: var(--st-info); }
.az-subnav { display: flex; flex-wrap: wrap; gap: 6px; width: fit-content; max-width: 100%; margin: 0 0 22px; padding: 5px; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-card); }
.az-subnav a { padding: 9px 20px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--text); white-space: nowrap; }
.az-subnav a:hover { background: var(--blue-50); color: var(--blue-700); }
.az-subnav a.on { background: var(--indigo-700); color: #fff; }
.az-mb { margin-bottom: 18px; }
.az-id { font-variant-numeric: tabular-nums; white-space: nowrap; }
.az-eroare-factura { max-width: 320px; white-space: normal; color: var(--st-refuzat); }
/* cardul whitelist de pe statistici */
.az-wl-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 18px 32px; align-items: center; margin: 22px 0; color: var(--text); }
.az-wl-card:hover { color: var(--text); box-shadow: var(--shadow-pop); }
.az-wl-card .az-section-h { margin-bottom: 6px; }
.az-wl-card p { margin: 0; max-width: 620px; }
.az-wl-nr { text-align: center; }
.az-wl-nr b { display: block; font-family: var(--f-head); font-size: 36px; line-height: 1; color: var(--st-asteptare); }
.az-wl-nr span { font-size: 13px; color: var(--text-muted); }
/* căutarea facturilor */
.az-filtre-facturi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; align-items: center; margin-bottom: 22px; }
.az-filtre-btns { display: flex; gap: 6px; align-items: center; }
.az-paginare { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0 0; }
.az-paginare a, .az-paginare button { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r-pill); background: var(--surface); box-shadow: var(--shadow-card); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; }
.az-paginare a:hover, .az-paginare button:hover { color: var(--blue-700); background: var(--blue-50); }
.az-paginare a.on, .az-paginare button.on { background: var(--indigo-700); color: #fff; }
.az-paginare a.off, .az-paginare button.off { pointer-events: none; opacity: .4; }
/* paginarea din liste (theme/js/autonom.js): rândurile din alte pagini se ascund, butoanele stau sub ultimul rând */
tr.az-alta-pagina, .az-collapsed tr.az-paginare-rand { display: none !important; }
.az-content table tr.az-paginare-rand td, .az-content table tr.az-paginare-rand:hover td { padding: 14px 8px 6px; border-bottom: 0; background: transparent; }
.az-paginare-rand .az-paginare { margin: 0; align-items: center; }
.az-paginare-puncte { padding: 0 4px; color: var(--text-muted); }
.az-paginare-info { margin-left: 10px; font-size: 13.5px; color: var(--text-muted); white-space: nowrap; }
/* rapoarte */
.az-rapoarte { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.az-rapoarte-lista { padding: 18px 12px; max-height: 640px; overflow-y: auto; }
.az-rapoarte-lista .az-dosar-h { margin: 0 12px 10px; }
.az-rapoarte-lista > p { margin: 0 12px; }
.az-rapoarte-lista a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.az-rapoarte-lista a:hover { background: var(--blue-50); color: var(--blue-700); }
.az-rapoarte-lista a.on { background: var(--indigo-700); color: #fff; }
.az-raport { margin: 0; padding: 18px 20px; max-height: 600px; overflow: auto; white-space: pre-wrap; font-family: Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; color: var(--text); background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--r-area); }
/* whitelist */
.az-wl-cauta { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; margin-bottom: 18px; }
.az-wl-cauta .az-search { flex: 1 1 340px; max-width: 560px; }
.az-wl-rezultate { overflow-x: auto; }
.az-wl-rezultate .table { margin-bottom: 0; }
.az-card-head { padding: 24px 26px 4px; }
.az-card-head .az-section-h { margin: 0 0 6px; }
.az-card-foot { padding: 0 26px 22px; }
.az-aproba .modal-dialog { max-width: 560px; }
.az-aproba .modal-content { text-align: left; }
.az-aproba .az-summary { margin-bottom: 18px; }
.az-aproba .az-field { margin-bottom: 4px; }
.az-aproba .az-hint { margin: 8px 0 22px; }
.az-pill .az-i { width: 13px; height: 13px; margin: -2px 2px 0 0; vertical-align: middle; }

/* ---------- 14j. Conturi bancare (formulare și fișe) ---------- */
.az-cont-rand { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) 120px auto auto; gap: 12px 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.az-cont-rand:first-child { padding-top: 0; }
.az-cont-implicit { margin: 16px 0 0; white-space: nowrap; }
.az-cont-sterge { margin-top: 8px; }
.az-cont-adauga { margin-top: 14px; }
.az-conturi-err { margin: 10px 0 0 4px; }
.az-conturi-lista { list-style: none; margin: 0; padding: 0; }
.az-conturi-lista li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--border-soft); }
.az-conturi-lista li:last-child { border-bottom: 0; }
.az-conturi-lista .az-id { font-weight: 600; letter-spacing: .02em; }
.az-conturi-lista .az-sub { margin: 0; }
.az-buton-nota { display: inline-block; margin: 6px 0 0 8px; font-size: 13px; color: var(--text-muted); vertical-align: middle; }

/* ---------- 14k. Mediul de dev (MAIL_DEV în .env) și anunțul pentru utilizatori (Setări) ---------- */
.az-dev-banda { background: #FFF4CE; color: #6B4E00; text-align: center; font-size: 13px; padding: 6px 16px; }
.az-anunt { display: flex; align-items: center; justify-content: center; gap: 8px; background: #FFF4CE; color: #6B4E00; border-top: 1px solid #F3E2A2; padding: 9px 16px; font-size: 14px; text-align: center; }
.az-anunt .az-i { flex: none; }
.az-anunt > span, .az-note > div { min-width: 0; overflow-wrap: anywhere; }
.az-field-data { max-width: 280px; }

/* ---------- 15. Login ---------- */
.az-login-page { min-height: 100vh; display: flex; flex-direction: column; }
.az-login-wrap { flex: 1; display: grid; place-items: center; padding: 48px 16px; }
.az-login { width: 100%; max-width: 440px; padding: 42px 40px 34px; }
.az-login img.az-logo { height: 46px; width: auto; display: block; margin-bottom: 26px; }
.az-login h1 { font-size: 34px; margin: 0 0 6px; }
.az-login .az-stack { display: grid; gap: 16px; margin: 26px 0 24px; }
.az-login .btn-cta { width: 100%; }
.az-login .az-help { font-size: 13px; color: var(--text-muted); margin: 20px 0 0; text-align: center; }

/* ---------- 16. Ecrane mici ---------- */
@media (max-width: 991px) {
  .az-filtre-facturi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .az-rapoarte { grid-template-columns: 220px minmax(0, 1fr); }
  .az-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .az-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .az-ro-grid.az-ro-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .az-container { padding: 0 16px; }
  .az-header .az-container { height: 68px; }
  .az-brand img { height: 32px; }
  .az-brand .az-app-name, .az-tools .az-who { display: none; }
  .az-nav .az-container { height: 60px; overflow-x: auto; scrollbar-width: none; }
  .az-nav .az-container::-webkit-scrollbar { display: none; }
  .az-nav .az-menu { gap: 22px; }
  /* bara se derulează pe orizontală, deci ar tăia listele derulante (Solicitări, Administrare): pe telefon ele se deschid
     ca un panou fix, pe toată lățimea ecranului, sub bară */
  .az-nav .dropdown-menu { position: fixed; top: auto; left: 16px; right: 16px; min-width: 0; margin-top: 0; }
  .az-nav .az-menu > li > a { font-size: 16px; }
  .az-title { font-size: 28px; }
  .az-mascota { width: 48px; height: 48px; }
  .az-content { padding: 20px 16px; }
  .az-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .az-grid-3, .az-grid-2 { grid-template-columns: 1fr; }
  .az-stat { padding: 18px; }
  .az-stat .az-stat-num { font-size: 32px; }
  .az-stat .az-stat-label { font-size: 14px; align-items: flex-start; }
  .az-stat .az-dot-st { margin-top: 6px; flex: none; }
  .az-bars li { grid-template-columns: 1fr 48px; }
  .az-bars li .az-bar { grid-column: 1 / -1; grid-row: 2; }
  .az-login { padding: 32px 22px 26px; }
  .az-content .form-horizontal { grid-template-columns: 1fr; }
  .az-guide { grid-template-columns: 1fr; }
  .az-toc { position: static; max-height: none; }
  .az-flow { padding: 22px 18px; }
  .az-role-tabs { width: 100%; }
  .az-role-tabs a { flex: 1; text-align: center; padding: 9px 10px; font-size: 14px; }
  .az-mini-stats { grid-template-columns: 1fr; }
  .az-filter-row, .az-filter-row.az-filter-row-2 { grid-template-columns: 1fr; }
  .az-filter-row-end { gap: 12px; }
  .az-form-grid, .az-ro-grid { grid-template-columns: 1fr; }
  .az-section-head .az-search { min-width: 0; width: 100%; }
  .az-table-card { padding: 12px; }
  .az-content table.az-stack tr.az-grp { border: 0; background: none; margin: 4px 0; padding: 0; }
  .az-content table.az-stack tr.az-grp td { padding: 0 !important; display: block; }
  .az-content table.az-stack tr.az-grp td::before { content: none; }
  .az-content table.az-stack tr.az-paginare-rand { border: 0; background: none; margin: 4px 0 0; padding: 0; }
  .az-content table.az-stack tr.az-paginare-rand td { display: block; padding: 0 !important; }
  .az-content table.az-stack tr.az-paginare-rand td::before { content: none; }
  .az-row-actions { justify-content: flex-end; flex-wrap: wrap; }
  .az-fisa .modal-dialog { margin: 12px auto; }
  .az-fisa h2 { margin: 18px 20px 2px; font-size: 24px; }
  .az-fisa-sub { margin: 0 20px; }
  .az-fisa-tabs { justify-content: flex-start; padding: 0 4px; }
  .az-fisa-body { padding: 18px 20px 0; }
  .az-fisa-top { padding: 0 14px 0 18px; }
  .az-ro-grid.az-ro-3 { grid-template-columns: 1fr; }
  .az-dosar-titlu { margin: 18px 20px 2px; font-size: 26px; }
  .az-dosar .az-fisa-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .az-dosar .az-fisa-tabs > li { flex: none; }
  .az-field-buton { flex-direction: column; align-items: stretch; }
  .az-profil { grid-template-columns: 1fr; }
  .az-cont-rand { grid-template-columns: minmax(0, 1fr) auto auto; }
  .az-cont-rand > .az-field:first-child, .az-cont-rand > .az-field:nth-child(2) { grid-column: 1 / -1; }
  .az-subnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; }
  .az-subnav::-webkit-scrollbar { display: none; }
  .az-subnav a { padding: 9px 14px; font-size: 14px; }
  .az-wl-card { grid-template-columns: 1fr; text-align: left; }
  .az-wl-nr { text-align: left; }
  .az-filtre-facturi { grid-template-columns: 1fr; }
  .az-rapoarte { grid-template-columns: 1fr; }
  .az-rapoarte-lista { max-height: 260px; }
  .az-card-head { padding: 18px 16px 4px; }
  .az-card-foot { padding: 0 16px 18px; }
  .az-cont-nou { padding: 18px 16px; }
  .az-field-buton .btn { height: 44px; }
  .az-steps-bar li + li::before { width: 14px; }
  .az-result { padding: 26px 20px; }
  .az-result .az-title { font-size: 24px; }
  .az-pagehead-ecran .page-header { font-size: 26px; }
  .az-pagehead-ecran .page-header > .btn:first-of-type { margin-left: 0; }
  .az-footer .az-container { justify-content: center; text-align: center; }

  /* tabelele devin liste de carduri: fiecare rând = un card cu etichetă și valoare */
  .az-content table.az-stack thead { display: none; }
  /* DataTables pune box-sizing: content-box pe celule; fără border-box padding-ul ar depăși cardul */
  .az-content table.az-stack, .az-content table.az-stack tbody,
  .az-content table.az-stack tr, .az-content table.az-stack td { display: block; width: auto !important; box-sizing: border-box !important; }
  .az-content table.az-stack tr { border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; padding: 6px 0; background: var(--surface); }
  .az-content table.az-stack td {
    border: 0 !important; display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 7px 14px !important; text-align: right; white-space: normal !important;
  }
  .az-content table.az-stack td::before { content: attr(data-label); font-weight: 600; font-size: 13px; color: var(--text-muted); text-align: left; flex: none; max-width: 45%; }
  /* celulele cu un rând secundar (furnizor + CUI, produs + descriere): valorile stau una sub alta, în dreapta */
  .az-content table.az-stack td:has(> .az-sub) { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 14px; justify-items: end; overflow-wrap: anywhere; }
  .az-content table.az-stack td:has(> .az-sub)::before { grid-row: span 2; align-self: center; max-width: none; }
  .az-content table.az-stack td.az-obs { max-width: none; }
  .az-content table.az-stack td:empty, .az-content table.az-stack td[data-label=""]:not(:has(*)) { display: none; }
  .dataTables_wrapper .dataTables_length { display: none; }
}
