:root {
  --bg-dark: #090d16;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.85);
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: #0284c7;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;
  
  --cyan-accent: #00f2fe;
  --magenta-accent: #ff0844;
  --yellow-accent: #ffb199;
  --green-accent: #10b981;
  --blue-accent: #3b82f6;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  
  --shadow-main: 0 20px 40px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
}

/* Background CMYK Glow Effects */
.background-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.25;
}

.glow-cyan {
  width: 500px;
  height: 500px;
  background: var(--cyan-accent);
  top: -150px;
  right: -100px;
}

.glow-magenta {
  width: 550px;
  height: 550px;
  background: var(--magenta-accent);
  bottom: -200px;
  left: -150px;
}

.glow-yellow {
  width: 450px;
  height: 450px;
  background: var(--yellow-accent);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Screen Transitions */
.screen-view {
  display: none !important;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.screen-view.active {
  display: flex !important;
  flex-direction: column;
}

/* ----------------------------------------------------
   ECRAN AUTENTIFICARE (LOGIN & PIN KEYPAD)
---------------------------------------------------- */
#auth-screen.active {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 24px 16px;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  box-sizing: border-box;
}

#auth-screen:not(.active) {
  display: none !important;
}

.auth-container {
  width: 100%;
  max-width: 460px;
  margin: auto !important;
}

.auth-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-main);
}

.brand-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.brand-logo {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 10px 16px;
  border-radius: 12px;
  letter-spacing: 1.5px;
  box-shadow: 0 8px 16px rgba(2, 132, 199, 0.4);
}

.brand-logo.sm {
  font-size: 0.9rem;
  padding: 6px 10px;
  border-radius: 8px;
}

.brand-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: 14px;
  margin-bottom: 28px;
  gap: 6px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.auth-subview {
  display: none;
}

.auth-subview.active {
  display: block;
}

.auth-instruction {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* PIN Display Buline */
.pin-display {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--cyan-accent);
  border-color: var(--cyan-accent);
  box-shadow: 0 0 12px var(--cyan-accent);
  transform: scale(1.15);
}

/* Keypad Tactil */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.key-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fff;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.key-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.key-btn:active {
  transform: scale(0.95);
}

.key-btn.action-key {
  font-size: 1.1rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

.key-btn.action-key:hover {
  color: #fff;
}

.demo-hint {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: #7dd3fc;
  text-align: center;
  margin-top: 16px;
}

.demo-hint code {
  background: rgba(0, 0, 0, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  color: #fff;
}

/* Formular User & Pass */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.form-group input,
.form-group select {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 12px 16px;
  border-radius: 10px;
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

/* Stilizare Barette de Căutare (Caută toner / Filtrează aparatul) */
.search-box-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-wrap .search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  transition: var(--transition-fast);
}

.search-input {
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid var(--border-color) !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 16px 10px 38px !important;
  border-radius: 10px;
  outline: none;
  width: 260px;
  transition: var(--transition-fast);
}

.search-box-wrap.full-width {
  width: 100%;
}

.search-box-wrap.full-width .search-input {
  width: 100% !important;
}

.search-input:focus {
  border-color: #00f2fe !important;
  background: rgba(15, 23, 42, 0.9) !important;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.25) !important;
}

.search-box-wrap:focus-within .search-icon {
  color: #00f2fe;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.full-width {
  width: 100%;
}

/* Butoane Generale */
.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.6);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 1.05rem;
  border-radius: 12px;
}

.btn-block {
  width: 100%;
}

.btn-icon-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.btn-icon-danger:hover {
  background: #ef4444;
  color: #fff;
}

