:root {
  --mt-blue: #3a57fc;
  --mt-blue-dark: #2446f9;
  --mt-orange: #f75a03;
  --mt-navy: #070d2b;
  --mt-dark: #111827;
  --mt-text: #5b6475;
  --mt-muted: #64748b;
  --mt-border: #e8edf5;
  --mt-soft: #f6f8fc;
  --mt-white: #ffffff;
  --mt-success: #10b981;
  --mt-warning: #f59e0b;
  --mt-danger: #ef4444;

  --mt-gradient: linear-gradient(135deg, #3a57fc 0%, #45b7ee 58%, #f75a03 145%);
  --mt-auth-gradient: linear-gradient(135deg, #0c1238 0%, #18255f 55%, #3a57fc 120%);
  --mt-button-gradient: linear-gradient(135deg, #3a57fc, #f75a03);

  --mt-radius-sm: 14px;
  --mt-radius-md: 20px;
  --mt-radius-lg: 30px;

  --mt-shadow-sm: 0 14px 35px rgba(15, 23, 42, 0.06);
  --mt-shadow-md: 0 24px 80px rgba(15, 23, 42, 0.22);
  --mt-shadow-lg: 0 30px 100px rgba(16, 24, 40, 0.12);

  --mt-transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Ahrefs", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--mt-dark);
  background: #f7f9fe;
  overflow-x: hidden;
}

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

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

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

/* Auth Page */
.auth-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 10%, rgba(58, 87, 252, 0.16), transparent 28%),
    radial-gradient(circle at 88% 20%, rgba(247, 90, 3, 0.12), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fc 100%);
}

.auth-bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(58, 87, 252, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 87, 252, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000000, transparent 75%);
}

/* Layout */
.auth-container {
  max-width: 1180px;
  padding: 0 18px;
  margin: 0 auto;
}

.auth-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  min-height: 82px;
}

.auth-brand img {
  width: auto;
  max-height: 46px;
  object-fit: contain;
}

.auth-header-link {
  font-size: 14px;
  font-weight: 850;
  color: var(--mt-muted);
}

.auth-header-link a {
  font-weight: 900;
  color: var(--mt-blue);
}

.auth-shell {
  position: relative;
  z-index: 2;
  padding: 26px 0 70px;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 34px;
  align-items: stretch;
}

/* Left Marketing Panel */
.auth-left {
  position: relative;
  min-height: 700px;
  padding: 38px;
  overflow: hidden;
  color: var(--mt-white);
  background: var(--mt-auth-gradient);
  border-radius: var(--mt-radius-lg);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.18);
}

.auth-left::before,
.auth-left::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-left::before {
  top: -100px;
  right: -150px;
  width: 370px;
  height: 370px;
  background: rgba(247, 90, 3, 0.28);
  filter: blur(2px);
}

.auth-left::after {
  left: -180px;
  bottom: -170px;
  width: 430px;
  height: 430px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-left-inner {
  position: relative;
  z-index: 1;
}

.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 900;
  color: #e9efff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.auth-pill span {
  width: 8px;
  height: 8px;
  background: var(--mt-orange);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(247, 90, 3, 0.18);
}

.auth-left h1 {
  margin: 28px 0 18px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -2px;
}

.auth-left p {
  max-width: 600px;
  font-size: 17px;
  line-height: 1.8;
  color: #d5dcff;
}

/* Preview Box */
.auth-preview {
  padding: 18px;
  margin-top: 34px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  backdrop-filter: blur(16px);
}

.auth-preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.auth-preview-top strong {
  font-size: 14px;
}

.auth-dots {
  display: flex;
  gap: 6px;
}

.auth-dots span {
  width: 10px;
  height: 10px;
  background: var(--mt-white);
  border-radius: 50%;
  opacity: 0.35;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.auth-metric {
  padding: 16px;
  color: #0f172a;
  background: var(--mt-white);
  border-radius: 16px;
}

.auth-metric small {
  display: block;
  font-weight: 850;
  color: var(--mt-muted);
}

.auth-metric strong {
  font-size: 26px;
  font-weight: 950;
  color: var(--mt-blue);
  letter-spacing: -1px;
}

.auth-chart {
  position: relative;
  height: 190px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 18px;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.9) 37px,
    rgba(226, 232, 240, 0.9) 38px
  );
}

