/* ════════════════════════════════════════════════════════════════
   header.css — navbar, layout și reset global pentru paginile ADMIN
   Încărcat prin: includes/header.php (toate paginile admin)
   Împreună cu: admin.css (componente admin specifice)
   ════════════════════════════════════════════════════════════════ */

/* TwemojiMozilla © Mozilla Foundation, CC-BY 4.0 — flag emoji polyfill for Chrome/Windows */
@font-face {
    font-family: 'FlagEmoji';
    src: url('../fonts/TwemojiMozilla.woff2') format('woff2');
    unicode-range: U+1F1E0-U+1F1FF;
}

/* Reset și configurare de bază */
/* ── Variables ─────────────────────────────────────────────────── */
:root {
    /* ── Design system — folosit în toate paginile admin ── */
    --bg:            #0d1117;
    --bg2:           #161b22;
    --bg3:           #21262d;
    --border:        #30363d;
    --accent:        #4f8ef7;
    --accent2:       #2956a0;
    --danger:        #e05252;
    --success:       #27ae60;
    --text:          #c9d1d9;
    --text-muted:    #8b949e;
    --title:         #f0f6fc;

    --reg-bg:       #111b28;
    --reg-surface:  #1e293b;
    --reg-border:   rgba(255,255,255,0.1);
    --reg-accent:   #6366f1;
    --reg-accent2:  #8b5cf6;
    --reg-text:     #f1f5f9;
    --reg-muted:    #94a3b8;
    --reg-success:  #10b981;
    --reg-error:    #ef4444;
    --reg-warning:  #f59e0b;
	--primary-color: #3b82f6;
    --secondary-color: #2c3e50;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #3b82f6;
    --light-bg: #ecf0f1;
    --dark-text: #2c3e50;
    --border-color: #bdc3c7;
	--primary-color: #3b82f6;
    --secondary-color: #2c3e50;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --info-color: #3b82f6;
    --light-bg: #1d2328;
    --border-color: #e0e0e0;
    --text-muted: #6c757d;
    --card-bg: #fafafa;
	--var-label: 0.75rem;
	--color-label: #8aa7cf;
	
	--header-bg: #1a1f2e;
    --header-accent: #4f8ef7;
    --header-text: #e8ecf4;
    --header-muted: rgba(232, 236, 244, 0.6);
    --header-hover-bg: rgba(79, 142, 247, 0.15);
    --header-border: rgba(255, 255, 255, 0.08);
    --header-dropdown-bg: #232838;
    --header-dropdown-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    --header-height: 64px;
    --header-radius: 8px;
    --header-transition: 0.2s ease;
}

/* ── Background ────────────────────────────────────────────────── */
.reg-bg {
    position: fixed; inset: 0; z-index: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(139,92,246,.12) 0%, transparent 50%),
                radial-gradient(ellipse at 60% 80%, rgba(16,185,129,.08) 0%, transparent 50%),
                #0f172a;
}

body {
    font-family: 'FlagEmoji', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* line-height: 1.6; */
    color: #bec9d3;
    /*background-color: #4e5253; /*f5f6fa*/
	background: var(--reg-bg);
	margin: 0px;
	height: 100%;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}


.main-content {
  flex: 1;
}
/* ============================================================
   CSS VARIABLES
   Variabilele de header sunt în header.css (:root acolo).
   Aici păstrăm doar variabilele pentru restul aplicației.
   ============================================================ */

/* ============================================================
   HEADER
   Toate stilurile de header sunt în header.css.
   Nu se definesc aici: .main-header, .header-container,
   .logo, .main-nav, .user-menu, .username, .dropdown,
   .dropdown-toggle, .dropdown-menu, .language-selector,
   .lang-selected, .lang-arrow, .lang-dropdown,
   .mobile-menu-toggle, .mobile-nav-panel
   ============================================================ */


/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}


