/**
 * Barrisol CAD & ERP - Main Design System (Strict Local, Zero CDN)
 * Dual Theme Architecture: Light Mode (Default) & Dark Mode
 */

/* ==========================================================================
   1. Theme Variables
   ========================================================================== */

:root,
[data-theme="light"] {
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  /* Color Palette - Clean Light Elegance */
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-panel: #ffffff;
  --bg-input: #ffffff;
  --bg-input-border: #cbd5e1;
  --bg-input-hover: #f1f5f9;
  --bg-modal: #ffffff;
  --bg-preview: #f1f5f9;
  --bg-stat-box: #f8fafc;
  --topbar-bg: rgba(255, 255, 255, 0.9);
  --modal-overlay-bg: rgba(15, 23, 42, 0.5);
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --primary-glow: 0 4px 14px rgba(37, 99, 235, 0.25);
  
  --cyan: #0284c7;
  --cyan-light: rgba(2, 132, 199, 0.08);
  --orange: #ea580c;
  --orange-light: rgba(234, 88, 12, 0.08);
  --purple: #7c3aed;
  --purple-light: rgba(124, 58, 237, 0.08);
  --emerald: #059669;
  --emerald-light: rgba(5, 150, 105, 0.08);
  --rose: #e11d48;
  --rose-light: rgba(225, 29, 72, 0.08);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-active: #2563eb;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* CAD Specific tokens in Light Mode */
  --cad-canvas-bg: #f8fafc;
  --cad-grid-line: #e2e8f0;
  --cad-grid-major: #cbd5e1;
  --cad-dim-badge-bg: #ffffff;
  --cad-dim-badge-border: #cbd5e1;
  --cad-dim-text: #0f172a;
  --cad-vertex-badge-bg: #ffffff;
  --cad-vertex-badge-border: #2563eb;
  --cad-vertex-text: #0f172a;
  --cad-poly-real-stroke: #0284c7;
  --cad-poly-real-fill: rgba(2, 132, 199, 0.06);

  --scrollbar-thumb: #cbd5e1;
  --scrollbar-thumb-hover: #94a3b8;
}

[data-theme="dark"] {
  /* Color Palette - Dark Cyber Glass */
  --bg-app: #0b0f19;
  --bg-sidebar: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(31, 41, 55, 0.95);
  --bg-panel: #131d2e;
  --bg-input: #1e293b;
  --bg-input-border: #334155;
  --bg-input-hover: #26354a;
  --bg-modal: #0f172a;
  --bg-preview: rgba(0, 0, 0, 0.35);
  --bg-stat-box: rgba(0, 0, 0, 0.25);
  --topbar-bg: rgba(17, 24, 39, 0.75);
  --modal-overlay-bg: rgba(0, 0, 0, 0.75);
  
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-light: rgba(59, 130, 246, 0.15);
  --primary-glow: 0 0 20px rgba(59, 130, 246, 0.4);
  
  --cyan: #06b6d4;
  --cyan-light: rgba(6, 182, 212, 0.15);
  --orange: #f97316;
  --orange-light: rgba(249, 115, 22, 0.15);
  --purple: #8b5cf6;
  --purple-light: rgba(139, 92, 246, 0.15);
  --emerald: #10b981;
  --emerald-light: rgba(16, 185, 129, 0.15);
  --rose: #f43f5e;
  --rose-light: rgba(244, 63, 94, 0.15);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-active: #3b82f6;
  
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  
  /* CAD Specific tokens in Dark Mode */
  --cad-canvas-bg: #060911;
  --cad-grid-line: rgba(255, 255, 255, 0.05);
  --cad-grid-major: rgba(255, 255, 255, 0.12);
  --cad-dim-badge-bg: #1e293b;
  --cad-dim-badge-border: #475569;
  --cad-dim-text: #ffffff;
  --cad-vertex-badge-bg: #1e293b;
  --cad-vertex-badge-border: #3b82f6;
  --cad-vertex-text: #ffffff;
  --cad-poly-real-stroke: #38bdf8;
  --cad-poly-real-fill: rgba(56, 189, 248, 0.08);

  --scrollbar-thumb: #334155;
  --scrollbar-thumb-hover: #475569;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* SVG Icon Helper */
.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  overflow: visible;
}

/* App Container */
#app {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   3. Sidebar Navigation
   ========================================================================== */

.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-badge {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: var(--primary-glow);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #1e3a8a, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .brand-title {
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Nav Menu */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

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

.nav-item.active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: rgba(37, 99, 235, 0.2);
  font-weight: 600;
}

