/* ==============================================================================
   BIDUF MARKETPLACE DESIGN SYSTEM — ULTRA-RESPONSIVE & MOTION ENGINE (2026)
   ============================================================================== */

:root {
  --ink: #0f1115;
  --ink-2: #181a20;
  --ink-3: #23262e;
  --slate: #565d6b;
  --slate-2: #838a98;
  --line: #e9eaf0;
  --line-2: #f1f2f6;
  --paper: #ffffff;
  --mist: #f8fafc;
  
  --brand: #4f46e5;
  --brand-deep: #3d34ce;
  --brand-light: #6366f1;
  --brand-wash: #eeecfb;
  
  --green: #059669;
  --green-wash: #dcfce7;
  --amber: #d97706;
  --amber-wash: #fef3c7;
  --red: #dc2626;
  --red-wash: #fee2e2;
  --purple: #7c3aed;
  --purple-wash: #f3e8ff;
  --blue: #2563eb;
  --blue-wash: #dbeafe;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --sh-sm: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --sh-md: 0 4px 20px -2px rgba(15,23,42,.08), 0 2px 6px -1px rgba(15,23,42,.04);
  --sh-lg: 0 20px 40px -12px rgba(15,23,42,.15), 0 8px 16px -6px rgba(15,23,42,.08);
  --sh-hover: 0 14px 34px -4px rgba(79,70,229,.14), 0 6px 14px -2px rgba(15,23,42,.06);
  --sh-glow: 0 0 24px rgba(79,70,229,0.28);

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --trans-fast: 0.15s var(--ease-spring);
  --trans-smooth: 0.28s var(--ease-spring);
  --trans-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base Resets & Smooth Scroll */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--mist);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--trans-fast), transform var(--trans-fast);
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}

input, select, textarea, button {
  font-family: inherit;
}

/* Brand Identity */
.brand {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.05em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  transition: transform var(--trans-bounce);
}

.brand:hover {
  transform: scale(1.03);
}

.brand .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  margin-left: 3px;
  margin-bottom: -11px;
}

.brand.light {
  color: #ffffff;
}

/* ==============================================================================
   BUTTONS & CTA SHIMMER MOTIONS
   ============================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--trans-smooth);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-deep), #2f25b0);
  box-shadow: 0 6px 18px rgba(79,70,229,0.42);
  transform: translateY(-2px);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
}

.btn-primary:hover::after {
  left: 140%;
}

.btn-ghost {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--sh-sm);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-wash);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border-color: var(--brand);
}

.btn-outline:hover {
  background: var(--brand-wash);
  transform: translateY(-2px);
}

.btn-danger {
  background: #ffffff;
  color: var(--red);
  border-color: var(--red-wash);
}

.btn-danger:hover {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
  box-shadow: 0 4px 14px rgba(220,38,38,0.3);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  min-height: 34px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  min-height: 52px;
  border-radius: var(--radius);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ==============================================================================
   FORM CONTROLS & FOCUS RIPPLE
   ============================================================================== */
.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}

.field .hint {
  font-size: 12px;
  color: var(--slate-2);
  margin-top: 6px;
}

.input, select.input, textarea.input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: 14.5px;
  background: #ffffff;
  transition: border-color var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px var(--brand-wash);
  background: #ffffff;
}

textarea.input {
  resize: vertical;
  min-height: 100px;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

/* Flash alerts */
.flash {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash.success {
  background: var(--green-wash);
  border-color: #86efac;
  color: #14532d;
}

.flash.error {
  background: var(--red-wash);
  border-color: #fca5a5;
  color: #7f1d1d;
}

.flash.info {
  background: var(--brand-wash);
  border-color: #c7d2fe;
  color: #312e81;
}

/* ==============================================================================
   APP LAYOUT & SHELL
   ============================================================================== */
.app {
  display: flex;
  min-height: 100vh;
}

.side {
  width: 260px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform var(--trans-smooth);
  box-shadow: var(--sh-sm);
}

.side-top {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-2);
}

.side-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: var(--brand-wash);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-top: 10px;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  scrollbar-width: thin;
}

.side-nav .grp {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-2);
  padding: 14px 12px 6px;
}

