/* ==========================================================================
   Veld Studio — Client Portal Stylesheet
   Standalone mobile-first portal for client copy review & approval.
   ========================================================================== */
@import 'variables.css';

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--sand-light);
  color: var(--bark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── LOGIN SCREEN ── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(160deg, var(--sand-light) 0%, var(--sand) 100%);
}

.login-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px 32px;
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--sand-dark);
  box-shadow: 0 4px 24px rgba(44, 31, 18, 0.06);
}

.login-brand {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--bark);
  text-align: center;
  margin-bottom: 4px;
}
.login-brand em { color: var(--terra); font-style: italic; }

.login-tagline {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 32px;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--sand-dark);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--bark);
  background: var(--sand-light);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--terra); }

.login-btn {
  width: 100%;
  padding: 13px;
  background: var(--terra);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.login-btn:hover { background: var(--terra-dark); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-error {
  color: var(--danger);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  min-height: 20px;
}

/* ── PORTAL SHELL ── */
.portal-shell { display: none; min-height: 100vh; }
.portal-shell.active { display: block; }
.login-screen.hidden { display: none; }

/* ── TOP BAR ── */
.portal-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--sand-dark);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--bark);
}
.topbar-brand em { color: var(--terra); font-style: italic; }

.topbar-logout {
  background: none;
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.topbar-logout:hover { border-color: var(--terra); color: var(--terra); }

/* ── PORTAL CONTENT ── */
.portal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 80px;
}

/* ── HEADER / GREETING ── */
.portal-greeting {
  margin-bottom: 28px;
}

.portal-greeting h1 {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 300;
  color: var(--bark);
  margin-bottom: 8px;
}
.portal-greeting h1 em { font-style: italic; color: var(--terra); }

.portal-greeting p {
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
}

/* ── PROGRESS CARD ── */
.progress-card {
  background: var(--white);
  border-radius: 12px;
  padding: 20px 24px;
  border: 1px solid var(--sand-dark);
  margin-bottom: 24px;
}

.progress-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 10px;
}

.progress-bar {
  height: 6px;
  background: var(--sand-dark);
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--terra));
  border-radius: 6px;
  transition: width 0.5s ease;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.progress-step {
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
}
.progress-step.active { color: var(--terra); font-weight: 500; }

/* ── PAGE CARD ── */
.page-card {
  background: var(--white);
  border-radius: 12px;
  border: 1px solid var(--sand-dark);
  overflow: hidden;
  margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.page-card-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sand-light);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.page-card-head:hover { background: var(--sand-light); }

.page-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 400;
  color: var(--bark);
}

.page-status {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.page-status.approved {
  background: var(--sage);
  color: var(--white);
}
.page-status.awaiting {
  background: var(--sand);
  color: var(--bark-mid);
}
.page-status.changes {
  background: var(--warning);
  color: var(--white);
}

.page-card-body {
  padding: 20px;
  display: none;
}
.page-card.open .page-card-body { display: block; }

.page-copy {
  font-size: 14px;
  color: var(--bark);
  line-height: 1.8;
  font-weight: 300;
  white-space: pre-wrap;
  margin-bottom: 20px;
}

.page-copy-empty {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  padding: 20px 0;
}

/* ── FEEDBACK SECTION ── */
.feedback-section {
  border-top: 1px solid var(--sand-light);
  padding-top: 16px;
}

.feedback-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 8px;
}

.feedback-textarea {
  width: 100%;
  border: 1.5px solid var(--sand-dark);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--bark);
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
  background: var(--sand-light);
}
.feedback-textarea:focus { border-color: var(--terra); }

.feedback-sent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--sand-light);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--bark);
  line-height: 1.5;
}

.feedback-sent-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--warning);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

/* ── ACTION BUTTONS ── */
.page-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-approve {
  background: var(--sage);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  flex: 1;
}
.btn-approve:hover { background: var(--sage-dark); }

.btn-feedback {
  background: transparent;
  color: var(--terra);
  border: 1.5px solid var(--terra);
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
  flex: 1;
}
.btn-feedback:hover { background: var(--terra); color: var(--white); }

.approved-note {
  font-size: 13px;
  color: var(--sage-dark);
  font-weight: 400;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--sand-light);
}

/* ── ALL APPROVED BANNER ── */
.all-approved {
  background: var(--sage);
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  color: var(--white);
  margin-top: 8px;
}

.all-approved h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 8px;
}

.all-approved p {
  font-size: 13px;
  opacity: 0.88;
}

/* ── SITE PREVIEW ── */
.preview-website-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}
.preview-website-card h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}
.preview-website-card p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.btn-preview-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--terra);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-preview-site:hover { background: var(--terra-dark, #a0522d); }

.site-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  padding: 12px;
}
.site-preview-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 8px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  flex-wrap: wrap;
}
.site-preview-pages {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}
.site-preview-tab {
  background: var(--sand-light);
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.site-preview-tab.active {
  background: var(--bark);
  color: white;
  border-color: var(--bark);
}
.site-preview-devices {
  display: flex;
  gap: 4px;
}
.site-preview-device {
  background: var(--sand-light);
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.site-preview-device.active {
  background: var(--bark);
  border-color: var(--bark);
}
.site-preview-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--muted);
}
.site-preview-close:hover { color: var(--bark); }
.site-preview-frame-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.site-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  transition: width 0.3s ease;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bark);
  color: var(--sand);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--sage-dark); }
.toast.error { background: var(--danger); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .login-card { padding: 32px 20px; }

  .portal-content { padding: 20px 12px 60px; }

  .portal-greeting h1 { font-size: 24px; }

  .progress-card { padding: 16px; }

  .page-card-head { padding: 14px 16px; }
  .page-card-body { padding: 16px; }

  .page-actions { flex-direction: column; }
  .btn-approve, .btn-feedback { flex: none; text-align: center; }
}
