/* ============================================================
   Salesrep Platform — Custom Styles
   File: assets/css/custom.css
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --primary:       #0A1628;
  --secondary:     #1B3A6B;
  --accent:        #E8A020;
  --accent-light:  #F5C842;
  --surface:       #F0F4FA;
  --card:          #FFFFFF;
  --text-primary:  #0A1628;
  --text-muted:    #6B7A99;
  --success:       #22C55E;
  --danger:        #EF4444;
  --warning:       #F59E0B;
  --live-pulse:    #22C55E;

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;
  --radius-xl:     22px;

  --shadow-card:   0 1px 3px rgba(10,22,40,0.06), 0 4px 16px rgba(10,22,40,0.06);
  --shadow-md:     0 4px 24px rgba(10,22,40,0.1);
  --shadow-lg:     0 8px 40px rgba(10,22,40,0.15);
  --shadow-accent: 0 4px 20px rgba(232,160,32,0.25);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.font-display { font-family: 'Syne', sans-serif; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(27,58,107,0.2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(27,58,107,0.4); }

.scrollbar-thin::-webkit-scrollbar { width: 4px; }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid rgba(27,58,107,0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-hover:hover { transform: translateY(-2px); }

/* ── Status Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge-live    { background: #dcfce7; color: #15803d; }
.badge-pending { background: #fef9c3; color: #a16207; }
.badge-closed  { background: #f1f5f9; color: #64748b; }
.badge-rejected{ background: #fee2e2; color: #b91c1c; }
.badge-approved{ background: #dcfce7; color: #15803d; }
.badge-won     { background: #dbeafe; color: #1d4ed8; }
.badge-lost    { background: #f3f4f6; color: #6b7280; }
.badge-upcoming{ background: #ede9fe; color: #6d28d9; }
.badge-draft   { background: #f3f4f6; color: #6b7280; }

/* ── Live Pulse Indicator ───────────────────────────────── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-pulse);
  position: relative;
}
.live-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--live-pulse);
  opacity: 0.3;
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50%       { transform: scale(1.6); opacity: 0; }
}

/* ── Countdown Timer ────────────────────────────────────── */
.countdown-timer {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--success);
  transition: color 0.4s ease;
}
.countdown-timer.warning { color: var(--warning); }
.countdown-timer.urgent  { color: var(--danger); animation: urgency-pulse 0.8s ease infinite; }
@keyframes urgency-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
  white-space: nowrap;
}

/* System-wide button shape: ensure every button style keeps the same curved edges. */
button,
input[type='submit'],
input[type='button'],
input[type='reset'],
.btn,
a.btn,
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-outline-white,
.btn-danger,
.btn-success,
.btn-logout {
  border-radius: var(--radius-md);
}

.btn-xs,
.btn-sm,
.btn-lg {
  border-radius: var(--radius-md);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: var(--accent);
  color: var(--primary);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(232,160,32,0.35); }

.btn-secondary {
  background: var(--secondary);
  color: white;
}
.btn-secondary:hover { background: #24518a; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(27,58,107,0.2);
  color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--secondary); background: rgba(27,58,107,0.04); }

.btn-outline-white {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: white;
}
.btn-outline-white:hover { border-color: white; background: rgba(255,255,255,0.08); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

/* Logout actions should read as destructive but stay legible on dark surfaces. */
.btn-logout {
  border: 1px solid rgba(239,68,68,0.45);
  color: #fecaca;
  background: rgba(127,29,29,0.18);
}

.btn-logout:hover {
  color: #ffe4e6;
  border-color: rgba(248,113,113,0.75);
  background: rgba(185,28,28,0.35);
}

.sidebar-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fca5a5;
  background: rgba(127,29,29,0.22);
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.sidebar-logout svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.sidebar-logout:hover {
  color: #ffe4e6;
  background: rgba(185,28,28,0.42);
  border-color: rgba(248,113,113,0.75);
}

.sidebar-user-row {
  overflow: hidden;
}

#sidebar-toggle .sidebar-toggle-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

.btn-success { background: #16a34a; color: white; }
.btn-success:hover { background: #15803d; transform: translateY(-1px); }

.btn-xs {
  padding: 6px 9px;
  font-size: 10px;
  line-height: 1.2;
  border-radius: 7px;
}

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ── Form Controls ──────────────────────────────────────── */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: white;
  border: 1.5px solid rgba(27,58,107,0.12);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(27,58,107,0.08);
}
.form-input.error,
.form-select.error,
.form-textarea.error { border-color: var(--danger); }

select.form-control,
select.location-select {
  -webkit-appearance: none;
  appearance: none;
  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='%23d4a017' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 36px;
  cursor: pointer;
}

select.form-control:disabled,
select.location-select:disabled {
  background-color: #f9fafb;
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 0.7;
}

select.form-control option[disabled],
select.location-select option[disabled] {
  color: #9ca3af;
}

/* Input with a leading icon — overrides the shorthand padding set above */
.form-input-icon { padding-left: 2.375rem; }

/* Input with leading icon */
.form-input-icon { padding-left: 2.375rem; }

.form-group { margin-bottom: 18px; }
.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; }
.form-hint  { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

/* ── Stats Card ─────────────────────────────────────────── */
.stat-card {
  background: white;
  border: 1px solid rgba(27,58,107,0.08);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
button.stat-card {
  appearance: none;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  background: white;
  cursor: pointer;
}

.stat-card:hover,
button.stat-card:hover {
  border-color: rgba(232,160,32,0.55);
  box-shadow: 0 10px 28px rgba(10,22,40,0.12), 0 0 0 2px rgba(232,160,32,0.18);
  transform: translateY(-2px);
}

.stat-card:active,
button.stat-card:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(10,22,40,0.1), 0 0 0 2px rgba(232,160,32,0.22);
}

button.stat-card:focus-visible {
  outline: none;
  border-color: rgba(232,160,32,0.75);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.25), 0 8px 24px rgba(10,22,40,0.12);
}
.stat-card .stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Data Table ─────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface);
  border-bottom: 1px solid rgba(27,58,107,0.08);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(27,58,107,0.05);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(240,244,250,0.6); }

