/* ============================================================
   TradesLink — auth.css
   Shared styles for signup / login / forgot-password
   Matches the design language of styles.css exactly
   ============================================================ */

/* ── Variables (mirrors styles.css) ───────────────────────────── */
:root {
  --orange:       #FF6A21;
  --orange-dark:  #E05510;
  --orange-glow:  rgba(255, 106, 33, 0.15);
  --bg:           #0F1117;
  --bg2:          #15171F;
  --bg3:          #1C1F2A;
  --bg4:          #22263A;
  --glass:        rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.10);
  --text:         #F0EEF8;
  --text-muted:   #8B8A96;
  --text-dim:     #5C5B66;
  --border:       rgba(255, 255, 255, 0.08);
  --white:        #ffffff;
  --error:        #FF5252;
  --error-glow:   rgba(255, 82, 82, 0.12);
  --success:      #33C97A;
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --shadow:       0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg:    0 24px 64px rgba(0,0,0,0.5);
  --transition:   250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-lg:350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.03em; font-weight: 800; }
.orange { color: var(--orange); }

/* ── Auth page shell ──────────────────────────────────────────
   Reuses the same hero-grid / glow motifs as the homepage so the
   auth pages read as a continuation of the same visual world.
   ─────────────────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 60px;
}
.auth-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 0%, transparent 100%);
}
.auth-glow {
  position: absolute;
  top: -15%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,106,33,0.12) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.auth-glow-2 {
  position: absolute;
  bottom: -15%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(45,125,210,0.07) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: authGlowPulse 6s ease-in-out infinite alternate;
}
@keyframes authGlowPulse {
  0%   { opacity: 0.5; transform: scale(1); }
  100% { opacity: 1;   transform: scale(1.08); }
}

/* ── Minimal top logo bar (auth pages don't carry full nav) ──── */
.auth-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 22px 0;
}
.auth-topbar .container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  white-space: nowrap;
}
.nav-logo .logo-icon {
  width: 34px; height: 34px;
  background: var(--orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.nav-logo .logo-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ── Auth card ─────────────────────────────────────────────── */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 48px 44px;
  animation: authFadeUp 550ms cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-card.wide { max-width: 640px; }
@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-header { text-align: center; margin-bottom: 36px; }
.auth-header .nav-logo { justify-content: center; margin-bottom: 24px; }
.auth-header h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 10px; }
.auth-subtitle { font-size: 0.92rem; color: var(--text-muted); max-width: 380px; margin: 0 auto; }

/* ── Role selector (signup step 1) ────────────────────────────*/
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}
.role-card {
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.role-card:hover {
  border-color: rgba(255,106,33,0.3);
  transform: translateY(-3px);
  background: var(--bg4);
}
.role-card .role-icon {
  width: 44px; height: 44px;
  background: rgba(255,106,33,0.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  transition: all var(--transition);
}
.role-card .role-icon svg {
  width: 22px; height: 22px;
  color: var(--orange);
  transition: color var(--transition);
}
.role-card.selected .role-icon svg { color: var(--white); }
.role-card .role-name { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.role-card .role-desc { font-size: 0.76rem; color: var(--text-muted); line-height: 1.45; }

.role-card.selected {
  border-color: var(--orange);
  background: var(--bg4);
  box-shadow: 0 0 0 3px var(--orange-glow), 0 8px 24px rgba(255,106,33,0.15);
  transform: scale(1.02);
}
.role-card.selected .role-icon { background: var(--orange); }

/* ── Form sections ─────────────────────────────────────────── */
.auth-form {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin-top: 0;
  transition:
    grid-template-rows 480ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 380ms ease,
    margin-top 480ms cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-form .form-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-form.active {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 28px;
}

.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.input-wrap { position: relative; }
.form-field input,
.form-field select {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.9rem;
  color: var(--text);
  transition: all var(--transition);
  appearance: none;
}
.form-field select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238B8A96' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.form-field select option { background: var(--bg2); color: var(--text); }
.form-field input::placeholder { color: var(--text-dim); }
.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
  background: var(--bg);
}
.form-field.has-error input,
.form-field.has-error select {
  border-color: var(--error);
  box-shadow: 0 0 0 3px var(--error-glow);
}
.field-error {
  font-size: 0.76rem;
  color: var(--error);
  display: none;
  align-items: center;
  gap: 5px;
}
.form-field.has-error .field-error { display: flex; }

.password-toggle {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color var(--transition);
}
.password-toggle:hover { color: var(--orange); }

/* ── Checkbox ──────────────────────────────────────────────── */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  appearance: none;
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background-color: var(--bg2);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
  transition: all var(--transition);
  cursor: pointer;
}
.form-check input[type="checkbox"]:checked {
  background-color: var(--orange);
  border-color: var(--orange);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.5 12L13 4.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.form-check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--orange-glow);
}
.form-check a { color: var(--orange); font-weight: 600; }
.form-check a:hover { text-decoration: underline; }

/* ── Buttons (extends the base .btn from styles.css) ─────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(255,106,33,0.3);
}
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,106,33,0.4);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-secondary {
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1rem; border-radius: var(--radius-lg); }

.btn-primary.is-loading { color: transparent; position: relative; pointer-events: none; }
.btn-primary.is-loading::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: btnSpin 700ms linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* ── Misc auth bits ───────────────────────────────────────────*/
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-dim); font-size: 0.78rem;
  margin: 4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-footer-text {
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-top: 28px;
}
.auth-footer-text a { color: var(--orange); font-weight: 700; }
.auth-footer-text a:hover { text-decoration: underline; }

