/* ========================================
   VARIABILE CSS - TEMA IMPLICITA (CLASSIC)
   ======================================== */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #eef4ff;
  --border: #dfe7f3;
  --text: #142033;
  --muted: #6c7b93;
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.10);
  --success: #0f9f6e;
  --success-soft: rgba(15, 159, 110, 0.12);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 18px 48px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;

  /* Sidebar - tema implicita */
  --sidebar-bg: #0b1220;
  --sidebar-surface: rgba(255, 255, 255, 0.04);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #e5eefc;
  --sidebar-muted: #8ea2c9;
  --sidebar-active: #3b82f6;
  --sidebar-active-soft: rgba(59, 130, 246, 0.16);
  --sidebar-icon: #d4e3ff;
  --sidebar-icon-hover: #7db4ff;
  --sidebar-card: rgba(255, 255, 255, 0.05);
  
  /* Culori suplimentare modernizate */
  --accent-cyan: #06b6d4;
  --accent-orange: #ea6a0b;
  --accent-purple: #a855f7;
}

/* ========================================
   TEME
   ======================================== */

/* Backup: Aplică teme și pe html element dacă body nu e disponibil */
html[data-theme="theme-flowlogix-classic"] {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fbff;
  --surface-3: #eef4ff;
  --border: #dfe7f3;
  --text: #142033;
  --muted: #6c7b93;
  --primary: #2563eb;
  --primary-soft: rgba(37, 99, 235, 0.10);
  --success: #0f9f6e;
  --success-soft: rgba(15, 159, 110, 0.12);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --sidebar-bg: #0b1220;
  --sidebar-surface: rgba(255, 255, 255, 0.04);
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-text: #e5eefc;
  --sidebar-muted: #8ea2c9;
  --sidebar-active: #3b82f6;
  --sidebar-active-soft: rgba(59, 130, 246, 0.16);
  --sidebar-icon: #d4e3ff;
  --sidebar-icon-hover: #7db4ff;
  --sidebar-card: rgba(255, 255, 255, 0.05);
  /* Role colors */
  --role-tura-bg: rgba(245, 158, 11, 0.18);
  --role-tura-text: #ffcc7a;
  --role-depozit-bg: rgba(59, 130, 246, 0.18);
  --role-depozit-text: #93c5fd;
  --role-manager-bg: rgba(168, 85, 247, 0.18);
  --role-manager-text: #d8b4fe;
}

/* TEMA: FlowLogix Ocean */
html[data-theme="theme-flowlogix-ocean"],
body.theme-flowlogix-ocean {
  --bg: #f0f9fc;
  --surface: #ffffff;
  --surface-2: #f0f9fc;
  --surface-3: #e0f7ff;
  --border: #b3e5ff;
  --text: #004d73;
  --muted: #45788b;
  --primary: #0ea5e9;
  --primary-soft: rgba(14, 165, 233, 0.10);
  --success: #0891b2;
  --success-soft: rgba(8, 145, 178, 0.12);
  --warning: #0284c7;
  --warning-soft: rgba(2, 132, 199, 0.12);
  --danger: #0369a1;
  --danger-soft: rgba(3, 105, 161, 0.12);

  /* Sidebar - Ocean */
  --sidebar-bg: #001f3f;
  --sidebar-surface: rgba(14, 165, 233, 0.08);
  --sidebar-border: rgba(14, 165, 233, 0.12);
  --sidebar-text: #b3e5ff;
  --sidebar-muted: #679db5;
  --sidebar-active: #0ea5e9;
  --sidebar-active-soft: rgba(14, 165, 233, 0.16);
  --sidebar-icon: #80d4ff;
  --sidebar-icon-hover: #40bfff;
  --sidebar-card: rgba(14, 165, 233, 0.08);
  /* Role colors - Ocean theme */
  --role-tura-bg: rgba(234, 88, 12, 0.18);
  --role-tura-text: #ffb84d;
  --role-depozit-bg: rgba(14, 165, 233, 0.18);
  --role-depozit-text: #80d4ff;
  --role-manager-bg: rgba(59, 130, 246, 0.18);
  --role-manager-text: #93c5fd;
}

