/*
 * 2026-10-18: aspectul intranetului (ICA R&D), ales de fiecare utilizator (TemaUtilizator):
 *   <html data-tema="luminos|intunecat|automat" data-culoare="verde|albastru|turcoaz|mov|portocaliu|bordo|gri">
 *
 * Modul intunecat: pagina se inverseaza (luminozitate) pastrand nuantele; imaginile, iconitele,
 * butoanele colorate si antetele de tabel sunt inversate inapoi, ca sa ramana cu culorile lor.
 * Doar pe ecran - tiparirea ramane neschimbata.
 */

/* ---------- culoarea de accent (variabile folosite si de lista de comenzi) ---------- */
html { --accent: #5e9a35; --accent-inchis: #3d6b20; --accent-deschis: #edf5e6; }
html[data-culoare="albastru"] { --accent: #2e6ab1; --accent-inchis: #1d4a85; --accent-deschis: #e8f0fa; }
html[data-culoare="turcoaz"] { --accent: #12897f; --accent-inchis: #0b5f58; --accent-deschis: #e3f4f2; }
html[data-culoare="mov"] { --accent: #6b4fa3; --accent-inchis: #4a3478; --accent-deschis: #efeaf8; }
html[data-culoare="portocaliu"] { --accent: #d9772b; --accent-inchis: #9c4f12; --accent-deschis: #fdf0e4; }
html[data-culoare="bordo"] { --accent: #a33a3a; --accent-inchis: #742525; --accent-deschis: #f9eaea; }
html[data-culoare="gri"] { --accent: #4f5b66; --accent-inchis: #2f3840; --accent-deschis: #eef1f4; }

/* pentru alta culoare decat verdele implicit: bara de jos a site-ului (tabelele isi iau culoarea din stiluri, mai jos) */
html[data-culoare]:not([data-culoare="verde"]):not([data-stil="clasic"]):not([data-stil="contrast"]) td[style*="89be56"] {
	background-color: var(--accent) !important;
}

/* ---------- modul intunecat ---------- */
@media screen {
	html[data-tema="intunecat"] {
		background: #fff;
		filter: invert(0.9) hue-rotate(180deg);
	}
	html[data-tema="intunecat"] img,
	html[data-tema="intunecat"] video,
	html[data-tema="intunecat"] iframe,
	html[data-tema="intunecat"] object,
	html[data-tema="intunecat"] embed,
	html[data-tema="intunecat"]:not([data-stil="clasic"]) .anchor_but,
	html[data-tema="intunecat"] .grid-view table.items th,
	html[data-tema="intunecat"] .mostra,
	html[data-tema="intunecat"] .pastreaza-culori {
		filter: invert(1) hue-rotate(180deg);
	}
}

@media screen and (prefers-color-scheme: dark) {
	html[data-tema="automat"] {
		background: #fff;
		filter: invert(0.9) hue-rotate(180deg);
	}
	html[data-tema="automat"] img,
	html[data-tema="automat"] video,
	html[data-tema="automat"] iframe,
	html[data-tema="automat"] object,
	html[data-tema="automat"] embed,
	html[data-tema="automat"]:not([data-stil="clasic"]) .anchor_but,
	html[data-tema="automat"] .grid-view table.items th,
	html[data-tema="automat"] .mostra,
	html[data-tema="automat"] .pastreaza-culori {
		filter: invert(1) hue-rotate(180deg);
	}
}

/* ---------- bara din dreapta: „Coloane” (doar pe lista de comenzi) + „Aspect” ---------- */
.selector-tema {
	position: relative;
	float: right;
	margin: 2px 0 0 10px;
	font-size: 11px;
}

.selector-tema .buton-bara,
.selector-tema #buton-coloane {
	display: inline-block;
	margin-left: 4px;
	padding: 2px 9px;
	border: 1px solid #c9d3dd;
	border-radius: 3px;
	background: #fff;
	color: var(--accent-inchis);
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
}

.selector-tema .buton-bara:hover,
.selector-tema #buton-coloane:hover {
	border-color: var(--accent);
}

.selector-tema .coloane-grid {
	margin: 0;
}

#panou-tema {
	position: absolute;
	z-index: 60;
	top: 24px;
	right: 0;
	width: 250px;
	padding: 8px 10px 10px 10px;
	border: 1px solid #c9d3dd;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 3px 12px rgba(0,0,0,0.18);
	text-align: left;
}

#panou-tema .titlu-panou {
	margin: 4px 0 5px 0;
	color: #6b7580;
	font-size: 10px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

#panou-tema .moduri a {
	display: inline-block;
	margin: 0 3px 6px 0;
	padding: 3px 8px;
	border: 1px solid #c9d3dd;
	border-radius: 3px;
	color: #333;
	text-decoration: none;
}

#panou-tema .culori a {
	display: block;
	margin: 1px 0;
	padding: 3px 6px;
	border: 1px solid transparent;
	border-radius: 3px;
	color: #333;
	text-decoration: none;
}

#panou-tema .moduri a:hover,
#panou-tema .culori a:hover {
	border-color: var(--accent);
}

#panou-tema a.activ {
	border-color: var(--accent) !important;
	background: var(--accent-deschis);
	font-weight: bold;
}

