/* ═══════════════════════════════════════════════════════════════
   InfraTrack Enterprise v4.0 — Complete Design System
   GDPR-Compliant | Security-Hardened | Professional SaaS UI
   ═══════════════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --primary: #0b84ff;
  --primary-hover: #006fe6;
  --primary-soft: rgba(11,132,255,.08);
  --primary-border: rgba(11,132,255,.20);
  --accent: #6c63ff;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --info-soft: #dbeafe;

  --bg: #f0f4f9;
  --bg2: #e8edf5;
  --card: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --muted2: #94a3b8;
  --line: #e2eaf4;
  --line2: #edf2f7;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 4px rgba(15,23,42,.05);
  --shadow-sm: 0 4px 14px rgba(15,23,42,.06);
  --shadow: 0 8px 28px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.12);

  --sidebar-w: 268px;
  --topbar-h: 66px;
  --transition: .2s cubic-bezier(.4,0,.2,1);

  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── SIDEBAR ── */
.side {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 100;
  overflow: hidden;
}
.side-inner {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 0 14px 20px;
}
.side-inner::-webkit-scrollbar { display: none; }

/* Brand */
.brand {
  display: flex; gap: 11px; align-items: center;
  padding: 20px 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand .logo {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #00a7d8);
  color: #fff; font-weight: 900; font-size: 15px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(11,132,255,.28);
  flex-shrink: 0;
}
.brand .logo.brand-logo-img {
  background: #fff !important;
  border: 1px solid var(--line);
  padding: 5px;
  box-shadow: var(--shadow-xs);
}
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand b { font-size: 15px; font-weight: 800; display: block; line-height: 1.2; }
.brand small { font-size: 11px; color: var(--muted); display: block; margin-top: 2px; }

/* Nav sections */
.nav-label {
  font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted2);
  padding: 20px 8px 8px;
  display: block;
}
.side nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.side nav a, .side a {
  display: flex; gap: 9px; align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-weight: 600; font-size: 13.5px;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}
.side nav a span, .side a span { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.side nav a:hover, .side a:hover {
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateX(2px);
}
.side nav a.active, .side a.active {
  background: linear-gradient(90deg, var(--primary-soft), rgba(11,132,255,.04));
  color: var(--primary);
  font-weight: 800;
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}

/* Sidebar bottom user card */
.side-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.side-user {
  display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: var(--transition);
}
.side-user:hover { background: var(--primary-soft); }
.side-user-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 900; font-size: 13px;
  display: grid; place-items: center; flex-shrink: 0;
}
.side-user-info { flex: 1; min-width: 0; }
.side-user-info b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-info small { display: block; font-size: 11px; color: var(--muted); }

/* ── TOPBAR ── */
.appbar {
  position: fixed; left: var(--sidebar-w); right: 0; top: 0;
  height: var(--topbar-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; gap: 16px;
  z-index: 90;
}
.global-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  width: min(480px, 44vw);
  transition: var(--transition);
}
.global-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background: #fff;
}
.global-search span { color: var(--muted); font-size: 16px; }
.global-search input {
  border: 0; background: transparent; outline: 0;
  width: 100%; font: inherit; color: var(--text);
  font-size: 13.5px;
}
.app-actions { display: flex; align-items: center; gap: 10px; }
.topbar-bell {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer;
  transition: var(--transition); position: relative;
  font-size: 16px;
}
.topbar-bell:hover { background: var(--primary-soft); border-color: var(--primary-border); }
.topbar-bell .badge-dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid #fff;
}
.org-chip {
  background: var(--primary); color: #fff;
  border-radius: 999px; padding: 7px 14px;
  font-size: 12px; font-weight: 800;
  letter-spacing: .01em;
}
.topbar-logout {
  background: var(--bg); color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 11px; padding: 9px 16px;
  font-weight: 700; font-size: 13px;
  cursor: pointer; transition: var(--transition);
  text-decoration: none; display: inline-flex;
  align-items: center; gap: 6px;
}
.topbar-logout:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* ── MAIN LAYOUT ── */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: calc(var(--topbar-h) + 28px) 30px 40px;
}
.login-main {
  min-height: 100vh;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f0f4f9 0%, #e8edf5 100%);
}