.forgot-row { display: flex; justify-content: flex-end; margin-top: -8px; }
.forgot-link { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; transition: color var(--transition); }
.forgot-link:hover { color: var(--orange); }

.form-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 20px;
  transition: color var(--transition);
}
.form-back:hover { color: var(--orange); }

/* Banner for top-level form errors (e.g. failed request) */
.form-banner {
  display: none;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,82,82,0.3);
  background: var(--error-glow);
  color: #FFA3A3;
}
.form-banner.show { display: flex; }

/* Success state (forgot password) */
.auth-success {
  display: none;
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 12px 0 4px;
  animation: formReveal 400ms cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-success.show { display: flex; }
.success-icon {
  width: 64px; height: 64px;
  background: rgba(51,201,122,0.12);
  border: 1px solid rgba(51,201,122,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  color: var(--success);
}
.auth-success h3 { font-size: 1.2rem; color: var(--text); }
.auth-success p { font-size: 0.9rem; color: var(--text-muted); max-width: 340px; }

/* Password eye icon */
.eye-icon { width: 18px; height: 18px; display: block; }

.form-field textarea {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.9rem;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
  min-height: 110px;
  transition: all var(--transition);
}
.form-field textarea::placeholder { color: var(--text-dim); }
.form-field textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-glow);
  background: var(--bg);
}
.field-hint { font-size: 0.76rem; color: var(--text-dim); }