#panou-tema .mostra {
	display: inline-block;
	width: 26px;
	height: 12px;
	margin-right: 8px;
	border-radius: 2px;
	vertical-align: middle;
}

/* panoul „Coloane”, cand butonul e mutat in bara din dreapta, se deschide spre stanga */
.selector-tema #panou-coloane {
	left: auto;
	right: 0;
	top: 24px;
	text-align: left;
}

#panou-tema .titlu-panou .nota {
	font-weight: normal;
	text-transform: none;
	letter-spacing: 0;
}

/* ---------- stiluri (lista din panoul „Aspect”) ---------- */
#panou-tema .stiluri a {
	display: block;
	margin: 1px 0;
	padding: 3px 6px;
	border: 1px solid transparent;
	border-radius: 3px;
	color: #333;
	text-decoration: none;
}

#panou-tema .stiluri a:hover {
	border-color: var(--accent);
}

#panou-tema .stiluri .descriere {
	display: block;
	color: #7a838c;
	font-size: 10px;
	font-weight: normal;
}

/* Compact si Aerisit au antet deschis la culoare: in modul intunecat se intuneca impreuna cu pagina */
@media screen {
	html[data-tema="intunecat"][data-stil="compact"] .grid-view table.items th,
	html[data-tema="intunecat"][data-stil="aerisit"] .grid-view table.items th {
		filter: none;
	}
}

@media screen and (prefers-color-scheme: dark) {
	html[data-tema="automat"][data-stil="compact"] .grid-view table.items th,
	html[data-tema="automat"][data-stil="aerisit"] .grid-view table.items th {
		filter: none;
	}
}

/* =====================================================================
   2026-10-18: STILURILE pentru toata aplicatia (toate tabelele, meniul, paginile de detaliu, butoanele)
   Clasic (original) = fara reguli, ramane aspectul initial.
   ===================================================================== */