.offers-actions-col {
  min-width: 210px;
}

.offers-actions-cell {
  white-space: nowrap;
}

.offers-actions-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.offers-actions-wrap .btn-xs {
  min-width: 74px;
}

.offers-actions-wrap-single .btn-xs {
  min-width: 128px;
}

.offer-type-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.offer-type-col {
  min-width: 128px;
}

.offer-type-cell {
  white-space: nowrap;
}

.active-offer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 250px;
  align-items: stretch;
  column-gap: 16px;
}

.active-offer-info {
  min-width: 0;
}

.active-offer-qty {
  width: 100%;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.active-offer-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}

.active-offer-time {
  min-height: 24px;
}

.active-offer-state {
  min-height: 16px;
}

.active-offer-meta-line {
  max-width: 240px;
}

.active-offer-total {
  min-height: 16px;
}

.active-offer-best-line {
  min-height: 28px;
}

.active-offer-improve-slot {
  min-height: 16px;
}

.active-offer-details-btn {
  min-width: 104px;
  align-self: flex-start;
}

.admin-actions-col {
  min-width: 220px;
}

.admin-actions-cell {
  white-space: normal;
}

.admin-actions-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, max-content));
  gap: 6px;
  align-items: center;
  justify-content: start;
}

.admin-actions-wrap > form {
  margin: 0;
}

.admin-actions-wrap .btn,
.admin-actions-wrap a.btn {
  width: 100%;
  min-width: 76px;
  justify-content: center;
}

.myoffers-table {
  min-width: 1080px;
}

.myoffers-table th,
.myoffers-table td {
  vertical-align: middle;
}

.myoffers-align-left {
  text-align: left;
}

.myoffers-align-center {
  text-align: center;
}

.myoffers-medicine-col {
  min-width: 360px;
}

.myoffers-submitted-col {
  min-width: 170px;
}

.myoffers-action-col {
  min-width: 150px;
}

.myoffers-medicine-cell .myoffers-medicine-meta {
  margin-top: 2px;
  line-height: 1.35;
}

.myoffers-submitted {
  white-space: nowrap;
}

.myoffers-action-cell {
  white-space: nowrap;
}

.myoffers-offer-btn {
  min-width: 120px;
  justify-content: center;
}

.myoffers-action-cell .myoffers-offer-btn {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1279px) {
  .active-offer-card {
    grid-template-columns: minmax(0, 1fr) 160px 220px;
  }

  .active-offer-meta-line {
    max-width: 210px;
  }

  .admin-actions-col {
    min-width: 186px;
  }

  .admin-actions-wrap {
    grid-template-columns: repeat(2, minmax(72px, 1fr));
  }

  .myoffers-table {
    min-width: 940px;
  }
}

/* ── Dashboard Layout ───────────────────────────────────── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--surface);
}
.dashboard-main {
  flex: 1;
  margin-left: 256px; /* sidebar width */
  height: 100vh;
  overflow-y: auto;
  transition: margin-left 0.3s ease;
}

/* Keep dashboard pages flush to the viewport top and scroll only within main content. */
body.dashboard-shell {
  margin: 0;
  overflow: hidden;
}

body.dashboard-shell .dashboard-layout {
  position: fixed;
  inset: 0;
  width: 100%;
  min-height: 100dvh;
  align-items: stretch;
}

body.dashboard-shell #sidebar {
  top: 0 !important;
  left: 0;
  margin-top: 0 !important;
  height: 100%;
}

