/* ═══════════════════════════════════════════
   MYROAD — Portal Styles
   ═══════════════════════════════════════════ */

:root {
  --bg:          #f6f8fa;
  --bg-card:     #ffffff;
  --border:      #d0d7de;
  --border-hover:#b1bac4;
  --text:        #1f2328;
  --text-muted:  #57606a;
  --gold:        #b08800;
  --gold-light:  #f0c000;
  --green:       #1a7f37;
  --red:         #cf222e;
  --blue:        #0969da;
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
  --radius:      8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }

/* ─────────────────────────────────────────
   LANDING
───────────────────────────────────────── */
#landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2333 100%);
  color: #e6edf3;
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(176,136,0,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(9,105,218,0.10) 0%, transparent 50%);
  pointer-events: none;
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 2;
}
.hero-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--gold-light);
}
.hero-logo span {
  color: rgba(230,237,243,0.5);
  font-weight: 400;
  font-size: 13px;
  margin-left: 8px;
}
.hero-nav-actions { display: flex; gap: 10px; }

.hero-body {
  padding: 80px 40px 90px;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 20px;
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  color: #e6edf3;
}
.hero-title em {
  font-style: normal;
  color: var(--gold-light);
}
.hero-subtitle {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(230,237,243,0.7);
  margin-bottom: 40px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-primary:hover { background: #956e00; border-color: #956e00; }

.btn-secondary {
  background: transparent;
  color: rgba(230,237,243,0.85);
  border-color: rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.35); }

.btn-outline {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: var(--border-hover); }

.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Module showcase on landing */
.modules-showcase {
  background: var(--bg);
  padding: 60px 40px;
}
.showcase-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 32px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}
.showcase-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.15s;
}
.showcase-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-hover); transform: translateY(-2px); }
.showcase-card-icon { font-size: 28px; margin-bottom: 12px; }
.showcase-card-label { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.showcase-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.showcase-card-accent {
  width: 3px;
  height: 32px;
  border-radius: 2px;
  float: right;
  margin-left: 16px;
  background: var(--mod-color, var(--gold));
}

/* Landing footer */
.landing-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ─────────────────────────────────────────
   AUTH OVERLAY
───────────────────────────────────────── */
#authOverlay {
  position: fixed;
  inset: 0;
  background: rgba(13,17,23,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-box-header {
  background: linear-gradient(135deg, #0d1117, #1c2333);
  padding: 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.auth-box-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: -0.5px;
}
.auth-box-sub {
  font-size: 12px;
  color: rgba(230,237,243,0.5);
  margin-top: 4px;
}
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.auth-tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
}
.auth-tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(176,136,0,0.04);
}
.auth-tab-btn:hover:not(.active) { background: var(--bg); }

.auth-body { padding: 24px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s;
  outline: none;
}
.form-group input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,136,0,0.12); }

.modules-select { margin-bottom: 16px; }
.modules-select-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.modules-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.module-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
  font-weight: 500;
}
.module-checkbox:hover { border-color: var(--gold); background: rgba(176,136,0,0.04); }
.module-checkbox input { accent-color: var(--gold); width: 14px; height: 14px; cursor: pointer; }

.btn-full { width: 100%; justify-content: center; padding: 11px; font-size: 14px; }
.btn-auth-primary {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
  border-radius: var(--radius);
  border: none;
}
.btn-auth-primary:hover { background: #956e00; }
.btn-auth-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-err { font-size: 12px; margin-top: 10px; min-height: 18px; }

/* ─────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────── */
#dashboard {
  min-height: 100vh;
  flex-direction: column;
  display: none;
}

.dash-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.dash-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.5px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-pill-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.btn-signout {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-signout:hover { border-color: var(--red); color: var(--red); }

.dash-body {
  padding: 40px 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.dash-greeting {
  margin-bottom: 32px;
}
.dash-greeting h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.dash-greeting p { color: var(--text-muted); font-size: 14px; }

/* Status cards */
.status-card {
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
  border: 1px solid;
}
.status-icon { font-size: 36px; margin-bottom: 12px; }
.status-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.status-card p { font-size: 14px; line-height: 1.6; }
.status-pending { background: #fff8e6; border-color: #f0c000; color: #7a5000; }
.status-denied  { background: #fff0f0; border-color: #cf222e; color: #7a0000; }
.status-info    { background: var(--bg); border-color: var(--border); color: var(--text-muted); }

/* Module grid */
#accessStatus { display: none; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

#moduleGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.module-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--mod-color, var(--gold));
}
.module-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--mod-color, var(--gold));
  transform: translateY(-2px);
}
.module-card-icon { font-size: 32px; margin-bottom: 12px; }
.module-card-label { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.module-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.module-card-open {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mod-color, var(--gold));
  letter-spacing: 0.5px;
}

/* ─────────────────────────────────────────
   ADMIN SECTION
───────────────────────────────────────── */
#adminSection {
  border-top: 2px solid var(--border);
  padding-top: 40px;
  margin-top: 8px;
}
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-tabs { display: flex; gap: 4px; }
.admin-tab-btn {
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.admin-tab-btn.active { background: var(--gold); color: #fff; border-color: var(--gold); }
.admin-tab-btn:hover:not(.active) { background: var(--bg); }

#pendingBadge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-row label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
#requestFilter {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}

/* Request / user cards */
.request-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s;
}
.request-card:hover { box-shadow: var(--shadow-sm); }

.request-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}
.request-user strong { font-size: 15px; font-weight: 700; display: block; }
.request-email { font-size: 12px; color: var(--text-muted); }
.request-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.request-date { font-size: 12px; color: var(--text-muted); }
.request-mods-requested { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.request-mods-requested em { color: var(--text); font-style: normal; font-weight: 500; }
.reviewed-note { font-size: 12px; color: var(--text-muted); font-style: italic; margin-top: 8px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-pending  { background: #fff8e6; color: #7a5000; border: 1px solid #f0c000; }
.badge-approved { background: #e6f4ea; color: #1a7f37; border: 1px solid #82c491; }
.badge-denied   { background: #fff0f0; color: #cf222e; border: 1px solid #f5c0c0; }

/* Approve module checkboxes */
.approve-mods { padding-top: 12px; border-top: 1px solid var(--border); }
.approve-mods-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.approve-mods-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.mod-check {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s;
}
.mod-check:hover { border-color: var(--gold); background: rgba(176,136,0,0.04); }
.mod-check.mod-requested { border-color: var(--gold); background: rgba(176,136,0,0.06); font-weight: 600; }
.mod-check input { accent-color: var(--gold); cursor: pointer; }

.request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-approve {
  padding: 7px 16px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-approve:hover { opacity: 0.85; }
.btn-approve:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-deny {
  padding: 7px 16px;
  background: none;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-deny:hover { background: var(--red); color: #fff; }
.btn-deny:disabled { opacity: 0.5; cursor: not-allowed; }

/* Misc */
.loading-text, .empty-text, .err-text {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}
.err-text { color: var(--red); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-nav { padding: 16px 20px; }
  .hero-body { padding: 48px 20px 56px; }
  .modules-showcase { padding: 40px 20px; }
  .dash-header { padding: 0 20px; }
  .dash-body { padding: 24px 20px; }
  .admin-header { flex-direction: column; align-items: flex-start; }
  .modules-check-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: center; }
}