/* TEMA: FlowLogix Orange */
html[data-theme="theme-flowlogix-orange"],
body.theme-flowlogix-orange {
  --bg: #fffbf0;
  --surface: #ffffff;
  --surface-2: #fffbf0;
  --surface-3: #ffe8cc;
  --border: #ffd699;
  --text: #5c2e0f;
  --muted: #92572c;
  --primary: #ea6a0b;
  --primary-soft: rgba(234, 106, 11, 0.10);
  --success: #ea580c;
  --success-soft: rgba(234, 88, 12, 0.12);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);

  /* Sidebar - Orange */
  --sidebar-bg: #3d2104;
  --sidebar-surface: rgba(234, 106, 11, 0.08);
  --sidebar-border: rgba(234, 106, 11, 0.12);
  --sidebar-text: #f5d4a8;
  --sidebar-muted: #b8915f;
  --sidebar-active: #ea6a0b;
  --sidebar-active-soft: rgba(234, 106, 11, 0.16);
  --sidebar-icon: #ffcc7a;
  --sidebar-icon-hover: #ffd99d;
  --sidebar-card: rgba(234, 106, 11, 0.08);
  /* Role colors - Orange theme */
  --role-tura-bg: rgba(245, 158, 11, 0.18);
  --role-tura-text: #ffcc7a;
  --role-depozit-bg: rgba(234, 106, 11, 0.18);
  --role-depozit-text: #ffaa33;
  --role-manager-bg: rgba(234, 88, 12, 0.18);
  --role-manager-text: #ffb84d;
}

/* TEMA: FlowLogix Dark */
html[data-theme="theme-flowlogix-dark"],
body.theme-flowlogix-dark {
  --bg: #1a1a1a;
  --surface: #2d2d2d;
  --surface-2: #3f3f3f;
  --surface-3: #4a4a4a;
  --border: #555555;
  --text: #e8e8e8;
  --muted: #b0b0b0;
  --primary: #3b82f6;
  --primary-soft: rgba(59, 130, 246, 0.15);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);

  /* Sidebar - Dark (mai deschis decât light dark) */
  --sidebar-bg: #0f0f0f;
  --sidebar-surface: rgba(59, 130, 246, 0.08);
  --sidebar-border: rgba(59, 130, 246, 0.12);
  --sidebar-text: #d4e3ff;
  --sidebar-muted: #8fa3c9;
  --sidebar-active: #3b82f6;
  --sidebar-active-soft: rgba(59, 130, 246, 0.16);
  --sidebar-icon: #a5c8ff;
  --sidebar-icon-hover: #7db4ff;
  --sidebar-card: rgba(59, 130, 246, 0.08);
  /* Role colors - Dark theme */
  --role-tura-bg: rgba(245, 158, 11, 0.18);
  --role-tura-text: #ffcc7a;
  --role-depozit-bg: rgba(59, 130, 246, 0.18);
  --role-depozit-text: #93c5fd;
  --role-manager-bg: rgba(168, 85, 247, 0.18);
  --role-manager-text: #d8b4fe;
}

/* TEMA: FlowLogix Minimal (singura tema cu sidebar light) */
html[data-theme="theme-flowlogix-ice"],
body.theme-flowlogix-ice {
  --bg: #fafbfc;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --surface-3: #eef2f6;
  --border: #e1e7ef;
  --text: #1e293b;
  --muted: #64748b;
  --primary: #475569;
  --primary-soft: rgba(71, 85, 105, 0.10);
  --success: #059669;
  --success-soft: rgba(5, 150, 105, 0.12);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);

  /* Sidebar - LIGHT (singura tema cu sidebar luminos) */
  --sidebar-bg: #ffffff;
  --sidebar-surface: rgba(15, 23, 42, 0.04);
  --sidebar-border: rgba(15, 23, 42, 0.08);
  --sidebar-text: #1e293b;
  --sidebar-muted: #64748b;
  --sidebar-active: #475569;
  --sidebar-active-soft: rgba(71, 85, 105, 0.10);
  --sidebar-icon: #64748b;
  --sidebar-icon-hover: #1e293b;
  --sidebar-card: rgba(15, 23, 42, 0.03);
  /* Role colors - Minimal theme (mai saturate pentru contrast pe light) */
  --role-tura-bg: rgba(234, 88, 12, 0.12);
  --role-tura-text: #c2410c;
  --role-depozit-bg: rgba(37, 99, 235, 0.12);
  --role-depozit-text: #1d4ed8;
  --role-manager-bg: rgba(168, 85, 247, 0.14);
  --role-manager-text: #7e22ce;
}

