/* ============================================================
   QuickKaam — Main Stylesheet
   ============================================================ */

:root {
  --bg:        #0a0a0f;
  --surface:   #13131c;
  --surface2:  #1c1c2a;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.14);
  --text:      #f0eff5;
  --muted:     #8b8a9e;
  --accent:    #ff6b35;
  --accent-h:  #e85a25;
  --purple:    #7c5cfc;
  --green:     #22c55e;
  --red:       #ef4444;
  --blue:      #3b82f6;
  --yellow:    #f59e0b;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'Syne', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, textarea, select, button { font-family: inherit; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(10,10,15,0.88);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.03em; color: var(--text);
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--muted); font-size: 0.9rem; font-weight: 400;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: .75rem; }

.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; overflow: hidden;
  color: var(--accent);
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: .3s;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.25rem;
  border-radius: 8px; font-size: .875rem; font-weight: 500;
  cursor: pointer; border: none; transition: all .2s;
  white-space: nowrap; text-decoration: none;
}
.btn-primary   { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(255,107,53,.3); }
.btn-outline   { background: transparent; color: var(--text); border: 1px solid var(--border2); }
.btn-outline:hover { background: var(--surface2); border-color: rgba(255,255,255,.2); }
.btn-ghost     { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm        { padding: .35rem .85rem; font-size: .8rem; border-radius: 6px; }
.btn-lg        { padding: .75rem 2rem; font-size: 1rem; border-radius: 10px; }
.btn-full      { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Google btn */
.btn-google {
  background: #fff; color: #1f1f1f;
  border: 1px solid #dadce0; gap: .6rem; padding: .6rem 1.5rem;
}
.btn-google:hover { background: #f8f8f8; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---- MAIN LAYOUT ---- */
.main-content { padding-top: 62px; min-height: calc(100vh - 62px); }

/* ---- HERO ---- */
.hero {
  min-height: calc(100vh - 62px);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 4rem clamp(1rem,5vw,3rem);
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,92,252,.18) 0%, transparent 70%);
  pointer-events: none;
}
.hero-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;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 50%, black 0%, transparent 100%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 760px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 100px; padding: .35rem 1rem;
  font-size: .78rem; color: var(--muted); margin-bottom: 2rem;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--green); border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 800; margin-bottom: 1.4rem;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { font-size: clamp(1rem,2.5vw,1.2rem); color: var(--muted); max-width: 520px; margin: 0 auto 2.5rem; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.stats-row {
  display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap;
  margin-top: 5rem; padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-num { font-family: 'Syne',sans-serif; font-size: 2.2rem; font-weight: 800; }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: .15rem; letter-spacing: .05em; text-transform: uppercase; }

/* ---- PAGE HEADER ---- */
.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.page-header h1 { font-size: clamp(1.8rem,4vw,3rem); font-weight: 800; margin-bottom: .4rem; }
.page-header p { color: var(--muted); }

/* ---- SECTION ---- */
.section { padding: clamp(3rem,7vw,5rem) 0; }
.section-title { font-size: clamp(1.6rem,4vw,2.4rem); font-weight: 800; margin-bottom: .5rem; }
.section-sub { color: var(--muted); margin-bottom: 3rem; }

/* ---- CARDS ---- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover {
  border-color: var(--border2); transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* Service card */
.service-img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: 8px; margin-bottom: 1rem;
  background: var(--surface2);
}
.service-emoji {
  width: 100%; height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; background: var(--surface2); border-radius: 8px; margin-bottom: 1rem;
}
.service-name { font-size: 1.1rem; font-weight: 700; margin-bottom: .35rem; }
.service-desc { color: var(--muted); font-size: .875rem; line-height: 1.55; margin-bottom: 1rem; }
.service-footer { display: flex; align-items: center; justify-content: space-between; }
.service-price { font-family: 'Syne',sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.service-price small { font-family: 'DM Sans',sans-serif; font-size: .72rem; font-weight: 400; color: var(--muted); }

/* Worker card */
.worker-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.worker-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--surface2); border: 2px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 800; color: var(--purple);
  overflow: hidden; flex-shrink: 0;
}
.worker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.worker-name { font-weight: 700; font-size: 1rem; }
.worker-area { font-size: .8rem; color: var(--muted); margin-top: .1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.tag {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 100px; padding: .2rem .65rem;
  font-size: .72rem; font-weight: 500; color: var(--muted);
}
.worker-bio { font-size: .85rem; color: var(--muted); line-height: 1.55; margin-bottom: 1.25rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Job card */
.job-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.job-id { font-size: .78rem; color: var(--muted); }
.job-desc { font-size: .875rem; color: var(--muted); margin-bottom: .75rem; line-height: 1.5; }
.job-meta { font-size: .8rem; margin-bottom: 1rem; }
.job-meta p { margin-bottom: .2rem; color: var(--muted); }
.job-meta strong { color: var(--text); }
.payment-row { display: flex; gap: 1rem; margin-top: .5rem; }
.pay-chip {
  font-size: .75rem; padding: .2rem .6rem; border-radius: 100px;
  font-weight: 500;
}
.pay-ok  { background: rgba(34,197,94,.15); color: var(--green); }
.pay-no  { background: rgba(239,68,68,.12); color: var(--red); }
.job-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* Status badges */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .7rem; border-radius: 100px;
  font-size: .72rem; font-weight: 600;
}
.badge-pending    { background: rgba(245,158,11,.15); color: var(--yellow); }
.badge-assigned   { background: rgba(59,130,246,.15); color: var(--blue); }
.badge-in_progress { background: rgba(124,92,252,.15); color: var(--purple); }
.badge-completed  { background: rgba(34,197,94,.15); color: var(--green); }
.badge-cancelled  { background: rgba(239,68,68,.12); color: var(--red); }

/* ---- GRIDS ---- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }

/* ---- FILTERS ---- */
.filters { display: flex; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.input-field {
  flex: 1; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: .6rem 1rem;
  color: var(--text); font-size: .9rem;
  transition: border-color .2s;
}
.input-field:focus { outline: none; border-color: rgba(255,107,53,.5); }
.input-field::placeholder { color: var(--muted); }
select.input-field { appearance: none; cursor: pointer; }
textarea.input-field { resize: vertical; min-height: 110px; }

/* ---- FORMS ---- */
.form-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.5rem,4vw,2.5rem);
}
.form-group { margin-bottom: 1.4rem; }
.form-label { display: block; font-size: .85rem; font-weight: 500; margin-bottom: .45rem; }
.form-hint { font-size: .75rem; color: var(--muted); margin-top: .3rem; }