/* ── File upload dropzone ──────────────────────────────────── */
.upload-dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg2);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-dropzone:hover,
.upload-dropzone.drag-over {
  border-color: var(--orange);
  background: var(--bg4);
}
.upload-dropzone input[type="file"] { display: none; }
.upload-icon {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  background: rgba(255,106,33,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.upload-icon svg { width: 20px; height: 20px; color: var(--orange); }
.upload-label { font-size: 0.86rem; font-weight: 600; color: var(--text); }
.upload-sublabel { font-size: 0.76rem; color: var(--text-muted); margin-top: 4px; }

.upload-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.upload-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload-thumb .remove-thumb {
  position: absolute;
  top: 4px; right: 4px;
  width: 20px; height: 20px;
  background: rgba(0,0,0,0.65);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  line-height: 1;
  transition: background var(--transition);
}
.upload-thumb .remove-thumb:hover { background: var(--error); }
.upload-thumb .remove-thumb svg { width: 11px; height: 11px; }

/* Simple auth gate shown to logged-out visitors */
.auth-gate {
  text-align: center;
  padding: 12px 0 4px;
}
.auth-gate .role-icon {
  width: 52px; height: 52px;
  margin: 0 auto 18px;
  background: rgba(255,106,33,0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}
.auth-gate .role-icon svg { width: 26px; height: 26px; color: var(--orange); }
.auth-gate h3 { font-size: 1.15rem; margin-bottom: 8px; }
.auth-gate p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 22px; }
.auth-gate .gate-actions { display: flex; gap: 12px; }
.auth-gate .gate-actions .btn { flex: 1; }

/* ── Reviews ───────────────────────────────────────────────── */
.review-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}
.review-prompt { font-size: 0.95rem; color: var(--text); margin-bottom: 4px; }
.review-job-title { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 18px; }
.star-rating {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
}
.star-btn {
  width: 34px; height: 34px;
  color: var(--border);
  transition: color 150ms ease, transform 150ms ease;
  cursor: pointer;
}
.star-btn svg { width: 100%; height: 100%; }
.star-btn:hover { transform: scale(1.15); }
.star-btn.filled { color: #FFB020; }
.review-comment {
  width: 100%;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.86rem;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
  min-height: 70px;
  margin-bottom: 14px;
}
.review-comment::placeholder { color: var(--text-dim); }
.review-actions { display: flex; gap: 10px; }
.review-actions .btn { flex: 1; }
.review-later {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}
.review-later:hover { color: var(--text); }

/* ── Expandable job details ───────────────────────────────────*/
.job-details-toggle {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
  margin-top: 4px;
  border-top: 1px solid var(--border);
  transition: color var(--transition);
}
.job-details-toggle:hover { color: var(--orange); }
.job-details-panel {
  padding-top: 14px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.job-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.job-photo-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.job-photo-thumb { cursor: pointer; }
.job-photo-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.job-photo-thumb:hover img { transform: scale(1.05); }

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-md);
  object-fit: contain;
}
.photo-lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  width: 40px; height: 40px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.photo-lightbox-close svg { width: 18px; height: 18px; }
.photo-lightbox-close:hover { background: rgba(255,255,255,0.15); }

/* ── Job completion flow ──────────────────────────────────────*/
.job-complete-actions { display: flex; gap: 10px; }
.job-complete-actions .btn { flex: 1; }
.job-complete-waiting {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
  background: var(--bg2);
  border-radius: var(--radius-sm);
}
.job-complete-prompt {
  background: rgba(51,201,122,0.1);
  border: 1.5px solid rgba(51,201,122,0.35);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
}
.job-complete-prompt p { font-size: 0.86rem; color: var(--text); margin-bottom: 10px; }
.job-completed-note {
  font-size: 0.82rem;
  color: var(--success);
  text-align: center;
}

/* ── Job offer banner (tradesperson accept/decline) ─────────── */
.job-offers-wrap:empty { display: none; }
.locked-fields-block {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px 18px;
  margin-bottom: 20px;
}
.locked-field-value {
  font-size: 0.9rem;
  color: var(--text);
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.locked-fields-note {
  margin-top: 12px;
  margin-bottom: 0;
  line-height: 1.5;
}
.locked-fields-note a { color: var(--orange); font-weight: 600; }
.locked-fields-note a:hover { text-decoration: underline; }

.job-offer-card {
  background: var(--orange-glow);
  border: 1.5px solid rgba(255,106,33,0.4);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin-bottom: 16px;
}
.job-offer-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin-bottom: 8px;
}
.job-offer-title { font-size: 1.02rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.job-offer-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; }
.job-offer-actions { display: flex; gap: 10px; }
.job-offer-actions .btn { flex: 1; }
.job-offer-price-form { flex-direction: column; gap: 14px; margin-top: 4px; }
.job-offer-price-form .job-offer-actions { margin-top: 2px; }
.job-payment-pending { display: flex; flex-direction: column; gap: 10px; }
.job-payment-pending p { margin: 0; font-size: 0.88rem; color: var(--text); }
.job-payment-pending strong { color: var(--orange); }
.payments-section-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; }
.payment-row { display: flex; flex-direction: column; gap: 8px; }
.payment-row-main { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.payment-row-title { font-weight: 600; }
.payment-row-date { font-size: 0.82rem; color: var(--text-muted); }
.payment-row-figures { display: flex; flex-direction: column; gap: 3px; font-size: 0.86rem; color: var(--text); }
.payment-status { font-size: 0.8rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; width: fit-content; }
.payment-status-sent { background: rgba(34,197,94,0.15); color: #22c55e; }
.payment-status-pending { background: rgba(251,146,60,0.15); color: var(--orange); }
.payment-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.payment-modal { background: var(--bg3); border: 1px solid var(--border); border-radius: 16px; padding: 28px; max-width: 420px; width: 100%; }
.payment-modal h3 { margin: 0 0 6px; font-size: 1.15rem; }
.payment-modal-amount { font-size: 1.6rem; font-weight: 800; color: var(--orange); margin: 0 0 18px; }
.payment-modal-details { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; padding: 16px; background: rgba(255,255,255,0.04); border-radius: 10px; }
.payment-modal-details div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; }
.payment-modal-details span { color: var(--text-muted); }
.payment-modal-details strong { text-align: right; }
.payment-modal-note { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 18px; }
.payment-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-decline {
  background: var(--glass);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-decline:hover { background: rgba(255,82,82,0.1); color: #FFA3A3; border-color: rgba(255,82,82,0.3); }

/* ── Active / Completed sub-tabs ──────────────────────────────*/
.dashboard-subtabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.dashboard-subtab {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 2px 12px;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.dashboard-subtab.active { color: var(--orange); border-bottom-color: var(--orange); }
.dashboard-subtab:not(.active):hover { color: var(--text); }

/* ── Unread message badge ─────────────────────────────────────*/
.job-chat-toggle { position: relative; }
.chat-unread-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  background: var(--error);
  color: white;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ── Dashboard — sidebar layout ───────────────────────────────*/
.dash-loading-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.dash-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.dash-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}
.dash-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  padding: 8px 10px 26px;
}
.dash-sidebar-logo .logo-icon { width: 30px; height: 30px; border-radius: 8px; }

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
  text-align: left;
  width: 100%;
}
.dash-nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.dash-nav-item:hover { background: var(--glass); color: var(--text); }
.dash-nav-item.active { background: var(--orange); color: var(--white); }
.dash-nav-logout {
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 16px;
}
.dash-nav-logout:hover { background: rgba(255,82,82,0.1); color: #FFA3A3; }

.dash-mobile-topbar {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.dash-mobile-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.dash-mobile-hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.dash-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 98;
}

.dash-main {
  flex: 1;
  padding: 36px 40px 60px;
  min-width: 0;
}

.dash-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.dash-topbar h1 { font-size: 1.5rem; margin-bottom: 4px; }
.dash-topbar-actions { display: flex; align-items: center; gap: 12px; }

.dash-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.dash-icon-btn svg { width: 19px; height: 19px; }
.dash-icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.dash-icon-badge {
  position: absolute;
  top: -3px; right: -3px;
  min-width: 16px; height: 16px;
  background: var(--error);
  color: white;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

.dash-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px 6px 6px;
}
.dash-profile-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--orange);
  display: flex; align-items: center; justify-content: center;
  color: white;
  flex-shrink: 0;
}
.dash-profile-avatar svg { width: 16px; height: 16px; }
.dash-profile-name { font-size: 0.82rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.dash-profile-link { font-size: 0.72rem; color: var(--text-muted); }
.dash-profile-link:hover { color: var(--orange); }

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.dash-stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.dash-stat-value { font-size: 1.7rem; font-weight: 800; color: var(--text); }
.dash-stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.dash-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.dash-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.dash-quick-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: all var(--transition);
}
.dash-quick-action-card:hover { border-color: rgba(255,106,33,0.35); background: var(--bg3); transform: translateY(-2px); }
.dash-quick-action-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,106,33,0.1);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dash-quick-action-icon svg { width: 19px; height: 19px; }
.dash-quick-action-label { font-size: 0.88rem; font-weight: 700; color: var(--text); }