/* ========================================
   BAZĂ
   ======================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

/* ========================================
   LAYOUT
   ======================================== */
.main {
  margin-left: 280px;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

.page-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ========================================
   TOPBAR
   ======================================== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.topbar-left h1 {
  margin: 0 0 6px;
  font-size: 1.9rem;
  color: var(--text);
}

.topbar-left p {
  margin: 0;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ========================================
   CONTROALE
   ======================================== */
.control-chip,
.control-select,
.control-button,
.control-input {
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 14px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: 0.18s ease;
}

.control-select,
.control-input {
  min-width: 150px;
}

/* ----- SELECT custom (drop default arrow, add chevron, adauga starile) ----- */
.control-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 38px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.control-select:hover {
  border-color: var(--primary);
  background-color: var(--surface-2);
}

.control-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.control-select option {
  background: var(--surface);
  color: var(--text);
  padding: 8px;
}

.control-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.control-button:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.control-button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.control-button.primary:hover {
  filter: brightness(0.97);
}

.control-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0 4px;
}

.breadcrumb strong {
  color: var(--text);
}

/* ========================================
   STATUS PILLS
   ======================================== */
.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.status-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-pill .meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-pill .meta span {
  font-size: 0.82rem;
  color: var(--muted);
}

.status-pill .meta strong {
  font-size: 1rem;
  color: var(--text);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.dot-success { background: var(--success); }
.dot-warning { background: var(--warning); }
.dot-danger { background: var(--danger); }
.dot-primary { background: var(--primary); }

/* ========================================
   CARDURI
   ======================================== */
.cards-grid {
  display: grid;
  gap: 18px;
}

.cards-grid.kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cards-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  padding: 16px 18px;
}

/* Cardurile din three-col devin flex column ca CTA-ul (.card-cta) sa se alinieze la baza */
.cards-grid.three-col > .card {
  display: flex;
  flex-direction: column;
}

.card-cta {
  margin-top: auto;
  padding-top: 12px;
}

/* ====== MODULE NAVIGATION CARDS (Inbound / Pick-Pack / Outbound) ====== */
.module-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.module-nav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
}

.module-nav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  border-color: var(--primary);
}

.module-nav-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