.side-nav a, .side-nav .na {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate);
  transition: all var(--trans-fast);
  margin-bottom: 2px;
}

.side-nav a:hover {
  background: var(--mist);
  color: var(--ink);
  transform: translateX(4px);
}

.side-nav a.active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

.side-nav a.active svg {
  stroke: #ffffff;
}

.side-nav svg {
  width: 18px;
  height: 18px;
  stroke: var(--slate-2);
  flex-shrink: 0;
  transition: stroke var(--trans-fast);
}

.side-nav a:hover svg {
  stroke: var(--ink);
}

.side-nav .na {
  color: var(--slate-2);
  cursor: default;
}

.side-nav .na .soon {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-2);
  background: var(--line-2);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.side-foot {
  padding: 16px 18px;
  border-top: 1px solid var(--line-2);
  background: #fafafa;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-user .av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.side-user .nm {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-user .em {
  font-size: 12px;
  color: var(--slate-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main {
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 68px;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 30;
  transition: background var(--trans-fast);
}

.topbar h1 {
  font-size: 20px;
  font-weight: 800;
}

.topbar .tb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  min-height: 40px;
  min-width: 40px;
  transition: background var(--trans-fast);
}

.burger:hover {
  background: var(--mist);
}

.burger svg {
  width: 24px;
  height: 24px;
  stroke: var(--ink);
}

.content {
  padding: 30px 28px 70px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

/* ==============================================================================
   CARDS & STATS WITH HOVER MOTIONS
   ============================================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.stat {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--sh-sm);
  transition: all var(--trans-smooth);
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--purple));
  opacity: 0;
  transition: opacity var(--trans-smooth);
}

.stat:hover {
  transform: none;
  box-shadow: var(--sh-md);
  border-color: rgba(79,70,229,0.25);
}

.stat:hover::before {
  opacity: 1;
}

.stat .sl {
  font-size: 12.5px;
  color: var(--slate);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat .sl svg {
  width: 16px;
  height: 16px;
  stroke: var(--brand);
}

.stat .sn {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin-top: 8px;
  letter-spacing: -0.03em;
}

.card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--sh-sm);
  transition: all var(--trans-smooth);
}

.card:hover {
  box-shadow: var(--sh-md);
}

.card.hover-lift:hover {
  transform: none;
  box-shadow: var(--sh-md);
  border-color: rgba(79,70,229,0.25);
}

.card h2 {
  font-size: 19px;
  margin-bottom: 6px;
  font-weight: 800;
}

.card .csub {
  color: var(--slate);
  font-size: 14px;
  margin-bottom: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.card-head h2 {
  margin: 0;
}

/* Glassmorphism Card Style */
.card-glass {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: var(--sh-md);
}

/* Table styling with smooth hover */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  scrollbar-width: thin;
}

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.tbl th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate);
  padding: 14px 16px;
  border-bottom: 1.5px solid var(--line);
  background: #fafafa;
}

table.tbl td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}

table.tbl tr:last-child td {
  border-bottom: none;
}

table.tbl tr {
  transition: background var(--trans-fast);
}

table.tbl tr:hover td {
  background: rgba(241,245,249,0.75);
}

.u-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.u-cell .av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #6366f1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

.u-cell .nm {
  font-weight: 600;
  font-size: 14px;
}

.u-cell .em {
  font-size: 12px;
  color: var(--slate-2);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  transition: transform var(--trans-fast);
}

.badge:hover {
  transform: scale(1.04);
}