.auth-chart svg {
  position: absolute;
  inset: 26px 20px;
}

.auth-chart path {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
}

/* Features */
.auth-feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 26px;
}

.auth-feature {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 15px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
}

.auth-feature i {
  font-size: 19px;
  color: #7dd3fc;
}

.auth-feature strong {
  display: block;
  font-size: 14px;
}

.auth-feature span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #cdd6ff;
}

/* Auth Card */
.auth-card {
  align-self: center;
  padding: 34px;
  background: var(--mt-white);
  border: 1px solid var(--mt-border);
  border-radius: var(--mt-radius-lg);
  box-shadow: var(--mt-shadow-lg);
}

.auth-card-header {
  margin-bottom: 26px;
  text-align: center;
}

.auth-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  font-size: 28px;
  color: var(--mt-blue);
  background: linear-gradient(135deg, rgba(58, 87, 252, 0.12), rgba(247, 90, 3, 0.12));
  border-radius: var(--mt-radius-md);
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 950;
  line-height: 1.1;
  color: #070b1f;
  letter-spacing: -1.4px;
}

.auth-card p {
  margin: 0;
  line-height: 1.65;
  color: #667085;
}

/* Forms */
.auth-form .form-label {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
  color: #334155;
}

.auth-form .form-control,
.auth-form .form-select {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  font-weight: 700;
  color: #0f172a;
  background: #fbfcff;
  border: 1px solid #dfe6f1;
  border-radius: var(--mt-radius-sm);
  box-shadow: none;
  transition: var(--mt-transition);
}

.auth-form textarea.form-control {
  height: auto;
  resize: vertical;
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
  background: var(--mt-white);
  border-color: var(--mt-blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(58, 87, 252, 0.1);
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: 18px;
  color: var(--mt-muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

.auth-check {
  font-size: 13px;
  font-weight: 700;
  color: #667085;
}

.auth-check a,
.auth-link {
  font-weight: 900;
  color: var(--mt-blue);
}

.auth-small-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

/* Buttons */
.auth-btn {
  width: 100%;
  min-height: 54px;
  font-weight: 950;
  color: var(--mt-white);
  background: var(--mt-button-gradient);
  border: 0;
  border-radius: var(--mt-radius-sm);
  box-shadow: 0 18px 38px rgba(58, 87, 252, 0.28);
  transition: var(--mt-transition);
}

.auth-btn:hover {
  color: var(--mt-white);
  filter: brightness(0.98);
  transform: translateY(-2px);
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  font-weight: 900;
  color: #334155;
  background: var(--mt-white);
  border: 1px solid #dfe6f1;
  border-radius: var(--mt-radius-sm);
  transition: var(--mt-transition);
}

.social-btn:hover {
  color: var(--mt-blue);
  background: #f8fbff;
  border-color: rgba(58, 87, 252, 0.25);
}

/* Separator */
.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 12px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: uppercase;
}

.auth-separator::before,
.auth-separator::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--mt-border);
}

.auth-footer-text {
  margin-top: 22px;
  font-weight: 750;
  color: #667085;
  text-align: center;
}

/* OTP */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 25px 0;
}

.otp-inputs input {
  width: 55px;
  height: 58px;
  font-size: 24px;
  font-weight: 950;
  color: #0f172a;
  text-align: center;
  background: #fbfcff;
  border: 1px solid #dfe6f1;
  border-radius: 15px;
}

.otp-inputs input:focus {
  background: var(--mt-white);
  border-color: var(--mt-blue);
  outline: none;
  box-shadow: 0 0 0 4px rgba(58, 87, 252, 0.1);
}

.otp-input {
  font-weight: 900;
  letter-spacing: 0.35rem;
}

.otp-dev-hint {
  padding: 12px;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px dashed #fb923c;
  border-radius: var(--mt-radius-sm);
}

.otp-dev-hint code {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--mt-dark);
}

