/* =============================================================
 * InfoTroop CCTV BOM Generator – Enterprise Portal Theme v3
 * Adapted from InfoTroop Managed IT Services portal
 * Primary: #2563eb · Sidebar: #0b1120 · Card: #fff
 * ============================================================= */

/* ---- Aptos / Calibri / Segoe UI font stack ---- */
@font-face {
  font-family: "Aptos";
  src: local("Aptos"), local("Aptos Regular");
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: "Aptos";
  src: local("Aptos Medium");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Aptos";
  src: local("Aptos SemiBold");
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: "Aptos";
  src: local("Aptos Bold");
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: "Aptos";
  src: local("Aptos ExtraBold");
  font-weight: 800;
  font-style: normal;
}

:root {
  /* Brand */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #6366f1;

  --sidebar-bg: #0b1120;
  --sidebar-w: 232px;
  --navbar-h: 56px;

  --dark: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;

  --sidebar-text: rgba(255, 255, 255, 0.65);
  --sidebar-active: #2563eb;
  --sidebar-hover: rgba(255, 255, 255, 0.07);
  --sidebar-line: rgba(255, 255, 255, 0.08);

  /* Legacy aliases (existing pages reference --brand etc.) */
  --brand: #2563eb;
  --brand-2: #1d4ed8;
  --brand-light: #eff6ff;
  --brand-dark: #0b1120;
  --brand-grad: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
  --brand-grad-soft: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --brand-grad-cool: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
  --shadow-brand: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* ============== BASE ============== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.app-body {
  margin: 0;
  font-family:
    "Aptos",
    "Aptos Regular",
    "Calibri",
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  overflow-x: hidden;
}
a {
  text-decoration: none;
  color: inherit;
}

/* ============== SIDEBAR (fixed, dark navy) ============== */
.app-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(37, 99, 235, 0.25);
  transition: transform 0.3s ease;
}
.app-sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-brand {
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--sidebar-line);
  flex-shrink: 0;
}
.sidebar-brand img {
  height: 47px;
  width: auto;
  /* filter: brightness(0) invert(1); makes logo white on dark */
}

.sidebar-inner {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 12px;
}
.sidebar-inner::-webkit-scrollbar {
  width: 4px;
}
.sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.sidebar-inner .nav {
  padding: 0;
  margin: 0;
  list-style: none;
}
.sidebar-inner .nav-item {
  list-style: none;
}
.sidebar-inner .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  cursor: pointer;
  transition: all 0.18s;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
  margin: 1px 0;
}
.sidebar-inner .nav-link i {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.55);
  transition: all 0.18s;
}
.sidebar-inner .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.sidebar-inner .nav-link:hover i {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.sidebar-inner .nav-link.active {
  background: var(--primary);
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.sidebar-inner .nav-link.active i {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.4) !important;
  margin: 14px 10px 4px;
  padding: 0;
}

.sidebar-footer {
  padding: 10px 8px;
  flex-shrink: 0;
  border-top: 1px solid var(--sidebar-line);
  text-align: center;
}
.sidebar-footer hr {
  display: none;
}
.sidebar-footer .text-brand,
.sidebar-footer .fw-semibold {
  color: #fff !important;
  font-weight: 700;
  font-size: 12px;
}
.sidebar-footer .text-muted {
  color: rgba(255, 255, 255, 0.35) !important;
  font-size: 10.5px;
}

/* ============== NAVBAR (fixed, white) ============== */
.app-navbar {
  height: var(--navbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 12px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}
.app-navbar .navbar-brand {
  display: none; /* brand lives in sidebar */
}
.app-navbar .nav-link,
.app-navbar .btn-link {
  color: var(--muted);
}
.app-navbar #sidebarToggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  padding: 6px;
  border-radius: 7px;
  transition: background 0.2s;
}
.app-navbar #sidebarToggle:hover {
  background: var(--bg);
  color: var(--text);
}