@media (max-width: 900px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar { display: none; position: fixed; z-index: 99; left: 0; top: 0; width: 250px; }
  .dash-sidebar.open { display: flex; }
  .dash-sidebar-backdrop.open { display: block; }
  .dash-mobile-topbar { display: flex; width: 100%; }
  .dash-main { padding: 24px 18px 50px; }
}

.dashboard-shell {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 110px 24px 80px;
}
.dashboard-container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.dashboard-header h1 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin-bottom: 4px; }
.dashboard-header .auth-subtitle { margin: 0; }
.dashboard-logout {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--transition);
  white-space: nowrap;
}
.dashboard-logout:hover { color: var(--text); border-color: rgba(255,255,255,0.2); background: var(--glass); }

.dashboard-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 5px;
  margin-bottom: 28px;
  width: fit-content;
}
.dashboard-tab {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.dashboard-tab.active { background: var(--orange); color: var(--white); }
.dashboard-tab:not(.active):hover { color: var(--text); }

.dashboard-panel { display: none; }
.dashboard-panel.active { display: block; }

/* Job cards */
.job-list { display: flex; flex-direction: column; gap: 14px; }
.job-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}
.job-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.job-card-title { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.job-card-meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.job-card-desc { font-size: 0.87rem; color: var(--text-muted); line-height: 1.6; margin: 12px 0; }
.job-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-pending { background: rgba(255,106,33,0.12); color: var(--orange); }
.status-assigned { background: rgba(45,125,210,0.14); color: #6FA8E0; }
.status-completed { background: rgba(51,201,122,0.14); color: var(--success); }
.status-cancelled { background: rgba(255,82,82,0.12); color: var(--error); }

.job-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--bg2);
  border: 1px solid rgba(51,201,122,0.25);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 4px 0 12px;
  font-size: 0.84rem;
}
.job-contact-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--success);
  background: rgba(51,201,122,0.12);
  padding: 3px 9px;
  border-radius: 999px;
}
.job-contact-name { color: var(--text); font-weight: 600; }

