/* =========================================================
   MockTest SaaS — Main CSS (global styles)
   ========================================================= */

/* ── Design Tokens (CSS Custom Properties) ───────────────────
   Defined here so they ALWAYS load with main.css.
   style.css also defines them as a backup, but WordPress does
   not auto-enqueue style.css — so we define them here too.
   ========================================================= */
:root {
  /* Brand colours — deep indigo, professional & confident */
  --primary:        #3949AB;
  --primary-dark:   #2C3893;
  --primary-light:  #5C6BC0;
  --primary-glow:   rgba(57,73,171,0.14);
  --secondary:      #0F9D8C;
  --secondary-dark: #0C8276;
  --danger:         #D64545;
  --danger-light:   #F0696B;
  --warn:           #B3791D;
  --warn-light:     #E0A23A;

  /* Backgrounds */
  --bg:             #F6F7FA;
  --bg-2:           #EEF0F5;
  --surface:        #FFFFFF;
  --surface-2:      #F4F5F8;
  --surface-3:      #E9EBF1;

  /* Borders */
  --border:         #E3E6ED;
  --border-strong:  #CBD0DC;

  /* Text */
  --text:           #161B26;
  --text-secondary: #3E4456;
  --muted:          #6B7180;

  /* Radius */
  --radius-sm:      8px;
  --radius:         12px;
  --radius-lg:      16px;
  --radius-xl:      20px;

  /* Shadows */
  --shadow-sm:      0 1px 2px rgba(22,27,38,0.04), 0 1px 1px rgba(22,27,38,0.03);
  --shadow:         0 4px 12px -2px rgba(22,27,38,0.07), 0 2px 4px -1px rgba(22,27,38,0.04);
  --shadow-lg:      0 16px 40px -8px rgba(22,27,38,0.14);
  --shadow-glow:    0 0 0 rgba(0,0,0,0);

  /* Typography */
  --font:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:      'JetBrains Mono', 'Fira Code', monospace;

  /* Layout */
  --sidebar-w:      268px;
  --topbar-h:       72px;

  /* Animation */
  --transition:     0.18s cubic-bezier(0.4,0,0.2,1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14.5px;
}

/* Dark background for all MockTest portal pages */
body.mt-page {
  background: var(--bg);
  color: var(--text);
}

/* Light bg only for plain WP non-site pages (not our dashboards/login) */
body:not(.mt-page):not(.mt-site) {
  background: #fff;
  color: #1a202c;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

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

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Utility ──────────────────────────────────────────────── */
.mt-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.mt-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.mt-text-primary   { color: var(--primary); }
.mt-text-secondary { color: var(--secondary); }
.mt-text-muted     { color: var(--muted); }
.mt-text-danger    { color: var(--danger); }

.mt-fw-800 { font-weight: 800; }
.mt-fw-700 { font-weight: 700; }
.mt-fw-600 { font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────── */
.mt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  outline: none;
  position: relative;
}

.mt-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.mt-btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: var(--shadow);
}
.mt-btn-primary:active { background: var(--primary-dark); }

.mt-btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}
.mt-btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--primary);
}

.mt-btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.mt-btn-ghost:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }

.mt-btn-danger {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid rgba(214,69,69,0.3);
}
.mt-btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

.mt-btn-sm { padding: 6px 14px; font-size: 12px; }
.mt-btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }

.mt-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ── Cards ────────────────────────────────────────────────── */
.mt-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.mt-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

.mt-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
}
.mt-card-header h2 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mt-card-body { padding: 24px; }

/* ── Stat Cards ───────────────────────────────────────────── */
.mt-stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.mt-stat-card:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }

.mt-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 14px;
  background: var(--primary-glow);
  color: var(--primary);
}
.mt-stat-card.accent-teal .mt-stat-icon { background: rgba(15,157,140,0.12); color: var(--secondary); }
.mt-stat-card.accent-warn .mt-stat-icon { background: rgba(179,121,29,0.12); color: var(--warn); }
.mt-stat-card.accent-danger .mt-stat-icon { background: rgba(214,69,69,0.1); color: var(--danger); }

