/* CheckPref - Design Modern cu Dark/Light Mode */
/* Paleta de culori ADRVEST */

/* ===== CSS Variables - Light Theme (Default) ===== */
:root {
  /* ADRVEST Brand Colors */
  --adrvest-blue: #0095DA;
  --adrvest-green: #58AB40;
  --adrvest-purple: #7961AA;
  --adrvest-red: #ED1C24;
  --adrvest-dark: #27344C;

  /* Primary Colors - Albastru ADRVEST */
  --color-primary: #0095DA;
  --color-primary-hover: #007bb5;
  --color-primary-light: rgba(0, 149, 218, 0.1);

  /* Semantic Colors - Culorile ADRVEST */
  --color-success: #58AB40;
  --color-success-light: rgba(88, 171, 64, 0.1);
  --color-warning: #f59e0b;
  --color-warning-light: rgba(245, 158, 11, 0.1);
  --color-danger: #ED1C24;
  --color-danger-light: rgba(237, 28, 36, 0.1);
  --color-info: #7961AA;
  --color-info-light: rgba(121, 97, 170, 0.1);

  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-elevated: #ffffff;

  /* Text Colors */
  --text-primary: #27344C;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: var(--color-primary);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 0 3px var(--color-primary-light);

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* Header gradient - ADRVEST colors */
  --header-gradient: linear-gradient(135deg, #27344C 0%, #0095DA 50%, #7961AA 100%);
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  /* ADRVEST colors - lighter versions for dark mode */
  --color-primary: #4db8e8;
  --color-primary-hover: #7dcbf0;
  --color-primary-light: rgba(0, 149, 218, 0.2);

  --color-success: #7bc96a;
  --color-success-light: rgba(88, 171, 64, 0.2);
  --color-warning: #fbbf24;
  --color-warning-light: rgba(251, 191, 36, 0.2);
  --color-danger: #f25a5f;
  --color-danger-light: rgba(237, 28, 36, 0.2);
  --color-info: #9d8bc4;
  --color-info-light: rgba(121, 97, 170, 0.2);

  --bg-primary: #1a2332;
  --bg-secondary: #27344C;
  --bg-tertiary: #364258;
  --bg-elevated: #27344C;

  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #64748b;
  --text-inverse: #1a2332;

  --border-light: #364258;
  --border-medium: #475569;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.4);

  --header-gradient: linear-gradient(135deg, #1e2a3d 0%, #0077b3 50%, #6a5299 100%);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* ===== Icon Styles (Line Icons) ===== */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.icon-sm {
  width: 18px;
  height: 18px;
}

.icon-lg {
  width: 28px;
  height: 28px;
}

.icon-xl {
  width: 32px;
  height: 32px;
}

/* ===== Header ===== */
.header {
  background: var(--header-gradient);
  color: var(--text-inverse);
  padding: 1rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-title .icon {
  width: 32px;
  height: 32px;
  stroke: white;
}

.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-title p {
  font-size: 0.75rem;
  opacity: 0.85;
  display: none;
}

@media (min-width: 640px) {
  .header-title p {
    display: block;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: var(--radius-full);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

.theme-toggle .icon {
  stroke: white;
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ===== Main Content ===== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

@media (min-width: 768px) {
  .main-content {
    padding: 1.5rem;
  }
}

/* ===== Section Headers ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.section-header .icon {
  color: var(--text-tertiary);
  width: 20px;
  height: 20px;
}

/* ===== Dashboard Stats ===== */
.dashboard {
  margin-bottom: 1.25rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.stat-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card.active {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
}

.stat-card.active .stat-info h3 {
  color: var(--color-primary);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon .icon {
  width: 22px;
  height: 22px;
}

.stat-icon.total {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.stat-icon.success {
  background: var(--color-success-light);
  color: var(--color-success);
}
.stat-icon.warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}
.stat-icon.danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}
.stat-icon.info {
  background: var(--color-info-light);
  color: var(--color-info);
}

.stat-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-info p {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ===== Filters ===== */
.filters {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .filters {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

@media (min-width: 768px) {
  .filter-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex: none;
  }
}

.filter-group label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
}

.filter-group select,
.filter-group input[type="text"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

@media (min-width: 768px) {
  .filter-group select,
  .filter-group input[type="text"] {
    width: auto;
    min-width: 180px;
  }
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.filter-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.active-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
}

.active-filter button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.8;
  display: flex;
}

.active-filter button:hover {
  opacity: 1;
}

/* ===== Notifications Panel ===== */
.notificari-panel {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.notificari-panel .section-header {
  margin-bottom: 0.75rem;
}

.badge {
  background: var(--color-primary);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.notificari-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.notificare-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--border-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notificare-item:hover {
  background: var(--bg-tertiary);
}

.notificare-item.critica {
  border-left-color: var(--color-danger);
  background: var(--color-danger-light);
}
.notificare-item.ridicata {
  border-left-color: var(--color-warning);
  background: var(--color-warning-light);
}
.notificare-item.medie {
  border-left-color: var(--color-info);
  background: var(--color-info-light);
}

.notificare-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  flex-shrink: 0;
}

.notificare-icon .icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.notificare-content {
  flex: 1;
  min-width: 0;
}

.notificare-content strong {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificare-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notificare-badge {
  font-size: 0.5625rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.notificare-badge.critica { background: var(--color-danger); color: white; }
.notificare-badge.ridicata { background: var(--color-warning); color: white; }
.notificare-badge.medie { background: var(--color-info); color: white; }

/* ===== Beneficiari Section ===== */
.beneficiari-section {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.beneficiari-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .beneficiari-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .beneficiari-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Beneficiar Card ===== */
.beneficiar-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 4px solid var(--border-medium);
}

.beneficiar-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.beneficiar-card.status-in_termen { border-left-color: var(--color-success); }
.beneficiar-card.status-aproape { border-left-color: var(--color-warning); }
.beneficiar-card.status-expirat { border-left-color: var(--color-danger); }

.beneficiar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.beneficiar-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.beneficiar-header .id {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: 0.125rem;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.status-badge.in_termen {
  background: var(--color-success-light);
  color: var(--color-success);
}
.status-badge.aproape {
  background: var(--color-warning-light);
  color: var(--color-warning);
}
.status-badge.expirat {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.beneficiar-info {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.375rem 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 0.75rem;
}

.beneficiar-info .label {
  color: var(--text-tertiary);
}

.beneficiar-info .value {
  font-weight: 500;
  text-align: right;
  color: var(--text-primary);
}

/* Tags */
.beneficiar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.tag {
  font-size: 0.625rem;
  padding: 0.1875rem 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tag .icon {
  width: 12px;
  height: 12px;
}

.tag-cerere.inexistenta {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.tag-cerere.depusa {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.tag-cerere.aprobata {
  background: var(--color-success-light);
  color: var(--color-success);
}

.tag-risc {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.tag-urgent {
  background: var(--color-warning-light);
  color: var(--color-warning);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== Progress Bar ===== */
.progress-container {
  margin-top: 0.75rem;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  margin-bottom: 0.375rem;
}

.progress-label .label {
  color: var(--text-tertiary);
}

.progress-label .value {
  font-weight: 700;
}

.progress-label .value.risc {
  color: var(--color-danger);
}

.progress-label .value.ok {
  color: var(--color-success);
}

.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

.progress-fill.ok {
  background: linear-gradient(90deg, var(--color-success) 0%, #34d399 100%);
}

.progress-fill.risc {
  background: linear-gradient(90deg, var(--color-danger) 0%, #f87171 100%);
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  padding: 0;
}

@media (min-width: 640px) {
  .modal {
    align-items: center;
    padding: 1rem;
  }
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: slideUp 0.3s ease;
}

@media (min-width: 640px) {
  .modal-content {
    border-radius: var(--radius-xl);
    max-width: 600px;
    animation: fadeIn 0.3s ease;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-tertiary);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

#modal-body {
  padding: 1.25rem;
}

@media (min-width: 640px) {
  #modal-body {
    padding: 1.5rem;
  }
}

/* Modal Detail Sections */
.detail-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
}

.detail-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.detail-header .subtitle {
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 480px) {
  .detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.detail-item {
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.detail-item .label {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.detail-item .value {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-item .value.success { color: var(--color-success); }
.detail-item .value.warning { color: var(--color-warning); }
.detail-item .value.danger { color: var(--color-danger); }

/* ===== Timeline ===== */
.timeline-section {
  margin-top: 1.5rem;
}

.timeline-section h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.timeline-section h3 .icon {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.4375rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

.timeline-item {
  position: relative;
  padding-bottom: 1rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.25rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--border-light);
}

.timeline-item .date {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-bottom: 0.125rem;
  font-weight: 500;
}

.timeline-item .action {
  font-size: 0.8125rem;
  color: var(--text-primary);
}

.timeline-item .user {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.125rem;
}

.timeline-item .user .icon {
  width: 12px;
  height: 12px;
}

/* ===== Buttons ===== */
.action-buttons {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .action-buttons {
    flex-direction: row;
  }
}

.btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

@media (min-width: 480px) {
  .btn {
    width: auto;
  }
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--border-light);
}

/* ===== Loading State ===== */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-tertiary);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-light);
  border-top-color: var(--color-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-tertiary);
}

.empty-state-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  color: var(--text-tertiary);
  opacity: 0.5;
}

.empty-state-icon .icon {
  width: 100%;
  height: 100%;
}

.empty-state p {
  font-size: 0.875rem;
}

/* ===== Form Styles ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  cursor: pointer;
  color: var(--text-secondary);
}

.radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
}

/* Template Section */
.template-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-light);
}

.template-section > label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-template {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-md);
}

.btn-template:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
}

/* ===== Toast Notifications ===== */
.toast {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  animation: slideInUp 0.3s ease-out;
  border: 1px solid var(--border-light);
}

@media (min-width: 480px) {
  .toast {
    left: auto;
    right: 1.5rem;
    bottom: 1.5rem;
    max-width: 360px;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-fade-out {
  animation: slideOutDown 0.3s ease-in forwards;
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }
  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

.toast-success {
  border-left: 4px solid var(--color-success);
}

.toast-error {
  border-left: 4px solid var(--color-danger);
}

.toast-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-icon .icon {
  width: 20px;
  height: 20px;
}

.toast-success .toast-icon .icon {
  color: var(--color-success);
}

.toast-error .toast-icon .icon {
  color: var(--color-danger);
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-content strong {
  display: block;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.toast-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close .icon {
  width: 18px;
  height: 18px;
}

.toast-close:hover {
  color: var(--text-primary);
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===== Selection ===== */
::selection {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ===== Focus Visible ===== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== Safe Area for Mobile ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .modal {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .toast {
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
}

/* ===== Login Screen ===== */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--bg-secondary);
}

.login-container {
  background: var(--bg-primary);
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo {
  width: auto;
  height: 80px;
  max-width: 280px;
  object-fit: contain;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.login-header .icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.login-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.login-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.login-error {
  background: var(--color-danger-light);
  color: var(--color-danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.btn-full {
  width: 100%;
}

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.login-footer p {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.login-footer small {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-family: monospace;
}

/* ===== Main App Layout ===== */
.main-app {
  display: flex;
  min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 260px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform var(--transition-normal);
}

.sidebar.open {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    transform: translateX(0);
  }
}

.sidebar-header {
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo {
  width: auto;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.sidebar-header .icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}

.sidebar-header span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: 0.25rem;
}

.nav-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--color-danger);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
}

.nav-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.75rem 0;
}

.nav-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  margin-top: 0.5rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-light);
}

.theme-toggle-sidebar {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.theme-toggle-sidebar:hover {
  background: var(--bg-tertiary);
}

.theme-toggle-sidebar .icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.theme-toggle-sidebar .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle-sidebar .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-sidebar .icon-moon {
  display: block;
}

/* ===== Sidebar Overlay ===== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none;
  }
}

/* ===== Mobile Header ===== */
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

@media (min-width: 1024px) {
  .mobile-header {
    display: none;
  }
}

.menu-toggle,
.user-menu-toggle {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.menu-toggle:hover,
.user-menu-toggle:hover {
  background: var(--bg-tertiary);
}

.menu-toggle .icon,
.user-menu-toggle .icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.mobile-header-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-header-title .icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.mobile-header-title span {
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== Main Wrapper ===== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ===== Top Bar ===== */
.top-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
}

@media (min-width: 1024px) {
  .top-bar {
    display: flex;
  }
}

.top-bar-left h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== User Dropdown ===== */
.user-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  padding-right: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-dropdown-toggle:hover {
  background: var(--bg-tertiary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

.user-dropdown-toggle .icon {
  width: 16px;
  height: 16px;
  color: var(--text-tertiary);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
  z-index: 300;
}

.user-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.dropdown-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.dropdown-item .icon {
  width: 18px;
  height: 18px;
}

.dropdown-item.text-danger {
  color: var(--color-danger);
}

.dropdown-item.text-danger:hover {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.25rem 0;
}

/* ===== Page Structure ===== */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== Users Table ===== */
.users-section {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.users-table {
  width: 100%;
}

.users-table-header {
  display: none;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (min-width: 768px) {
  .users-table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 120px;
    gap: 1rem;
  }
}

.users-table-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.users-table-row:hover {
  background: var(--bg-secondary);
}

.users-table-row.inactive {
  opacity: 0.6;
}

@media (min-width: 768px) {
  .users-table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 120px;
    gap: 1rem;
    align-items: center;
  }
}

.col-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-small {
  width: 36px;
  height: 36px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.user-details {
  min-width: 0;
}

.user-details strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-details small {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-role,
.col-dept,
.col-status {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.role-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.role-badge.role-admin {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.role-badge.role-manager {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.role-badge.role-operator {
  background: var(--color-info-light);
  color: var(--color-info);
}

.role-badge.role-viewer {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-right: 0.5rem;
}

.status-dot.active {
  background: var(--color-success);
}

.status-dot.inactive {
  background: var(--text-tertiary);
}

.col-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-icon.text-danger {
  color: var(--color-danger);
}

.btn-icon.text-danger:hover {
  background: var(--color-danger-light);
}

.btn-icon .icon {
  width: 16px;
  height: 16px;
}

/* ===== Form Row ===== */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.form-row .form-group {
  margin-bottom: 0;
}

.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.form-group input:disabled {
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

/* ===== Settings Page ===== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .settings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.settings-card {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.settings-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.settings-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.theme-options {
  display: flex;
  gap: 0.5rem;
}

.theme-options .btn {
  flex: 1;
  padding: 0.5rem;
}

/* ===== Notificari Full List ===== */
.notificari-list-full {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.notificari-list-full .notificare-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
}

/* ===== Reports Page ===== */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.report-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
}

.report-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.report-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  color: var(--color-primary);
}

.report-icon.warning {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.report-icon.danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.report-icon.info {
  background: var(--color-info-light);
  color: var(--color-info);
}

.report-icon .icon-lg {
  width: 28px;
  height: 28px;
}

.report-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.report-card p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.report-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.report-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.report-header p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.report-stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.report-stat-card h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.report-stat-card .big-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.report-stat-card small {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.report-stat-card.success {
  background: var(--color-success-light);
}

.report-stat-card.success .big-number {
  color: var(--color-success);
}

.report-stat-card.warning {
  background: var(--color-warning-light);
}

.report-stat-card.warning .big-number {
  color: var(--color-warning);
}

.report-stat-card.danger {
  background: var(--color-danger-light);
}

.report-stat-card.danger .big-number {
  color: var(--color-danger);
}

.report-section {
  margin-bottom: 1.5rem;
}

.report-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.report-section h4.danger {
  color: var(--color-danger);
}

.report-section h4.warning {
  color: var(--color-warning);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
}

.report-table th,
.report-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.report-table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

.report-table td {
  font-size: 0.875rem;
}

.report-table .text-right {
  text-align: right;
}

.report-table .success {
  color: var(--color-success);
}

.report-table .warning {
  color: var(--color-warning);
}

.report-table .danger {
  color: var(--color-danger);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

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

.btn-warning:hover {
  background: #d97706;
}

/* Toast info type */
.toast-info {
  border-left: 4px solid var(--color-info);
}

.toast-info .toast-icon {
  color: var(--color-info);
}

/* ===== Charts Section ===== */
.charts-section {
  margin-bottom: 1.5rem;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.chart-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.chart-card.chart-wide {
  grid-column: 1 / -1;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.chart-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-body {
  position: relative;
  height: 250px;
}

.chart-body canvas {
  max-height: 100%;
}

/* ===== Notification Bell ===== */
.notification-bell {
  position: relative;
}

.bell-button {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

.bell-button:hover {
  background: var(--bg-tertiary);
}

.bell-button .icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-danger);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

.bell-badge:empty,
.bell-badge[data-count="0"] {
  display: none;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 400;
  display: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast);
}

.notification-dropdown.show {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
}

.notification-header h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notification-header .btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.notification-header .btn-link:hover {
  text-decoration: underline;
}

.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: var(--bg-secondary);
}

.notification-item.unread {
  background: var(--color-primary-light);
}

.notification-item.unread:hover {
  background: rgba(99, 102, 241, 0.15);
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-icon.critica {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.notification-icon.ridicata {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.notification-icon.medie {
  background: var(--color-info-light);
  color: var(--color-info);
}

.notification-icon .icon {
  width: 18px;
  height: 18px;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-content strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.notification-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.notification-content .time {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

.notification-footer {
  padding: 0.75rem 1rem;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.notification-footer a {
  color: var(--color-primary);
  font-size: 0.8125rem;
  text-decoration: none;
  font-weight: 500;
}

.notification-footer a:hover {
  text-decoration: underline;
}

/* ===== Top Risc Section ===== */
.top-risc-section {
  background: var(--bg-primary);
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.top-risc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.risc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-danger);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.risc-item:hover {
  background: var(--bg-tertiary);
  transform: translateX(4px);
}

.risc-rank {
  width: 28px;
  height: 28px;
  background: var(--color-danger);
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.risc-info {
  flex: 1;
  min-width: 0;
}

.risc-info strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.risc-info small {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.risc-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.risc-percent {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-danger);
}

.risc-amount {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

/* ===== Period Filter ===== */
.period-filter {
  margin-left: auto;
}

.period-filter select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
}

.period-filter select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ===== Empty Notifications ===== */
.notification-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-tertiary);
}

.notification-empty .icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  opacity: 0.5;
}

.notification-empty p {
  font-size: 0.875rem;
}

/* ===== Notifications Page ===== */
.notif-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .notif-stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.notif-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
}

.notif-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.notif-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-stat-icon .icon {
  width: 24px;
  height: 24px;
}

.notif-stat-card.critical .notif-stat-icon {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.notif-stat-card.warning .notif-stat-icon {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.notif-stat-card.info .notif-stat-icon {
  background: var(--color-info-light);
  color: var(--color-info);
}

.notif-stat-card.total .notif-stat-icon {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

.notif-stat-info {
  display: flex;
  flex-direction: column;
}

.notif-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.notif-stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.notif-filters {
  margin-bottom: 1rem;
}

.notificari-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.notificari-list-full {
  max-height: calc(100vh - 450px);
  overflow-y: auto;
}

.notif-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.notif-card:last-child {
  border-bottom: none;
}

.notif-card:hover {
  background: var(--bg-secondary);
}

.notif-card.unread {
  background: var(--color-primary-light);
  border-left: 3px solid var(--color-primary);
}

.notif-card.unread:hover {
  background: rgba(99, 102, 241, 0.12);
}

.notif-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-card-icon .icon {
  width: 22px;
  height: 22px;
}

.notif-card-icon.critica {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.notif-card-icon.ridicata {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.notif-card-icon.medie {
  background: var(--color-info-light);
  color: var(--color-info);
}

.notif-card-content {
  flex: 1;
  min-width: 0;
}

.notif-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.375rem;
}

.notif-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notif-card-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
}

.notif-card-badge.critica {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.notif-card-badge.ridicata {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.notif-card-badge.medie {
  background: var(--color-info-light);
  color: var(--color-info);
}

.notif-card-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.notif-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.notif-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.notif-card-meta .icon {
  width: 14px;
  height: 14px;
}

.notif-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.notif-action-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.notif-action-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.notif-action-btn .icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.notif-action-btn:hover .icon {
  color: var(--color-primary);
}

.notif-empty-state {
  padding: 4rem 2rem;
  text-align: center;
}

.notif-empty-state .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  color: var(--text-tertiary);
  opacity: 0.5;
}

.notif-empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.notif-empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Print styles */
@media print {
  .sidebar,
  .mobile-header,
  .top-bar,
  .reports-grid,
  .btn,
  .report-header button {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .report-content {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .report-header {
    display: block !important;
  }

  .report-table {
    font-size: 10px;
  }
}