.pulse-btn {
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(2, 132, 199, 0); }
  100% { box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

/* Alertă */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-top: 16px;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.hidden {
  display: none !important;
}

/* ----------------------------------------------------
   APLICAȚIA PRINCIPALĂ (HEADER + BODY)
---------------------------------------------------- */
.app-header {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.office-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.office-selector-wrap select {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

.office-selector-wrap select option,
select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 10px 14px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.user-role-tag {
  background: #0284c7;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-role-tag.admin {
  background: #8b5cf6;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

/* Navigation Tabs Main */
.app-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.app-nav {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.5);
  padding: 12px 32px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: rgba(2, 132, 199, 0.15);
  border-color: rgba(2, 132, 199, 0.4);
  color: #38bdf8;
  font-weight: 600;
}

.main-content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.app-section {
  display: none;
}

.app-section.active {
  display: block;
}

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

.section-header h3 {
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* WIZARD CTA BANNER */
.wizard-cta-banner {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 32px;
}

.banner-icon {
  width: 64px;
  height: 64px;
  background: rgba(2, 132, 199, 0.25);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #38bdf8;
}

.banner-text {
  flex: 1;
}

.banner-text h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}

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

.margin-top {
  margin-top: 24px;
}

.table-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.table-card-header h4 {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
}

.bg-cyan { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.bg-green { background: linear-gradient(135deg, #10b981, #34d399); }
.bg-red { background: linear-gradient(135deg, #ef4444, #f87171); }

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Table Design */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 100%;
  position: relative;
}

.custom-table {
  width: 100%;
  min-width: 720px !important;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th {
  background: rgba(0, 0, 0, 0.4);
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.custom-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-light);
}

.custom-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-stock-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-stock-low {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.office-badge {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
}

/* ----------------------------------------------------
   MODALE ȘI OVERLAY-URI POPUP
---------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  box-sizing: border-box;
}

.modal-overlay.hidden {
  display: none !important;
}

.wizard-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  width: 95vw;
  max-width: 1180px;
  max-height: min(92vh, calc(100dvh - 24px));
  margin: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 242, 254, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-manage-types .wizard-modal-card {
  width: 95vw !important;
  max-width: 1180px !important;
}

.manage-view .table-card {
  overflow-x: auto !important;
  width: 100% !important;
}

.manage-view table.custom-table {
  width: 100% !important;
  min-width: 980px !important;
  table-layout: auto !important;
}

.manage-view th, 
.manage-view td {
  padding: 12px 14px !important;
  white-space: nowrap !important;
}

.manage-view td.action-cell {
  min-width: 260px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
}


@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.wizard-header {
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: #090d16;
  flex-shrink: 0;
}

.wizard-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wizard-icon-box {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
}

.wizard-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Bară Pași Wizard */
.wizard-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.4;
  transition: var(--transition-fast);
}

.wizard-step-item.active {
  opacity: 1;
}

.wizard-step-item.completed .step-num {
  background: var(--green-accent);
  color: #fff;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.wizard-step-item.active .step-num {
  background: var(--cyan-accent);
  color: #000;
  box-shadow: 0 0 12px var(--cyan-accent);
}

.step-title {
  font-size: 0.88rem;
  font-weight: 600;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 12px;
}

.step-connector.active {
  background: var(--cyan-accent);
}

/* Wizard Body */
.wizard-body, .manage-body {
  padding: 24px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  flex: 1;
  min-height: 0;
}

.wizard-step-content {
  display: none;
}

.wizard-step-content.active {
  display: block;
}

.step-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-subheading {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.step-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;

}

.selected-summary-badge {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.selected-summary-badge.cyan {
  background: rgba(0, 242, 254, 0.15);
  border-color: rgba(0, 242, 254, 0.3);
  color: var(--cyan-accent);
}

.selected-summary-badge.toner-color-badge-yellow {
  background: rgba(234, 179, 8, 0.2) !important;
  border: 1px solid rgba(250, 204, 21, 0.5) !important;
  color: #facc15 !important;
}

.selected-summary-badge.toner-color-badge-cyan {
  background: rgba(2, 132, 199, 0.2) !important;
  border: 1px solid rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
}

.selected-summary-badge.toner-color-badge-magenta {
  background: rgba(219, 39, 119, 0.2) !important;
  border: 1px solid rgba(244, 114, 182, 0.5) !important;
  color: #f472b6 !important;
}

.selected-summary-badge.toner-color-badge-black {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #f8fafc !important;
}


.summary-badges-wrap {
  display: flex;
  gap: 8px;
}

/* Grid Aparate & Tonere */
.aparate-grid,
.tonere-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  overflow: visible;
  padding: 4px;
  margin-top: 14px;
}

.card-select-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-select-item:hover {
  background: rgba(2, 132, 199, 0.15);
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.card-select-item.selected {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

.card-title {
  font-weight: 700;
  font-size: 1rem;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Pasul 3 Index Box (stil gestiune.pimcopy.ro) */
.wizard-index-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.index-old-header {
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;

}

.index-vechi-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-accent);
}

.index-limits-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.limit-tag {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
}

.limit-tag.min {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.limit-tag.max {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.contor-input-lg {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  padding: 14px 20px !important;
  letter-spacing: 1px;
}

/* Tastatură Numerică Integrată în Modale (Wizard) */
.wizard-keypad-wrap {
  margin-top: 10px;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px;
}

.wizard-keypad-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wizard-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.wkey-btn {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 10px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.wkey-btn:active, .wkey-btn:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: #00f2fe;
  color: #00f2fe;
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

.wkey-btn.action-danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  font-size: 0.88rem;
}
.wkey-btn.action-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}

.wkey-btn.action-back {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  font-size: 0.95rem;
}
.wkey-btn.action-back:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #fff;
}

/* Metrics Real-time Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.metric-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 14px 18px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-card.highlight {
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
}

.metric-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.modal-card {
  background: #1e293b;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 680px;
  max-height: min(90vh, calc(100dvh - 24px));
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-main);
  overflow: hidden;
  padding: 0;
  margin: auto;
}

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

.modal-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  flex: 1;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  background: #0f172a;
  flex-shrink: 0;
}

.text-cyan { color: var(--cyan-accent); }
.text-magenta { color: var(--magenta-accent); }
.text-yellow { color: var(--yellow-accent); }

/* Stilizare Modal Operațiune Stoc (Adăugare / Scădere) */
.stock-op-toggle {
  display: flex;
  gap: 12px;
}

.op-option {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  user-select: none;
}

.op-option:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.op-option.active#op-label-add {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.5);
  color: #34d399;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.op-option.active#op-label-sub {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.text-green { color: #34d399; }
.text-red { color: #f87171; }

.btn-danger-custom {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-danger-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
}

/* Casetă Preview Stoc */
.stock-preview-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stock-preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.stock-preview-row.highlight {
  color: #fff;
  font-weight: 600;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.stock-preview-row.highlight strong {
  font-size: 1.15rem;
  color: var(--cyan-accent);
}

/* ----------------------------------------------------
   CUSTOM SCROLLBAR (THEME-MATCHED DARK NEON INTERFACE)
---------------------------------------------------- */
::-webkit-scrollbar,
*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
div::-webkit-scrollbar,
section::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track,
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
div::-webkit-scrollbar-track,
section::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.9) !important;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
div::-webkit-scrollbar-thumb,
section::-webkit-scrollbar-thumb {
  background: rgba(51, 65, 85, 0.9) !important;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
div::-webkit-scrollbar-thumb:hover,
section::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00f2fe 0%, #4facfe 100%) !important;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.6) !important;
}

::-webkit-scrollbar-corner {
  background: transparent !important;
}

* {
  scrollbar-width: thin !important;
  scrollbar-color: #334155 #0f172a !important;
}

/* ----------------------------------------------------
   COLOR TAGS & TEXT FOR TONER TYPES (CYAN, MAGENTA, YELLOW, BLACK)
---------------------------------------------------- */
.toner-color-text {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.2;
}

.toner-color-cyan {
  color: #00f2fe !important;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: 0 2px 8px rgba(0, 242, 254, 0.15);
}

.toner-color-magenta {
  color: #ff0844 !important;
  background: rgba(255, 8, 68, 0.12);
  border: 1px solid rgba(255, 8, 68, 0.3);
  box-shadow: 0 2px 8px rgba(255, 8, 68, 0.15);
}

.toner-color-yellow {
  color: #facc15 !important;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  box-shadow: 0 2px 8px rgba(250, 204, 21, 0.15);
}

.toner-color-black {
  color: #e2e8f0 !important;
  background: rgba(226, 232, 240, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.18);
}

/* Card highlight borders for Wizard Step 2 Tonere */
.card-select-item.card-color-cyan:hover {
  border-color: #00f2fe;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.25);
}
.card-select-item.card-color-magenta:hover {
  border-color: #ff0844;
  box-shadow: 0 4px 18px rgba(255, 8, 68, 0.25);
}
.card-select-item.card-color-yellow:hover {
  border-color: #facc15;
  box-shadow: 0 4px 18px rgba(250, 204, 21, 0.25);
}
.card-select-item.card-color-black:hover {
  border-color: #94a3b8;
  box-shadow: 0 4px 18px rgba(148, 163, 184, 0.25);
}

/* ----------------------------------------------------
   NUMBERED PAGINATION FOOTER
---------------------------------------------------- */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 16px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

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

.pagination-info strong {
  color: #00f2fe;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.page-btn:hover:not(:disabled):not(.active) {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
  color: #00f2fe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 242, 254, 0.25);
}

.page-btn.active {
  background: linear-gradient(135deg, #00f2fe 0%, #0284c7 100%);
  border-color: #00f2fe;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.4);
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.05);
  background: rgba(15, 23, 42, 0.4);
}

.page-ellipsis {
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 4px;
}

/* ----------------------------------------------------
   BARĂ DE CĂUTARE ȘI ALINIERE BUTOANE HEADERS
---------------------------------------------------- */
.action-buttons {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.search-box-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  margin: 0 !important;
}

.search-box-wrap.full-width {
  width: 100% !important;
}

.search-box-wrap .search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.search-input {
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid var(--border-color) !important;
  color: #fff !important;
  padding: 10px 14px 10px 36px !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: 0.88rem !important;
  outline: none !important;
  width: 220px !important;
  transition: all 0.2s !important;
}

.search-input:focus {
  border-color: var(--cyan-accent) !important;
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2) !important;
}

.search-input.full-width {
  width: 100% !important;
}

/* ----------------------------------------------------
   STILURI MODAL GESTIUNE TIPURI TONERE & APARATE
---------------------------------------------------- */
.modal-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg);
}

.manage-tabs-bar {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  flex-shrink: 0;
}

.manage-tab-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.manage-tab-btn:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #fff;
}

.manage-tab-btn.active {
  background: rgba(2, 132, 199, 0.2);
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.3);
}

.manage-view {
  display: block;
}

.manage-view.hidden {
  display: none !important;
}

.manage-card-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
}

.selected-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 42px;
  max-height: 120px;
  overflow-y: auto;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3) 0%, rgba(56, 189, 248, 0.2) 100%);
  border: 1px solid #38bdf8;
  color: #f0f9ff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
}