body.dashboard-shell .dashboard-main {
  margin-top: 0 !important;
  min-height: 100%;
  height: 100%;
  overflow-y: auto;
}

body.dashboard-shell .dashboard-header {
  top: 0;
  margin-top: 0;
}

body.dashboard-shell .page-enter {
  animation: none;
  opacity: 1;
  transform: none;
}

#sidebar.collapsed {
  width: 72px !important;
}

html[data-sidebar-collapsed='1'] #sidebar {
  width: 72px !important;
}

#sidebar.collapsed .nav-label,
#sidebar.collapsed .sidebar-brand-text,
#sidebar.collapsed .sidebar-user-text,
#sidebar.collapsed .nav-badge {
  display: none !important;
}

html[data-sidebar-collapsed='1'] #sidebar .nav-label,
html[data-sidebar-collapsed='1'] #sidebar .sidebar-brand-text,
html[data-sidebar-collapsed='1'] #sidebar .sidebar-user-text,
html[data-sidebar-collapsed='1'] #sidebar .nav-badge {
  display: none !important;
}

#sidebar.collapsed .sidebar-user-row {
  justify-content: center;
  gap: 6px;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar-collapsed='1'] #sidebar .sidebar-user-row {
  justify-content: center;
  gap: 6px;
  padding-left: 0;
  padding-right: 0;
}

#sidebar.collapsed .sidebar-avatar {
  width: 30px;
  height: 30px;
}

html[data-sidebar-collapsed='1'] #sidebar .sidebar-avatar {
  width: 30px;
  height: 30px;
}

#sidebar.collapsed .sidebar-logout {
  display: none !important;
}

html[data-sidebar-collapsed='1'] #sidebar .sidebar-logout {
  display: none !important;
}

#sidebar.collapsed #sidebar-toggle {
  width: 40px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

html[data-sidebar-collapsed='1'] #sidebar #sidebar-toggle {
  width: 40px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

#sidebar.collapsed #sidebar-toggle .sidebar-toggle-label {
  display: none;
}

html[data-sidebar-collapsed='1'] #sidebar #sidebar-toggle .sidebar-toggle-label {
  display: none;
}

#sidebar.collapsed nav a {
  justify-content: center;
}

html[data-sidebar-collapsed='1'] #sidebar nav a {
  justify-content: center;
}

#sidebar.collapsed nav a i {
  margin-right: 0;
}

html[data-sidebar-collapsed='1'] #sidebar nav a i {
  margin-right: 0;
}

#sidebar.collapsed + #sidebar-overlay + .dashboard-main,
#sidebar.collapsed ~ .dashboard-main {
  margin-left: 72px;
}

html[data-sidebar-collapsed='1'] .dashboard-main {
  margin-left: 72px;
}

@media (max-width: 1023px) {
  .dashboard-main {
    margin-left: 0;
    height: 100dvh;
  }
  #sidebar {
    left: 0;
    right: auto;
    width: min(84vw, 320px);
    transform: translateX(-100%);
    box-shadow: 0 16px 38px rgba(10,22,40,0.45);
  }
  #sidebar.mobile-open {
    transform: translateX(0);
  }
  #sidebar.collapsed ~ .dashboard-main { margin-left: 0; }
  html[data-sidebar-collapsed='1'] .dashboard-main { margin-left: 0; }
}