/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-error {
    background: #fadbd8;
    color: #c0392b;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}


/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard h1 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.user-info {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info p {
    margin-bottom: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.dashboard-card h3 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.dashboard-card p {
    margin-bottom: 1rem;
    color: #7f8c8d;
}


/* ============================================================
   PERMISSIONS
   ============================================================ */
.permissions-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.permissions-section h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.permissions-list {
    list-style: none;
}

.permissions-list li {
    padding: 0.75rem;
    border-bottom: 1px solid var(--light-bg);
    display: flex;
    justify-content: space-between;
}

.permission-name {
    font-weight: 600;
    color: var(--primary-color);
}

.permission-desc {
    color: #7f8c8d;
    font-size: 0.9rem;
}


/* ============================================================
   INFO BOXES
   ============================================================ */
.info-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-box.warning {
    border-left: 4px solid var(--warning-color);
    background: #fff3cd;
}

.info-box h3 {
    margin-bottom: 1rem;
}

.info-box ul {
    margin-left: 1.5rem;
}


/* ============================================================
   SETTINGS
   ============================================================ */
.settings-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-bg);
}

.setting-item label {
    font-weight: 600;
}


/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
    background: #1d2328;
    color: white;
    padding: 2rem 0;
	margin-top: 3rem;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-info-links {
    max-width: 1200px;
    margin: 0 auto 1rem;
    padding: 0 20px .75rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
    justify-content: center;
}
.footer-info-col {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 120px;
}
.footer-info-col-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255,255,255,.35);
    margin-bottom: .2rem;
}
.footer-info-links a {
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: color .15s;
}
.footer-info-links a:hover { color: rgba(255,255,255,.9); }

.footer-container p {
    margin-bottom: 0.5rem;
}


/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
    text-align: center;
    padding: 3rem;
    background: #1d2328;
    border: 1px solid #5b5a5a;
    border-radius: 8px;
    color: #bec9d3;
}

.error-page h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--danger-color);
}

.error-page p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #bec9d3;
}

[data-theme="light"] .error-page {
    background: #ffffff;
    border-color: #9daabc;
    color: #1e293b;
}

[data-theme="light"] .error-page p {
    color: #1e293b;
}


/* ============================================================
   FEATURE BADGE
   ============================================================ */
.feature-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid #a5d6a7;
    transition: all 0.3s;
}

.feature-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.2);
}


/* ============================================================
   BUTTONS
   Definițiile de bază pentru .btn, .btn-primary etc. sunt în
   header.css (versiune inline-flex). Aici adăugăm doar ce
   lipsește din header.css.
   ============================================================ */

.btn-block {
    width: 100%;
}



/* Form rows */
.form-row {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    align-items: start;
}

.form-row.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-row.cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form-row.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #5a5b5b;
    justify-content: flex-end;
}

.form-actions button,
.form-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

@keyframes subtlePulse {
    0%   { box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15); }
    50%  { box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.25); }
    100% { box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15); }
}


/* ============================================================
   RESPONSIVE - doar pentru componente din acest fișier
   (header-ul e acoperit complet de header.css)
   ============================================================ */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .form-container {
        padding: .75rem;
        margin: 1.5rem 0;
    }

    .form-row.cols-2,
    .form-row.cols-3,
    .form-row.cols-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-container h2 {
        font-size: 1.35rem;
        margin-bottom: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

}



/* ============================================
   HEADER - Responsive & Modern
   Toți selectorii prefixați cu .main-header
   pentru specificitate maximă vs admin.css etc.
   ============================================ */

.main-header,
.main-header * {
  box-sizing: border-box;
}

/* ---- Wrapper ---- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg) !important;
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  height: var(--header-height);
  margin-left: var(--sidebar-width);
  transition: margin-left 0.28s ease;
}

.main-header .header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Logo ---- */
.main-header .logo {
  flex-shrink: 0;
  margin-right: 8px;
}

.main-header .logo a {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 30%, var(--header-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* ---- Main Nav ---- */
.main-header .main-nav {
  flex: 1;
}

.main-header .main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  margin: 0;
  padding: 0;
}

.main-header .main-nav ul li {
  position: relative;
  list-style: none;
}

.main-header .main-nav ul li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  color: var(--header-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--header-radius);
  transition: color var(--header-transition), background var(--header-transition);
  white-space: nowrap;
}

.main-header .main-nav ul li > a:hover {
  color: var(--header-text);
  background: var(--header-hover-bg);
}

/* ============================================================
   DROPDOWN - controlat de JS cu clasa .hdr-open
   Evităm :hover CSS ca să nu fim bătuți de admin.css
   care are .dropdown:hover .dropdown-menu { display: block }
   ============================================================ */

.main-header .main-nav li.dropdown {
  position: relative;
}

