/* ============================================
   SISTEM MANAGEMENT OFERTE — CSS Principal
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* Culori primare */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;

  /* Culori secundare */
  --success: #16a34a;
  --success-hover: #15803d;
  --success-light: #dcfce7;

  --warning: #d97706;
  --warning-hover: #b45309;
  --warning-light: #fef3c7;

  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fee2e2;

  --info: #0891b2;
  --info-light: #cffafe;

  /* Neutrale */
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --bg-dark: #1e293b;
  --bg-darker: #0f172a;

  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-light: #f1f5f9;

  --border: #e2e8f0;
  --border-hover: #cbd5e1;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* Raze */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Umbre */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

  /* Fonturi */
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  /* Layout */
  --navbar-height: 56px;
  --sidebar-width: 260px;
  --max-content: 1440px;

  /* Tranziții */
  --transition: 150ms ease;
  --transition-slow: 300ms ease;
}

/* --- Reset / Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

img { max-width: 100%; }

/* --- Typography --- */
h1, h2, h3, h4 {
  color: var(--text);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center { text-align: center; }
.font-mono { font-family: var(--font-mono); }

/* --- Layout --- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-content {
  flex: 1;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: var(--space-lg);
}

@media (max-width: 768px) {
  .page-content {
    padding: var(--space-md);
  }
}

/* --- Navbar --- */
.navbar {
  background: var(--bg-dark);
  color: var(--text-light);
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
}
.navbar-brand:hover {
  color: #fff;
  text-decoration: none;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar-app-version {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.85);
  background: rgba(255, 255, 255, 0.08);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}

.navbar-nav a {
  color: var(--text-light);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: background var(--transition);
  white-space: nowrap;
}
.navbar-nav a:hover,
.navbar-nav a.active {
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* Hamburger */
.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--space-sm);
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: block;
  }
  .navbar-app-version {
    font-size: 0.66rem;
    height: 20px;
    padding: 0 6px;
  }
  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
  }
  .navbar-nav.open {
    display: flex;
  }
  .navbar-nav a {
    padding: var(--space-md);
    width: 100%;
  }
}

/* --- Cards / Boxes --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  transition: box-shadow var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  margin: 0;
}

.card-body {
  /* default */
}

@media (max-width: 768px) {
  .card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }
}

/* --- Tabele responsive --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table th,
table td {
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  width: 160px;
  min-width: 120px;
}

table tbody tr:hover {
  background: var(--primary-light);
}

/* Tabel complet (liste) */
.table-full th {
  width: auto;
}

@media (max-width: 768px) {
  /* Stack table pe mobil */
  .table-stack thead { display: none; }
  .table-stack tr {
    display: block;
    margin-bottom: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
  }
  .table-stack td {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-sm);
    border: none;
  }
  .table-stack td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: var(--space-md);
  }
}

/* --- Formulare --- */
label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

