:root {
  --brand: #0d1b3d;
  --accent: #c0c0c0;
  --muted: #c0c0c0;          /* <-- your requested grey lives here too */
  --bg: #f5f5f5;
}

/* Reset-ish */
* { box-sizing: border-box; }
body {
  font-family: 'Red Hat Display', sans-serif;
  margin: 0;
  background-color: var(--bg);
  color: #111827;
  line-height: 1.4;
}

/* Simple container helper */
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid #e6e9ee;
  box-shadow: 0 1px 0 rgba(16,24,40,0.02);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { margin: 0; font-size: 20px; color: var(--brand); }
.main-nav a { color: var(--muted); margin-left: 12px; text-decoration: none; }
.main-nav a:hover { color: var(--accent); }

/* Footer */
.site-footer { padding: 18px 0; text-align: center; color: var(--muted); font-size: 14px; margin-top: 24px; }

/* -------------------------
   Global button baseline
   ------------------------- */
.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  background: #efefef;
  color: #111;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
a.btn { display: inline-block; }

/* A generic "primary" for legacy places; NOT used by Upload or Confirm */
.btn.primary {
  background: var(--accent);
  color: #fff;
}

/* -------------------------
   Layout containers (shared)
   ------------------------- */
.site-main { padding: 24px 0; }
.main { flex: 1; padding: 32px; }
.content { flex: 1; padding: 32px; }
@media (max-width: 900px) {
  .main, .content { padding: 16px; }
}

/* -------------------------------
   Sidebar layout (global/shared)
---------------------------------*/
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  flex-wrap: nowrap;      /* important: don't wrap sidebar under content */
}

.sidebar {
  width: 240px;
  background: var(--brand);
  color: #fff;
  flex: 0 0 250px;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px;
}

.content {
  flex: 1 1 auto;         /* fills the rest of the width */
  min-width: 0;           /* prevents overflow from blowing out layout */
}

.sidebar .logo img { max-width: 170px; margin-top: 20px; margin-bottom: 10px; }

.sidebar .welcome {
  text-align: center; margin-bottom: 24px;
  font-size: 18px; line-height: 1.5;
}

.sidebar-nav {
  display: flex; flex-direction: column;
  gap: 12px; width: 100%;
}

/* Sidebar buttons (global) */
.sidebar-nav .btn {
  width: 100%; display: block; text-align: center;
  background: #12285b; color: #fff; font-weight: 500; border-radius: 8px;
}
.sidebar-nav .btn:hover { background: #1c3c88; }
.sidebar-nav .btn.upgrade { background: var(--accent); color: #fff; }
.sidebar-nav .btn.active { background: #0066ff; color: #fff; }

/* Refer button theming from your prefs (white + black, bold; blue on hover) */
.sidebar .refer-btn { background: #ffffff; color: #000; font-weight: 700; }
.sidebar .refer-btn:hover { background: #ffffff; color: #007bff; }
.sidebar .refer-btn img {
  width: 18px; height: 18px;
  vertical-align: middle; margin-right: 8px; margin-top: -2px;
}

@media (max-width: 900px) {
  .dashboard-layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row; align-items: center; justify-content: flex-start;
    padding: 12px; gap: 12px;
  }
  .sidebar .logo img { max-width: 100px; margin-bottom: 0; }
  .sidebar .welcome { margin-bottom: 0; text-align: left; font-size: 12px; }
  .sidebar-nav { flex-direction: row; gap: 8px; margin-left: auto; }
}

/* Sidebar helpers */
.sidebar-spacer { height: 96px; }
@media (max-width: 900px) { .sidebar-spacer { height: 0; } }
.sidebar-item img { width: 18px; height: 18px; margin-right: 8px; vertical-align: middle; }

/* -------------------------
   Modal (Referral Popup)
   ------------------------- */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.5); }
.modal-dialog {
  position: relative; z-index: 1001;
  width: min(720px, calc(100vw - 32px));
  background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  padding: 32px 28px; border: 1px solid #e5e7eb; min-height: 360px;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-title { margin: 0; font-size: 20px; font-weight: 700; color: #111827; }
.modal-close { background: transparent; border: none; color: #6b7280; font-size: 22px; cursor: pointer; }
.modal-body { margin-top: 6px; padding-block: 16px 18px; }
.modal-actions { margin-top: 12px; display: flex; gap: 10px; justify-content: flex-end; }

/* Referral modal button look */
.modal .btn.primary {
  background: #D0D0D0;
  color: #000;
  font-weight: 700;
}
.modal .btn.primary:hover {
  background: #bcbcbc;
  color: #000;
}

/* Utility */
.label { display: block; font-weight: 600; margin: 8px 0 6px 0; }
.input-row { display: flex; gap: 10px; align-items: center; margin: 10px 0 6px 0; }
.input {
  flex: 1 1 auto; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 14px; background: #fff;
}
.divider { height: 1px; background: #e5e7eb; margin: 14px 0; }
.hint { color: var(--muted); font-size: 13px; margin-top: 10px; text-align: left; }
.referral-lede { margin: 8px 0 16px 0; }

/* ======================
   Utilities (global)
   ====================== */
.hidden { display: none !important; }

/* -------------------------
   Badges (global)
   ------------------------- */
.badge.bonus-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border-radius: 999px; background: #e6f0ff; color: #007bff;
  font-size: 12px; font-weight: 600; vertical-align: middle;
}

/* =========================
   UPLOAD BUTTON (ONLY HERE)
   ========================= */
.db-upload-btn {
  /* base/disabled state */
  background: #c0c0c0;      /* your grey */
  color: #fff;
  border: none;
  border-radius: 8px;        /* same rounding as Confirm */
  padding: 8px 16px;         /* match Confirm sizing */
  font-size: 14px;           /* match Confirm font size */
  line-height: 1;            /* snug like Confirm */
  outline: none;
}
.db-upload-btn.is-disabled {
  background: #c0c0c0;      /* keep same grey when disabled */
  color: #fff;
  cursor: not-allowed;
  opacity: 1;                /* do not fade */
}
.db-upload-btn.is-ready {
  background: #0066ff;      /* blue when files are selected */
  color: #fff;
  cursor: pointer;
}
.db-upload-btn:focus-visible {
  outline: 2px solid #99c2ff;  /* subtle, accessible focus */
  outline-offset: 2px;
}

/* -------
   SCROLL
   ------- */

html {
  scroll-behavior: smooth;
}