.app-navbar .navbar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}
.app-navbar .navbar-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.app-navbar .btn-outline-light {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted) !important;
}
.app-navbar .btn-outline-light:hover {
  background: var(--bg);
  color: var(--text) !important;
  border-color: var(--border);
}
.app-navbar .btn-light {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.app-navbar .btn-light:hover {
  background: var(--bg);
}

.app-navbar .dropdown-menu {
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  padding: 6px;
  min-width: 220px;
}
.app-navbar .dropdown-divider {
  margin: 4px 0;
}
.app-navbar .dropdown-item {
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 14px;
}
.app-navbar .dropdown-item:hover {
  background: var(--bg);
}

/* ============== LAYOUT ============== */
.app-shell {
  /* wrapper kept as a no-op flex container; main content uses margin-left */
  display: block;
  min-height: calc(100vh - var(--navbar-h));
}
.app-main {
  margin-left: var(--sidebar-w);
  padding: calc(var(--navbar-h) + 22px) 24px 24px;
  min-height: 100vh;
  min-width: 0;
}

/* ============== STAT CARDS ============== */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: none;
  display: block;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.stat-1::after {
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}
.stat-2::after {
  background: var(--success);
}
.stat-3::after {
  background: var(--warning);
}
.stat-4::after {
  background: #8b5cf6;
}

.stat-card .stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 22px;
  background: var(--primary-light) !important;
  color: var(--primary) !important;
  box-shadow: none;
}
.stat-1 .stat-icon {
  background: #dbeafe !important;
  color: #2563eb !important;
}
.stat-2 .stat-icon {
  background: #d1fae5 !important;
  color: #059669 !important;
}
.stat-3 .stat-icon {
  background: #fef3c7 !important;
  color: #d97706 !important;
}
.stat-4 .stat-icon {
  background: #ede9fe !important;
  color: #7c3aed !important;
}

/* ============== CARDS ============== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  overflow: hidden;
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
  color: var(--dark);
  padding: 14px 18px;
}
.card-header i {
  color: var(--primary);
  margin-right: 4px;
}
.card-body {
  padding: 18px;
}

/* ============== BUTTONS ============== */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: inherit;
  transition: all 0.18s;
}
.btn-primary {
  background: var(--primary);
  border: 0;
  color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-dark);
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

.btn-success {
  background: var(--success);
  border: 0;
  color: #fff;
}
.btn-success:hover {
  background: #059669;
  color: #fff;
}
.btn-info {
  background: var(--accent);
  border: 0;
  color: #fff;
}
.btn-info:hover {
  background: #0891b2;
  color: #fff;
}
.btn-warning {
  background: var(--warning);
  border: 0;
  color: #fff;
}
.btn-warning:hover {
  background: #d97706;
  color: #fff;
}
.btn-danger {
  background: var(--danger);
  border: 0;
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

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

.btn-outline-success {
  border: 1.5px solid var(--success);
  color: var(--success);
  background: transparent;
}
.btn-outline-success:hover {
  background: var(--success);
  color: #fff;
}
.btn-outline-danger {
  border: 1.5px solid var(--danger);
  color: var(--danger);
  background: transparent;
}
.btn-outline-danger:hover {
  background: var(--danger);
  color: #fff;
}
.btn-outline-info {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn-outline-info:hover {
  background: var(--accent);
  color: #fff;
}
.btn-outline-dark {
  border: 1.5px solid var(--dark);
  color: var(--dark);
  background: transparent;
}
.btn-outline-dark:hover {
  background: var(--dark);
  color: #fff;
}

/* ============== TABLES ============== */
.table {
  margin-bottom: 0;
  font-size: 14px;
  color: var(--text);
}
.table thead th {
  background: #f8fafc !important;
  color: var(--muted) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 11px 14px;
  white-space: nowrap;
}
.table tbody td {
  padding: 11px 14px;
  border-color: #f1f5f9;
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table-hover tbody tr:hover {
  background: #f8fafc;
}
.table-bordered {
  border-color: var(--border);
}
.table-bordered td,
.table-bordered th {
  border-color: #f1f5f9;
}
.table-light {
  background: #f8fafc;
}
.table-light th {
  background: #f8fafc !important;
}

/* ============== FORM CONTROLS ============== */
.form-control,
.form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 14.5px;
  color: var(--text);
  background: #fff;
  font-family: inherit;
  transition: all 0.2s;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  outline: none;
}
.form-label {
  font-weight: 600;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 5px;
}
.form-control-sm,
.form-select-sm {
  padding: 6px 9px;
  font-size: 13.5px;
  border-radius: 6px;
}
.form-control.bg-light {
  background: #f8fafc !important;
}

/* Input groups */
.input-group-text {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-right: 0;
  color: var(--muted);
}
.input-group .form-control {
  border-left: 0;
}
.input-group .form-control:focus {
  border-left: 0;
}

/* ============== BADGES ============== */
.badge {
  font-weight: 600;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
}
.badge.bg-primary {
  background: #dbeafe !important;
  color: #1e40af !important;
}
.badge.bg-success {
  background: #d1fae5 !important;
  color: #065f46 !important;
}
.badge.bg-info {
  background: #cffafe !important;
  color: #155e75 !important;
}
.badge.bg-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}
.badge.bg-danger {
  background: #fee2e2 !important;
  color: #991b1b !important;
}
.badge.bg-secondary {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

/* ============== ALERTS ============== */
.alert {
  border: 0;
  border-left: 3.5px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14px;
}
.alert-info {
  background: #e0f2fe;
  color: #0369a1;
  border-left-color: #0ea5e9;
}
.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left-color: var(--success);
}
.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-left-color: var(--warning);
}
.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-left-color: var(--danger);
}