.mt-stat-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.mt-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.mt-stat-delta {
  font-size: 12px;
  color: var(--secondary-dark);
  margin-top: 6px;
  font-weight: 600;
}

/* ── Badges ───────────────────────────────────────────────── */
.mt-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mt-badge-active   { background: rgba(15,157,140,0.1); color: var(--secondary-dark); border: 1px solid rgba(15,157,140,0.25); }
.mt-badge-inactive { background: rgba(214,69,69,0.1); color: var(--danger); border: 1px solid rgba(214,69,69,0.25); }
.mt-badge-pro      { background: var(--primary-glow); color: var(--primary); border: 1px solid rgba(57,73,171,0.25); }
.mt-badge-basic    { background: var(--surface-3); color: var(--muted); border: 1px solid var(--border-strong); }
.mt-badge-enterprise { background: rgba(15,157,140,0.1); color: var(--secondary-dark); border: 1px solid rgba(15,157,140,0.25); }

/* ── Form Inputs ──────────────────────────────────────────── */
.mt-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.mt-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
}
.mt-input {
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.mt-input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.mt-input::placeholder { color: var(--muted); opacity: 0.75; }
.mt-input-icon-wrap { position: relative; }
.mt-input-icon-wrap .mt-input { padding-left: 44px; }
.mt-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}

/* ── Alerts ───────────────────────────────────────────────── */
.mt-alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  animation: mtFadeIn 0.3s ease;
}
.mt-alert-error   { background: rgba(214,69,69,0.08); color: var(--danger); border: 1px solid rgba(214,69,69,0.2); }
.mt-alert-success { background: rgba(15,157,140,0.08); color: var(--secondary-dark); border: 1px solid rgba(15,157,140,0.2); }
.mt-alert-info    { background: var(--primary-glow); color: var(--primary-dark); border: 1px solid rgba(57,73,171,0.2); }

/* ── Tables ───────────────────────────────────────────────── */
.mt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mt-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.mt-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.mt-table tbody tr:hover td { background: var(--surface-2); }
.mt-table tbody tr:last-child td { border-bottom: none; }

/* ── Modal ────────────────────────────────────────────────── */
.mt-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.mt-modal-overlay.open { display: flex; }
.mt-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: mtSlideUp 0.3s ease;
}
.mt-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.mt-modal-title {
  font-size: 18px;
  font-weight: 700;
}
.mt-modal-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.mt-modal-close:hover { color: var(--danger); border-color: var(--danger); }

/* ── Animations ───────────────────────────────────────────── */
@keyframes mtFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes mtSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes mtPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
@keyframes mtSpin {
  to { transform: rotate(360deg); }
}
.mt-spin { animation: mtSpin 0.8s linear infinite; }
.mt-pulse { animation: mtPulse 1.5s ease infinite; }