textarea {
  min-height: 100px;
  resize: vertical;
  font-family: var(--font-mono);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Butoane --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
  line-height: 1.4;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: var(--success-hover);
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: var(--warning-hover);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: var(--danger-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  background: var(--bg);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-sm {
  padding: 2px 8px;
  font-size: 0.75rem;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

@media (max-width: 768px) {
  .btn-group {
    flex-direction: column;
  }
  .btn-group .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Badges / Status --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-info    { background: var(--info-light);     color: var(--info); }
.badge-muted   { background: #f1f5f9; color: var(--text-muted); }

/* --- Flash Messages --- */
.flash-container {
  position: fixed;
  top: calc(var(--navbar-height) + var(--space-md));
  right: var(--space-md);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 400px;
  width: 100%;
}

.flash {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  animation: flash-in 0.3s ease;
  cursor: pointer;
}

.flash-success { background: var(--success-light); color: #166534; border-left: 4px solid var(--success); }
.flash-error   { background: var(--danger-light);  color: #991b1b; border-left: 4px solid var(--danger); }
.flash-warning { background: var(--warning-light); color: #92400e; border-left: 4px solid var(--warning); }
.flash-info    { background: var(--info-light);    color: #155e75; border-left: 4px solid var(--info); }

.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.5;
  color: inherit;
}
.flash-close:hover { opacity: 1; }

@keyframes flash-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@media (max-width: 768px) {
  .flash-container {
    left: var(--space-sm);
    right: var(--space-sm);
    max-width: none;
  }
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
}

/* --- Grid utilities --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* --- Spacing utilities --- */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.p-md  { padding: var(--space-md); }
.p-lg  { padding: var(--space-lg); }

/* --- Display utilities --- */
.d-flex { display: flex; }
.d-none { display: none; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* --- Scroll to top --- */
.scroll-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  background: var(--primary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  border: none;
  z-index: 500;
  transition: all var(--transition);
}
.scroll-top:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}
.scroll-top.visible {
  display: flex;
}

/* --- Markdown content (AI observații) --- */
.md-content { line-height: 1.6; }
.md-content p { margin: 0.3rem 0; }
.md-content .md-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.75rem 0 0.3rem;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid var(--border);
}
.md-content .md-heading:first-child { margin-top: 0; }
.md-content .md-list {
  margin: 0.25rem 0 0.5rem 1.2rem;
  padding: 0;
}
.md-content .md-list li {
  margin-bottom: 0.15rem;
}
.md-content .md-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.4rem 0 0.6rem;
  font-size: 0.85rem;
}
.md-content .md-table th,
.md-content .md-table td {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  text-align: left;
}
.md-content .md-table th {
  background: var(--bg);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.md-content .md-table tr:nth-child(even) td {
  background: #f8fafc;
}
.md-content strong { font-weight: 700; color: var(--text); }
.md-content code {
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85em;
}

/* --- Sortable table headers --- */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { background: var(--bg); }
th.sortable .sort-icon {
  font-size: 0.7em;
  color: var(--text-muted);
  margin-left: 2px;
}
th.sortable.sort-asc .sort-icon,
th.sortable.sort-desc .sort-icon { color: var(--primary); }

/* --- Print --- */
@media print {
  .navbar, .flash-container, .btn, .scroll-top { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; }
}
/* ============================================
   LEFT SIDEBAR  Panou informatii rapide
   ============================================ */

/* Layout wrapper: sidebar stanga + continut dreapta */
.content-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
}

/* Sidebar */
.left-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg-dark);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition-slow), min-width var(--transition-slow);
  flex-shrink: 0;
  z-index: 100;
}
.left-sidebar.collapsed {
  width: 36px;
  min-width: 36px;
}
.left-sidebar.collapsed .sidebar-inner {
  display: none;
}
.sidebar-collapse-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  cursor: pointer;
  padding: 6px 10px;
  text-align: right;
  width: 100%;
  transition: color var(--transition);
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { color: #fff; }
.left-sidebar.collapsed .sidebar-collapse-btn {
  text-align: center;
  transform: scaleX(-1);
  padding: 8px 6px;
}
.sidebar-inner {
  padding: 4px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-section {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.sidebar-clock-section { background: rgba(255,255,255,0.04); }
.sidebar-clock-date {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}
.sidebar-clock-time {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1.1;
  letter-spacing: 0.04em;
}
.sidebar-session-timer {
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #a5f3fc;
  letter-spacing: 0.04em;
}
.sidebar-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
  width: 100%;
}
.sidebar-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.3);
}
.sidebar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sidebar-hint { font-size: 0.7rem; color: rgba(255,255,255,0.3); }
.sidebar-stats-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 2px 0;
}
.sidebar-stat-label { color: rgba(255,255,255,0.6); }
.sidebar-stat-label--in-lucru   { color: #fcd34d; }
.sidebar-stat-label--transmis   { color: #93c5fd; }
.sidebar-stat-label--acceptat   { color: #86efac; }
.sidebar-stat-label--respins    { color: #fca5a5; }
.sidebar-stat-label--neanalizat { color: #cbd5e1; }
.sidebar-stat-val {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #fff;
  min-width: 24px;
  text-align: right;
}
.sidebar-refresh-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.45);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  width: 100%;
  margin-top: 4px;
}
.sidebar-refresh-btn:hover {
  color: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.35);
}
.content-layout > .page-content { flex: 1; min-width: 0; }
@media (max-width: 900px) { .left-sidebar { display: none; } }
@media print { .left-sidebar { display: none !important; } }


/* ============================================
   LEFT SIDEBAR - Panou informatii rapide
   ============================================ */

.content-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: flex-start;
}

.left-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bg-dark);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: var(--navbar-height);
  height: calc(100vh - var(--navbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  transition: width var(--transition-slow), min-width var(--transition-slow);
  flex-shrink: 0;
  z-index: 100;
}
.left-sidebar.collapsed { width: 36px; min-width: 36px; }
.left-sidebar.collapsed .sidebar-inner { display: none; }
.sidebar-collapse-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1rem; cursor: pointer;
  padding: 6px 10px; text-align: right;
  width: 100%; transition: color var(--transition);
  flex-shrink: 0;
}
.sidebar-collapse-btn:hover { color: #fff; }
.left-sidebar.collapsed .sidebar-collapse-btn {
  text-align: center; transform: scaleX(-1); padding: 8px 6px;
}
.sidebar-inner { padding: 4px 0 16px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-section {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; gap: 5px;
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-label {
  font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4); font-weight: 600;
}
.sidebar-clock-section { background: rgba(255,255,255,0.04); }
.sidebar-clock-date { font-size: 0.8rem; color: rgba(255,255,255,0.65); font-weight: 500; }
.sidebar-clock-time {
  font-size: 1.5rem; font-weight: 700;
  font-family: var(--font-mono); color: #fff;
  line-height: 1.1; letter-spacing: 0.04em;
}
.sidebar-session-timer {
  font-size: 1.1rem; font-weight: 700;
  font-family: var(--font-mono); color: #a5f3fc; letter-spacing: 0.04em;
}
.sidebar-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-light); border-radius: var(--radius-sm);
  padding: 6px 10px; font-size: 0.8rem; cursor: pointer;
  text-align: left; transition: background var(--transition), border-color var(--transition);
  width: 100%;
}
.sidebar-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.3);
}
.sidebar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sidebar-hint { font-size: 0.7rem; color: rgba(255,255,255,0.3); }
.sidebar-stats-list { display: flex; flex-direction: column; gap: 3px; }
.sidebar-stat-row {
  display: flex; justify-content: space-between;
  align-items: center; font-size: 0.8rem; padding: 2px 0;
}
.sidebar-stat-label { color: rgba(255,255,255,0.6); }
.sidebar-stat-label--in-lucru   { color: #fcd34d; }
.sidebar-stat-label--transmis   { color: #93c5fd; }
.sidebar-stat-label--acceptat   { color: #86efac; }
.sidebar-stat-label--respins    { color: #fca5a5; }
.sidebar-stat-label--neanalizat { color: #cbd5e1; }
.sidebar-stat-val {
  font-weight: 700; font-family: var(--font-mono);
  font-size: 0.85rem; color: #fff; min-width: 24px; text-align: right;
}
.sidebar-refresh-btn {
  background: none; border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.45); border-radius: var(--radius-sm);
  padding: 4px 8px; font-size: 0.72rem; cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  width: 100%; margin-top: 4px;
}
.sidebar-refresh-btn:hover { color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.35); }
.content-layout > .page-content { flex: 1; min-width: 0; }
@media (max-width: 900px) { .left-sidebar { display: none; } }
@media print { .left-sidebar { display: none !important; } }

/* Layout: content area fills all remaining space, reduced padding vs standalone pages */
.content-layout > .page-content { flex: 1; min-width: 0; max-width: none; margin: 0; padding: var(--space-md); }

/* --- Sidebar: Curs BNR --- */
.sidebar-eur-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 2px 0;
}
.sidebar-eur-label { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.sidebar-eur-val {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fde68a;
  letter-spacing: 0.03em;
}
.sidebar-eur-currency { font-size: 0.75rem; color: rgba(255,255,255,0.5); }
.sidebar-eur-date { font-size: 0.68rem; color: rgba(255,255,255,0.3); margin-bottom: 4px; }
.sidebar-eur-actions { display: flex; gap: 4px; flex-direction: column; }
.sidebar-btn--eur { font-size: 0.78rem; }
.sidebar-eur-stale  { font-size: 0.67rem; color: #fca5a5; margin-top: 2px; }
.sidebar-eur-manual { font-size: 0.67rem; color: #fcd34d; margin-top: 2px; }

/* --- Navbar dropdown --- */
.navbar-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.navbar-dropdown-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  white-space: nowrap;
  transition: color var(--transition);
  opacity: 0.85;
}
.navbar-dropdown-btn:hover { opacity: 1; color: #fff; }
.navbar-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  padding: 4px 0;
  flex-direction: column;
}
.navbar-dropdown:hover .navbar-dropdown-menu,
.navbar-dropdown:focus-within .navbar-dropdown-menu {
  display: flex;
}
.navbar-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.88rem;
  opacity: 0.85;
  white-space: nowrap;
  transition: background var(--transition), opacity var(--transition);
}
.navbar-dropdown-menu a:hover {
  background: rgba(255,255,255,0.1);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   Agent Local Detection — Banner + Overlay Blocare
   ═══════════════════════════════════════════════════════════════ */

/* Banner global de avertizare (afișat când agentul nu e detectat local) */
.agent-local-banner {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-bottom: 2px solid #f87171;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #991b1b;
  animation: agentBannerSlideIn 0.3s ease-out;
}
@keyframes agentBannerSlideIn {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.agent-local-banner strong {
  font-weight: 700;
}
.agent-local-banner em {
  font-style: normal;
  color: #b91c1c;
  font-weight: 500;
}

/* Card-uri cu agent-local-required: au position relative pentru overlay */
.agent-local-required {
  position: relative;
}

/* Overlay blocare — ascuns implicit, afișat prin JS */
.agent-blocked-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  border-radius: var(--radius, 8px);
  padding: 2rem;
}
.agent-blocked-message {
  text-align: center;
  max-width: 460px;
  color: #991b1b;
}
.agent-blocked-message strong {
  display: block;
  font-size: 0.95rem;
  margin: 0.5rem 0 0.3rem;
  line-height: 1.4;
}
.agent-blocked-message p {
  font-size: 0.85rem;
  color: #b91c1c;
  margin: 0;
}

/* Acțiuni individuale dezactivate (link-uri, butoane) */
/* Stare inițială: acțiuni agent sunt atentuate până la verificare */
.agent-local-action {
  transition: opacity 0.2s ease, filter 0.2s ease;
}
body:not(.agent-local-checked) .agent-local-action {
  opacity: 0.5;
  pointer-events: none;
}

.agent-action-disabled {
  opacity: 0.4 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  filter: grayscale(60%);
}
.agent-action-disabled::after {
  content: ' 🛡️';
  font-size: 0.8em;
}