.module-nav-icon.tag-inbound  { background: rgba(37, 99, 235, 0.10);  color: #2563eb; }
.module-nav-icon.tag-pickpack { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.module-nav-icon.tag-outbound { background: rgba(16, 185, 129, 0.10); color: #059669; }

.module-nav-body {
  flex: 1;
  min-width: 0;
}

.module-nav-title {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}

.module-nav-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}

.module-nav-card .arrow {
  color: var(--muted);
  font-size: 1.3rem;
  transition: 0.18s;
}

.module-nav-card:hover .arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-title-wrap h3,
.card-title-wrap h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
  color: var(--text);
}

.card-title-wrap p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-icon-btn,
.card-tag {
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 12px;
  height: 38px;
  min-width: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.card-tag {
  font-weight: 700;
  font-size: 0.85rem;
}

.tag-success { color: var(--success); background: var(--success-soft); border-color: transparent; }
.tag-warning { color: var(--warning); background: var(--warning-soft); border-color: transparent; }
.tag-danger { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.tag-primary { color: var(--primary); background: var(--primary-soft); border-color: transparent; }

/* ========================================
   KPI CARDS
   ======================================== */
.kpi-card {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.kpi-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -20px auto;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(37,99,235,0.12) 0%, rgba(37,99,235,0) 72%);
  pointer-events: none;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.kpi-top .label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.kpi-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.kpi-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.kpi-change {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 600;
  margin-top: 4px;
}

/* ========================================
   TABEL & LISTE
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: var(--surface-2);
  color: var(--text);
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}

td {
  padding: 12px;
  border: 1px solid var(--border);
  color: var(--text);
}

tr:hover {
  background: var(--surface-2);
}

/* ========================================
   BADGE-URI
   ======================================== */
.small-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ========================================
   MODAL
   ======================================== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 31, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal.open {
  display: flex;
}

.modal-dialog {
  width: min(760px, 100%);
  background: var(--surface);
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.modal-footer {
  border-top: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-body {
  padding: 22px;
  color: var(--text);
}

.modal-title {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

/* ========================================
   SETARI & RAPOARTE
   ======================================== */
.settings-grid,
.report-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row strong {
  color: var(--text);
}

.setting-row .text-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ========================================
   TEME PREVIEW
   ======================================== */
.theme-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.theme-preview-card {
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.28s ease;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.theme-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0), rgba(37, 99, 235, 0.02));
  pointer-events: none;
}

.theme-preview-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
  transform: translateY(-3px);
}

.theme-preview-card.active-theme {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.2), inset 0 0 0 1px var(--primary);
}

.theme-swatch {
  width: 100%;
  height: 80px;
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.swatch-classic {
  background: linear-gradient(135deg, #2563eb 0%, #ea6a0b 100%);
}

.swatch-ocean {
  background: linear-gradient(135deg, #0ea5e9 0%, #0891b2 100%);
}

.swatch-orange {
  background: linear-gradient(135deg, #ea6a0b 0%, #d95e2c 100%);
}

.swatch-dark {
  background: linear-gradient(135deg, #1e293b 0%, #3f3f46 100%);
}

.swatch-ice {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.theme-preview-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}

.theme-preview-card p {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

.theme-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   SUMMARY LIST + PROFILE INFO
   ======================================== */
.summary-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

.summary-item p {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

/* Profil modern */
.settings-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-theme,
.card-profile,
.card-info {
  transition: all 0.3s ease;
}

.card-theme {
  border-left: 4px solid var(--primary);
}

.card-profile {
  border-left: 4px solid var(--accent-cyan);
}

.card-info {
  border-left: 4px solid var(--accent-orange);
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  margin: 0 0 4px;
  color: var(--text);
}

.card h2 i {
  font-size: 1.3rem;
  color: var(--primary);
}

.card-profile h2 i {
  color: var(--accent-cyan);
}

.card-info h2 i {
  color: var(--accent-orange);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.profile-item {
  padding: 20px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.profile-item:hover {
  border-color: var(--primary);
  background: var(--surface-3);
}

.profile-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-item-label i {
  font-size: 1rem;
  color: var(--primary);
}

.profile-item-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}

.settings-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 10px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text);
}

.settings-note i {
  flex-shrink: 0;
  color: var(--primary);
  font-size: 1rem;
  margin-top: 2px;
}

.settings-note p {
  margin: 0;
  color: var(--muted);
}

/* Info list */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-item:last-child {
  border-bottom: none;
}

.info-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

.info-item strong {
  color: var(--text);
  font-weight: 600;
}

/* ========================================
   PROGRESS
   ======================================== */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-row .row-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--text);
}

.progress-track {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), rgba(37, 165, 235, 0.6));
}

/* ========================================
   NOTIFICARI
   ======================================== */
.notification-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(100vw - 32px, 420px);
  max-height: 80vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  display: none;
  z-index: 1000;
}

.notification-dropdown.open {
  display: block;
}

.notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: 0.2s ease;
}

.notification-item:hover {
  background: var(--surface-2);
}

.notification-item:last-child {
  border-bottom: none;
}

/* ========================================
   LINII SI SEPARATOARE
   ======================================== */
.text-muted {
  color: var(--muted);
}

.footer-note {
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 8px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1080px) {
  .main {
    margin-left: 92px;
  }

  .cards-grid.kpi-grid,
  .status-strip,
  .alert-grid,
  .cards-grid.two-col,
  .cards-grid.three-col,
  .settings-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .theme-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .main {
    margin-left: 0;
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }

  .notification-dropdown {
    width: min(100vw - 32px, 360px);
    right: auto;
    left: 0;
  }

  .cards-grid.kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid,
  .report-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
  }

  .theme-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
  }

  .theme-preview-card {
    padding: 16px 12px;
  }

  .theme-swatch {
    height: 70px;
    margin-bottom: 10px;
  }

  .card {
    padding: 24px;
  }

  .profile-info {
    gap: 16px;
    margin-top: 16px;
  }

  .profile-item {
    padding: 16px;
  }
}

