/* ═══════════════════════════════════════════════════════════════════════
   SmartDesk — TenderIntel Design System
   Self-hosted, no CDN dependencies, no icon fonts
═══════════════════════════════════════════════════════════════════════ */

/* ── Google Fonts equivalent via system stack + Inter via preload ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════════════════════ */
:root {
  --primary:        #0284c7;
  --primary-dark:   #0369a1;
  --primary-xdark:  #075985;
  --primary-light:  #e0f2fe;
  --primary-glow:   rgba(2,132,199,.15);
  --secondary:      #6366f1;
  --secondary-dark: #4f46e5;
  --accent:         #06b6d4;

  --sidebar-bg:     #ffffff;
  --sidebar-border: #e8ecf2;
  --sidebar-hover:  #f1f5f9;
  --sidebar-active-bg: #eff6ff;
  --sidebar-active-color: var(--primary);
  --sidebar-width:  256px;

  --topbar-height:  60px;
  --topbar-bg:      #ffffff;

  --body-bg:        #f8fafc;
  --card-bg:        #ffffff;
  --card-shadow:    0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --card-hover-shadow: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --card-radius:    12px;

  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --border-color:   #e2e8f0;

  --success:  #10b981;
  --warning:  #f59e0b;
  --danger:   #ef4444;
  --info:     #3b82f6;
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 112.5%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--body-bg);
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   GRID SYSTEM  (Bootstrap-compatible API)
═══════════════════════════════════════════════════════════════ */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-fluid { width: 100%; padding: 0 1rem; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}
.row > * { padding-left: 0.5rem; padding-right: 0.5rem; }

/* Gutters */
.g-0 { gap: 0; }
.g-1 { gap: 0.25rem; }
.g-2 { gap: 0.5rem;  margin-left: 0; margin-right: 0; }
.g-3 { gap: 1rem;    margin-left: 0; margin-right: 0; }
.g-4 { gap: 1.5rem;  margin-left: 0; margin-right: 0; }
.g-5 { gap: 2rem;    margin-left: 0; margin-right: 0; }
.g-2 > *, .g-3 > *, .g-4 > *, .g-5 > * { padding: 0; }

/* Column sizes */
.col    { flex: 1; min-width: 0; }
.col-auto { flex: 0 0 auto; width: auto; min-width: 0; }
.col-1  { flex: 0 0 8.3333%;   max-width: 8.3333%; }
.col-2  { flex: 0 0 16.6667%;  max-width: 16.6667%; }
.col-3  { flex: 0 0 25%;       max-width: 25%; }
.col-4  { flex: 0 0 33.3333%;  max-width: 33.3333%; }
.col-5  { flex: 0 0 41.6667%;  max-width: 41.6667%; }
.col-6  { flex: 0 0 50%;       max-width: 50%; }
.col-7  { flex: 0 0 58.3333%;  max-width: 58.3333%; }
.col-8  { flex: 0 0 66.6667%;  max-width: 66.6667%; }
.col-9  { flex: 0 0 75%;       max-width: 75%; }
.col-10 { flex: 0 0 83.3333%;  max-width: 83.3333%; }
.col-11 { flex: 0 0 91.6667%;  max-width: 91.6667%; }
.col-12 { flex: 0 0 100%;      max-width: 100%; }