/* ============== LOGIN PAGE ============== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
  background: #fff;
}
.login-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 70% at 50% 50%,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0) 60%,
      rgba(240, 245, 255, 0.6) 100%
    ),
    radial-gradient(
      ellipse 60% 50% at 15% 10%,
      rgba(219, 234, 254, 0.45) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 55% 45% at 88% 92%,
      rgba(224, 242, 254, 0.35) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse 40% 40% at 80% 8%,
      rgba(238, 242, 255, 0.4) 0%,
      transparent 50%
    );
}
.login-mask::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.055) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
}
.login-mask::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  height: 22%;
  background: radial-gradient(
    ellipse 70% 100% at 50% 50%,
    rgba(37, 99, 235, 0.05) 0%,
    transparent 100%
  );
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 980px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  z-index: 2;
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 6px 12px rgba(0, 0, 0, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.08),
    0 36px 64px rgba(0, 0, 0, 0.09),
    0 64px 96px rgba(37, 99, 235, 0.12);
  transform: translateY(-4px);
}

.login-left {
  background: linear-gradient(155deg, #1a3a8f 0%, #0f1f5c 40%, #080e2a 100%);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.login-left::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.3) 0%,
    transparent 70%
  );
}
.login-left::after {
  content: "";
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(6, 182, 212, 0.2) 0%,
    transparent 70%
  );
}
.login-left > * {
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.login-brand img {
  height: 60px;
  width: auto;
  /*filter: brightness(0) invert(1);*/
}
.login-headline {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 10px;
}
.login-headline span {
  color: #60a5fa;
}
.login-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.65;
  max-width: 380px;
}

.login-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 32px;
}
.login-feat {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
.login-feat i {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #60a5fa;
}

.login-copyright {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 24px;
}

.login-right {
  background: #fff;
  padding: 52px 44px;
}
.login-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--dark);
  margin: 0 0 4px;
}
.login-desc {
  font-size: 14.5px;
  color: var(--muted);
  margin-bottom: 28px;
}
.login-right .form-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.login-right .form-control {
  padding: 10px 14px;
  font-size: 14.5px;
}
.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  border: 0;
  border-radius: 9px;
  padding: 12px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 6px;
  transition: all 0.2s;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.demo-pills {
  margin-top: 20px;
}
.demo-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.demo-pill code {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}
.demo-pill .role {
  color: var(--muted);
  font-weight: 500;
  margin-left: auto;
}

.login-bottom {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 28px;
}