/* Punte invizibilă - acoperă zona dintre trigger și meniu */
.main-header .main-nav li.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 10px;
  background: transparent;
  z-index: 1001;
}

/* ÎNCHIS - forțat cu !important */
.main-header .main-nav li.dropdown > .dropdown-menu {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  min-width: 200px;
  background: var(--header-dropdown-bg) !important;
  border: 1px solid var(--header-border) !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
  box-shadow: var(--header-dropdown-shadow) !important;
  overflow: hidden;
  z-index: 1001 !important;
  padding: 4px;
  flex-direction: column;
  margin: 0 !important;
}

/* DESCHIS - JS pune .hdr-open pe <li> */
.main-header .main-nav li.dropdown.hdr-open > .dropdown-menu {
  display: flex !important;
}

.main-header .main-nav li.dropdown > .dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--header-muted) !important;
  text-decoration: none;
  transition: color var(--header-transition), background var(--header-transition);
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

.main-header .main-nav li.dropdown > .dropdown-menu a:hover {
  color: var(--header-text) !important;
  background: var(--header-hover-bg) !important;
  transform: none !important;
}

/* ---- User Menu ---- */
.main-header .user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.main-header .user-menu .username {
  font-size: 0.875rem;
  color: var(--header-muted);
  font-weight: 500;
}

.main-header .user-menu.dropdown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--header-radius);
  cursor: pointer;
  transition: background var(--header-transition);
}

.main-header .user-menu.dropdown:hover {
  background: var(--header-hover-bg);
}

.main-header .user-menu.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 10px;
  background: transparent;
  z-index: 1001;
}

.main-header .user-menu .dropdown-toggle {
  background: none !important;
  border: none !important;
  color: var(--header-muted);
  font-size: 0.75rem;
  line-height: 1;
  box-shadow: none !important;
  transform: none !important;
  padding: 0;
  cursor: pointer;
}

.main-header .user-menu > .dropdown-menu {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  min-width: 160px;
  background: var(--header-dropdown-bg) !important;
  border: 1px solid var(--header-border) !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
  box-shadow: var(--header-dropdown-shadow) !important;
  overflow: hidden;
  z-index: 1001 !important;
  padding: 4px;
  flex-direction: column;
  margin: 0 !important;
}

.main-header .user-menu.dropdown.hdr-open > .dropdown-menu {
  display: flex !important;
}

.main-header .user-menu > .dropdown-menu a {
  display: block;
  padding: 9px 12px;
  color: var(--header-muted) !important;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: color var(--header-transition), background var(--header-transition);
  background: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

.main-header .user-menu > .dropdown-menu a:hover {
  color: var(--header-text) !important;
  background: var(--header-hover-bg) !important;
  transform: none !important;
}

/* ---- Buttons în header ---- */
.main-header .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: var(--header-radius);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--header-transition);
  white-space: nowrap;
  box-shadow: none !important;
  transform: none !important;
}

.main-header .btn:hover {
  transform: none !important;
  box-shadow: none !important;
}

.main-header .btn-sm {
  padding: 5px 12px;
  font-size: 0.8125rem;
}

.main-header .btn-primary {
  background: var(--header-accent) !important;
  color: #fff !important;
}

.main-header .btn-primary:hover {
  background: #3a7ae8 !important;
}

.main-header .user-menu > a.btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--header-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.main-header .user-menu > a.btn:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

/* ---- Language Selector ---- */
.main-header .language-selector {
  position: relative;
  flex-shrink: 0;
}

.main-header .language-selector::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 10px;
  background: transparent;
  z-index: 1001;
}

.main-header .lang-selected {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--header-border);
  border-radius: var(--header-radius);
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--header-text);
  transition: background var(--header-transition);
  user-select: none;
  white-space: nowrap;
}

.main-header .lang-selected:hover {
  background: rgba(255, 255, 255, 0.12);
}

.main-header .lang-arrow {
  font-size: 0.7rem;
  color: var(--header-muted);
}

.main-header .lang-dropdown {
  display: none !important;
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  min-width: 130px;
  background: var(--header-dropdown-bg) !important;
  border: 1px solid var(--header-border) !important;
  border-radius: 0 0 var(--header-radius) var(--header-radius) !important;
  box-shadow: var(--header-dropdown-shadow) !important;
  padding: 4px;
  z-index: 1001 !important;
  flex-direction: column;
  margin: 0 !important;
}