.dashboard-header {
  background: white;
  border-bottom: 1px solid rgba(27,58,107,0.08);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.dashboard-content { padding: 28px 24px; }

/* ── Bid Card ───────────────────────────────────────────── */
.bid-card {
  background: white;
  border: 1px solid rgba(27,58,107,0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  position: relative;
}
.bid-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(27,58,107,0.15);
}
.bid-card.is-live {
  border-color: rgba(34,197,94,0.2);
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(34,197,94,0.1);
}
.bid-card.is-closed { opacity: 0.75; }
.bid-card.is-closed::after {
  content: 'CLOSED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: rgba(100,116,139,0.15);
  letter-spacing: 0.2em;
  pointer-events: none;
}

/* ── OTP Input ──────────────────────────────────────────── */
.otp-input-group { display: flex; gap: 8px; }
.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  border: 2px solid rgba(27,58,107,0.15);
  border-radius: var(--radius-md);
  background: white;
  color: var(--primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.otp-input:focus { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(27,58,107,0.1); }
.otp-input.filled { border-color: var(--accent); background: #fffbf0; }

/* ── Upload Zone ────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed rgba(27,58,107,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(240,244,250,0.5);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--secondary);
  background: rgba(27,58,107,0.04);
}
.upload-zone.has-file {
  border-color: var(--accent);
  background: rgba(232,160,32,0.04);
}

/* ── Supplier Submit: Time Slot Picker ─────────────────── */
.timeslot-option {
  display: block;
  cursor: pointer;
}

.timeslot-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.timeslot-content {
  border: 2px solid rgba(27,58,107,0.22);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  background: #fff;
}

.timeslot-option:hover .timeslot-content {
  border-color: rgba(27,58,107,0.45);
}

.timeslot-radio:checked + .timeslot-content {
  border-color: var(--accent);
  background: #fff8e8;
  box-shadow: 0 0 0 3px rgba(232,160,32,0.2), 0 8px 20px rgba(232,160,32,0.2);
  transform: translateY(-1px);
}

.timeslot-radio:focus-visible + .timeslot-content {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,160,32,0.28);
}

#slot-picker-section.timeslot-invalid .timeslot-content {
  border-color: rgba(239,68,68,0.45);
}

/* ── Modal ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}
.modal-box {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}
.modal-backdrop.open .modal-box {
  transform: scale(1) translateY(0);
}
.modal-header {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 2;
  background: white;
  border-bottom: 1px solid rgba(27,58,107,0.08);
  padding-bottom: 14px;
}
.modal-body { padding: 16px 28px 20px; }
.modal-footer { padding: 0 28px 24px; display: flex; gap: 10px; justify-content: flex-end; }

.modal-summary {
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid rgba(27,58,107,0.08);
  padding: 10px 12px;
  margin-bottom: 12px;
}

.modal-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal-data-table td,
.modal-data-table th {
  padding-top: 10px;
  padding-bottom: 10px;
}

.loading-skeleton-lines {
  display: grid;
  gap: 10px;
}

.loading-skeleton-lines .line {
  height: 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f0f4fa 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

.loading-skeleton-lines .line:nth-child(1) { width: 60%; }
.loading-skeleton-lines .line:nth-child(2) { width: 92%; }
.loading-skeleton-lines .line:nth-child(3) { width: 88%; }
.loading-skeleton-lines .line:nth-child(4) { width: 75%; }

/* ── Toast ──────────────────────────────────────────────── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid transparent;
  max-width: 360px;
  pointer-events: all;
  animation: toast-in 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
  font-size: 13px;
  font-weight: 500;
}
.toast-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.toast-error   { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.toast-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.toast-info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.toast.hiding  { animation: toast-out 0.25s ease forwards; }

@keyframes toast-in  { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(110%); opacity: 0; } }

/* ── Hero Grid Pattern ──────────────────────────────────── */
.hero-grid {
  background-image:
    linear-gradient(rgba(232,160,32,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,160,32,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ── Glassmorphism ──────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ── Animated Counter ───────────────────────────────────── */
.count-up { transition: all 0.5s ease; }

/* ── Section headings ───────────────────────────────────── */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(232,160,32,0.12);
  color: var(--accent);
  margin-bottom: 12px;
}

/* ── Step Connector ─────────────────────────────────────── */
.step-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(232,160,32,0.2));
}

/* ── Loading Skeleton ───────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f0f4fa 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Page Transition ────────────────────────────────────── */
.page-enter { animation: page-fade-in 0.35s ease forwards; }
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Outbid Alert ───────────────────────────────────────── */
.outbid-alert {
  background: #fff1f2;
  border: 1.5px solid #fecdd3;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #be123c;
}

/* ── Admin KPI card accent variants ────────────────────── */
.kpi-blue   .stat-icon { background: rgba(27,58,107,0.08); color: var(--secondary); }
.kpi-gold   .stat-icon { background: rgba(232,160,32,0.1); color: var(--accent); }
.kpi-green  .stat-icon { background: rgba(34,197,94,0.1);  color: #16a34a; }
.kpi-red    .stat-icon { background: rgba(239,68,68,0.1);  color: #dc2626; }
.kpi-purple .stat-icon { background: rgba(139,92,246,0.1); color: #7c3aed; }

/* ── Responsive utility ─────────────────────────────────── */
@media (max-width: 640px) {
  .active-offer-card {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .active-offer-qty,
  .active-offer-meta {
    max-width: 280px;
    width: 100%;
    justify-self: center;
  }

  .active-offer-meta {
    align-items: center;
    text-align: center;
  }

  .active-offer-meta-line {
    max-width: 280px;
  }

  .active-offer-details-btn {
    align-self: center;
  }

  .dashboard-content  { padding: 16px; }
  .dashboard-header   { padding: 12px 16px; align-items: flex-start; flex-wrap: wrap; }
  .dashboard-header > .ml-auto { margin-left: 0 !important; }
  .modal-box          { border-radius: var(--radius-lg); }
  .modal-header,
  .modal-body,
  .modal-footer       { padding-left: 20px; padding-right: 20px; }

  .card {
    border-radius: 14px;
  }

  .btn {
    min-height: 40px;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px;
  }

  .data-table th,
  .data-table td {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  #sidebar, .dashboard-header, #toast-container { display: none !important; }
  .dashboard-main { margin-left: 0 !important; }
}
