/* Architect portal — public + client + admin styles.
 *
 * Brand tokens read from CSS custom properties so each business can
 * override them via inline <style> in the template (loaded from
 * businesses.brand_json).
 */

:root {
  --biz-primary: #1f2937;
  --biz-accent:  #b08962;
  --biz-bg:      #fafaf7;
  --biz-card:    #ffffff;
  --biz-border:  #e5e3dd;
  --biz-text:    #1f2937;
  --biz-muted:   #6b6b66;
  --biz-danger:  #b91c1c;
  --biz-success: #15803d;
  --biz-radius:  14px;
  --biz-radius-sm: 8px;
  --biz-shadow:  0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
  --biz-font:    -apple-system, "Heebo", "Assistant", "Segoe UI", system-ui, sans-serif;
}

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

body.biz {
  margin: 0;
  background: var(--biz-bg);
  color: var(--biz-text);
  font-family: var(--biz-font);
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--biz-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.biz-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.biz-narrow { max-width: 720px; margin: 0 auto; padding: 0 20px; }

.biz-header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--biz-border);
  background: var(--biz-card);
}
.biz-header h1 {
  margin: 0; font-size: 28px; font-weight: 600;
  letter-spacing: -.01em; color: var(--biz-primary);
}
.biz-header .biz-tagline {
  margin: 4px 0 0; color: var(--biz-muted); font-size: 15px;
}
.biz-header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.biz-nav a {
  margin-inline-start: 14px; font-size: 14px; color: var(--biz-muted);
}
.biz-nav a:hover { color: var(--biz-primary); }

.biz-hero {
  padding: 60px 0 50px;
  text-align: center;
}
.biz-hero h2 {
  font-size: 36px; font-weight: 500; margin: 0 0 12px;
  letter-spacing: -.02em;
}
.biz-hero p {
  font-size: 18px; color: var(--biz-muted); max-width: 580px;
  margin: 0 auto 28px;
}
.biz-hero .biz-cta {
  display: inline-block;
  padding: 14px 30px;
  background: var(--biz-primary); color: #fff !important;
  border-radius: var(--biz-radius);
  font-size: 16px; font-weight: 500;
  border: none; cursor: pointer;
}
.biz-hero .biz-cta:hover { opacity: .92; text-decoration: none; }

.biz-card {
  background: var(--biz-card);
  border: 1px solid var(--biz-border);
  border-radius: var(--biz-radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--biz-shadow);
}
.biz-card h3 {
  margin: 0 0 10px; font-size: 17px; font-weight: 600;
}
.biz-card .biz-meta {
  font-size: 13px; color: var(--biz-muted); margin-bottom: 6px;
}

.biz-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.biz-form { margin: 16px 0; }
.biz-form .biz-field { margin-bottom: 14px; }
.biz-form label {
  display: block; font-size: 13px; color: var(--biz-muted);
  margin-bottom: 6px;
}
.biz-form input, .biz-form textarea, .biz-form select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--biz-border);
  border-radius: var(--biz-radius-sm);
  font: inherit; background: #fff; color: inherit;
}
.biz-form input:focus, .biz-form textarea:focus {
  outline: none; border-color: var(--biz-primary);
}
.biz-form textarea { min-height: 96px; resize: vertical; }

.biz-btn {
  display: inline-block; padding: 10px 22px;
  border: 1px solid var(--biz-primary);
  background: var(--biz-primary); color: #fff;
  border-radius: var(--biz-radius-sm);
  font: inherit; cursor: pointer;
}
.biz-btn:hover { opacity: .92; }
.biz-btn-ghost {
  background: transparent; color: var(--biz-primary);
}
.biz-btn-danger {
  background: var(--biz-danger); border-color: var(--biz-danger);
}
.biz-btn-sm { padding: 6px 12px; font-size: 13px; }

.biz-chat { padding: 36px 0; }
.biz-chat-bubble {
  background: var(--biz-card);
  border: 1px solid var(--biz-border);
  border-radius: var(--biz-radius);
  padding: 20px 24px; margin-bottom: 14px;
  box-shadow: var(--biz-shadow);
}
.biz-chat-bubble h2 {
  font-size: 19px; font-weight: 500; margin: 0 0 6px;
}
.biz-chat-bubble p { margin: 0; color: var(--biz-muted); }

.biz-quick-row {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0;
}
.biz-quick {
  padding: 8px 16px; font-size: 14px;
  background: #fff; border: 1px solid var(--biz-border);
  border-radius: 999px; cursor: pointer; color: inherit;
}
.biz-quick:hover { border-color: var(--biz-primary); }

.biz-progress {
  height: 4px; background: var(--biz-border); border-radius: 2px;
  margin-bottom: 22px; overflow: hidden;
}
.biz-progress > span {
  display: block; height: 100%; background: var(--biz-accent);
  transition: width .4s;
}

.biz-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--biz-border);
  margin-bottom: 18px;
}
.biz-tabs a {
  padding: 10px 16px; font-size: 14px; color: var(--biz-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.biz-tabs a.active {
  color: var(--biz-primary); border-bottom-color: var(--biz-primary);
}

.biz-comment {
  padding: 12px 14px; margin-bottom: 8px;
  border-radius: var(--biz-radius-sm);
  background: var(--biz-card); border: 1px solid var(--biz-border);
}
.biz-comment-member { background: #f6f4ee; }
.biz-comment-internal {
  background: #fff7ed; border-color: #fed7aa;
}
.biz-comment-meta {
  font-size: 12px; color: var(--biz-muted); margin-bottom: 4px;
}

.biz-pill {
  display: inline-block; padding: 3px 10px; font-size: 12px;
  border-radius: 999px; background: var(--biz-border);
  color: var(--biz-text);
}
.biz-pill-intake    { background: #fef3c7; color: #92400e; }
.biz-pill-briefed   { background: #dbeafe; color: #1e40af; }
.biz-pill-proposal  { background: #e0e7ff; color: #3730a3; }
.biz-pill-active    { background: #dcfce7; color: #166534; }
.biz-pill-completed { background: #f1f5f9; color: #475569; }
.biz-pill-cancelled { background: #fee2e2; color: #991b1b; }

.biz-impersonate-banner {
  background: var(--biz-accent); color: #fff;
  padding: 8px 16px; text-align: center; font-size: 13px;
}
.biz-impersonate-banner a { color: #fff; text-decoration: underline; }

.biz-kanban {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}
.biz-kanban-col h3 {
  font-size: 13px; color: var(--biz-muted); text-transform: uppercase;
  letter-spacing: .05em; margin: 0 0 10px;
}

@media (max-width: 720px) {
  .biz-kanban { grid-template-columns: 1fr; }
  .biz-hero h2 { font-size: 28px; }
}

.biz-empty {
  padding: 32px; text-align: center; color: var(--biz-muted);
  border: 1px dashed var(--biz-border); border-radius: var(--biz-radius);
}

.biz-error {
  padding: 10px 14px; margin: 12px 0;
  background: #fee2e2; border: 1px solid #fecaca;
  color: var(--biz-danger); border-radius: var(--biz-radius-sm);
}
.biz-success-msg {
  padding: 10px 14px; margin: 12px 0;
  background: #dcfce7; border: 1px solid #bbf7d0;
  color: var(--biz-success); border-radius: var(--biz-radius-sm);
}