.main-header .language-selector.hdr-open .lang-dropdown {
  display: flex !important;
}

.main-header .lang-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: var(--header-muted) !important;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: color var(--header-transition), background var(--header-transition);
  background: transparent !important;
}

.main-header .lang-dropdown a:hover {
  color: var(--header-text) !important;
  background: var(--header-hover-bg) !important;
}

.lang-name { font-size: 0.85em; opacity: 0.75; margin-left: 2px; }

@media (max-width: 600px) {
    .lang-name { display: none; }
}

/* ============================================
   HAMBURGER
   ============================================ */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--header-radius);
  margin-left: auto;
  transition: background var(--header-transition);
  box-shadow: none !important;
}

.mobile-menu-toggle:hover {
  background: var(--header-hover-bg) !important;
  transform: none !important;
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--header-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================
   MOBILE PANEL
   ============================================ */
.mobile-nav-panel {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 999;
  padding: 12px 16px 20px;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-panel.is-open { display: flex; }

.mobile-nav-panel a,
.mobile-nav-panel .mobile-section-title {
  display: block;
  padding: 10px 14px;
  color: var(--header-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  border-radius: var(--header-radius);
  transition: color var(--header-transition), background var(--header-transition);
}

.mobile-nav-panel a:hover {
  color: var(--header-text);
  background: var(--header-hover-bg);
}

.mobile-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--header-accent) !important;
  padding-top: 14px !important;
  padding-bottom: 4px !important;
  cursor: default;
}

.mobile-nav-divider {
  height: 1px;
  background: var(--header-border);
  margin: 8px 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .main-header .main-nav { display: none; }
  .main-header .logo { margin-right: auto; }
  .main-header .header-container { gap: 10px; }
  .uname-label { display: none; }
}

@media (max-width: 480px) {
  .main-header .header-container { padding: 0 14px; gap: 6px; }
  .main-header .logo a { font-size: 1.05rem; }
  .main-header .lang-selected { padding: 5px 8px; font-size: 0.75rem; }
}

.avatar {
	width:46px;
	height:46px;
	border-radius:50%;
	object-fit:cover;
	vertical-align:middle;
	margin-right:.4rem;
	border:2px solid var(--border-color,#e5e7eb);
}

/* =============================================================================
   NAV ADMIN - dropdown cu flyout pe categorii
   ============================================================================= */

.nav-admin-dropdown {
    position: relative;
}

.nav-arrow {
    font-size: .7rem;
    opacity: .7;
}

/* Meniul principal - lista de categorii */
.nav-admin-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    background: #1d2328;
    border: 1px solid #9b9494;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    padding: .4rem 0;
    z-index: 1000;
}

.nav-admin-dropdown.hdr-open .nav-admin-menu {
    display: block;
}

/* Rand categorie */
.nav-cat-item {
    position: relative;
}

.nav-cat-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .3rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: #cbd5e0;
    cursor: default;
    white-space: nowrap;
    transition: background .12s, color .12s;
    user-select: none;
}

.nav-cat-svg-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--icon-circle-bg);
}

.nav-cat-item.sub-open > .nav-cat-label,
.nav-cat-item.has-active > .nav-cat-label {
    background: #3498db;
    color: #fff;
}

.nav-cat-item.sub-open > .nav-cat-label .nav-cat-svg-icon,
.nav-cat-item.has-active > .nav-cat-label .nav-cat-svg-icon {
    opacity: 1;
}

.nav-cat-arrow {
    font-size: 1rem;
    opacity: .6;
    flex-shrink: 0;
}

/* Submeniu - pozitionat prin JS cu position:fixed */
.nav-cat-submenu {
    position: fixed;
    display: none;
    min-width: 210px;
    max-height: 70vh;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--header-dropdown-bg) !important;
    /* border: 1px solid #9b9494; */
    /* border-radius: 10px; */
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    padding: 0;
    z-index: 9999;
}

.nav-cat-submenu.sub-visible {
    display: block;
}

/* Link pagina - identic cu nav-cat-label, fara border-radius propriu */
.nav-page-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: .5rem 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: #cbd5e0;
    text-decoration: none;
    white-space: nowrap;
    transition: background .12s, color .12s;
    user-select: none;
    border-radius: 0;
}