@media (min-width: 576px) {
  .col-sm-1  { flex: 0 0 8.3333%;   max-width: 8.3333%; }
  .col-sm-2  { flex: 0 0 16.6667%;  max-width: 16.6667%; }
  .col-sm-3  { flex: 0 0 25%;       max-width: 25%; }
  .col-sm-4  { flex: 0 0 33.3333%;  max-width: 33.3333%; }
  .col-sm-6  { flex: 0 0 50%;       max-width: 50%; }
  .col-sm-8  { flex: 0 0 66.6667%;  max-width: 66.6667%; }
  .col-sm-12 { flex: 0 0 100%;      max-width: 100%; }
  .d-sm-none  { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex  { display: flex !important; }
}
@media (min-width: 768px) {
  .col-md-1  { flex: 0 0 8.3333%;   max-width: 8.3333%; }
  .col-md-2  { flex: 0 0 16.6667%;  max-width: 16.6667%; }
  .col-md-3  { flex: 0 0 25%;       max-width: 25%; }
  .col-md-4  { flex: 0 0 33.3333%;  max-width: 33.3333%; }
  .col-md-5  { flex: 0 0 41.6667%;  max-width: 41.6667%; }
  .col-md-6  { flex: 0 0 50%;       max-width: 50%; }
  .col-md-7  { flex: 0 0 58.3333%;  max-width: 58.3333%; }
  .col-md-8  { flex: 0 0 66.6667%;  max-width: 66.6667%; }
  .col-md-9  { flex: 0 0 75%;       max-width: 75%; }
  .col-md-10 { flex: 0 0 83.3333%;  max-width: 83.3333%; }
  .col-md-11 { flex: 0 0 91.6667%;  max-width: 91.6667%; }
  .col-md-12 { flex: 0 0 100%;      max-width: 100%; }
  .d-md-none  { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex  { display: flex !important; }
  .d-md-inline-flex { display: inline-flex !important; }
}
@media (min-width: 992px) {
  .col-lg-1  { flex: 0 0 8.3333%;   max-width: 8.3333%; }
  .col-lg-2  { flex: 0 0 16.6667%;  max-width: 16.6667%; }
  .col-lg-3  { flex: 0 0 25%;       max-width: 25%; }
  .col-lg-4  { flex: 0 0 33.3333%;  max-width: 33.3333%; }
  .col-lg-5  { flex: 0 0 41.6667%;  max-width: 41.6667%; }
  .col-lg-6  { flex: 0 0 50%;       max-width: 50%; }
  .col-lg-7  { flex: 0 0 58.3333%;  max-width: 58.3333%; }
  .col-lg-8  { flex: 0 0 66.6667%;  max-width: 66.6667%; }
  .col-lg-9  { flex: 0 0 75%;       max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.3333%;  max-width: 83.3333%; }
  .col-lg-11 { flex: 0 0 91.6667%;  max-width: 91.6667%; }
  .col-lg-12 { flex: 0 0 100%;      max-width: 100%; }
}
@media (min-width: 1200px) {
  .col-xl-3  { flex: 0 0 25%;      max-width: 25%; }
  .col-xl-4  { flex: 0 0 33.3333%; max-width: 33.3333%; }
  .col-xl-6  { flex: 0 0 50%;      max-width: 50%; }
  .col-xl-8  { flex: 0 0 66.6667%; max-width: 66.6667%; }
}

/* ═══════════════════════════════════════════════════════════════
   DISPLAY UTILITIES
═══════════════════════════════════════════════════════════════ */
.d-none        { display: none !important; }
.d-block       { display: block !important; }
.d-inline      { display: inline !important; }
.d-inline-block{ display: inline-block !important; }
.d-flex        { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid        { display: grid !important; }

/* ═══════════════════════════════════════════════════════════════
   FLEXBOX UTILITIES
═══════════════════════════════════════════════════════════════ */
.flex-row        { flex-direction: row !important; }
.flex-column     { flex-direction: column !important; }
.flex-wrap       { flex-wrap: wrap !important; }
.flex-nowrap     { flex-wrap: nowrap !important; }
.flex-1          { flex: 1 !important; }
.flex-shrink-0   { flex-shrink: 0 !important; }
.flex-grow-1     { flex-grow: 1 !important; }
.justify-content-start   { justify-content: flex-start !important; }
.justify-content-end     { justify-content: flex-end !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around  { justify-content: space-around !important; }
.align-items-start   { align-items: flex-start !important; }
.align-items-end     { align-items: flex-end !important; }
.align-items-center  { align-items: center !important; }
.align-items-baseline{ align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }
.align-self-center   { align-self: center !important; }
.align-self-end      { align-self: flex-end !important; }

/* Gap */
.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 2rem !important; }
.column-gap-2 { column-gap: 0.5rem !important; }
.row-gap-2    { row-gap: 0.5rem !important; }

/* ═══════════════════════════════════════════════════════════════
   SPACING UTILITIES
═══════════════════════════════════════════════════════════════ */
/* Margin */
.m-0  { margin: 0 !important; }
.m-1  { margin: 0.25rem !important; }
.m-2  { margin: 0.5rem !important; }
.m-3  { margin: 1rem !important; }
.m-4  { margin: 1.5rem !important; }
.m-5  { margin: 3rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }
.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-auto { margin-right: auto !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Padding */
.p-0  { padding: 0 !important; }
.p-1  { padding: 0.25rem !important; }
.p-2  { padding: 0.5rem !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.p-5  { padding: 3rem !important; }
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.ps-0 { padding-left: 0 !important; }
.ps-1 { padding-left: 0.25rem !important; }
.ps-2 { padding-left: 0.5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.ps-4 { padding-left: 1.5rem !important; }
.pe-0 { padding-right: 0 !important; }
.pe-1 { padding-right: 0.25rem !important; }
.pe-2 { padding-right: 0.5rem !important; }
.pe-3 { padding-right: 1rem !important; }
.pe-4 { padding-right: 1.5rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }

/* ═══════════════════════════════════════════════════════════════
   TEXT UTILITIES
═══════════════════════════════════════════════════════════════ */
.text-start   { text-align: left !important; }
.text-center  { text-align: center !important; }
.text-end     { text-align: right !important; }
.text-truncate{ overflow: hidden !important; white-space: nowrap !important; text-overflow: ellipsis !important; }
.text-nowrap  { white-space: nowrap !important; }
.text-wrap    { white-space: normal !important; }
.text-break   { word-break: break-word !important; }
.text-decoration-none { text-decoration: none !important; }
.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize{ text-transform: capitalize !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary{ color: var(--text-secondary) !important; }
.text-primary { color: var(--primary) !important; }
.text-primary-brand { color: var(--primary) !important; }
.text-danger  { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: #d97706 !important; }
.text-info    { color: var(--info) !important; }
.text-dark    { color: #1a2233 !important; }
.text-white   { color: #fff !important; }
.small, small { font-size: 0.85em !important; }
.fs-6    { font-size: 1rem !important; }
.fs-5    { font-size: 1.25rem !important; }
.fw-300  { font-weight: 300 !important; }
.fw-400  { font-weight: 400 !important; }
.fw-500  { font-weight: 500 !important; }
.fw-600  { font-weight: 600 !important; }
.fw-700  { font-weight: 700 !important; }
.fw-800  { font-weight: 800 !important; }
.fw-bold    { font-weight: 700 !important; }
.fw-normal  { font-weight: 400 !important; }
.fw-semibold{ font-weight: 600 !important; }
.fst-italic { font-style: italic !important; }
.font-monospace { font-family: 'Courier New', Courier, monospace !important; }
.lh-1   { line-height: 1 !important; }
.lh-sm  { line-height: 1.25 !important; }

/* ═══════════════════════════════════════════════════════════════
   BORDER UTILITIES
═══════════════════════════════════════════════════════════════ */
.border        { border: 1px solid var(--border-color) !important; }
.border-0      { border: 0 !important; }
.border-top    { border-top: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }
.border-start  { border-left: 1px solid var(--border-color) !important; }
.border-end    { border-right: 1px solid var(--border-color) !important; }
.rounded       { border-radius: 0.375rem !important; }
.rounded-1     { border-radius: 0.25rem !important; }
.rounded-2     { border-radius: 0.5rem !important; }
.rounded-3     { border-radius: 0.75rem !important; }
.rounded-pill  { border-radius: 9999px !important; }
.rounded-circle{ border-radius: 50% !important; }
.rounded-xl    { border-radius: 14px !important; }

/* ═══════════════════════════════════════════════════════════════
   BACKGROUND UTILITIES
═══════════════════════════════════════════════════════════════ */
.bg-white      { background-color: #fff !important; }
.bg-light      { background-color: #f8fafc !important; }
.bg-dark       { background-color: #1a2233 !important; }
.bg-primary    { background-color: var(--primary) !important; }
.bg-danger     { background-color: var(--danger) !important; }
.bg-success    { background-color: var(--success) !important; }
.bg-warning    { background-color: var(--warning) !important; }
.bg-primary-light { background: var(--primary-light) !important; }
.bg-transparent{ background: transparent !important; }

/* ═══════════════════════════════════════════════════════════════
   SIZING UTILITIES
═══════════════════════════════════════════════════════════════ */
.w-100  { width: 100% !important; }
.w-75   { width: 75% !important; }
.w-50   { width: 50% !important; }
.w-25   { width: 25% !important; }
.h-100  { height: 100% !important; }
.mw-100 { max-width: 100% !important; }
.min-vw-100 { min-width: 100vw !important; }
.min-vh-100 { min-height: 100vh !important; }

/* ═══════════════════════════════════════════════════════════════
   POSITION UTILITIES
═══════════════════════════════════════════════════════════════ */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed !important; }
.position-sticky   { position: sticky !important; }
.top-0     { top: 0 !important; }
.bottom-0  { bottom: 0 !important; }
.start-0   { left: 0 !important; }
.end-0     { right: 0 !important; }
.start-100 { left: 100% !important; }
.top-50    { top: 50% !important; }
.start-50  { left: 50% !important; }
.translate-middle {
  transform: translate(-50%, -50%) !important;
}
.translate-middle-x { transform: translateX(-50%) !important; }
.translate-middle-y { transform: translateY(-50%) !important; }

/* ═══════════════════════════════════════════════════════════════
   OVERFLOW
═══════════════════════════════════════════════════════════════ */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto   { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* ═══════════════════════════════════════════════════════════════
   OPACITY
═══════════════════════════════════════════════════════════════ */
.opacity-0  { opacity: 0 !important; }
.opacity-25 { opacity: .25 !important; }
.opacity-50 { opacity: .5 !important; }
.opacity-75 { opacity: .75 !important; }
.opacity-100{ opacity: 1 !important; }

/* ═══════════════════════════════════════════════════════════════
   SHADOW
═══════════════════════════════════════════════════════════════ */
.shadow    { box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15) !important; }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075) !important; }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important; }
.shadow-none{ box-shadow: none !important; }

/* ═══════════════════════════════════════════════════════════════
   VISIBILITY
═══════════════════════════════════════════════════════════════ */
.visible   { visibility: visible !important; }
.invisible { visibility: hidden !important; }

/* ═══════════════════════════════════════════════════════════════
   CURSOR
═══════════════════════════════════════════════════════════════ */
.cursor-pointer { cursor: pointer !important; }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.sidebar-brand {
  padding: 0 1.25rem;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  border-bottom: 1px solid var(--sidebar-border);
}
.brand-logo-wrap {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(2,132,199,.3);
}
.brand-logo-wrap svg { color: #fff; }
.brand-text { color: var(--text-primary); font-weight: 700; font-size: 0.95rem; letter-spacing: -.01em; }
.brand-text span { color: var(--primary); }

.sidebar-nav { padding: 0.75rem 0.75rem; flex: 1; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 3px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 99px; }

.nav-section-label {
  padding: 0.85rem 0.75rem 0.3rem;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.845rem;
  font-weight: 500;
  border-radius: 8px;
  margin-bottom: 1px;
  transition: all 0.15s ease;
}
.sidebar-link:hover {
  background: var(--sidebar-hover);
  color: var(--text-primary);
  text-decoration: none;
}
.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-color);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
  padding-left: calc(0.75rem - 3px);
}
.sidebar-link.active .si-icon { color: var(--primary); background: var(--primary-light); }
.sidebar-link .si-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 7px;
  background: transparent;
  flex-shrink: 0;
  transition: all 0.15s;
  color: var(--text-muted);
}
.sidebar-link:hover .si-icon { background: var(--primary-light); color: var(--primary); }
.sidebar-footer {
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.5rem;
  border-radius: 8px;
  transition: background 0.15s;
  text-decoration: none;
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.user-name { color: var(--text-primary); font-size: 0.82rem; font-weight: 600; line-height: 1.2; }
.user-role { color: var(--text-muted); font-size: 0.7rem; }
.logout-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.4rem;
  transition: all 0.15s;
  border: 1px solid var(--border-color);
}
.logout-btn:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════
   MAIN WRAPPER
═══════════════════════════════════════════════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
═══════════════════════════════════════════════════════════════ */
.topbar {
  height: var(--topbar-height);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 999;
  gap: 1rem;
}
.topbar-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  flex: 1;
  letter-spacing: -.01em;
}
.topbar-actions { display: flex; align-items: center; gap: 0.4rem; }
.topbar-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.topbar-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); text-decoration: none; }
.topbar-divider { width: 1px; height: 20px; background: var(--border-color); }
.topbar-flash {
  padding: 0.3rem 0.8rem;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
}
.topbar-flash.success { background: #ecfdf5; color: #059669; }
.topbar-flash.danger  { background: #fef2f2; color: #dc2626; }
.topbar-flash.info    { background: #eff6ff; color: #2563eb; }

/* ═══════════════════════════════════════════════════════════════
   PAGE CONTENT
═══════════════════════════════════════════════════════════════ */
.page-content { padding: 1.5rem 0; flex: 1; }
.page-hero    { padding-left: 1.5rem; padding-right: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: var(--card-hover-shadow); }
.card-header {
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.875rem 1.125rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}
.card-header .card-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.card-body { padding: 1.25rem; }
.card-footer {
  background: #fafbfc;
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 1.125rem;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}
.card-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.25rem; }
.card-text  { color: var(--text-secondary); font-size: 0.875rem; }

/* ═══════════════════════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════════════════════ */
.stat-card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  transition: all 0.2s ease;
}
.stat-card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-1px);
}
.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -.03em;
}
.stat-label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.2rem; font-weight: 500; }
.stat-trend { font-size: 0.7rem; font-weight: 600; margin-top: 0.2rem; }
.stat-trend.up { color: var(--success); }
.stat-trend.neutral { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   STATUS BADGES
═══════════════════════════════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding: 0.22em 0.75em;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.badge-OPEN      { background: #ecfdf5; color: #059669; }
.badge-CLOSED    { background: #fef2f2; color: #dc2626; }
.badge-AWARDED   { background: #eff6ff; color: #2563eb; }
.badge-CANCELLED { background: #f8fafc; color: #64748b; }
.badge-DRAFT     { background: #fffbeb; color: #d97706; }
.badge-SUBMITTED { background: #f0f9ff; color: #0284c7; }
.badge-UNDER_REVIEW { background: #f5f3ff; color: #7c3aed; }
.badge-WON       { background: #ecfdf5; color: #059669; }
.badge-LOST      { background: #fef2f2; color: #dc2626; }
.badge-WITHDRAWN { background: #f8fafc; color: #64748b; }

/* Generic badge (Bootstrap-compatible) */
.badge {
  display: inline-block;
  padding: 0.22em 0.65em;
  font-size: 0.7em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 9999px;
}
.badge.bg-danger  { background-color: var(--danger) !important; color: #fff; }
.badge.bg-success { background-color: var(--success) !important; color: #fff; }
.badge.bg-light   { background-color: #f1f5f9 !important; }
.badge.text-dark  { color: #1a2233 !important; }

/* ═══════════════════════════════════════════════════════════════
   TENDER ROWS
═══════════════════════════════════════════════════════════════ */
.tender-row {
  transition: background 0.12s;
  cursor: pointer;
  border-left: 3px solid transparent;
}
.tender-row:hover {
  background: #f8fbff;
  border-left-color: var(--primary);
}
.row-arrow { color: var(--text-muted); font-size: 0.7rem; transition: transform 0.15s; }
.tender-row:hover .row-arrow { transform: translateX(3px); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════════ */
.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
.form-control, .form-select {
  display: block;
  width: 100%;
  font-size: 0.875rem;
  font-family: inherit;
  border: 1.5px solid var(--border-color);
  border-radius: 8px;
  padding: 0.55rem 0.875rem;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  outline: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control-sm, .form-select-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
  border-radius: 6px;
}
.form-control[type="date"] { cursor: pointer; }
.form-text { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.25rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input {
  width: 1rem; height: 1rem;
  cursor: pointer;
  accent-color: var(--primary);
}
.form-check-label { font-size: 0.83rem; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* Input group */
.input-group { display: flex; align-items: stretch; }
.input-group > .form-control,
.input-group > .form-select { flex: 1; border-radius: 0; }
.input-group > .form-control:first-child,
.input-group > .form-select:first-child { border-radius: 8px 0 0 8px; }
.input-group > .form-control:last-child,
.input-group > .form-select:last-child  { border-radius: 0 8px 8px 0; }
.input-group-sm > .form-control,
.input-group-sm > .form-select { border-radius: 0; padding: 0.35rem 0.65rem; font-size: 0.82rem; }
.input-group-sm > .form-control:last-child { border-radius: 0 6px 6px 0; }
.input-group-sm > .form-control:first-child { border-radius: 6px 0 0 6px; }
.input-group-text {
  display: flex; align-items: center;
  padding: 0 0.875rem;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.input-group-sm .input-group-text {
  padding: 0 0.6rem;
  font-size: 0.78rem;
  border-radius: 6px 0 0 6px;
}
.input-group:focus-within .input-group-text { border-color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.845rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 9px;
  padding: 0.55rem 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;
  box-shadow: 0 1px 3px rgba(2,132,199,.25);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 3px 10px rgba(2,132,199,.35);
  transform: translateY(-1px);
  color: #fff;
}
.btn-secondary {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover { background: #e2e8f0; color: var(--text-primary); }
.btn-secondary-brand {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(24,99,220,.25);
}
.btn-secondary-brand:hover { box-shadow: 0 4px 16px rgba(24,99,220,.35); transform: translateY(-1px); color: #fff; }
.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border: none; color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.25);
}
.btn-success:hover { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border: none; color: #fff;
}
.btn-danger:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }
.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none; color: #fff;
}
.btn-outline-primary {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,140,193,.25);
}
.btn-outline-secondary {
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  background: #fff;
}
.btn-outline-secondary:hover { border-color: var(--text-secondary); background: #f8fafc; color: var(--text-primary); }
.btn-outline-danger {
  border: 1.5px solid var(--danger);
  color: var(--danger);
  background: transparent;
}
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-light {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-light:hover { background: #e2e8f0; color: var(--text-primary); }
.btn-outline-light {
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.1);
}
.btn-outline-light:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-link {
  background: none; border: none;
  color: var(--primary);
  padding: 0; font-weight: 400;
  text-decoration: underline;
}
.btn-link:hover { color: var(--primary-dark); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.8rem; border-radius: 7px; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: 11px; }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HERO
═══════════════════════════════════════════════════════════════ */
.page-hero {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--card-shadow);
}
.page-hero-title { color: var(--text-primary); font-size: 1.1rem; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.page-hero-sub { color: var(--text-secondary); font-size: 0.8rem; margin: 0.15rem 0 0; }
.page-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }

/* ═══════════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════════ */
.alert {
  border-radius: 10px;
  font-size: 0.855rem;
  border: none;
  padding: 0.75rem 1rem;
  position: relative;
}
.alert-success { background: #ecfdf5; color: #059669; }
.alert-danger  { background: #fef2f2; color: #dc2626; }
.alert-warning { background: #fffbeb; color: #d97706; }
.alert-info    { background: #eff6ff; color: #2563eb; }
.alert-dismissible { padding-right: 3rem; }
.alert-dismissible .btn-close {
  position: absolute; top: 50%; right: 0.75rem;
  transform: translateY(-50%);
  background: transparent; opacity: 0.6;
}
.alert-dismissible .btn-close:hover { opacity: 1; }
.fade { transition: opacity 0.15s linear; }
.fade:not(.show) { opacity: 0; }

/* Validation */
.invalid-feedback { color: var(--danger); font-size: 0.78rem; margin-top: 0.25rem; display: none; }
.is-invalid ~ .invalid-feedback,
.is-invalid + .invalid-feedback { display: block; }
.is-invalid .form-control,
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,.15); }

/* ═══════════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════════ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--text-primary);
}
.table th {
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 0.7rem 0.875rem;
  border-bottom: 2px solid var(--border-color);
  background: #fafbfc;
  white-space: nowrap;
}
.table td {
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: #f8fbff; }
.table-sm th, .table-sm td { padding: 0.45rem 0.65rem; }
.table-striped tbody tr:nth-child(even) { background: #fafbfc; }
.table-bordered th, .table-bordered td { border: 1px solid var(--border-color); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-light thead tr { background: #fafbfc; }
.table-light th { background: #fafbfc; }

/* Table wrap */
.table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  list-style: none;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
}
.pagination-sm .page-link { font-size: 0.78rem; padding: 0.25rem 0.5rem; }
.justify-content-center.pagination { justify-content: center; }
.page-item { }
.page-item.disabled .page-link { opacity: .5; pointer-events: none; }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link {
  display: block;
  padding: 0.38rem 0.65rem;
  color: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: 7px;
  font-size: 0.82rem;
  text-decoration: none;
  background: #fff;
  transition: all 0.15s;
}
.page-link:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   LIST GROUP
═══════════════════════════════════════════════════════════════ */
.list-group { display: flex; flex-direction: column; border-radius: var(--card-radius); overflow: hidden; }
.list-group-flush { border-radius: 0; }
.list-group-item {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-primary);
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item-action {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: background 0.15s;
  cursor: pointer;
}
.list-group-item-action:hover { background: #f8fbff; text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
}
.breadcrumb-item { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  margin-right: 0.25rem;
  color: var(--border-color);
}
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.active { color: var(--text-primary); }
nav[aria-label="breadcrumb"] { margin-bottom: 1rem; }

/* ═══════════════════════════════════════════════════════════════
   DROPDOWN
═══════════════════════════════════════════════════════════════ */
.dropdown { position: relative; display: inline-block; }
.dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: 0.35em;
  vertical-align: middle;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  z-index: 1100;
  padding: 0.4rem;
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  list-style: none;
}
.dropdown-menu.show,
.dropdown.open .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.dropdown-menu-end { right: 0; left: auto; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.845rem;
  color: var(--text-primary);
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.dropdown-item:hover { background: #f1f5f9; color: var(--text-primary); text-decoration: none; }
.dropdown-header {
  padding: 0.35rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.4rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   PROGRESS
═══════════════════════════════════════════════════════════════ */
.progress {
  height: 8px;
  background: var(--border-color);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════
   TABS (Bootstrap-compatible)
═══════════════════════════════════════════════════════════════ */
.nav { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.nav-tabs {
  border-bottom: 2px solid var(--border-color);
}
.nav-tabs .nav-link {
  padding: 0.6rem 1rem;
  font-size: 0.845rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  border-radius: 0;
  display: block;
}
.nav-tabs .nav-link:hover { color: var(--text-primary); }
.nav-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.nav-pills .nav-link {
  padding: 0.45rem 1rem;
  font-size: 0.845rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.15s;
  display: block;
}
.nav-pills .nav-link:hover { background: #f1f5f9; color: var(--text-primary); }
.nav-pills .nav-link.active { background: var(--primary); color: #fff; }
.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }

/* ═══════════════════════════════════════════════════════════════
   MODAL
═══════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1040;
  display: none;
}
.modal-backdrop.show { display: block; }
.modal {
  position: fixed; inset: 0;
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal.show { display: flex; }
.modal-dialog { width: 100%; max-width: 520px; }
.modal-content {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-body { padding: 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex; gap: 0.5rem; justify-content: flex-end;
}
.btn-close {
  width: 28px; height: 28px;
  border: none;
  background: #f1f5f9;
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.btn-close:hover { background: #e2e8f0; color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════
   PAGE HEADER ACTIONS ROW
═══════════════════════════════════════════════════════════════ */
.page-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════════════════════ */
.empty-state { padding: 3rem 1rem; text-align: center; }
.empty-state-icon {
  width: 64px; height: 64px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  margin: 0 auto 1rem;
}
.empty-state h6 { font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.empty-state p  { color: var(--text-secondary); font-size: 0.855rem; }

/* ═══════════════════════════════════════════════════════════════
   AI ANIMATION
═══════════════════════════════════════════════════════════════ */
@keyframes ai-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.15); }
}
.ai-pulse { animation: ai-pulse 1.4s ease-in-out infinite; display: inline-block; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   INLINE SVG ICON SIZING
═══════════════════════════════════════════════════════════════ */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 14px; height: 14px; }
.icon    { width: 16px; height: 16px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 20px; height: 20px; }
.icon-xl { width: 24px; height: 24px; }

/* Spinner */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spinner { animation: spin 0.8s linear infinite; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); box-shadow: 4px 0 24px rgba(0,0,0,.12); }
  .sidebar.show { transform: translateX(0); }
  .main-wrapper { margin-left: 0; width: 100%; }
  .page-content { padding: 1rem 0; }
  .page-hero    { padding-left: 1rem; padding-right: 1rem; }
  .page-hero { flex-direction: column; align-items: flex-start; }
  .topbar { padding: 0 1rem; }
}

/* ── Table header improvements ── */
.table th { background: #fafbfc; }

/* ── Better tender row ── */
.tender-row { border-left: 3px solid transparent; }
.tender-row:hover { background: #f8fafc; border-left-color: var(--primary); }

/* ── Section headings ── */
.section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
