/* ============================================================
   Dairy Baroud — Main Stylesheet
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-lighter: #dbeafe;
  --primary-dark: #1e3a8a;
  --success: #059669;
  --success-light: #d1fae5;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --info: #0891b2;
  --info-light: #cffafe;
  --bg: #f1f5f9;
  --card: #ffffff;
  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1e40af;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --sidebar-width: 260px;
  --header-height: 64px;
  --transition: .2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── RTL ── */
body.rtl { direction: rtl; }
body.rtl .sidebar { left: auto; right: 0; }
body.rtl .main-content { margin-left: 0; margin-right: var(--sidebar-width); }
body.rtl .header { left: 0; right: var(--sidebar-width); }
body.rtl .hamburger { left: auto; right: 16px; }
body.rtl .sidebar .nav-link i { margin-right: 0; margin-left: 12px; }
body.rtl .modal-close { right: auto; left: 20px; }
body.rtl .stat-icon { right: auto; left: 20px; }
body.rtl .qc-indicator { right: auto; left: 8px; }
body.rtl .toast { right: auto; left: 24px; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,.15) 0%, transparent 70%);
  top: -200px; right: -200px;
  border-radius: 50%;
}
.login-page::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(5,150,105,.1) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
}
.login-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 25px 60px rgba(0,0,0,.3);
  position: relative;
  z-index: 2;
}
.login-card .logo-area {
  text-align: center;
  margin-bottom: 32px;
}
.login-card .logo-area .logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(30,64,175,.3);
}
.login-card .logo-area .logo-icon i { font-size: 28px; color: #fff; }
.login-card .logo-area h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.login-card .logo-area p {
  color: var(--text-secondary);
  font-size: .9rem;
}
.login-card .form-group {
  margin-bottom: 20px;
  position: relative;
}
.login-card .form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.login-card .form-group input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .95rem;
  transition: var(--transition);
  background: var(--bg);
  color: var(--text);
}
.login-card .form-group input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
  background: #fff;
}
.login-card .form-group .input-icon {
  position: absolute;
  left: 14px; bottom: 13px;
  color: var(--text-light);
  font-size: 1rem;
}
body.rtl .login-card .form-group .input-icon {
  left: auto; right: 14px;
}
body.rtl .login-card .form-group input {
  padding: 12px 44px 12px 16px;
}
.login-card .btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(30,64,175,.3);
}
.login-card .btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,64,175,.4);
}
.login-card .error-msg {
  text-align: center;
  color: var(--danger);
  font-size: .85rem;
  margin-top: 12px;
  font-weight: 500;
}
.login-lang-switch {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.login-lang-switch a {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  transition: var(--transition);
}
.login-lang-switch a:hover, .login-lang-switch a.active {
  color: var(--primary);
  background: var(--primary-lighter);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--success));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-brand .brand-icon i { color: #fff; font-size: 18px; }
.sidebar-brand h2 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}
.sidebar-brand span {
  display: block;
  color: var(--text-light);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-nav .nav-section {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 16px 12px 8px;
}
.nav-link {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
}
.nav-link i {
  width: 20px;
  text-align: center;
  margin-right: 12px;
  font-size: 1rem;
  opacity: .7;
}
.nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.nav-link:hover i { opacity: 1; }
.nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30,64,175,.4);
}
.nav-link.active i { opacity: 1; }
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer .nav-link { color: #94a3b8; }
.sidebar-footer .nav-link:hover { color: #f87171; background: rgba(248,113,113,.1); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 900;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-left h1 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-xs);
}
.hamburger:hover { background: var(--border-light); }
.header-right { display: flex; align-items: center; gap: 16px; }
.lang-switch {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: var(--radius-xs);
}
.lang-switch a {
  padding: 5px 10px;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 4px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.lang-switch a:hover { color: var(--primary); }
.lang-switch a.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: default;
}
.user-info .avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
}
.user-info .user-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  padding-top: var(--header-height);
  min-height: 100vh;
}
.page-content {
  padding: 28px;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-light);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stat-card .stat-icon {
  position: absolute;
  top: 20px; right: 20px;
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.stat-card .stat-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.stat-card .stat-sub {
  font-size: .8rem;
  color: var(--text-light);
  margin-top: 4px;
}
.stat-icon.blue { background: var(--primary-lighter); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.amber { background: var(--warning-light); color: var(--warning); }
.stat-icon.cyan { background: var(--info-light); color: var(--info); }

/* ============================================================
   CARDS & TABLES
   ============================================================ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
  overflow: hidden;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.card-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
}
.card-body { padding: 24px; }
.card-body.no-pad { padding: 0; }

.table-responsive { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
table th, table td {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
body.rtl table th, body.rtl table td { text-align: right; }
table th {
  background: var(--bg);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
table td {
  border-bottom: 1px solid var(--border-light);
  font-size: .88rem;
  color: var(--text);
}
table tbody tr:hover { background: #f8fafc; }
table tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  gap: 4px;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-secondary { background: var(--bg); color: var(--text-secondary); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn i { font-size: .9rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,64,175,.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(30,64,175,.35);
}
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-lighter);
}
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.btn-icon:hover { background: var(--bg); color: var(--primary); }
.btn-icon.danger:hover { color: var(--danger); background: var(--danger-light); }

/* ============================================================
   FORMS
   ============================================================ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.form-group {
  margin-bottom: 0;
}
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.form-group label .required { color: var(--danger); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  transition: var(--transition);
  background: #fff;
  color: var(--text);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }
select.form-control { appearance: auto; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-text { font-size: .75rem; color: var(--text-light); margin-top: 4px; }

/* ============================================================
   QC FORM — PARAMETER ROW
   ============================================================ */
.qc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.qc-param {
  position: relative;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.qc-param.passed { border-color: var(--success); background: rgba(5,150,105,.03); }
.qc-param.failed { border-color: var(--danger); background: rgba(220,38,38,.03); }
.qc-param label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qc-param label .range {
  font-size: .65rem;
  font-weight: 500;
  color: var(--text-light);
  text-transform: none;
}
.qc-param input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: .95rem;
  font-weight: 600;
  transition: var(--transition);
}
.qc-param input:focus {
  outline: none;
  border-color: var(--primary-light);
}
.qc-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  color: #fff;
}
.qc-indicator.pass { background: var(--success); }
.qc-indicator.fail { background: var(--danger); }

/* ============================================================
   CAMERA / SCALE PHOTO
   ============================================================ */
.camera-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  position: relative;
  background: var(--bg);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.camera-area i { font-size: 2.5rem; color: var(--text-light); }
.camera-area p { font-size: .85rem; color: var(--text-secondary); }
.camera-area video,
.camera-area img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
}
.camera-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   TANK CARDS
   ============================================================ */