.nav-page-link:hover {
    background: #3498db;
    color: #fff;
}

.nav-page-link.active {
    background: #3498db;
    color: #fff;
}

.nav-page-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--icon-circle-bg);
    opacity: 0.85;
}

.nav-page-link:hover .nav-page-icon,
.nav-page-link.active .nav-page-icon {
    opacity: 1;
}

.nav-cat-submenu::-webkit-scrollbar { width: 4px; }
.nav-cat-submenu::-webkit-scrollbar-track { background: transparent; }
.nav-cat-submenu::-webkit-scrollbar-thumb { background: #4a5568; border-radius: 2px; }

.mobile-nav-panel a.active {
    font-weight: 700;
    color: #3498db;
}

/* ============================================================================
   THEME TOGGLE — light / dark
   ============================================================================ */
:root {
    --sidebar-width: 240px;
    --sidebar-bg: #161d2e;
    --sidebar-text: #94a3b8;
    --sidebar-hover: rgba(255,255,255,0.06);
    --sidebar-active-bg: rgba(79,142,247,0.18);
    --sidebar-active-text: #4f8ef7;
    --sidebar-border: rgba(255,255,255,0.07);
    --sidebar-title-color: #4f8ef7;
    --content-bg: var(--reg-bg);
    --icon-circle-bg: #1d2328;
}

[data-theme="light"] {
    --icon-circle-bg: #e6edf6;
    --header-bg: #ffffff;
    --header-text: #1e293b;
    --header-muted: rgba(30,41,59,0.6);
    --header-hover-bg: rgba(52,152,219,0.1);
    --header-border: rgba(0,0,0,0.09);
    --header-dropdown-bg: #f8fafc;
    --sidebar-bg: #f8fafc;
    --sidebar-text: #374151;
    --sidebar-hover: rgba(52,152,219,0.08);
    --sidebar-active-bg: rgba(52,152,219,0.14);
    --sidebar-active-text: #2563eb;
    --sidebar-border: rgba(0,0,0,0.08);
    --sidebar-title-color: #282e3d;
    --reg-bg: #f1f5f9;
    --reg-surface: #ffffff;
    --reg-text: #1e293b;
    /* Core page variables — override the dark defaults from :root */
    --bg:         #f1f5f9;
    --bg2:        #ffffff;
    --bg3:        #f0f4f8;
    --bg4:        #e2e8f0;
    --border:     rgba(0,0,0,0.10);
    --text:       #1e293b;
    --text-muted: rgba(30,41,59,0.55);
    --title:      #0f172a;
    --accent:     #4f8ef7;
}

[data-theme="light"] body {
    background: var(--reg-bg);
    color: #1e293b;
}

[data-theme="light"] .main-header {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Buton theme toggle */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--header-hover-bg);
    border: 1px solid var(--header-border);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--header-text);
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.theme-toggle-btn:hover { background: rgba(79,142,247,0.25); }
.theme-toggle-btn.btn-ico {
    display: flex !important;
    justify-content: center;
}
.theme-toggle-btn.btn-ico::before {
    width: 18px;
    height: 18px;
}


/* ============================================================================
   ADMIN LAYOUT — sidebar + content
   ============================================================================ */
.admin-layout {
    display: block;
    margin-left: var(--sidebar-width);
    flex: 1;
    transition: margin-left 0.28s ease;
}

/* ============================================================================
   RESPONSIVE SIDEBAR
   ============================================================================ */
@media (max-width: 900px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    .admin-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.35);
    }
    .admin-layout {
        margin-left: 0;
    }
    .main-header {
        margin-left: 0;
    }
    .adm-footer {
        margin-left: 0;
    }
    /* Ascundem butonul hamburger principal cand avem sidebar-toggle-btn */
    .main-header .sidebar-toggle-btn { display: flex; }
}

@media (min-width: 901px) {
    .main-header .sidebar-toggle-btn { display: flex; }
    /* Desktop: sidebar toggle ascunde/arata sidebar-ul */
    body.sidebar-collapsed .admin-sidebar {
        transform: translateX(-100%);
    }
    body.sidebar-collapsed .admin-layout {
        margin-left: 0;
    }
    body.sidebar-collapsed .main-header {
        margin-left: 0;
    }
    body.sidebar-collapsed .adm-footer {
        margin-left: 0;
    }
}