/* ── Clients Space: Auth Pages ─────────────────────────── */

:root {
  --bg: #050608;
  --surface: #0c0f14;
  --surface-soft: #0f131a;
  --text: #e8edf5;
  --text-soft: #a9b4c7;
  --line: #1d2633;
  --blue: #0f7bff;
  --green: #19c37d;
  --gold: #f4b942;
  --radius-lg: 26px;
  --radius-md: 18px;
  --shadow: 0 28px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Sora", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgba(22, 94, 255, 0.2), transparent 38%),
    radial-gradient(circle at 85% 8%, rgba(15, 123, 255, 0.14), transparent 30%),
    var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0,
      transparent 62px,
      rgba(255, 255, 255, 0.02) 63px,
      transparent 64px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 62px,
      rgba(255, 255, 255, 0.02) 63px,
      transparent 64px
    );
}

/* Auth layout */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.25rem 3rem;
}

/* Auth card */
.auth-card {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 0%, rgba(15, 123, 255, 0.12), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% -20%, rgba(15, 123, 255, 0.08), transparent 60%);
}

.auth-card h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  text-align: center;
}

.auth-card .auth-subtitle {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  color: var(--text-soft);
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
}

.auth-form label .req {
  color: #ef4444;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="tel"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 0.72rem 0.9rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  background: rgba(6, 11, 20, 0.9);
  border: 1px solid rgba(30, 40, 58, 0.85);
  border-radius: 10px;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.auth-form input:focus {
  border-color: rgba(15, 123, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(15, 123, 255, 0.12);
}

.auth-form input::placeholder {
  color: rgba(169, 180, 199, 0.45);
}

/* Password wrapper with toggle */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 2.8rem;
}

.password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-soft);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 200ms ease;
}

.password-toggle:hover {
  opacity: 1;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

/* Password strength meter */
.strength-meter {
  display: flex;
  gap: 4px;
  margin-top: 0.3rem;
}

.strength-meter .bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(30, 40, 58, 0.6);
  transition: background 300ms ease;
}