/* ── PAGE HEADER ── */
.page-head, .premium-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 26px;
}
.page-head h1 { font-size: 28px; font-weight: 900; letter-spacing: -.03em; margin: 6px 0 0; }
.page-head p { color: var(--muted); margin: 6px 0 0; font-size: 14px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary); font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em; font-size: 11px;
}
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
/* ══════════════════════════════════════════════════════════════════
   UNIFIED BUTTON SYSTEM v4.0
   All buttons in the application use these standards.
   Primary color follows the organization theme automatically.
   ══════════════════════════════════════════════════════════════════ */

/* ── Base: every clickable element EXCEPT the scan FAB ── */
.btn, button:not(.scan-fab-btn),
a.btn, a.proc295-btn, a.proc296-btn,
.proc295-btn, .proc296-btn,
.itx-btn, .proc-btn, .pr-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 10px 18px !important;
  border-radius: var(--radius, 14px) !important;
  font: 700 13.5px/1 var(--font, 'Inter', system-ui, sans-serif) !important;
  cursor: pointer !important;
  border: 1.5px solid transparent !important;
  transition: filter .15s, transform .15s, box-shadow .15s, background .15s !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  letter-spacing: .01em !important;
}

/* ── Primary: org-themed (inherits --primary from branding) ── */
.btn:not(.secondary):not(.danger):not(.ghost):not(.muted):not(.success):not(.warning),
button:not(.scan-fab-btn):not(.secondary):not(.danger):not(.ghost):not(.muted):not(.success):not(.warning):not([type=reset]),
.proc295-btn.primary, .proc296-btn.primary,
.itx-btn.itx-btn-primary, .pr-btn.pr-btn-new {
  background: var(--primary, #0b84ff) !important;
  color: #fff !important;
  border-color: var(--primary, #0b84ff) !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--primary, #0b84ff) 30%, transparent) !important;
}

/* ── Hover state — also exclude FAB ── */
.btn:hover, button:not(.scan-fab-btn):hover,
.proc295-btn:hover, .proc296-btn:hover,
.itx-btn:hover, .proc-btn:hover {
  filter: brightness(.91) !important;
  transform: translateY(-1px) !important;
}
.btn:active, button:not(.scan-fab-btn):active { transform: translateY(0) !important; filter: brightness(.85) !important; }

/* ── Secondary / Ghost: white + border ── */
.btn.secondary, .btn.muted,
.secondary, .btn.ghost,
.proc295-btn.ghost, .proc296-btn.secondary,
.proc295-mini:not(.compare), .proc295-mini.open,
.itx-btn:not(.itx-btn-primary):not(.itx-btn-danger) {
  background: #fff !important;
  color: var(--text, #0f172a) !important;
  border-color: var(--line, #e2eaf4) !important;
  box-shadow: 0 2px 8px rgba(15,23,42,.06) !important;
}
.btn.secondary:hover, .btn.ghost:hover, .btn.muted:hover,
.proc295-btn.ghost:hover, .proc296-btn.secondary:hover {
  background: var(--bg, #f0f4f9) !important;
  border-color: #c8d5e3 !important;
  filter: none !important;
}

/* ── Danger: red ── */
.btn.danger, .danger,
.proc295-btn.danger, .proc296-btn.danger,
.itx-btn.itx-btn-danger,
a.proc295-btn.primary[href*="delete"],
.btn-release, .qe-btn.danger {
  background: #b91c1c !important;
  color: #fff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 4px 14px rgba(185,28,28,.25) !important;
}

/* ── Success: green ── */
.btn.success { background: var(--success, #16a34a) !important; color: #fff !important; border-color: var(--success, #16a34a) !important; box-shadow: 0 4px 14px rgba(22,163,74,.22) !important; }

/* ── Warning ── */
.btn.warning { background: #f59e0b !important; color: #fff !important; border-color: #f59e0b !important; }

/* ── Compare button (special gradient, still follows primary) ── */
.proc295-mini.compare, .proc296-btn.compare,
.btn.compare { 
  background: var(--primary, #0b84ff) !important;
  color: #fff !important;
  border-color: var(--primary, #0b84ff) !important;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary, #0b84ff) 35%, transparent) !important;
}

/* ── Size variants ── */
.btn.sm, .btn.small, .proc295-mini, button.small { padding: 7px 13px !important; font-size: 12.5px !important; border-radius: 10px !important; }
.btn.lg, .btn.large { padding: 13px 24px !important; font-size: 15px !important; border-radius: 16px !important; }

/* ── Mini link-style buttons (table actions) ── */
.mini-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); color: var(--text-2);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); padding: 7px 12px;
  font: 700 12.5px var(--font);

  text-decoration: none; cursor: pointer;
  transition: var(--transition);
}
.mini-btn:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); }
.mini-btn.danger-btn:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }

/* ── CARDS ── */
.card, .panel, .form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.panel, .card { padding: 24px; margin-bottom: 18px; }
.card:hover { box-shadow: var(--shadow-sm); }

/* ── KPI GRID ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
  position: relative; overflow: hidden;
  transition: var(--transition);
}
.kpi-card::after {
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px;
  background: var(--primary-soft);
  border-radius: 50%;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.kpi-icon {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--primary-soft);
  display: grid; place-items: center;
  font-size: 20px; margin-bottom: 14px;
  position: relative; z-index: 1;
}
.kpi-card span { display: block; color: var(--muted); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; }
.kpi-card b { display: block; font-size: 36px; font-weight: 900; letter-spacing: -.04em; margin: 6px 0 4px; }
.kpi-card small { color: var(--muted2); font-size: 12px; }
.kpi-trend { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 3px; }
.kpi-trend.up { background: var(--success-soft); color: var(--success); }
.kpi-trend.down { background: var(--danger-soft); color: var(--danger); }

/* ── TABLES ── */
.table-wrap, .premium-table { overflow: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th {
  text-align: left; font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); background: var(--bg);
  padding: 13px 16px;
}
th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line2); }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafcff; }
tr { transition: var(--transition); }

/* ── FORMS ── */
.form, .form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid { grid-template-columns: repeat(3, 1fr); }
.form .wide, .form-grid .wide { grid-column: 1/-1; }
label { display: block; margin-bottom: 7px; font-weight: 700; font-size: 13px; color: var(--text-2); }
label .required { color: var(--danger); margin-left: 3px; }
input, select, textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  background: #fff;
  font: inherit; color: var(--text);
  transition: var(--transition);
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
input::placeholder { color: var(--muted2); }
.field-hint { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.field-error { border-color: var(--danger) !important; }
.error-msg { color: var(--danger); font-size: 12px; margin-top: 5px; display: block; }

/* ── BADGES ── */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 5px 11px;
  font-size: 11.5px; font-weight: 800;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.badge.available { background: var(--success-soft); color: #166534; }
.badge.assigned { background: var(--info-soft); color: #1d4ed8; }
.badge.maintenance { background: var(--warning-soft); color: #92400e; }
.badge.damaged, .badge.lost { background: var(--danger-soft); color: #991b1b; }
.badge.retired { background: #e5e7eb; color: #374151; }
.badge.active { background: var(--success-soft); color: #166534; }
.badge.inactive { background: #f1f5f9; color: var(--muted); }
.badge.pending { background: var(--warning-soft); color: #92400e; }
.badge.approved { background: var(--success-soft); color: #166534; }
.badge.rejected { background: var(--danger-soft); color: #991b1b; }
.badge.draft { background: #f1f5f9; color: #64748b; }

/* ── ASSET TAG ── */
.asset-tag {
  display: inline-flex; align-items: center;
  background: var(--info-soft); color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 999px; padding: 5px 11px;
  font-weight: 900; font-size: 13px;
}

/* ── ALERTS / FLASH ── */
.alert, .errorbox {
  background: var(--danger-soft); color: #991b1b;
  border: 1px solid #fca5a5; border-radius: var(--radius);
  padding: 13px 16px; margin: 12px 0;
  display: flex; align-items: flex-start; gap: 10px;
}
.okbox {
  background: var(--success-soft); color: #065f46;
  border: 1px solid #86efac; border-radius: var(--radius);
  padding: 13px 16px; margin: 12px 0;
}
.flash-success {
  background: var(--success-soft); color: #065f46;
  border-left: 4px solid var(--success);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 20px;
}
.flash-error {
  background: var(--danger-soft); color: #991b1b;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 20px;
}

/* ── DASHBOARD GRID ── */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 18px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 44px; gap: 12px; align-items: center; margin: 14px 0; }
.bar-row.wide { grid-template-columns: 160px 1fr 52px; }
.bar-row span { font-size: 13px; color: var(--text-2); font-weight: 600; }
.bar-row div { height: 9px; background: var(--line2); border-radius: 999px; overflow: hidden; }
.bar-row i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #00a7d8); border-radius: 999px; transition: width .8s cubic-bezier(.4,0,.2,1); }
.bar-row b { font-weight: 800; color: var(--text); }

/* ── TIMELINE ── */
.timeline { display: grid; gap: 14px; }
.timeline > div { position: relative; padding-left: 30px; }
.timeline > div::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: -18px; width: 2px; background: var(--line); }
.timeline > div:last-child::before { display: none; }
.timeline i {
  position: absolute; left: 0; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.timeline b { display: block; font-size: 13.5px; font-weight: 800; }
.timeline small { display: block; color: var(--muted); margin-top: 2px; font-size: 12px; }
.timeline p { margin: 5px 0 0; color: var(--text-2); font-size: 13px; }

/* ── WATCH LIST ── */
.watch-list { display: grid; gap: 10px; }
.watch-list a {
  display: grid; grid-template-columns: 100px 1fr auto;
  gap: 10px; align-items: center;
  text-decoration: none; color: var(--text);
  padding: 12px 14px;
  border: 1px solid var(--line2); border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}
.watch-list a:hover { border-color: #bfdbfe; background: #f8fbff; }
.watch-list b { font-weight: 800; font-size: 13.5px; }
.watch-list span { color: var(--text-2); font-size: 13px; }
.watch-list em {
  font-style: normal; background: var(--warning-soft);
  color: #9a3412; border-radius: 999px; padding: 5px 10px;
  font-weight: 800; font-size: 12px;
}

/* ── SECTION TITLE ── */
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title h2 { margin: 0; font-size: 17px; font-weight: 800; }
.section-title .muted { color: var(--muted); font-size: 13px; }

/* ── LOGIN CARD ── */
.login-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: min(440px, 94vw);
  box-shadow: var(--shadow-lg);
}
.login-card .brand { justify-content: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.login-card h2 { font-size: 24px; font-weight: 900; text-align: center; margin-bottom: 8px; }
.login-card .login-sub { text-align: center; color: var(--muted); margin-bottom: 28px; font-size: 14px; }
.login-card .btn { width: 100%; padding: 14px; font-size: 15px; }
.login-card .form-group { margin-bottom: 18px; }
.login-card input { padding: 13px 16px; border-radius: var(--radius); }

/* ── FILTER BAR ── */
.filter-card {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  padding: 14px 18px; margin-bottom: 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.filter-card .searchbox {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 8px 16px;
  flex: 1; min-width: 220px;
}
.filter-card .searchbox input { border: 0; background: transparent; outline: 0; font: inherit; }
.filter-card select { flex: none; width: auto; border-radius: 999px; padding: 9px 14px; font-size: 13px; }

/* ── EMPLOYEE GRID ── */
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.employee-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.employee-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.employee-avatar {
  width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-weight: 900; font-size: 18px;
  display: grid; place-items: center; flex-shrink: 0;
}
.employee-main { flex: 1; min-width: 0; }
.employee-main h3 { font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.employee-main p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.employee-main small { color: var(--muted2); font-size: 12px; display: block; margin-top: 3px; }
.employee-gdpr-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f0fdf4; color: #166534;
  border: 1px solid #bbf7d0; border-radius: 999px;
  padding: 3px 9px; font-size: 11px; font-weight: 800;
  margin-top: 6px;
}

/* ── INTEGRATION CARDS ── */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.integration-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-xs);
  transition: var(--transition);
  display: flex; flex-direction: column; gap: 14px;
}
.integration-card:hover { box-shadow: var(--shadow-sm); }
.int-header { display: flex; gap: 12px; align-items: center; }
.int-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  display: grid; place-items: center; font-size: 22px; flex-shrink: 0;
}
.int-icon.smtp { background: #fff7ed; border-color: #fed7aa; }
.int-icon.api { background: var(--info-soft); border-color: #bfdbfe; }
.int-icon.oauth { background: #f0fdf4; border-color: #bbf7d0; }
.int-icon.system { background: #f5f3ff; border-color: #ddd6fe; }
.int-name { font-size: 15px; font-weight: 800; }
.int-type { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.int-status { margin-left: auto; }
.int-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
.int-actions { display: flex; gap: 8px; margin-top: auto; }
.int-actions .btn { flex: 1; }

/* ── SMTP TEST UI ── */
.smtp-test-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.test-step { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line2); }
.test-step:last-child { border-bottom: 0; }
.step-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; font-size: 16px; }
.step-icon.running { background: var(--primary-soft); animation: pulse 1.2s infinite; }
.step-icon.pass { background: var(--success-soft); }
.step-icon.fail { background: var(--danger-soft); }
.step-icon.skip { background: var(--line2); }
.step-info { flex: 1; }
.step-label { font-weight: 800; font-size: 13.5px; }
.step-detail { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ── GDPR BANNER ── */
.gdpr-consent-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(15,23,42,.96);
  backdrop-filter: blur(16px);
  color: #fff; padding: 20px 30px;
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  z-index: 9999;
  border-top: 1px solid rgba(255,255,255,.1);
}
.gdpr-consent-banner p { flex: 1; min-width: 280px; font-size: 13px; line-height: 1.6; color: #cbd5e1; }
.gdpr-consent-banner a { color: #60a5fa; text-decoration: underline; }
.gdpr-consent-banner .gdpr-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.gdpr-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f0fdf4; color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: 999px; padding: 4px 10px;
  font-size: 11px; font-weight: 800;
}

/* ── MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: var(--radius-xl);
  padding: 32px; width: min(520px, 100%);
  box-shadow: var(--shadow-lg);
  transform: scale(.95) translateY(10px);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.modal-backdrop.open .modal { transform: scale(1) translateY(0); }
.modal-title { font-size: 20px; font-weight: 900; margin-bottom: 10px; }
.modal-body { color: var(--text-2); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── ANIMATED LOADING ── */
.skeleton {
  background: linear-gradient(90deg, var(--line2) 25%, var(--line) 50%, var(--line2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── PROGRESS BAR ── */
.progress-track { height: 8px; background: var(--line2); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), #00a7d8); border-radius: 999px; transition: width .6s ease; }

/* ── NOTIFICATION TOAST ── */
#toast-container {
  position: fixed; top: 80px; right: 24px; z-index: 9998;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 360px;
}
.toast {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px;
  box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: flex-start;
  animation: toastIn .3s cubic-bezier(.4,0,.2,1);
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--primary); }
.toast-icon { font-size: 18px; flex-shrink: 0; }
.toast-msg { flex: 1; font-size: 13.5px; font-weight: 600; }
.toast-close { color: var(--muted); cursor: pointer; font-size: 16px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── DETAIL GRID ── */
.asset-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 20px; }
.detail-card { min-height: 320px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 12px 16px; }
.kv span { color: var(--muted); font-weight: 600; font-size: 13px; padding-bottom: 12px; }
.kv strong { font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--line2); }

/* ── SCAN FAB — QR code floating button ── */
.scan-fab-btn {
  position: fixed !important; right: 22px !important; bottom: 22px !important; z-index: 900 !important;
  width: 60px !important; height: 60px !important; border-radius: 18px !important;
  background: var(--primary, #0b84ff) !important;
  border: none !important; color: #fff !important; cursor: pointer !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  box-shadow: 0 8px 28px color-mix(in srgb, var(--primary,#0b84ff) 45%, transparent), 0 2px 8px rgba(0,0,0,.14) !important;
  transition: transform .2s ease, box-shadow .2s ease !important;
  padding: 0 !important; margin: 0 !important;
  font-size: 0 !important; /* hide any text */
}
.scan-fab-btn svg { display: block !important; flex-shrink: 0 !important; }
.scan-fab-btn svg rect, .scan-fab-btn svg path { /* already have fill="white" inline */ }
.scan-fab-btn:hover { transform: translateY(-3px) scale(1.06) !important; filter: none !important; box-shadow: 0 14px 36px color-mix(in srgb, var(--primary,#0b84ff) 55%, transparent) !important; }
.scan-fab-btn:active { transform: scale(.95) !important; filter: none !important; }

/* Legacy FAB class - kept for backwards compat */
.mobile-scan-fab {
  position: fixed; right: 20px; bottom: 88px; z-index: 80;
  border: 0; border-radius: 999px;
  background: var(--primary); color: #fff;
  width: 58px; height: 58px;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(11,132,255,.4); font-size: 22px;
  cursor: pointer;
}
.mobile-bottom-bar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 79;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  justify-content: space-around; padding: 10px 6px 14px;
}
.mobile-bottom-bar a {
  font-size: 11px; text-decoration: none; color: var(--text-2);
  font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.mobile-bottom-bar a.active { color: var(--primary); }

/* ── ANIMATIONS ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeIn .35s cubic-bezier(.4,0,.2,1) both; }
.animate-in-delay-1 { animation-delay: .05s; }
.animate-in-delay-2 { animation-delay: .1s; }
.animate-in-delay-3 { animation-delay: .15s; }
.animate-in-delay-4 { animation-delay: .2s; }

/* ── EMPTY STATES ── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state-icon { font-size: 48px; margin-bottom: 14px; opacity: .6; }
.empty-state h3 { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.empty-state p { font-size: 14px; line-height: 1.6; }
.empty-inline { padding: 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; background: var(--bg); }

/* ── SECTION HEADER ── */
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.section-header h2 { font-size: 18px; font-weight: 900; }

/* ── PROCUREMENT STATUS PIPELINE ── */
.proc-pipeline {
  display: flex; align-items: center; gap: 0; overflow: auto;
  margin-bottom: 24px; padding: 4px;
}
.proc-stage {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  position: relative; white-space: nowrap;
}
.proc-stage:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.proc-stage:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.proc-stage.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-border); }
.proc-stage.done { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .asset-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .side { display: none; }
  .appbar { left: 0; }
  .main { margin-left: 0; padding: calc(var(--topbar-h) + 16px) 16px 100px; }
  .mobile-scan-fab { display: flex; }
  .mobile-bottom-bar { display: flex; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .filter-card { flex-direction: column; }
  .form, .form-grid { grid-template-columns: 1fr; }
  .head-actions { flex-wrap: wrap; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .global-search { width: 100%; }
}
@media (max-width: 600px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .login-card { padding: 28px 20px; }
  .employee-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
}
@media print {
  .side, .appbar, .page-head .head-actions, .filter-card, .btn, form { display: none !important; }
  .main { margin: 0; padding: 20px; }
}

/* ── PROCUREMENT BUTTON FIXES ── */
/* Force white text on primary (dark red) proc296 buttons */
.proc296-btn.primary,
.proc296-btn.primary:link,
.proc296-btn.primary:visited,
a.proc296-btn.primary {
  color: #ffffff !important;
  background: #a00000 !important;
  border-color: #a00000 !important;
}
.proc296-btn.primary:hover,
a.proc296-btn.primary:hover {
  color: #ffffff !important;
  filter: brightness(.88) !important;
  transform: translateY(-1px) !important;
}
/* Compare Vendors button white text */
.proc296-btn.compare,
.proc295-mini.compare,
a.proc296-btn.compare,
a.proc295-mini.compare {
  color: #ffffff !important;
}
.proc296-btn.compare:hover,
a.proc296-btn.compare:hover {
  color: #ffffff !important;
  filter: brightness(.88) !important;
}
/* Show detail page Compare Vendors button */
.proc295-btn.primary,
a.proc295-btn.primary {
  color: #ffffff !important;
}