[data-theme="dark"] .nav-item.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.25), rgba(6, 182, 212, 0.1));
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.nav-badge {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  background: var(--border-color);
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  background: var(--emerald-light);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px var(--emerald);
}

/* ==========================================================================
   4. Main Wrapper & Topbar
   ========================================================================== */

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-app);
}

/* Topbar */
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border-color);
  background: var(--topbar-bg);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 40;
  box-shadow: var(--shadow-xs);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}

.breadcrumb-item {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.breadcrumb-item:hover {
  color: var(--primary);
}

.breadcrumb-sep {
  color: var(--text-dim);
  user-select: none;
}

.breadcrumb-active {
  color: var(--text-main);
  font-weight: 600;
  cursor: default;
}

/* User Profile in Topbar */
.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 20px;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-details-mini {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

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

.tenant-name {
  font-size: 0.68rem;
  color: var(--text-dim);
}

.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin-left: 2px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(225, 29, 72, 0.1);
  color: var(--rose);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Icon visibility based on active theme */
:root .theme-toggle-btn .icon-moon,
[data-theme="light"] .theme-toggle-btn .icon-moon {
  display: inline-block;
  color: #475569;
}

:root .theme-toggle-btn .icon-sun,
[data-theme="light"] .theme-toggle-btn .icon-sun {
  display: none;
}

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

[data-theme="dark"] .theme-toggle-btn .icon-sun {
  display: inline-block;
  color: #f59e0b;
}

/* Search Bar */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px 8px 36px;
  font-size: 0.85rem;
  color: var(--text-main);
  width: 220px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  width: 270px;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-box .icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  color: var(--primary);
}

.btn-success {
  background: linear-gradient(135deg, var(--emerald), #047857);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857, #065f46);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--rose-light);
  color: var(--rose);
  border-color: rgba(225, 29, 72, 0.2);
}

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

.btn-sm {
  padding: 6px 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-icon-only {
  padding: 8px;
  border-radius: var(--radius-md);
}

/* ==========================================================================
   6. Content Containers & Cards
   ========================================================================== */

.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: none;
}

.view-container.active {
  display: block;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.page-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-in_lucru {
  background: var(--orange-light);
  color: var(--orange);
  border: 1px solid rgba(234, 88, 12, 0.25);
}

.badge-masurat {
  background: var(--cyan-light);
  color: var(--cyan);
  border: 1px solid rgba(2, 132, 199, 0.25);
}

.badge-oferta {
  background: var(--purple-light);
  color: var(--purple);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.badge-finalizat {
  background: var(--emerald-light);
  color: var(--emerald);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.card-body {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* Ceiling Thumbnail Card */
.ceiling-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ceiling-preview {
  height: 160px;
  background: var(--bg-preview);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.ceiling-preview svg {
  max-width: 90%;
  max-height: 90%;
}

.ceiling-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-stat-box);
  padding: 10px;
  border-radius: var(--radius-md);
  margin: 10px 0;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-item .stat-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-item .stat-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

/* ==========================================================================
   7. Modals
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--modal-overlay-bg);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   8. Form Controls
   ========================================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-main);
  transition: var(--transition);
  font-family: inherit;
  box-shadow: var(--shadow-xs);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ==========================================================================
   9. Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideInRight 0.3s ease forwards;
}

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

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

.toast.toast-info {
  border-left: 4px solid var(--primary);
}

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

/* ==========================================================================
   10. Scrollbar Customization
   ========================================================================== */

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
}

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

/* ==========================================================================
   11. Comenzi Atelier & Colaborare B2B
   ========================================================================== */

.orders-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.orders-filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.orders-filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.orders-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-xs);
}

.order-badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-trimis {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-in_croiala {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-finalizat {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-expediat {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.order-share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-hover);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* ==========================================================================
   12. Ecran Autentificare (Login Overlay)
   ========================================================================== */

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-overlay.active {
  display: flex;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-lg);
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.login-error {
  padding: 10px 14px;
  background: rgba(225, 29, 72, 0.12);
  border: 1px solid rgba(225, 29, 72, 0.3);
  color: #e11d48;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 14px;
}

.login-demo-box {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   13. Tabel Gestiune Utilizatori (Multi-User în Setări)
   ========================================================================== */

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.users-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.users-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.role-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}

.role-admin {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
}

.role-montator {
  background: rgba(37, 99, 235, 0.12);
  color: #2563eb;
}

.role-croitor {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

