* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--nar-color-background);
  color: var(--nar-color-text);
}
.nar-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--nar-color-primary);
  color: var(--nar-color-surface);
}
.brand-lockup { display: inline-flex; align-items: center; gap: 0.65rem; color: inherit; text-decoration: none; }
.brand-symbol { width: 52px; height: 52px; object-fit: cover; border-radius: 14px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-wordmark { font-weight: 800; font-size: 1.25rem; letter-spacing: 0.045em; white-space: nowrap; }
.brand-link { color: #ff334f; }
.nar-tagline { margin-top: 0.3rem; font-size: 0.68rem; font-weight: 650; letter-spacing: 0.055em; text-transform: uppercase; opacity: 0.92; }
.growth-brand { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.8rem; }
.growth-brand img { width: 84px; height: 84px; object-fit: cover; border-radius: 20px; }
.growth-brand .growth-eyebrow { font-size: 1.35rem; letter-spacing: 0.055em; }
.growth-brand .growth-eyebrow span { color: #c51f35; }
.growth-slogan { margin: 0.28rem 0 0; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; color: var(--nar-color-text-muted); }
/* Section 11 (mobile/responsive finalization): this row (logo + tagline +
   session-nav, itself up to 4 controls: name/role, bell, e-mail
   verification, logout) had no wrap and no narrow-viewport rule -- on a
   ~390px phone it overflowed the header horizontally, at times pushing
   "Çıkış yap" off-screen. flex-wrap lets it fall to a second line instead
   of clipping; the tagline is hidden below 420px so the session controls
   get priority over decorative text on the smallest phones. */
.session-nav { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; font-size: 0.9rem; }
.public-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; width: 100%; order: 3; }
.public-nav a { color: var(--nar-color-surface); font-size: 0.82rem; text-decoration: none; }
.public-nav a:hover, .public-nav a:focus-visible { text-decoration: underline; }
.session-nav button { background: transparent; border: 1px solid rgba(255,255,255,0.5); color: var(--nar-color-surface); padding: 0.35rem 0.75rem; border-radius: 6px; cursor: pointer; }
@media (max-width: 420px) {
  .nar-tagline { display: none; }
  .session-nav { margin-left: 0; width: 100%; }
}

/* --- notifications (Section 8/9 PWA finalization) --- */
.notif-btn { position: relative; background: transparent; border: 1px solid rgba(255,255,255,0.5); color: var(--nar-color-surface); padding: 0.35rem 0.75rem; border-radius: 6px; cursor: pointer; font-size: 0.85rem; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.notif-badge { display: inline-block; margin-left: 0.35rem; background: var(--nar-color-danger); color: var(--nar-color-surface); border-radius: 999px; padding: 0.05rem 0.4rem; font-size: 0.72rem; font-weight: 700; }
.notif-badge[hidden] { display: none; }
.notifications-panel { position: absolute; top: 3.5rem; right: 1rem; width: min(360px, calc(100vw - 2rem)); max-height: 70vh; overflow-y: auto; background: var(--nar-color-surface); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.18); padding: 1rem; z-index: 20; }
.notifications-panel[hidden] { display: none; }
.notifications-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.notifications-panel-header h2 { margin: 0; font-size: 1rem; }
.notifications-panel-header .btn-link { margin-bottom: 0; font-size: 0.8rem; }
.notifications-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.notification-item { padding: 0.6rem 0.7rem; background: var(--nar-color-background); border-radius: 8px; cursor: pointer; border: none; text-align: left; width: 100%; font: inherit; color: inherit; }
.notification-item.is-unread { background: var(--nar-color-success-bg); font-weight: 600; }
.notification-item p { margin: 0.2rem 0 0; font-size: 0.78rem; color: var(--nar-color-text-muted); font-weight: 400; }

/* --- appointment lifecycle --- */
.badge-en_route { background: var(--nar-color-warning-bg); color: var(--nar-color-warning); }
.badge-arrived { background: var(--nar-color-warning-bg); color: var(--nar-color-warning); }
.badge-confirmed_arrival { background: #e3ecfb; color: #1a3d7a; }
.badge-in_progress { background: #e3ecfb; color: #1a3d7a; }
.badge-professional_completed { background: var(--nar-color-warning-bg); color: var(--nar-color-warning); }
.badge-completed { background: var(--nar-color-success-bg); color: var(--nar-color-primary); }
.badge-disputed { background: var(--nar-color-danger-bg); color: var(--nar-color-danger); }
.badge-created { background: var(--nar-color-border); color: var(--nar-color-text-muted); }
#appointment-actions { display: flex; flex-direction: column; gap: 0.7rem; }
.appointment-action-form { display: flex; flex-direction: column; gap: 0.5rem; }
.appointment-action-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; font-weight: 600; }
.appointment-action-form input, .appointment-action-form textarea { padding: 0.55rem 0.6rem; border: 1px solid var(--nar-color-border-strong); border-radius: 8px; font-size: 0.95rem; font-family: inherit; }
.appointment-action-form .btn-primary, .appointment-action-form .btn-secondary { width: 100%; }
#appointment-review-form select { padding: 0.55rem 0.6rem; border: 1px solid var(--nar-color-border-strong); border-radius: 8px; font-size: 0.95rem; }

main { max-width: 480px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.view[hidden] { display: none; }

.auth-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.growth-hero { background: var(--nar-color-surface); padding: 1.35rem; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 1rem; }
.growth-hero h1 { margin: 0.2rem 0 0.6rem; font-size: 1.45rem; line-height: 1.2; }
.growth-hero p { line-height: 1.5; }
.growth-eyebrow { color: var(--nar-color-primary); font-weight: 800; letter-spacing: 0.08em; margin: 0; }
.growth-hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }
.growth-link-button { display: inline-block; text-decoration: none; }
.auth-tab { flex: 1; padding: 0.6rem; border: none; border-radius: 8px; background: var(--nar-color-border); cursor: pointer; font-weight: 600; }
.auth-tab.is-active { background: var(--nar-color-primary); color: var(--nar-color-surface); }

.auth-form { display: flex; flex-direction: column; gap: 0.85rem; background: var(--nar-color-surface); padding: 1.25rem; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.auth-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.auth-form input, .auth-form select { padding: 0.6rem 0.65rem; border: 1px solid var(--nar-color-border-strong); border-radius: 8px; font-size: 1rem; }

.btn-primary { background: var(--nar-color-primary); color: var(--nar-color-surface); border: none; padding: 0.7rem 1rem; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary.is-loading { opacity: 0.75; }

.form-error { color: var(--nar-color-danger); font-size: 0.85rem; margin: 0; }
.form-error[hidden] { display: none; }
.form-success { color: var(--nar-color-primary); font-size: 0.9rem; margin: 0; background: #e5f2ec; padding: 0.65rem 0.75rem; border-radius: 8px; }
.form-success[hidden] { display: none; }

.card { background: var(--nar-color-surface); border-radius: 12px; padding: 1.25rem; margin-top: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card h2 { margin-top: 0; font-size: 1.05rem; }
.empty-state { color: var(--nar-color-text-muted); font-size: 0.9rem; }

/* --- unified conversational Need intake (Section H) --- */
.need-capabilities { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.85rem; }
.capability-badge { font-size: 0.76rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--nar-color-border); color: var(--nar-color-text-muted); }
.capability-badge.is-connected { background: var(--nar-color-success-bg); color: var(--nar-color-primary); }
.need-thread { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.85rem; max-height: 420px; overflow-y: auto; }
.need-turn { padding: 0.65rem 0.8rem; border-radius: 10px; font-size: 0.92rem; line-height: 1.4; max-width: 88%; }
.need-turn-system { background: var(--nar-color-background); align-self: flex-start; }
.need-turn-user { background: var(--nar-color-primary); color: var(--nar-color-surface); align-self: flex-end; }
.need-input-area { display: flex; flex-direction: column; gap: 0.65rem; }
.need-input-area textarea, .need-input-area input, .need-input-area select { padding: 0.6rem 0.65rem; border: 1px solid var(--nar-color-border-strong); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.need-input-area label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
.need-option-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.need-option-btn { background: var(--nar-color-border); color: var(--nar-color-text); border: none; padding: 0.55rem 0.9rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.need-option-btn:hover { background: #dedad0; }

.btn-secondary { background: var(--nar-color-border); color: var(--nar-color-text); border: none; padding: 0.65rem 1rem; border-radius: 8px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.btn-link { background: none; border: none; color: var(--nar-color-primary); font-weight: 600; cursor: pointer; padding: 0; margin-bottom: 0.75rem; font-size: 0.9rem; }
.form-hint { font-size: 0.82rem; color: var(--nar-color-text-muted); margin: 0; }
.loading-state { color: var(--nar-color-text-muted); font-size: 0.9rem; padding: 0.5rem 0; }

.review-summary { background: var(--nar-color-background); border-radius: 8px; padding: 0.85rem; margin-bottom: 0.6rem; }
.review-sector { font-weight: 700; margin: 0 0 0.4rem; }
.review-score { font-size: 0.85rem; color: var(--nar-color-text-muted); margin: 0.4rem 0 0; }
.review-safety { color: var(--nar-color-danger); font-weight: 600; font-size: 0.85rem; margin: 0.5rem 0 0; }

/* --- request list --- */
.request-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.request-list-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.75rem; background: var(--nar-color-background); border-radius: 8px; cursor: pointer; }
.request-list-item:hover { background: #efece2; }
.request-list-item:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.request-list-sector { font-weight: 600; flex: 1; }
.request-list-date { font-size: 0.8rem; color: var(--nar-color-text-muted); }

.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge-open { background: var(--nar-color-success-bg); color: var(--nar-color-primary); }
.badge-closed { background: var(--nar-color-border); color: var(--nar-color-text-muted); }
.badge-cancelled { background: var(--nar-color-danger-bg); color: var(--nar-color-danger); }

/* --- request detail --- */
.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 0.75rem; margin: 0; font-size: 0.9rem; }
.detail-grid dt { color: var(--nar-color-text-muted); font-weight: 600; }
.detail-grid dd { margin: 0; }

/* --- professional onboarding + opportunity feed --- */
#professional-profile-form { display: flex; flex-direction: column; gap: 0.85rem; }
#professional-profile-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; }
#professional-profile-form input, #professional-profile-form select { padding: 0.6rem 0.65rem; border: 1px solid var(--nar-color-border-strong); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 0.5rem !important; }
.checkbox-label input { width: auto; padding: 0 !important; }

.opportunity-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.opportunity-item { padding: 0.75rem; background: var(--nar-color-background); border-radius: 8px; }
.opportunity-item p { margin: 0.35rem 0 0; font-size: 0.9rem; }
.opportunity-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.match-score-pill { background: var(--nar-color-primary); color: var(--nar-color-surface); padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.opportunity-why { color: #4a4a3f; font-size: 0.82rem; }
.opportunity-quote { margin-top: 0.6rem; padding: 0.65rem; background: var(--nar-color-surface); border: 1px solid #d8d5c8; border-radius: 6px; }
.opportunity-quote-summary { font-weight: 600; margin: 0 0 0.4rem; }
.opportunity-quote-reasons { margin: 0 0 0.5rem; padding-left: 1.1rem; font-size: 0.85rem; color: #4a4a3f; }
.opportunity-quote-reasons li { margin: 0.15rem 0; }


/* --- proposals (professional submission + customer comparison) --- */
.btn-submit-proposal { margin-top: 0.6rem; width: 100%; }
.btn-submit-proposal.is-done { background: var(--nar-color-text-muted); cursor: default; }
.proposal-item-error { margin-top: 0.4rem; }
.proposal-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.6rem; }
.proposal-item { padding: 0.75rem; background: var(--nar-color-background); border-radius: 8px; }
.proposal-item p { margin: 0.35rem 0 0; font-size: 0.9rem; }
.proposal-item .btn-primary { margin-top: 0.6rem; width: 100%; }
.badge-submitted { background: var(--nar-color-warning-bg); color: var(--nar-color-warning); }
.badge-selected { background: var(--nar-color-success-bg); color: var(--nar-color-primary); }
.badge-not_selected { background: var(--nar-color-border); color: var(--nar-color-text-muted); }
.badge-expired { background: var(--nar-color-border); color: var(--nar-color-text-muted); }

/* --- Payment / Credit Sandbox (Founder directive 2026-09-29) ---
   Explicitly, visually distinct from real status badges (amber/orange,
   never green/success-colored) so SANDBOX / TEST MODE never reads as a
   real payment confirmation. */
.sandbox-badge { display: inline-block; background: #fff4d6; color: var(--nar-color-warning); border: 1px solid #e8c877; padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: middle; margin-left: 0.4rem; }
#credit-balance-card #credit-balance-text { font-size: 1.15rem; font-weight: 700; color: var(--nar-color-primary); }
#credit-order-form { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--nar-color-border); }
#credit-order-form label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; }
#credit-order-form input { padding: 0.55rem 0.6rem; border: 1px solid var(--nar-color-border-strong); border-radius: 8px; font-size: 1rem; font-family: inherit; max-width: 12rem; }
.credit-orders-list { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.credit-order-item { padding: 0.6rem 0.75rem; background: var(--nar-color-background); border-radius: 8px; font-size: 0.85rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.badge-sandbox_pending { background: var(--nar-color-warning-bg); color: var(--nar-color-warning); }
.badge-sandbox_approved { background: #e3ecfb; color: #1a3d7a; }
.badge-sandbox_credited { background: var(--nar-color-success-bg); color: var(--nar-color-primary); }
.badge-sandbox_rejected { background: var(--nar-color-danger-bg); color: var(--nar-color-danger); }
.badge-sandbox_cancelled { background: var(--nar-color-border); color: var(--nar-color-text-muted); }
.credit-order-cta { margin-top: 0.5rem; }