/* ===== 2026-10-18: aspect modern pentru tabelul de comenzi (doar .grid-view) ===== */
html:not([data-stil="clasic"]) .grid-view table.items
{
	border: 1px solid #d5dde5;
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

html:not([data-stil="clasic"]) .grid-view table.items th
{
	padding: 7px 8px;
	border: 0;
	border-right: 1px solid rgba(255,255,255,0.2);
	background: var(--accent, #5e9a35);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
	vertical-align: middle;
}

html:not([data-stil="clasic"]) .grid-view table.items th a,
html:not([data-stil="clasic"]) .grid-view table.items th a:hover
{
	color: #fff;
}

html:not([data-stil="clasic"]) .grid-view table.items thead tr.filters td
{
	padding: 5px 6px;
	border: 0;
	border-bottom: 1px solid #d5dde5;
	background: #f3f6f9;
}

html:not([data-stil="clasic"]) .grid-view table.items .filters input,
html:not([data-stil="clasic"]) .grid-view table.items .filters select
{
	box-sizing: border-box;
	width: 100%;
	padding: 3px 5px;
	border: 1px solid #c9d3dd;
	border-radius: 3px;
	background: #fff;
	font-size: 11px;
}

html:not([data-stil="clasic"]) .grid-view table.items .filters input:focus,
html:not([data-stil="clasic"]) .grid-view table.items .filters select:focus
{
	border-color: var(--accent, #5e9a35);
	outline: none;
	box-shadow: 0 0 0 2px rgba(94,154,53,0.2);
}

html:not([data-stil="clasic"]) .grid-view table.items tbody td
{
	padding: 4px 8px;
	border: 0;
	border-bottom: 1px solid #e8edf2;
	color: #2b2f33;
	font-size: 12px;
	vertical-align: middle;
}

html:not([data-stil="clasic"]) #comanda-grid table.items tbody td.text-lung
{
	white-space: normal;
	min-width: 240px;
}

html:not([data-stil="clasic"]) .grid-view table.items tbody tr.even td { background: #fff; }
html:not([data-stil="clasic"]) .grid-view table.items tbody tr.odd td { background: #f7f9fb; }
html:not([data-stil="clasic"]) .grid-view table.items tbody tr:hover td { background: var(--accent-deschis, #edf5e6); }

/* comenzi intarziate: roz deschis + bara rosie in stanga */
html:not([data-stil="clasic"]) .grid-view table.items tbody tr.row-expired td { background: #fdecec; }
html:not([data-stil="clasic"]) .grid-view table.items tbody tr.row-expired:hover td { background: #fadede; }
html:not([data-stil="clasic"]) .grid-view table.items tbody tr.row-expired td:first-child { box-shadow: inset 4px 0 0 #d9534f; }

/* comenzi anulate: gri + bara rosu-inchis in stanga */
html:not([data-stil="clasic"]) .grid-view table.items tbody tr.comanda-anulata td { background: #f0f0f0; color: #8a8a8a; }
html:not([data-stil="clasic"]) .grid-view table.items tbody tr.comanda-anulata td:first-child { box-shadow: inset 4px 0 0 #7a1f1f; }

/* starea comenzii, cand termenul a trecut si comanda nu e finalizata */
html:not([data-stil="clasic"]) .grid-view table.items tbody td.expired { background: #f8d7d7; color: #a12a2a; font-weight: 600; }

/* DC / DR ca etichete */
html:not([data-stil="clasic"]) .grid-view .badge-alerta
{
	display: inline-block;
	padding: 1px 7px;
	border-radius: 9px;
	background: #d9534f;
	color: #fff;
	font-size: 10px;
	font-weight: bold;
	line-height: 15px;
}

/* paginare, 10/20/50/100 si „Coloane” in acelasi stil */
html:not([data-stil="clasic"]) .grid-view .summary
{
	color: #6b7580;
	font-size: 11px;
}

html:not([data-stil="clasic"]) .grid-view ul.yiiPager a:link,
html:not([data-stil="clasic"]) .grid-view ul.yiiPager a:visited,
html:not([data-stil="clasic"]) .grid-view .marime-pagina a,
html:not([data-stil="clasic"]) #buton-coloane
{
	padding: 2px 8px;
	border: 1px solid #c9d3dd;
	border-radius: 3px;
	background: #fff;
	color: var(--accent-inchis, #3d6b20);
	font-weight: 600;
}

html:not([data-stil="clasic"]) .grid-view ul.yiiPager a:hover,
html:not([data-stil="clasic"]) .grid-view .marime-pagina a:hover,
html:not([data-stil="clasic"]) #buton-coloane:hover
{
	border-color: var(--accent, #5e9a35);
}

html:not([data-stil="clasic"]) .grid-view ul.yiiPager .selected a,
html:not([data-stil="clasic"]) .grid-view .marime-pagina a.activ
{
	background: var(--accent, #5e9a35);
	border-color: var(--accent, #5e9a35);
	color: #fff;
}

html:not([data-stil="clasic"]) .grid-view ul.yiiPager .hidden a
{
	border-color: #e3e8ed;
	color: #b0b8c0;
}

/* ===== 2026-10-18: stilul „Compact (tabel)” - ca in Excel: randuri stranse, grila completa, butoane conturate ===== */
html[data-stil="compact"] .grid-view table.items
{
	border: 1px solid #c8ced5;
	border-radius: 0;
	box-shadow: none;
}

html[data-stil="compact"] .grid-view table.items th
{
	padding: 3px 6px;
	border: 1px solid #c8ced5;
	border-bottom: 2px solid var(--accent, #5e9a35);
	background: #eef1f4;
	color: #2b2f33;
	font-size: 11px;
}

html[data-stil="compact"] .grid-view table.items th a,
html[data-stil="compact"] .grid-view table.items th a:hover
{
	color: #2b2f33;
}

html[data-stil="compact"] .grid-view table.items thead tr.filters td
{
	padding: 2px 3px;
	border: 1px solid #dde2e7;
	background: #f8f9fa;
}

html[data-stil="compact"] .grid-view table.items .filters input,
html[data-stil="compact"] .grid-view table.items .filters select
{
	padding: 1px 3px;
	border-radius: 0;
}

html[data-stil="compact"] .grid-view table.items tbody td
{
	padding: 2px 6px;
	border: 1px solid #e1e5ea;
	font-size: 11px;
}

html[data-stil="compact"] .grid-view table.items tbody tr.even td,
html[data-stil="compact"] .grid-view table.items tbody tr.odd td { background: #fff; }
html[data-stil="compact"] .grid-view table.items tbody tr:hover td { background: #fff8db; }
html[data-stil="compact"] .grid-view table.items tbody tr.row-expired td { background: #fff1f1; color: #9b2c2c; }
html[data-stil="compact"] .grid-view table.items tbody tr.row-expired td:first-child { box-shadow: inset 3px 0 0 #d9534f; }

html[data-stil="compact"] .grid-view td a.anchor_but
{
	padding: 0 4px;
	border-width: 1px;
	border-style: solid;
	background: transparent !important;
	font-size: 10px;
	line-height: 14px;
}

html[data-stil="compact"] .grid-view td a.but-detalii   { color: #2c5f9e; border-color: #2c5f9e; }
html[data-stil="compact"] .grid-view td a.but-modifica  { color: #a86512; border-color: #a86512; }
html[data-stil="compact"] .grid-view td a.but-aloca     { color: #5c3f8a; border-color: #5c3f8a; }
html[data-stil="compact"] .grid-view td a.but-rezultat  { color: #227443; border-color: #227443; }
html[data-stil="compact"] .grid-view td a.but-rezultate { color: #0d6363; border-color: #0d6363; }
html[data-stil="compact"] .grid-view td a.but-cloneaza  { color: #4f565c; border-color: #4f565c; }
html[data-stil="compact"] .grid-view td a.but-deblocare { color: #962f27; border-color: #962f27; }
html[data-stil="compact"] .grid-view td a.but-aprobare  { color: #826400; border-color: #826400; }

/* ===== 2026-10-18: stilul „Aerisit (carduri)” - fiecare rand e un card separat ===== */
html[data-stil="aerisit"] .grid-view table.items
{
	border: 0;
	border-spacing: 0 6px;
	background: transparent;
	box-shadow: none;
}

html[data-stil="aerisit"] .grid-view table.items th
{
	padding: 9px 10px 7px 10px;
	border: 0;
	border-bottom: 2px solid var(--accent, #5e9a35);
	background: #fff;
	color: var(--accent-inchis, #3d6b20);
	font-size: 10px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

html[data-stil="aerisit"] .grid-view table.items th a,
html[data-stil="aerisit"] .grid-view table.items th a:hover
{
	color: var(--accent-inchis, #3d6b20);
}

html[data-stil="aerisit"] .grid-view table.items thead tr.filters td
{
	border: 0;
	background: #fff;
}

html[data-stil="aerisit"] .grid-view table.items tbody td
{
	padding: 9px 10px;
	border: 0;
	border-top: 1px solid #e3e8ee;
	border-bottom: 1px solid #e3e8ee;
	background: #fff;
}

html[data-stil="aerisit"] .grid-view table.items tbody td:first-child
{
	border-left: 1px solid #e3e8ee;
	border-radius: 6px 0 0 6px;
}

html[data-stil="aerisit"] .grid-view table.items tbody td:last-child
{
	border-right: 1px solid #e3e8ee;
	border-radius: 0 6px 6px 0;
}

html[data-stil="aerisit"] .grid-view table.items tbody tr.even td,
html[data-stil="aerisit"] .grid-view table.items tbody tr.odd td { background: #fff; }
html[data-stil="aerisit"] .grid-view table.items tbody tr:hover td { background: var(--accent-deschis, #edf5e6); }
html[data-stil="aerisit"] .grid-view table.items tbody tr.row-expired td { background: #fff5f5; border-color: #f2c9c9; }

html[data-stil="aerisit"] .grid-view td a.anchor_but
{
	margin-right: 4px;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 10px;
}

/* ===== 2026-10-18: stilul „Contrast ridicat” - text mare, negru pe alb, borduri clare ===== */
html[data-stil="contrast"] .grid-view table.items
{
	border: 2px solid #000;
	border-radius: 0;
	box-shadow: none;
}

html[data-stil="contrast"] .grid-view table.items th
{
	padding: 7px 8px;
	border: 1px solid #000;
	background: #000;
	color: #fff;
	font-size: 12px;
	font-weight: bold;
}

html[data-stil="contrast"] .grid-view table.items th a,
html[data-stil="contrast"] .grid-view table.items th a:hover
{
	color: #fff;
	text-decoration: underline;
}

html[data-stil="contrast"] .grid-view table.items thead tr.filters td
{
	border: 1px solid #000;
	background: #fff;
}

html[data-stil="contrast"] .grid-view table.items .filters input,
html[data-stil="contrast"] .grid-view table.items .filters select
{
	border: 2px solid #000;
	border-radius: 0;
	font-size: 12px;
}

html[data-stil="contrast"] .grid-view table.items tbody td
{
	padding: 6px 8px;
	border: 1px solid #000;
	color: #000;
	font-size: 13px;
}

html[data-stil="contrast"] .grid-view table.items tbody tr.even td { background: #fff; }
html[data-stil="contrast"] .grid-view table.items tbody tr.odd td { background: #efefef; }
html[data-stil="contrast"] .grid-view table.items tbody tr:hover td { background: #ffff99; }
html[data-stil="contrast"] .grid-view table.items tbody tr.row-expired td { background: #ffd6d6; font-weight: bold; }
html[data-stil="contrast"] .grid-view table.items tbody tr.row-expired td:first-child { box-shadow: inset 6px 0 0 #c00000; }
html[data-stil="contrast"] .grid-view table.items tbody tr.comanda-anulata td { background: #d9d9d9; color: #333; text-decoration: line-through; }
html[data-stil="contrast"] .grid-view table.items tbody td.expired { background: #ffb3b3; color: #000; }

html[data-stil="contrast"] .grid-view td a.anchor_but
{
	padding: 2px 7px;
	border: 2px solid #000;
	font-size: 12px;
}

html[data-stil="contrast"] .grid-view ul.yiiPager a:link,
html[data-stil="contrast"] .grid-view ul.yiiPager a:visited,
html[data-stil="contrast"] .grid-view .marime-pagina a
{
	border: 2px solid #000;
	color: #000;
	font-size: 12px;
}

html[data-stil="contrast"] .grid-view ul.yiiPager .selected a,
html[data-stil="contrast"] .grid-view .marime-pagina a.activ
{
	background: #000;
	color: #fff;
}


/* doar lista de comenzi: randuri pe un singur rand (exceptie coloanele cu text lung) */
html:not([data-stil="clasic"]) #comanda-grid table.items tbody td
{
	white-space: nowrap;
}

/* ---------- meniul de sus (bara cu Home, Comenzi, ...) ---------- */
html[data-stil="modern"] #nav-bar {
	border-color: var(--accent-inchis);
	background: var(--accent-inchis);
}

html[data-stil="compact"] #nav-bar {
	border-top: 1px solid #c8ced5;
	border-bottom: 2px solid var(--accent);
	background: #eef1f4;
}
html[data-stil="compact"] #nav > li > a { color: #2b2f33; }
html[data-stil="compact"] #nav > li.over > a { color: var(--accent-inchis); }

html[data-stil="aerisit"] #nav-bar {
	border-top: 0;
	border-bottom: 2px solid var(--accent);
	background: #fff;
}
html[data-stil="aerisit"] #nav > li { background: none; }
html[data-stil="aerisit"] #nav > li > a {
	color: var(--accent-inchis);
	font-size: 11px;
	letter-spacing: 0.4px;
	text-transform: uppercase;
}

html[data-stil="contrast"] #nav-bar {
	border-color: #000;
	background: #000;
}
html[data-stil="contrast"] #nav > li > a {
	color: #fff;
	font-size: 13px;
	font-weight: bold;
	text-decoration: underline;
}

/* meniurile inchise la culoare (Modern, Contrast) isi pastreaza culoarea si in modul intunecat */
@media screen {
	html[data-tema="intunecat"][data-stil="modern"] #nav-bar,
	html[data-tema="intunecat"][data-stil="contrast"] #nav-bar {
		filter: invert(1) hue-rotate(180deg);
	}
}
@media screen and (prefers-color-scheme: dark) {
	html[data-tema="automat"][data-stil="modern"] #nav-bar,
	html[data-tema="automat"][data-stil="contrast"] #nav-bar {
		filter: invert(1) hue-rotate(180deg);
	}
}

/* ---------- paginile de detaliu (tabelele „Vizualizare”) ---------- */
html:not([data-stil="clasic"]) table.detail-view {
	border: 1px solid #d5dde5;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: 4px;
	background: #fff;
}
html:not([data-stil="clasic"]) table.detail-view th,
html:not([data-stil="clasic"]) table.detail-view td {
	padding: 5px 10px;
	border: 0;
	border-bottom: 1px solid #e8edf2;
	font-size: 12px;
}
html:not([data-stil="clasic"]) table.detail-view tr.odd,
html:not([data-stil="clasic"]) table.detail-view tr.even { background: #fff; }
html:not([data-stil="clasic"]) table.detail-view th {
	background: var(--accent-deschis);
	color: var(--accent-inchis);
	font-weight: 600;
}

html[data-stil="compact"] table.detail-view { border-radius: 0; }
html[data-stil="compact"] table.detail-view th,
html[data-stil="compact"] table.detail-view td { padding: 2px 6px; border: 1px solid #e1e5ea; font-size: 11px; }
html[data-stil="compact"] table.detail-view th { background: #eef1f4; color: #2b2f33; }

html[data-stil="aerisit"] table.detail-view { border-color: #e3e8ee; border-radius: 8px; }
html[data-stil="aerisit"] table.detail-view th,
html[data-stil="aerisit"] table.detail-view td { padding: 9px 12px; }
html[data-stil="aerisit"] table.detail-view th { background: #fff; text-transform: uppercase; font-size: 10px; letter-spacing: 0.4px; }

html[data-stil="contrast"] table.detail-view { border: 2px solid #000; border-radius: 0; }
html[data-stil="contrast"] table.detail-view th,
html[data-stil="contrast"] table.detail-view td { border: 1px solid #000; color: #000; font-size: 13px; }
html[data-stil="contrast"] table.detail-view th { background: #000; color: #fff; }

/* ---------- butoanele din formulare (Salveaza, Cauta, ...) ---------- */
html:not([data-stil="clasic"]) input[type="submit"],
html:not([data-stil="clasic"]) input[type="button"] {
	padding: 4px 14px;
	border: 1px solid var(--accent-inchis);
	border-radius: 3px;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}
html:not([data-stil="clasic"]) input[type="submit"]:hover,
html:not([data-stil="clasic"]) input[type="button"]:hover { background: var(--accent-inchis); }

html[data-stil="compact"] input[type="submit"],
html[data-stil="compact"] input[type="button"] {
	padding: 2px 10px;
	border-radius: 0;
	background: #fff;
	color: var(--accent-inchis);
}
html[data-stil="compact"] input[type="submit"]:hover,
html[data-stil="compact"] input[type="button"]:hover { background: var(--accent-deschis); }

html[data-stil="aerisit"] input[type="submit"],
html[data-stil="aerisit"] input[type="button"] { padding: 6px 18px; border-radius: 16px; }

html[data-stil="contrast"] input[type="submit"],
html[data-stil="contrast"] input[type="button"] {
	border: 2px solid #000;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-size: 13px;
}
html[data-stil="contrast"] input[type="submit"]:hover,
html[data-stil="contrast"] input[type="button"]:hover { background: #333; }

/* butoanele de formular colorate isi pastreaza culoarea in modul intunecat */
@media screen {
	html[data-tema="intunecat"]:not([data-stil="clasic"]):not([data-stil="compact"]) input[type="submit"],
	html[data-tema="intunecat"]:not([data-stil="clasic"]):not([data-stil="compact"]) input[type="button"] {
		filter: invert(1) hue-rotate(180deg);
	}
}
@media screen and (prefers-color-scheme: dark) {
	html[data-tema="automat"]:not([data-stil="clasic"]):not([data-stil="compact"]) input[type="submit"],
	html[data-tema="automat"]:not([data-stil="clasic"]):not([data-stil="compact"]) input[type="button"] {
		filter: invert(1) hue-rotate(180deg);
	}
}


/* ======================================================================================
   2026-10-18: meniul de sus, submeniurile si calea de navigare (Home › Comenzi › ...) - aspect modern.
   Stilul „Clasic” ramane aspectul original (doar submeniul e putin mai lat, ca sa incapa „Functionalitati”).
   ====================================================================================== */
#nav ul { width: 210px; }
#nav li.over ul li.over ul { left: 208px; top: -1px; }
/* 26.4.7: meniul Admin pe grupe (Administrare > arborele meniului) - submeniurile de nivelul 3 si 4 apar doar cand grupa lor e
   deschisa, langa ea (mbmenu.css le punea la 100px, peste submeniul parinte) */
#mainmenu #nav ul ul ul { left: -10000px; }
#mainmenu #nav li.over > ul > li.over > ul > li.over > ul,
#mainmenu #nav li.over > ul > li.over > ul > li.over > ul > li.over > ul { left: 208px; top: -1px; }
/* 26.4.7: pagina deschisa in panoul din dreapta al paginii Administrare (iframe; layout-urile admin.php / adminpopup.php pun clasa
   „in-administrare” pe <html>): fara antet, meniu, selectorul de aspect, subsol si banda / filigranul serverului de test (raman o
   singura data, in pagina Administrare) */
html.in-administrare #maincont > table.background > tbody > tr:first-child,
html.in-administrare #maincont > table.background > tbody > tr:nth-child(n+4),
html.in-administrare #mainmenu,
html.in-administrare #selector-tema,
html.in-administrare #server-test-banda,
html.in-administrare #server-test-filigran,
html.in-administrare #testare-sus { display: none !important; }
html.in-administrare #maincont > table.background { width: 100% !important; }

/* ---- bara de sus: elemente tip „pastila” ---- */
/* position + z-index: meniul (si submeniurile) peste antetul lipit al tabelelor, si in modul intunecat (filtrul creeaza alt strat) */
html:not([data-stil="clasic"]) #nav-bar { position: relative; z-index: 60; padding: 0 16px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
html:not([data-stil="clasic"]) #nav > li { background: none; }
html:not([data-stil="clasic"]) #mainmenu #nav > li > a,
html:not([data-stil="clasic"]) #mainmenu #nav > li > a:hover {
	padding: 0;
	background: none;
	text-decoration: none;
}
html:not([data-stil="clasic"]) #nav > li > a > span {
	margin: 5px 2px;
	padding: 6px 13px;
	border-radius: 6px;
	line-height: 16px;
	transition: background-color 0.15s, color 0.15s;
}
html:not([data-stil="clasic"]) #nav > li.parent > a > span:after { content: " \25BE"; font-size: 10px; opacity: 0.8; }
/* bare inchise la culoare (Modern, Contrast): evidentiere alba transparenta */
html[data-stil="modern"] #mainmenu #nav > li > a { color: #fff; }
html[data-stil="modern"] #nav > li.over > a > span,
html[data-stil="modern"] #nav > li > a:hover > span { background: rgba(255, 255, 255, 0.18); color: #fff; }
html[data-stil="contrast"] #nav > li.over > a > span,
html[data-stil="contrast"] #nav > li > a:hover > span { background: #fff; color: #000; }
/* bare deschise (Compact, Aerisit): evidentiere in culoarea temei */
html[data-stil="compact"] #nav > li.over > a > span,
html[data-stil="compact"] #nav > li > a:hover > span,
html[data-stil="aerisit"] #nav > li.over > a > span,
html[data-stil="aerisit"] #nav > li > a:hover > span { background: var(--accent-deschis); color: var(--accent-inchis); }

/* ---- submeniurile: card alb cu umbra ---- */
html:not([data-stil="clasic"]) #mainmenu #nav ul {
	width: 220px;
	padding: 6px;
	border: 1px solid #dde3ea;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 30, 45, 0.18);
}
html:not([data-stil="clasic"]) #nav li.over > ul { left: 2px; top: 100%; }
html:not([data-stil="clasic"]) #nav li.over ul li.over > ul { left: 100%; top: -7px; margin-left: -2px; }
html:not([data-stil="clasic"]) #mainmenu #nav li.over > ul > li.over > ul > li.over > ul,
html:not([data-stil="clasic"]) #mainmenu #nav li.over > ul > li.over > ul > li.over > ul > li.over > ul { left: 100%; top: -7px; margin-left: -2px; }   /* 26.4.7 */
html:not([data-stil="clasic"]) #nav ul li,
html:not([data-stil="clasic"]) #nav ul li.last { padding: 0; background: none; }
html:not([data-stil="clasic"]) #mainmenu #nav ul li a,
html:not([data-stil="clasic"]) #mainmenu #nav ul li a:hover {
	padding: 0;
	border-radius: 6px;
	background: none;
	color: #2b3138;
	font-size: 12px;
	font-weight: normal;
}
html:not([data-stil="clasic"]) #nav ul span,
html:not([data-stil="clasic"]) #nav ul li.last span,
html:not([data-stil="clasic"]) #nav ul li.last li span { padding: 8px 12px; background: none; }
html:not([data-stil="clasic"]) #mainmenu #nav ul li.over > a,
html:not([data-stil="clasic"]) #mainmenu #nav ul li a:hover { background: var(--accent-deschis); color: var(--accent-inchis); }
html:not([data-stil="clasic"]) #mainmenu #nav ul li.parent > a { background-image: none; }
html:not([data-stil="clasic"]) #nav ul li.parent > a > span:after { content: "\203A"; float: right; font-size: 14px; line-height: 12px; color: #8a96a3; }
/* Contrast: chenar negru si evidentiere negru pe alb */
html[data-stil="contrast"] #mainmenu #nav ul { border: 2px solid #000; box-shadow: none; }
html[data-stil="contrast"] #mainmenu #nav ul li a { color: #000; font-size: 13px; font-weight: bold; }
html[data-stil="contrast"] #mainmenu #nav ul li.over > a,
html[data-stil="contrast"] #mainmenu #nav ul li a:hover { background: #000; color: #fff; }
/* Modern / Contrast in modul intunecat: bara isi pastreaza culoarea, dar submeniul devine inchis, ca restul paginii */
@media screen {
	html[data-tema="intunecat"][data-stil="modern"] #nav > li > ul,
	html[data-tema="intunecat"][data-stil="contrast"] #nav > li > ul { filter: invert(1) hue-rotate(180deg); }
}
@media screen and (prefers-color-scheme: dark) {
	html[data-tema="automat"][data-stil="modern"] #nav > li > ul,
	html[data-tema="automat"][data-stil="contrast"] #nav > li > ul { filter: invert(1) hue-rotate(180deg); }
}

/* ---- calea de navigare (Home › Comenzi › 128243 › Rezultate) ---- */
html:not([data-stil="clasic"]) div.breadcrumbs {
	display: inline-block;
	margin: 8px 0 4px 20px;
	padding: 4px 12px;
	border: 1px solid #e1e6ec;
	border-radius: 999px;
	background: #f7f9fb;
	color: #8a96a3;
	font-size: 12px;
}
html:not([data-stil="clasic"]) div.breadcrumbs a { color: var(--accent-inchis); font-weight: 600; text-decoration: none; }
html:not([data-stil="clasic"]) div.breadcrumbs a:hover { text-decoration: underline; }
html:not([data-stil="clasic"]) div.breadcrumbs span { color: #2b3138; font-weight: 600; }
html:not([data-stil="clasic"]) div.breadcrumbs span.separator-cale { margin: 0 6px; color: #b0b9c3; font-weight: normal; }
html[data-stil="contrast"] div.breadcrumbs { border: 2px solid #000; background: #fff; color: #000; font-size: 14px; }
html[data-stil="contrast"] div.breadcrumbs a { color: #000; text-decoration: underline; }

/* 2026-10-18: logo-ul si bannerul din antet (transparente): la tema intunecata apar variantele pentru fond inchis */
.logo-ica-intunecat, .antet-intunecat { display: none; }
@media screen {
	html[data-tema="intunecat"] .logo-ica-luminos, html[data-tema="intunecat"] .antet-luminos { display: none; }
	html[data-tema="intunecat"] .logo-ica-intunecat, html[data-tema="intunecat"] .antet-intunecat { display: inline; }
}
@media screen and (prefers-color-scheme: dark) {
	html[data-tema="automat"] .logo-ica-luminos, html[data-tema="automat"] .antet-luminos { display: none; }
	html[data-tema="automat"] .logo-ica-intunecat, html[data-tema="automat"] .antet-intunecat { display: inline; }
}

/* 2026-10-18: versiunea aplicatiei, ultima linie din meniul Admin - mica, gri, fara efect la mouse (toate stilurile) */
html:not([data-stil="clasic"]) #mainmenu #nav ul li.versiune-aplicatie { margin-top: 4px; border-top: 1px solid #e3e8ee; background-image: none; }
html:not([data-stil="clasic"]) #mainmenu #nav ul li.versiune-aplicatie a,
html:not([data-stil="clasic"]) #mainmenu #nav ul li.versiune-aplicatie a:hover { background: none; }
#mainmenu #nav ul li.versiune-aplicatie a,
#mainmenu #nav ul li.versiune-aplicatie a:hover { color: #8a96a3; cursor: default; }
html[data-stil="clasic"] #mainmenu #nav ul li.versiune-aplicatie a:hover { background: #e3ecee; } /* Clasic: fundalul meniului vechi, fara evidentiere */
#mainmenu #nav ul li.versiune-aplicatie span { padding-top: 5px; padding-bottom: 4px; font-size: 10px; letter-spacing: 0.3px; }
html[data-stil="contrast"] #mainmenu #nav ul li.versiune-aplicatie a { color: #555; font-size: 11px; font-weight: normal; }

/* 2026-10-18: butoanele din coloana de actiuni (vizualizare, editare, stergere, activ ...) mereu pe un singur rand, in toate listele.
   Coloana implicita din Yii are 60px, iar iconitele noi (18px) nu mai incapeau trei pe un rand.
   Multe liste isi pun propriul htmlOptions pe coloana (fara clasa button-column), deci se tinteste si celula care contine butoanele. */
.grid-view table.items td.button-column,
.grid-view table.items td:has(> a.view), .grid-view table.items td:has(> a.update), .grid-view table.items td:has(> a.delete) { white-space: nowrap; }
.grid-view table.items td.button-column img, .grid-view table.items td > a.view img, .grid-view table.items td > a.update img, .grid-view table.items td > a.delete img { vertical-align: middle; }

/* 2026-10-18: meniul „Operatii” din stanga paginilor (layout column2: Lista / Adauga / Modifica / Vizualizeaza / Sterge)
   ca un card modern: titlu in culoarea temei, fiecare operatie pe un rand cu sageata, evidentiere la mouse.
   Caseta goala (pagini fara operatii) nu se mai afiseaza. La stilul Clasic ramane ca inainte. */
html:not([data-stil="clasic"]) #sidebar { padding: 20px 16px 20px 0; }
html:not([data-stil="clasic"]) #sidebar .portlet { margin: 0 0 15px; border: 1px solid #dde3ea; border-radius: 6px; background: #fff; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
html:not([data-stil="clasic"]) #sidebar .portlet:not(:has(ul.operations li)) { display: none; }
html:not([data-stil="clasic"]) #sidebar .portlet-decoration { padding: 9px 12px 8px; border-left: 0; border-bottom: 1px solid #e8edf2; background: var(--accent-deschis, #edf5e6); }
html:not([data-stil="clasic"]) #sidebar .portlet-title { color: var(--accent-inchis, #3d6b20); font-size: 12px; font-weight: bold; text-transform: uppercase; letter-spacing: .5px; }
html:not([data-stil="clasic"]) #sidebar .portlet-content { margin: 0; padding: 6px; background: #fff; font-size: 12px; }
html:not([data-stil="clasic"]) #sidebar .operations li { padding: 0; }
html:not([data-stil="clasic"]) #sidebar .operations li a { position: relative; display: block; padding: 7px 10px 7px 24px; border-radius: 4px; color: #2f3a44; font-size: 12px; font-weight: 600; line-height: 16px; font-family: inherit; text-decoration: none; }
html:not([data-stil="clasic"]) #sidebar .operations li a:before { content: "\203A"; position: absolute; left: 10px; top: 6px; color: var(--accent, #5e9a35); font-size: 15px; font-weight: bold; line-height: 16px; }
html:not([data-stil="clasic"]) #sidebar .operations li a:visited { color: #2f3a44; }
html:not([data-stil="clasic"]) #sidebar .operations li a:hover { background: var(--accent-deschis, #edf5e6); color: var(--accent-inchis, #3d6b20); }
html:not([data-stil="clasic"]) #sidebar .operations li.active a { background: var(--accent, #5e9a35); color: #fff; }
html:not([data-stil="clasic"]) #sidebar .operations li.active a:before { color: #fff; }
/* pagina cu meniul Operatii: meniul in stanga (200px), continutul in dreapta, pe toata latimea ramasa
   (grila veche blueprint avea 950px si punea meniul deasupra continutului); fara operatii, coloana dispare */
html:not([data-stil="clasic"]) .container:has(> .span-5 #sidebar) { display: flex; align-items: flex-start; gap: 4px; width: auto; }
html:not([data-stil="clasic"]) .container:has(> .span-5 #sidebar) > .span-5 { flex: 0 0 210px; float: none; width: auto; margin: 0; }
html:not([data-stil="clasic"]) .container:has(> .span-5 #sidebar) > .span-19 { flex: 1 1 auto; min-width: 0; float: none; width: auto; margin: 0; }
html:not([data-stil="clasic"]) .container:has(> .span-5 #sidebar):not(:has(ul.operations li)) > .span-5 { display: none; }
@media (max-width: 900px) { html:not([data-stil="clasic"]) .container:has(> .span-5 #sidebar) { flex-direction: column; } html:not([data-stil="clasic"]) .container:has(> .span-5 #sidebar) > .span-5 { flex-basis: auto; width: 100%; } }

/* 26.3.40: tiparirea (Ctrl+P) arata ca pagina: meniul de sus (stilul mbmenu e doar pentru ecran) ramane pe un rand, fara submeniurile
   desfacute; linkurile nu mai primesc adresa in paranteza (regula din print.css - blueprint) */
@media print {
	#nav, #nav ul { list-style: none; margin: 0; padding: 0; }
	#nav { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 4px 0 6px; border-bottom: 1px solid #ccc; }
	#nav > li { display: block; margin: 0; padding: 0; }
	#nav li ul { display: none !important; }
	#nav a { color: #333; font-weight: bold; text-decoration: none; }
	a:link:after, a:visited:after { content: "" !important; }
	ul.yiiPager { display: inline; list-style: none; margin: 0; padding: 0; }
	ul.yiiPager li { display: inline-block; margin: 0 3px 0 0; }
	ul.yiiPager li.hidden { display: none; }
}