.b-green { background: var(--green-wash); color: #047857; }
.b-amber { background: var(--amber-wash); color: #b45309; }
.b-red   { background: var(--red-wash); color: #b91c1c; }
.b-brand { background: var(--brand-wash); color: var(--brand-deep); }
.b-purple{ background: var(--purple-wash); color: #6d28d9; }
.b-blue  { background: var(--blue-wash); color: #1d4ed8; }
.b-gray  { background: var(--line-2); color: var(--slate); }

/* Section Title */
.page-intro {
  margin-bottom: 26px;
}

.page-intro h1 {
  font-size: 26px;
  font-weight: 800;
}

.page-intro p {
  color: var(--slate);
  font-size: 14.5px;
  margin-top: 6px;
}

/* ==============================================================================
   KEYFRAME ANIMATIONS & SCROLL REVEALS
   ============================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.25); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(79,70,229,0); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

/* Static reveal — Animations disabled for instant, clean UI */
.reveal, .reveal.is-revealed {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Skeleton Loading Animation */
.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* ==============================================================================
   RESPONSIVE BREAKPOINTS — OMNI-CHANNEL (DESKTOP → LAPTOP → TABLET → MOBILE)
   ============================================================================== */

/* LARGE DESKTOP (> 1440px) — Prevent over-stretched layouts */
@media (min-width: 1441px) {
  .content {
    max-width: 1360px;
  }

  .global-page-main {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1360px;
  }
}

/* LAPTOP (1025px - 1440px) — Streamline grids and sidebar proportions */
@media (max-width: 1440px) and (min-width: 1025px) {
  .content {
    max-width: 1120px;
    padding: 28px 24px 60px;
  }

  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }

  .stat .sn {
    font-size: 28px;
  }
}

/* TABLET LANDSCAPE & PORTRAIT (1024px and below) */
@media (max-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .content {
    padding: 24px 20px 60px;
  }

  .stat .sn {
    font-size: 26px;
  }

  .stat {
    padding: 18px;
  }

  /* Responsive table horizontal scroll with gradient hint */
  .table-wrap {
    position: relative;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to left, rgba(255,255,255,0.95), transparent);
    pointer-events: none;
    opacity: 0.8;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  }

  table.tbl th,
  table.tbl td {
    padding: 12px 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Form row collapse at tablet */
  .row2 {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  /* Public page catalog grids: 2 columns */
  .gig-grid, .catalog-grid, .site-grid, .project-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px;
  }

  /* Hero sections compact */
  .hero-section h1, .page-hero h1 {
    font-size: 32px !important;
  }

  .hero-section p, .page-hero p {
    font-size: 15px !important;
  }
}

/* TABLET PORTRAIT / MOBILE TRANSITION (960px and below) */
@media (max-width: 960px) {
  .side {
    transform: translateX(-100%);
    z-index: 1000;
  }
  
  .side.open {
    transform: translateX(0);
    box-shadow: var(--sh-lg);
  }
  
  .main {
    margin-left: 0;
  }
  
  .burger {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    backdrop-filter: blur(4px);
    z-index: 999;
    animation: fadeIn 0.2s ease;
  }
  
  .backdrop.show {
    display: block;
  }
  
  .topbar {
    padding: 0 16px;
    height: 60px;
  }

  .topbar h1 {
    font-size: 17px;
  }

  .auth-split {
    flex-direction: column;
    max-width: 540px;
  }

  .auth-split-art {
    padding: 32px;
    min-height: 200px;
    flex: none;
  }

  .auth-split-form {
    padding: 36px 24px;
  }

  /* Mega Menu responsive */
  .mega-menu-panel {
    left: 0 !important;
    right: 0 !important;
    max-width: 100vw !important;
    border-radius: 0 0 16px 16px !important;
  }
}

/* MEDIUM MOBILE / SMALL TABLET (768px and below) */
@media (max-width: 768px) {
  .row2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Public catalog grids: 1 column */
  .gig-grid, .catalog-grid, .site-grid, .project-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  /* Card adjustments */
  .card {
    padding: 20px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Global header compact */
  .global-nav-container {
    padding: 0 12px !important;
    gap: 8px !important;
  }

  .global-search-bar {
    max-width: 100% !important;
    min-width: unset !important;
  }

  .global-search-bar input {
    font-size: 14px !important;
  }

  /* Category directory grids */
  .dir-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .dir-cat-card {
    padding: 16px 12px !important;
  }

  /* Hide non-essential table columns on smaller screens */
  table.tbl .hide-mobile {
    display: none;
  }

  /* Announcement bar compact */
  .global-announcement-bar {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
}

/* SMARTPHONES & SMALL TABLETS (640px and below) */
@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stat {
    padding: 16px;
  }

  .stat .sn {
    font-size: 24px;
  }
  
  .content {
    padding: 14px 12px 80px;
  }
  
  .page-intro h1 {
    font-size: 20px;
  }

  .page-intro p {
    font-size: 13px;
  }

  .card {
    padding: 16px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
  }

  .card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .card h2 {
    font-size: 16px;
  }

  .btn {
    min-height: 44px;
    font-size: 14px;
    padding: 10px 16px;
  }

  .btn-lg {
    padding: 12px 20px;
    font-size: 15px;
    min-height: 48px;
  }

  .btn-sm {
    min-height: 38px;
    padding: 8px 14px;
  }

  .auth-card {
    padding: 24px 16px;
    border-radius: var(--radius);
  }

  /* Touch-friendly tap targets — minimum 44px */
  .side-nav a, .side-nav .na {
    padding: 12px 14px;
    min-height: 44px;
  }

  .dock-item {
    min-height: 44px;
    padding: 8px 10px;
  }

  /* Form inputs: larger touch targets */
  .input, select.input, textarea.input {
    padding: 13px 14px;
    font-size: 16px; /* prevents iOS zoom on focus */
    min-height: 48px;
  }

  .field label {
    font-size: 13.5px;
    margin-bottom: 6px;
  }

  /* Tables scroll hint */
  .table-wrap {
    margin: 0 -12px;
    padding: 0 12px;
    border-radius: 0;
  }

  table.tbl th,
  table.tbl td {
    padding: 10px 12px;
    font-size: 12.5px;
  }

  /* Responsive Bottom Modal behavior */
  #role-switch-modal > div,
  #inactivity-modal > div {
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    animation: slideUp 0.3s var(--ease-spring) !important;
  }

  /* Category directory: single column */
  .dir-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Hero sections full-width compact */
  .hero-section, .page-hero {
    padding: 32px 16px !important;
    border-radius: 0 !important;
  }

  .hero-section h1, .page-hero h1 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }

  .hero-section p, .page-hero p {
    font-size: 14px !important;
  }

  /* Wallet and profile sections */
  .wallet-stat-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* Filter bar compact */
  .filter-bar, .search-filter-bar {
    flex-direction: column !important;
    gap: 8px !important;
  }

  .filter-bar select, .search-filter-bar select,
  .filter-bar input, .search-filter-bar input {
    width: 100% !important;
  }

  /* Badge font scaling */
  .badge {
    font-size: 10.5px;
    padding: 3px 9px;
  }

  /* Topbar compact */
  .topbar {
    height: 56px;
    padding: 0 12px;
  }

  .topbar h1 {
    font-size: 16px;
  }

  /* Global announcement bar */
  .global-announcement-bar {
    font-size: 11px !important;
    padding: 5px 10px !important;
  }
}

/* ==============================================================================
   CLEAN DASHBOARDS: ZERO IRRITATING ANIMATIONS (BUYER, PUBLISHER & AGENCY)
   ============================================================================== */
.card,
.stat,
.card-tilt,
.perspective-container,
.tbl tr,
.welcome,
.page-intro {
  animation: none !important;
  transform: none !important;
}

.card:hover,
.stat:hover,
.card.hover-lift:hover,
.card-tilt:hover {
  transform: none !important;
  transition: box-shadow var(--trans-fast), border-color var(--trans-fast) !important;
}

.card-tilt::after {
  display: none !important;
}

.radar-scan,
.chat-pulse-ring {
  animation: none !important;
  display: none !important;
}

.reveal,
.reveal.is-revealed {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Chat Message Spring Entrance */
@keyframes msgSpring {
  0% { opacity: 0; transform: translateY(14px) scale(0.94); }
  70% { opacity: 1; transform: translateY(-2px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-bubble-enter {
  animation: msgSpring 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Mobile Bottom Navigation Dock (<= 640px) */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 16px 36px -6px rgba(15, 23, 42, 0.2), 0 4px 12px rgba(0,0,0,0.06);
  border-radius: 40px;
  padding: 6px 10px;
  z-index: 9999;
  gap: 4px;
  align-items: center;
  justify-content: space-around;
  width: calc(100% - 28px);
  max-width: 400px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 20px;
  color: var(--slate);
  font-size: 10.5px;
  font-weight: 600;
  transition: all 0.2s ease;
  flex: 1;
  text-decoration: none;
}

.dock-item svg {
  width: 20px;
  height: 20px;
  stroke: var(--slate);
  transition: stroke 0.2s ease, transform 0.2s ease;
}

.dock-item.active {
  color: var(--brand);
  background: var(--brand-wash);
}

.dock-item.active svg {
  stroke: var(--brand);
  transform: scale(1.1);
}

.dock-item:active {
  transform: scale(0.92);
}

@media (max-width: 640px) {
  .mobile-bottom-dock {
    display: flex;
  }
  body {
    padding-bottom: 74px;
  }
}

/* View Transitions API Disabled - Zero Page Crossfade Flickering */
@view-transition {
  navigation: none;
}

/* Accessibility: User Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Universal Global Page Layout (Full-width, zero sidebar offset) */
.global-page-main {
  width: 100%;
  min-height: calc(100vh - 120px);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==============================================================================
   SUPER ADMIN SUITE: FLOATING BULK DOCK, MODAL & ADVANCED FILTER BARS
   ============================================================================== */

/* Table Checkbox Styling */
.admin-row-cb, #admin-select-all {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--brand);
  border-radius: 4px;
  vertical-align: middle;
}

th.admin-cb-cell, td.admin-cb-cell {
  width: 44px;
  text-align: center !important;
  padding: 12px 10px !important;
}

/* Floating Bulk Dock */
.admin-bulk-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bulk-dock-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.bulk-dock-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
}

.bulk-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--brand);
  color: #ffffff;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
}

.bulk-dock-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bulk-dock-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.bulk-dock-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Bulk Deletion Confirmation Modal */
.admin-bulk-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-bulk-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.admin-bulk-modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 26px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
  animation: modalScaleUp 0.25s var(--ease-spring);
  z-index: 2;
}

.modal-icon-danger {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fee2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

/* Advanced Multi-Criteria Filter Bar */
.admin-filter-bar-container {
  margin-bottom: 22px;
}

.admin-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--sh-sm);
}

.filter-field-search {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.filter-field-search .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-2);
  pointer-events: none;
}

.filter-input-search {
  padding-left: 36px !important;
  padding-right: 32px !important;
  height: 38px !important;
  font-size: 13.5px !important;
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--slate);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 4px;
}

.filter-field {
  min-width: 140px;
}

.filter-limit-field {
  min-width: 105px;
}

.filter-select {
  height: 38px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  background-color: #fafafa !important;
  border-color: var(--line) !important;
  cursor: pointer;
}

.filter-select:focus {
  background-color: #ffffff !important;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 0 4px;
  font-size: 12.5px;
  color: var(--slate);
}

.results-badge strong {
  color: var(--ink);
}

.active-filter-indicator {
  background: var(--brand-wash);
  color: var(--brand);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

@media (max-width: 768px) {
  .admin-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .filter-field, .filter-field-search, .filter-limit-field {
    min-width: 100%;
    width: 100%;
  }

  .admin-bulk-dock {
    bottom: 16px;
    width: calc(100% - 32px);
  }

  .bulk-dock-inner {
    justify-content: space-between;
    width: 100%;
    border-radius: var(--radius);
  }
}

/* ==============================================================================
   Core Web Vitals & Lazy Rendering Architecture (PRD-PERF-2026)
   content-visibility: auto skips layout & paint calculations for off-screen blocks
   contain-intrinsic-size provides estimated placeholder height to prevent CLS
   ============================================================================== */
.cv-auto-sec {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.cv-auto-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 240px;
}

.cv-auto-footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}

/* ==============================================================================
   CLEAN, STATIC DASHBOARDS — ZERO JITTER, ZERO NUMBER SPINNING, NO SHIFTS
   ============================================================================== */
.welcome, .stat-grid, .stat, .card, .tbl, .tbl tr, .page-intro, .layout-main, .reveal {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  opacity: 1 !important;
}

.stat:hover, .card:hover, .card.hover-lift:hover {
  transform: none !important;
}