.job-chat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-top: 12px;
  transition: all var(--transition);
}
.job-chat-toggle svg { width: 15px; height: 15px; }
.job-chat-toggle:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.job-chat-panel {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}
.job-chat-messages {
  max-height: 260px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.job-chat-loading { font-size: 0.82rem; color: var(--text-dim); text-align: center; padding: 10px 0; }
.job-chat-warning {
  font-size: 0.78rem;
  color: #FFA3A3;
  background: rgba(255,82,82,0.1);
  border: 1px solid rgba(255,82,82,0.25);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 6px 0 0;
  text-align: center;
}
.job-chat-expand {
  display: block;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0 2px;
}
.job-chat-expand:hover { color: var(--orange); }

.chat-bubble-row { display: flex; }
.chat-bubble-row.mine { justify-content: flex-end; }
.chat-bubble-row.theirs { justify-content: flex-start; }
.chat-bubble {
  max-width: 75%;
  padding: 9px 13px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-bubble-row.mine .chat-bubble {
  background: var(--orange);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-bubble-row.theirs .chat-bubble {
  background: var(--bg3);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-bubble-text { font-size: 0.86rem; line-height: 1.4; word-break: break-word; }
.chat-bubble-time { font-size: 0.68rem; opacity: 0.7; align-self: flex-end; }

.job-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.job-chat-input {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.86rem;
  color: var(--text);
  font-family: inherit;
}
.job-chat-input:focus { outline: none; border-color: var(--orange); }
.job-chat-send {
  width: 36px; height: 36px;
  flex-shrink: 0;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: background var(--transition);
}
.job-chat-send svg { width: 16px; height: 16px; }
.job-chat-send:hover { background: var(--orange-dark); }

.job-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.job-empty-state .icon { display: flex; justify-content: center; margin-bottom: 14px; }
.job-empty-state .icon svg { width: 40px; height: 40px; color: var(--text-dim); }
.job-empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .auth-card { padding: 36px 24px; border-radius: var(--radius-lg); }
  .role-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-shell { padding: 130px 16px 40px; }
  .auth-topbar { padding: 18px 0; }
  .form-field textarea { min-height: 130px; }
  .dashboard-shell { padding: 130px 16px 50px; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
  .job-card-top { flex-direction: column; }
}