.strength-meter .bar.weak { background: #ef4444; }
.strength-meter .bar.medium { background: #f4b942; }
.strength-meter .bar.strong { background: #19c37d; }

.strength-label {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-top: 0.15rem;
}

.strength-label.weak { color: #ef4444; }
.strength-label.medium { color: #f4b942; }
.strength-label.strong { color: #19c37d; }

/* Form row (side by side fields) */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

@media (max-width: 480px) {
  .auth-row { grid-template-columns: 1fr; }
}

/* Checkbox row */
.auth-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  color: var(--text-soft);
  cursor: pointer;
}

.auth-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
  flex-shrink: 0;
}

.auth-check a {
  color: var(--blue);
  text-decoration: none;
}

.auth-check a:hover {
  text-decoration: underline;
}

/* Remember / Forgot row */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.forgot-link {
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  color: var(--blue);
  text-decoration: none;
  transition: color 200ms ease;
}

.forgot-link:hover {
  color: #55aeff;
  text-decoration: underline;
}

/* Submit button */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 1.2rem;
  margin-top: 0.4rem;
  border-radius: 12px;
  border: 1px solid rgba(26, 137, 255, 0.55);
  color: #e9f2ff;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(140deg, rgba(16, 54, 108, 0.88), rgba(10, 24, 46, 0.92));
  box-shadow: inset 0 0 0 1px rgba(120, 182, 255, 0.15);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.auth-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(85, 174, 255, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(133, 194, 255, 0.24),
    0 10px 22px rgba(9, 39, 82, 0.35);
}

.auth-btn:active {
  transform: translateY(0);
}

/* Footer links (switch between login/signup) */
.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.auth-footer a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Status messages */
.auth-status {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.auth-status.success {
  background: rgba(25, 195, 125, 0.12);
  border: 1px solid rgba(25, 195, 125, 0.35);
  color: #19c37d;
}

.auth-status.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.auth-status[hidden] {
  display: none;
}

/* ── Client Space header button ───────────────────── */
.client-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.32rem 0.85rem 0.32rem 0.32rem;
  color: #d8dee8;
  border: 1px solid rgba(14, 90, 210, 0.45);
  box-shadow: inset 0 0 0 1px rgba(15, 123, 255, 0.18);
  background: rgba(9, 12, 18, 0.82);
  transition: border-color 240ms ease, box-shadow 240ms ease, transform 220ms ease;
  text-decoration: none;
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.client-pill:hover {
  border-color: rgba(53, 148, 255, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(85, 170, 255, 0.38),
    0 10px 22px rgba(7, 46, 102, 0.28);
  transform: translateY(-1px);
}

.client-pill .client-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(15, 123, 255, 0.3), rgba(15, 123, 255, 0.1));
}

.client-pill .client-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #7ab8ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-pill .client-text {
  color: #c8d4e4;
}

/* Hide text on small screens */
@media (max-width: 1040px) {
  .client-pill .client-text { display: none; }
  .client-pill { padding: 0.25rem; }
}

/* Mobile menu client link */
.mobile-client-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.4rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  border-top: 1px solid var(--line);
  margin-top: 0.25rem;
}

.mobile-client-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Dashboard ────────────────────────────────────── */
.dash-page {
  min-height: 100vh;
  padding: 7rem 1.25rem 3rem;
}

.dash-card {
  max-width: 720px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 0%, rgba(15, 123, 255, 0.10), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.dash-card h1 {
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.dash-card .dash-email {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 2rem;
}

.dash-sections {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(6, 11, 20, 0.6);
  padding: 1.25rem;
}

.dash-tile h3 {
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.dash-tile p {
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.dash-tile-link {
  text-decoration: none;
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.dash-tile-link:hover {
  border-color: rgba(15, 123, 255, 0.45);
  background: rgba(10, 18, 32, 0.8);
  transform: translateY(-1px);
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease, border-color 200ms ease;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.6);
}

/* ── Auth page logo ───────────────────────────────── */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.auth-logo img {
  height: 42px;
  width: auto;
}

/* ── Reports Page ─────────────────────────────────── */
.reports-card {
  max-width: 800px;
}

.reports-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.reports-header h1 {
  margin-bottom: 0.25rem;
}

.back-dash-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(6, 11, 20, 0.5);
  transition: border-color 200ms ease, color 200ms ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-dash-link:hover {
  border-color: rgba(15, 123, 255, 0.5);
  color: var(--text);
}

/* Report month groups */
.report-month-group {
  margin-bottom: 1.5rem;
}

.report-month-label {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}

.report-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual report row */
.report-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(6, 11, 20, 0.6);
  text-decoration: none;
  transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.report-item:hover {
  border-color: rgba(15, 123, 255, 0.45);
  background: rgba(10, 18, 32, 0.8);
  transform: translateY(-1px);
}

.report-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 123, 255, 0.18), rgba(15, 123, 255, 0.06));
  border: 1px solid rgba(15, 123, 255, 0.2);
  flex-shrink: 0;
}

.report-ext {
  font-family: 'Sora', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #7ab8ff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.report-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.report-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-meta {
  font-family: 'Sora', sans-serif;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.report-dl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--text-soft);
  transition: color 200ms ease, background 200ms ease;
}

.report-item:hover .report-dl {
  color: var(--blue);
  background: rgba(15, 123, 255, 0.1);
}

/* Loading state */
.reports-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--text-soft);
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
}

.reports-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: reportsSpin 0.8s linear infinite;
}

@keyframes reportsSpin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.reports-empty {
  text-align: center;
  padding: 2.5rem 1rem;
}

.reports-empty .empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--line);
}

.reports-empty h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.reports-empty p {
  font-family: 'Sora', sans-serif;
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card {
    border-radius: 18px;
  }

  .auth-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .reports-header {
    flex-direction: column;
  }

  .report-item {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .report-icon {
    width: 38px;
    height: 38px;
  }

  .report-title {
    font-size: 0.82rem;
  }
}