/* Notes & Strength */
.auth-note {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  color: #475569;
  background: #f3f6ff;
  border: 1px solid #dce5ff;
  border-radius: 16px;
}

.auth-note i {
  margin-right: 6px;
  color: var(--mt-blue);
}

.strength {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: 999px;
}

.strength span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--mt-danger);
  border-radius: inherit;
  transition: var(--mt-transition);
}

.strength.good span {
  width: 66%;
  background: var(--mt-warning);
}

.strength.strong span {
  width: 100%;
  background: var(--mt-success);
}

/* Toast */
.mt-auth-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: #065f46;
  pointer-events: none;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 16px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.16);
  opacity: 0;
  transform: translateY(14px);
  transition: var(--mt-transition);
}

.mt-auth-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mt-auth-toast.error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Back Link */
.back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  color: var(--mt-muted);
}

.back-home:hover {
  color: var(--mt-blue);
}

/* Dashboard */
.dashboard-body {
  color: #101828;
  background: #f6f8ff;
}

.dashboard-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 clamp(18px, 4vw, 54px);
  background: var(--mt-white);
  border-bottom: 1px solid #e5e7eb;
}

.dashboard-wrap {
  max-width: 1180px;
  padding: 34px 18px;
  margin: 0 auto;
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px;
  margin-bottom: 24px;
  color: var(--mt-white);
  background: linear-gradient(135deg, #111827, #24305f);
  border-radius: 28px;
  box-shadow: var(--mt-shadow-md);
}

.dashboard-hero h1 {
  margin: 14px 0 6px;
  font-weight: 900;
}

.dashboard-hero p {
  margin: 0;
  color: #dbeafe;
}

.dash-profile {
  min-width: 220px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
}

.dash-profile small {
  display: block;
  color: #bfdbfe;
}

.dash-card,
.dash-panel {
  background: var(--mt-white);
  border: 1px solid #e5e7eb;
  box-shadow: var(--mt-shadow-sm);
}

.dash-card {
  padding: 22px;
  border-radius: 22px;
}

.dash-card i {
  font-size: 1.7rem;
  color: var(--mt-blue);
}

.dash-card small {
  display: block;
  margin-top: 12px;
  color: var(--mt-muted);
}

.dash-card strong {
  font-size: 2rem;
  font-weight: 900;
}

.dash-panel {
  padding: 24px;
  border-radius: 24px;
}

.dash-panel h2 {
  margin: 0;
  font-weight: 900;
}

.dash-panel p {
  margin: 4px 0 0;
  color: var(--mt-muted);
}

.sentiment {
  padding: 6px 10px;
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
}

.sentiment.positive {
  color: #166534;
  background: #dcfce7;
}

.sentiment.neutral {
  color: #334155;
  background: #f1f5f9;
}

/* Responsive */
@media (max-width: 991px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-left {
    min-height: auto;
  }

  .auth-card {
    max-width: 680px;
    margin: 0 auto;
  }

  .auth-feature-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .dashboard-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    height: auto;
    padding-block: 14px;
  }

  .dashboard-hero {
    display: block;
  }

  .dash-profile {
    margin-top: 20px;
  }

  .auth-header-link {
    font-size: 0.85rem;
  }
}

@media (max-width: 575px) {
  .auth-header {
    min-height: auto;
    padding: 18px 0;
  }

  .auth-header .d-flex {
    align-items: flex-start !important;
    gap: 12px;
  }

  .auth-brand img {
    max-width: 160px;
  }

  .auth-shell {
    padding-top: 10px;
  }

  .auth-left {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .auth-left h1 {
    font-size: 38px;
    letter-spacing: -1.7px;
  }

  .auth-metrics,
  .auth-feature-list {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 26px 20px;
    border-radius: 22px;
  }

  .auth-card h2 {
    font-size: 29px;
  }

  .otp-inputs {
    gap: 7px;
  }

  .otp-inputs input {
    width: 44px;
    height: 52px;
    font-size: 20px;
  }

  .auth-small-actions {
    display: block;
  }

  .auth-small-actions .auth-link {
    display: block;
    margin-top: 12px;
  }
}