/* ===== LOGIN PAGE LAYOUT ===== */
.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(120deg, #eef2ff, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-body * {
  box-sizing: border-box;
}

.login-body .main {
  margin-left: 0 !important;
}

/* ===== CONTAINER ===== */
.login-container {
  display: flex;
  align-items: stretch;   /* sectiunile primesc inaltimea cardului mai mare */
  justify-content: center;
  gap: 28px;
  padding: 40px 24px;
  width: 100%;
}

.login-brand-section {
  flex: 0 0 560px;
  max-width: 560px;
  display: flex;
  justify-content: center;
}

.login-brand-inner {
  width: 100%;
  background: #ffffff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

/* ===== BRAND TOP (logo + nume) ===== */
.login-brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-logo-wrap img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.login-brand-top h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #111827;
}

.login-brand-top p {
  margin: 0;
  font-size: 0.88rem;
  color: #6b7280;
}

/* ===== BRAND CONTENT ===== */
.login-brand-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #111827;
}

.login-brand-content p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ===== ROLE CARDS ===== */
.login-role-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-preview-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  transition: 0.2s;
}

.role-preview-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.role-preview-card i {
  font-size: 18px;
  color: #2563eb;
  margin-top: 2px;
  flex-shrink: 0;
}

.role-preview-card strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 3px;
}

.role-preview-card span {
  display: block;
  font-size: 0.85rem;
  line-height: 1.4;
  color: #6b7280;
}

/* ===== RIGHT SIDE ===== */
.login-form-section {
  flex: 0 0 560px;
  max-width: 560px;
  display: flex;
  justify-content: center;
}

/* ===== LOGIN CARD ===== */
.login-form-card {
  width: 100%;
  background: #ffffff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: center; /* centreaza tot continutul vertical in card */
  min-height: 520px;
}

.login-form-header h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  color: #111827;
}

.login-form-header p {
  font-size: 13.5px;
  color: #6b7280;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ===== ALERT ===== */
.login-alert {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
}

.login-alert-error {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: #374151;
  display: block;
}

/* INPUT WRAP */
.input-wrap {
  position: relative;
  overflow: hidden;
}

.input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

/* INPUT */
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 38px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 13.5px;
  background: #f9fafb;
  color: #111827;
  transition: all 0.15s;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:hover:not(:focus) {
  border-color: #d1d5db;          /* feedback la hover inainte de focus */
  background: #f3f4f6;
}

.input-wrap.focused i {
  color: #2563eb;
}

.form-input:focus {
  border-color: #2563eb;
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* PASSWORD TOGGLE */
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.15s;
}

.password-toggle:hover {
  color: #4b5563;
  background: rgba(0, 0, 0, 0.04);
}

.password-toggle:focus-visible {
  outline: none;
  color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

/* ===== BUTTON ===== */
.login-submit-btn {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: white;
  font-weight: 600;
  font-size: 14px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.18);  /* subtle depth pe starea default */
  transition: all 0.15s ease;
}

.login-submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.login-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.login-submit-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* ===== HELPER INFO ===== */
.login-helper-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 10px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
  font-size: 12px;
  color: #6b7280;
}

.login-helper-info p {
  margin: 0;
  line-height: 1.4;
}

.login-helper-info i {
  font-size: 16px;
  color: #9ca3af;
  flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .login-brand-section,
  .login-form-section {
    flex: 0 0 460px;
    max-width: 460px;
  }
}

@media (max-width: 1000px) {
  .login-container {
    flex-direction: column;
    align-items: center;
    padding: 30px 16px;
    gap: 20px;
  }

  .login-brand-section,
  .login-form-section {
    flex: unset;
    align-self: auto;
    width: 100%;
    max-width: 520px;
  }

  .login-form-card {
    justify-content: flex-start; /* pe mobil cardul are naltime naturala, nu mai e nevoie de centrare */
    min-height: auto;
  }
}

/* ========================================
   MONITORING GRID (Tabel + Chart)
   ======================================== */
.monitoring-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.monitoring-table {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.monitoring-chart {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.monitoring-chart .card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.monitoring-chart canvas {
  max-height: 380px;
}

@media (max-width: 992px) {
  .monitoring-grid {
    grid-template-columns: 1fr;
  }
}