/* ============== BOM PRINT / VIEW ============== */
.bom-print {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 32px;
}
.bom-header {
  background: linear-gradient(135deg, #1a3a8f 0%, #0f1f5c 50%, #080e2a 100%);
  color: #fff;
  margin: -32px -32px 24px;
  padding: 24px 32px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  overflow: hidden;
}
.bom-header::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.3) 0%,
    transparent 70%
  );
  pointer-events: none;
}
.bom-header > * {
  position: relative;
  z-index: 1;
}
.bom-header img.bom-logo {
  height: 44px;
  width: auto;
  /* filter: brightness(0) invert(1); */
  margin-bottom: 10px;
}
.bom-header .company-info {
  font-size: 12.5px;
  opacity: 0.9;
  line-height: 1.6;
}
.bom-header .company-info strong {
  font-size: 16px;
  opacity: 1;
  display: block;
  margin-bottom: 4px;
}
.bom-header .quote-box {
  text-align: right;
  background: rgba(255, 255, 255, 0.08);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  min-width: 220px;
  font-size: 13px;
}
.bom-header .quote-box h4 {
  color: #fff;
  font-weight: 700;
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 1.2px;
}

/* ============== WIZARD ============== */
.wizard-progress {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: var(--card);
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.wizard-step {
  flex: 1;
  min-width: 90px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  background: #fff5d6;
  /* background: #f8fafc; */
  border: 1px solid #fff5d6;
  text-align: center;
  font-size: 15px !important;
  font-weight: bold !important;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}
.wizard-step .badge-num {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffc107;
  color: var(--muted);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-right: 6px;
  font-size: 11px;
}
.wizard-step:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.wizard-step.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-brand);
}
.wizard-step.active .badge-num {
  background: #fff;
  color: var(--primary);
}
.wizard-step.completed {
  background: #d1fae5;
  border-color: var(--success);
  color: #065f46;
}
.wizard-step.completed .badge-num {
  background: var(--success);
  color: #fff;
}

.wizard-pane {
  display: none;
}
.wizard-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Form section header */
.form-sect-head {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 13px 20px;
  font-weight: 700;
  font-size: 15px;
}

/* ============== UTILITY ============== */
.text-brand {
  color: var(--primary) !important;
}
.text-primary {
  color: var(--primary) !important;
}
.bg-brand {
  background: var(--primary) !important;
  color: #fff !important;
}
.border-brand {
  border-color: var(--primary) !important;
}

/* Disable Bootstrap's default shadow-sm everywhere */
.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}
.shadow {
  box-shadow: var(--shadow-md) !important;
}

/* ============== MOBILE ============== */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show,
  .app-sidebar.mobile-open {
    transform: translateX(0);
  }
  .app-navbar {
    left: 0;
  }
  .app-main {
    margin-left: 0;
    padding: calc(var(--navbar-h) + 16px) 16px 16px;
  }

  .wizard-progress {
    gap: 4px;
    padding: 6px;
  }
  .wizard-step {
    min-width: 0;
    flex-basis: calc(33.333% - 4px);
    font-size: 11px;
    padding: 6px 4px;
  }
  .wizard-step .badge-num {
    width: 18px;
    height: 18px;
    font-size: 10px;
    margin-right: 3px;
  }

  .wizard-pane {
    padding: 16px 14px 100px !important;
  }
  .wizard-nav-sticky {
    padding: 10px 14px !important;
  }

  .login-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }
  .login-left {
    display: none;
  }
  .login-right {
    padding: 36px 28px;
  }

  .bom-header {
    flex-direction: column;
    align-items: stretch;
  }
  .bom-header .quote-box {
    text-align: left;
  }
}

/* Editable rows polish */
.editable-table {
  font-size: 13.5px;
}
.editable-table tbody tr:hover {
  background: var(--primary-light);
}
.editable-table .form-control-sm,
.editable-table .form-select-sm {
  font-size: 13px;
  padding: 5px 8px;
}

/* ============== PRINT ============== */
@media print {
  .app-navbar,
  .app-sidebar,
  .no-print,
  .wizard-nav-sticky {
    display: none !important;
  }
  .app-main {
    margin: 0;
    padding: 0;
  }
  body.app-body {
    background: #fff;
  }
  .bom-print {
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  .bom-header,
  .form-sect-head,
  .table thead th,
  .stat-card::after {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