/* ---- DIVIDER ---- */
.divider {
  display: flex; align-items: center; gap: 1rem;
  color: var(--muted); font-size: .8rem; margin: 1.5rem 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ---- ALERTS ---- */
.alert {
  padding: .85rem 1.1rem; border-radius: 8px;
  font-size: .875rem; margin-bottom: 1.25rem;
  display: flex; align-items: flex-start; gap: .5rem;
}
.alert-success { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.25); }
.alert-error   { background: rgba(239,68,68,.10); color: #ff8080;     border: 1px solid rgba(239,68,68,.25); }
.alert-info    { background: rgba(59,130,246,.10); color: #7eb3ff;    border: 1px solid rgba(59,130,246,.25); }

/* ---- MODAL ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: 2rem; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.3rem; font-weight: 700; }
.modal-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.4rem; line-height: 1; transition: color .2s; }
.modal-close:hover { color: var(--text); }

/* ---- CHAT ---- */
.chat-box {
  display: flex; flex-direction: column;
  height: 380px; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg);
}
.chat-head {
  padding: .85rem 1rem; background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: .9rem;
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }
.chat-bubble {
  max-width: 78%; padding: .55rem .9rem;
  border-radius: 14px; font-size: .875rem; line-height: 1.5;
  word-break: break-word;
}
.chat-bubble.me {
  align-self: flex-end;
  background: var(--accent); color: #fff; border-bottom-right-radius: 4px;
}
.chat-bubble.them {
  align-self: flex-start;
  background: var(--surface2); color: var(--text); border-bottom-left-radius: 4px;
}
.chat-time { font-size: .68rem; opacity: .6; margin-top: .2rem; }
.chat-form {
  display: flex; gap: .6rem; padding: .75rem;
  border-top: 1px solid var(--border); background: var(--surface);
}
.chat-input {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: .5rem .9rem;
  color: var(--text); font-size: .875rem;
}
.chat-input:focus { outline: none; border-color: var(--accent); }
.chat-empty { color: var(--muted); font-size: .85rem; text-align: center; margin: auto; }

/* ---- STEP CARDS (HOW IT WORKS) ---- */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1.5rem; }
.step-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: border-color .2s, transform .2s;
}
.step-card:hover { border-color: rgba(255,107,53,.4); transform: translateY(-3px); }
.step-num { font-family: 'Syne',sans-serif; font-size: 3rem; font-weight: 800; color: var(--border2); line-height: 1; margin-bottom: 1rem; }
.step-card h3 { font-size: 1rem; margin-bottom: .4rem; }
.step-card p { color: var(--muted); font-size: .85rem; line-height: 1.55; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: .5; }
.empty-state h3 { color: var(--text); margin-bottom: .5rem; }

/* ---- LOGIN PAGE ---- */
.auth-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 62px); padding: 2rem 1rem;
}
.auth-card {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 16px; padding: clamp(2rem,5vw,3rem);
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-logo { font-family: 'Syne',sans-serif; font-size: 1.6rem; font-weight: 800; margin-bottom: 1.5rem; }
.auth-logo span { color: var(--accent); }
.auth-title { font-size: 1.5rem; font-weight: 700; margin-bottom: .4rem; }
.auth-sub { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }

/* ---- DASHBOARD STATS ---- */
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1rem; margin-bottom: 2.5rem; }
.dash-stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem;
}
.dash-stat-val { font-family: 'Syne',sans-serif; font-size: 2rem; font-weight: 800; }
.dash-stat-key { font-size: .78rem; color: var(--muted); margin-top: .2rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---- PROFILE PAGE ---- */
.profile-wrap { max-width: 640px; margin: 0 auto; }

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-size: 1.1rem; }
.footer-copy { font-size: .8rem; color: var(--muted); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .82rem; color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 62px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-hamburger { display: flex; }
  .stats-row { gap: 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---- UTILS ---- */
.text-muted    { color: var(--muted); }
.text-accent   { color: var(--accent); }
.text-green    { color: var(--green); }
.text-red      { color: var(--red); }
.text-center   { text-align: center; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }
