/* ============================================================
   DECORAWORLD — Portal do Cliente
   Design: comercial e acolhedor (diferente do painel admin)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #eeb32b;
  --gold-dark:  #c49424;
  --gold-light: rgba(238,179,43,0.12);
  --cream:      #f8f5f0;
  --warm-bg:    #faf8f4;
  --card-bg:    #ffffff;
  --border:     rgba(139,125,90,0.12);
  --text:       #1a1a1a;
  --text-muted: rgba(26,26,26,0.5);
  --text-light: rgba(26,26,26,0.35);
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg:  0 20px 48px rgba(0,0,0,0.1);
  --radius:     12px;
  --radius-sm:  8px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--warm-bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────── */
.font-display { font-family: 'Newsreader', Georgia, serif; }

h1, h2, h3 { font-weight: 600; line-height: 1.25; }

/* ── Layout ─────────────────────────────────────────────── */
.portal-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.portal-header-logo img {
  height: 32px;
  width: auto;
}

.portal-header-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.portal-header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.portal-nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.portal-nav-link:hover, .portal-nav-link.active {
  background: var(--gold-light);
  color: var(--gold-dark);
}

.portal-main {
  flex: 1;
  padding: 32px 24px;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-body { padding: 24px; }

/* Project cards */
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--gold-light);
  color: var(--gold-dark);
  border: 1px solid rgba(238,179,43,0.2);
}

/* ── Progress Bar ────────────────────────────────────────── */
.progress-wrap {
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
  transition: width .4s ease;
}

/* ── Stage Timeline ──────────────────────────────────────── */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

.timeline-dot.done {
  background: rgba(74,222,128,.15);
  border: 2px solid rgba(74,222,128,.4);
  color: #16a34a;
}

.timeline-dot.active {
  background: var(--gold-light);
  border: 2px solid var(--gold);
  color: var(--gold-dark);
}

.timeline-dot.pending {
  background: rgba(0,0,0,.04);
  border: 2px solid rgba(0,0,0,.1);
  color: rgba(0,0,0,.3);
}

.timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}

.timeline-card.active-stage {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(238,179,43,0.08);
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: color .15s;
  white-space: nowrap;
}

.tab.active {
  color: var(--gold-dark);
  border-bottom-color: var(--gold);
}

/* ── Photo Grid ──────────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.photo-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background: #f0ece6;
  border: 1px solid var(--border);
  transition: transform .15s;
}

.photo-thumb:hover { transform: scale(1.02); }

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s;
}

.lightbox-close:hover { opacity: 1; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, transform .1s;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--gold);
  color: #0d0d0d;
}

.btn-primary:hover { background: var(--gold-dark); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-outline:hover { background: rgba(0,0,0,.04); color: var(--text); }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

.btn-whatsapp:hover { background: #1dbb57; }

.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ── Form Inputs ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(238,179,43,.08);
}

.form-textarea { min-height: 100px; resize: vertical; }

/* ── Login Page ──────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f5f0 0%, #ede8e0 100%);
  padding: 20px;
}

.login-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

/* ── Document List ───────────────────────────────────────── */
.doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}

.doc-item:last-child { border-bottom: none; }
.doc-item:hover { background: rgba(0,0,0,.02); }

.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 16px;
  flex-shrink: 0;
}

/* ── WhatsApp Float ──────────────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
  z-index: 99;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
}

/* ── Utility ─────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-gold  { color: var(--gold-dark); }
.text-green { color: #16a34a; }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 11px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.hidden { display: none !important; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: .35;
}

/* ── Status chips ────────────────────────────────────────── */
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.chip-green  { background: rgba(74,222,128,.1); color: #16a34a; border: 1px solid rgba(74,222,128,.2); }
.chip-yellow { background: var(--gold-light); color: var(--gold-dark); border: 1px solid rgba(238,179,43,.2); }
.chip-gray   { background: rgba(0,0,0,.06); color: var(--text-muted); border: 1px solid rgba(0,0,0,.08); }