.selected-chip.magenta {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.3) 0%, rgba(244, 114, 182, 0.2) 100%);
  border-color: #f472b6;
}

.chip-remove-btn {
  cursor: pointer;
  color: #ef4444;
  font-weight: 700;
  font-size: 0.95rem;
  margin-left: 4px;
  transition: color 0.15s;
}
.chip-remove-btn:hover {
  color: #ff8080;
}

.compatibility-picker-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
  gap: 10px !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  padding: 12px !important;
  background: rgba(9, 13, 22, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
}

.checkbox-card {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: rgba(30, 41, 59, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-size: 0.88rem !important;
  color: #f1f5f9 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
}

.checkbox-card:hover {
  background: rgba(2, 132, 199, 0.2) !important;
  border-color: #38bdf8 !important;
}

.checkbox-card input[type="checkbox"] {
  accent-color: #00f2fe !important;
  width: 17px !important;
  height: 17px !important;
  cursor: pointer !important;
}

.btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #0f172a;
  font-weight: 700;
  border: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  color: #fff;
  transform: translateY(-1px);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.inactive {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ----------------------------------------------------
   STILURI VIBRANTE CULORI TONERE (CYAN, MAGENTA, YELLOW, BLACK)
---------------------------------------------------- */
.toner-color-text {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.toner-color-cyan {
  color: #38bdf8 !important;
  background: rgba(2, 132, 199, 0.18) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
}

.toner-color-magenta {
  color: #f472b6 !important;
  background: rgba(219, 39, 119, 0.18) !important;
  border: 1px solid rgba(244, 114, 182, 0.35) !important;
}

.toner-color-yellow {
  color: #facc15 !important;
  background: rgba(234, 179, 8, 0.2) !important;
  border: 1px solid rgba(250, 204, 21, 0.45) !important;
}

.toner-color-black {
  color: #e2e8f0 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* WIZARD & PICKER CARD COLORS */
.card-color-yellow {
  border-color: rgba(250, 204, 21, 0.5) !important;
  background: rgba(234, 179, 8, 0.12) !important;
}
.card-color-yellow:hover {
  border-color: #facc15 !important;
  background: rgba(234, 179, 8, 0.25) !important;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.35) !important;
}

.card-color-cyan {
  border-color: rgba(56, 189, 248, 0.5) !important;
  background: rgba(2, 132, 199, 0.12) !important;
}
.card-color-cyan:hover {
  border-color: #38bdf8 !important;
  background: rgba(2, 132, 199, 0.25) !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

.card-color-magenta {
  border-color: rgba(244, 114, 182, 0.5) !important;
  background: rgba(219, 39, 119, 0.12) !important;
}
.card-color-magenta:hover {
  border-color: #f472b6 !important;
  background: rgba(219, 39, 119, 0.25) !important;
  box-shadow: 0 0 16px rgba(244, 114, 182, 0.35) !important;
}

.card-color-black {
  border-color: rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
.card-color-black:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* ----------------------------------------------------
   STILURI BUTOANE ACȚIUNI ÎN TABELE (TRANSPARENTE, FĂRĂ SUPRAPUNERE)
---------------------------------------------------- */
td.action-cell,
.action-buttons-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.btn-sm {
  padding: 6px 14px !important;
  font-size: 0.82rem !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.btn-outline-warning {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
.btn-outline-warning:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25) !important;
}

.btn-outline-danger {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.35) !important;
}
.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25) !important;
}

.btn-outline-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
.btn-outline-success:hover {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25) !important;
}

/* ----------------------------------------------------
   CLASE UTILITARE FORMULARE RESPONSIVE
---------------------------------------------------- */
.form-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

#modal-new-user .modal-card,
#modal-edit-user .modal-card {
  max-width: 740px !important;
}

.full-span {
  grid-column: 1 / -1;
}

/* Derulare Nativă Touch Fluidă pe iOS/Android */
.table-card,
.manage-card-box,
.selected-chips-container,
.compatibility-picker-grid,
.wizard-modal-card,
.modal-card,
.modal-overlay,
.app-nav {
  -webkit-overflow-scrolling: touch;
}

/* Stilizare Scrollbar Personalizat Fin pentru Touch & Desktop */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* ----------------------------------------------------
   RESPONSIVITATE TABLETE (ANDROID & IOS)
   Adaptare pentru 1024px, 768px, Portret și Peisaj
---------------------------------------------------- */
@media (max-width: 1024px) {
  /* Modale pe Tabletă */
  .modal-overlay {
    padding: 16px 8px 48px 8px !important;
  }
  
  .wizard-modal-card {
    width: 98vw;
    max-width: 98vw;
    padding: 20px 16px;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .modal-card {
    max-width: 96vw;
    padding: 20px 16px;
    margin-top: 0;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .modal-footer, .wizard-footer {
    padding-top: 12px;
    padding-bottom: 8px;
    position: sticky;
    bottom: 0;
    background: inherit;
    z-index: 10;
    box-shadow: 0 -10px 20px rgba(15, 23, 42, 0.9);
  }

  /* Header & Navigare */
  .app-header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-left {
    gap: 12px;
    flex-wrap: wrap;
  }

  .header-title {
    font-size: 1rem;
  }

  .office-selector-wrap {
    padding: 4px 10px;
  }

  .app-nav {
    padding: 10px 16px;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
  }

  .nav-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  /* Keypad Login PIN */
  .auth-card {
    padding: 28px 20px;
  }

  .key-btn {
    padding: 14px 10px;
    font-size: 1.3rem;
  }

  /* Tabele cu derulare orizontală pe touch */
  .table-card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  table.custom-table {
    min-width: 680px;
  }

  /* Wizard Pași Bară */
  .wizard-steps-bar {
    padding: 10px 14px;
    gap: 8px;
  }

  .step-title {
    font-size: 0.8rem;
  }

  .step-connector {
    margin: 0 4px;
  }

  /* Gride Formular */
  .form-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Trecere formulare pe o singură coloană pe tablete în portret sau mobile */
  .form-grid-2col,
  .form-grid-3col {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .full-span {
    grid-column: 1 !important;
  }

  .action-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .action-buttons .search-box-wrap,
  .action-buttons .search-input,
  .action-buttons .btn {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .app-header {
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .header-title {
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .header-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .office-selector-wrap {
    width: 100%;
    padding: 6px 10px;
  }

  .office-selector-wrap select {
    width: 100%;
  }

  /* Ajustare butoane mari pentru utilizare ușoară cu degetul (touch targets min 44px) */
  .btn {
    min-height: 44px;
    padding: 10px 16px;
  }

  .form-group input,
  .form-group select {
    min-height: 44px;
    font-size: 16px !important; /* Previne auto-zoom nesuferit pe iOS Safari */
  }

  .wizard-steps-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .step-connector {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .aparate-grid,
  .tonere-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 20px 14px;
    border-radius: 16px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .keypad-grid {
    gap: 8px;
  }

  .key-btn {
    padding: 12px 6px;
    font-size: 1.15rem;
    border-radius: 10px;
  }

  .wizard-modal-card,
  .modal-card {
    padding: 0;
    border-radius: 14px;
    width: 98vw;
    max-width: 98vw;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .section-header button {
    width: 100%;
  }

  .aparate-grid,
  .tonere-grid {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------
   ADAPTARE SPECIALĂ MOD PEISAJ / LANDSCAPE (DE-A LATUL)
---------------------------------------------------- */
@media (max-height: 650px) {
  #auth-screen.active {
    padding: 12px 16px !important;
    justify-content: center !important;
    align-items: center !important;
    overflow-y: auto;
  }

  .auth-card {
    padding: 18px 24px;
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    margin: auto !important;
  }

  .brand-header {
    margin-bottom: 10px;
  }

  .auth-tabs, .role-selector-tabs {
    margin-bottom: 10px;
  }

  .keypad-grid {
    gap: 6px;
    margin-bottom: 10px;
  }

  .key-btn {
    padding: 8px 4px;
    font-size: 1.1rem;
    border-radius: 8px;
  }

  .modal-card {
    max-height: calc(100dvh - 16px);
  }

  .wizard-modal-card {
    max-height: calc(100dvh - 16px);
  }

  .modal-header, .wizard-header {
    padding: 10px 16px;
  }

  .modal-body, .wizard-body, .manage-body {
    padding: 12px 16px;
  }

  .modal-footer, .wizard-footer {
    padding: 8px 16px;
  }
}