/* ── Loading Skeleton ─────────────────────────────────────── */
.mt-skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: mtSkeletonShimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes mtSkeletonShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── 404 / Error Page ─────────────────────────────────────── */
.mt-error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.mt-error-code {
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================================
   MockTest SaaS — Site Header & Footer
   ========================================================= */
body.mt-site {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}
.mt-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.mt-site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mt-site-logo { text-decoration: none; display: flex; align-items: center; }
.mt-logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mt-site-nav { display: flex; align-items: center; gap: 28px; }
.mt-site-nav a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: color var(--transition); }
.mt-site-nav a:hover { color: var(--text); }
.mt-site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 32px 24px; }
.mt-site-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.mt-footer-name { font-size: 16px; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-footer-tagline { font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }
.mt-footer-copy { font-size: 12px; color: var(--muted); }
.mt-site-main { min-height: 60vh; }

/* ── Shared Section Helpers ─── */
.mt-section-header { text-align: center; margin-bottom: 52px; }
.mt-section-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; color: var(--primary); background: rgba(108,99,255,0.1); border: 1px solid rgba(108,99,255,0.25); padding: 4px 14px; border-radius: 20px; margin-bottom: 14px; }
.mt-section-header h2 { font-size: 36px; font-weight: 800; margin-bottom: 12px; background: linear-gradient(135deg, var(--text), var(--text-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-section-header p { font-size: 16px; color: var(--muted); max-width: 560px; margin: 0 auto; line-height: 1.7; }
.mt-gradient-text { background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── Hero ─── */
.mt-hero { position: relative; padding: 100px 0 90px; text-align: center; overflow: hidden; }
.mt-hero-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 60px 60px; opacity: 0.4; pointer-events: none; }
.mt-hero-glow { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 700px; height: 700px; background: radial-gradient(circle, rgba(108,99,255,0.18) 0%, transparent 65%); pointer-events: none; }
.mt-hero-inner { position: relative; z-index: 1; }
.mt-hero-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-secondary); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 30px; padding: 6px 18px; margin-bottom: 28px; }
.mt-hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 8px var(--secondary); animation: mtPulse 2s ease infinite; }
.mt-hero-title { font-size: clamp(36px, 5.5vw, 62px); font-weight: 900; line-height: 1.12; margin-bottom: 24px; letter-spacing: -0.02em; }
.mt-hero-desc { font-size: 18px; color: var(--muted); max-width: 620px; margin: 0 auto 36px; line-height: 1.7; }
.mt-hero-cta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.mt-hero-stats { display: inline-flex; align-items: center; gap: 36px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 36px; }
.mt-hero-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mt-hero-stat-num { font-size: 28px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-hero-stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); }
.mt-hero-stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── Features ─── */
.mt-features { padding: 90px 0; background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mt-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.mt-feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.mt-feature-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.mt-feature-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.mt-feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.mt-feature-card p { font-size: 14px; color: var(--muted); line-height: 1.65; }
.mt-feature-card code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; font-size: 12px; color: var(--secondary); }

/* ── How It Works ─── */
.mt-how-it-works { padding: 90px 0; }
.mt-steps { display: flex; align-items: flex-start; justify-content: center; gap: 16px; flex-wrap: wrap; }
.mt-step { flex: 1; min-width: 220px; max-width: 280px; text-align: center; padding: 28px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: border-color var(--transition); }
.mt-step:hover { border-color: var(--primary); }
.mt-step-num { font-size: 42px; font-weight: 900; background: linear-gradient(135deg, var(--primary), var(--secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1; margin-bottom: 14px; }
.mt-step h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.mt-step p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.mt-step-arrow { font-size: 28px; color: var(--border-strong); padding-top: 50px; flex-shrink: 0; }

/* ── CTA Banner ─── */
.mt-cta-banner { padding: 80px 0; background: var(--bg-2); border-top: 1px solid var(--border); }
.mt-cta-inner { text-align: center; max-width: 600px; margin: 0 auto; }
.mt-cta-inner h2 { font-size: 34px; font-weight: 800; margin-bottom: 14px; background: linear-gradient(135deg, var(--text), var(--text-secondary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-cta-inner p { font-size: 16px; color: var(--muted); margin-bottom: 28px; }

/* ── Responsive ─── */
@media (max-width: 768px) {
  .mt-hero { padding: 72px 0 60px; }
  .mt-hero-title { font-size: 34px; }
  .mt-hero-desc { font-size: 15px; }
  .mt-hero-stats { gap: 20px; padding: 16px 24px; }
  .mt-step-arrow { display: none; }
  .mt-section-header h2 { font-size: 26px; }
  .mt-site-header-inner { padding: 0 16px; }
  .mt-features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .mt-hero-cta { flex-direction: column; width: 100%; }
  .mt-hero-cta .mt-btn { width: 100%; justify-content: center; }
  .mt-hero-stats { flex-direction: column; gap: 16px; }
  .mt-hero-stat-divider { width: 60px; height: 1px; }
}