.tanks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.tank-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  padding: 24px;
  transition: var(--transition);
}
.tank-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.tank-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tank-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
}
.tank-card-header .tank-actions { display: flex; gap: 6px; }
.tank-visual {
  position: relative;
  height: 140px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
  border: 2px solid var(--border);
}
.tank-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, rgba(59,130,246,.3), rgba(59,130,246,.6));
  transition: height .6s ease;
  border-radius: 0 0 6px 6px;
}
.tank-fill-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  z-index: 2;
}
.tank-info {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--text-secondary);
}
.tank-info span strong { color: var(--text); font-weight: 600; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.show { display: flex; }
.swal2-container {
  z-index: 5000 !important;
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  z-index: 3000;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ============================================================
   RECEPTION DETAIL VIEW
   ============================================================ */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.detail-item {
  padding: 12px 0;
}
.detail-item .detail-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 4px;
}
.detail-item .detail-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

/* ============================================================
   STEPPER (reception form sections)
   ============================================================ */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 20px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: var(--text-light);
  background: #fff;
  transition: var(--transition);
  flex-shrink: 0;
}
.step.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.step.done .step-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}
.step-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}
.step.active .step-label { color: var(--primary); }
.step.done .step-label { color: var(--success); }
.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  flex-shrink: 0;
}
.step-line.done { background: var(--success); }

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

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-light);
}
.empty-state i { font-size: 3rem; margin-bottom: 12px; display: block; }
.empty-state p { font-size: .95rem; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }
  .sidebar {
    transform: translateX(-280px);
    width: 280px;
  }
  body.rtl .sidebar { transform: translateX(280px); }
  .sidebar.open { transform: translateX(0) !important; }
  .hamburger { display: block; }
  .header {
    left: 0 !important;
    right: 0 !important;
    padding: 0 16px;
  }
  .main-content {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .page-content { padding: 16px; }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .stat-card { padding: 16px; }
  .stat-card .stat-value { font-size: 1.4rem; }
  .stat-card .stat-icon { width: 36px; height: 36px; font-size: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .qc-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tanks-grid { grid-template-columns: 1fr; }
  .stepper { flex-wrap: wrap; gap: 8px; }
  .step-line { width: 24px; }
  .step-label { display: none; }
  .modal { margin: 12px; max-height: 95vh; }
  .card-header { padding: 16px; }
  .card-body { padding: 16px; }
  .user-info .user-name { display: none; }
  table th, table td { padding: 10px 12px; font-size: .82rem; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
  .login-card { padding: 32px 24px; margin: 16px; }
}

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

/* Sidebar overlay on mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
