/* BYP – Quick Job Quotes
   Light utility design. Fast, clean, professional.
   ------------------------------------------------------------ */

:root {
  --bg:           #F6F7F5;
  --card:         #FFFFFF;
  --text:         #1F2328;
  --muted:        #6B7280;
  --muted-light:  #9CA3AF;
  --border:       #E5E7EB;
  --border-focus: #1F7A63;
  --accent:       #1F7A63;
  --accent-hover: #186655;
  --accent-light: #EAF4F1;
  --success:      #15803D;
  --success-bg:   #F0FDF4;
  --success-bdr:  #BBF7D0;
  --danger:       #DC2626;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius:       14px;
  --shadow:       0 4px 14px rgba(0,0,0,0.07);
  --shadow-sm:    0 2px 6px rgba(0,0,0,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout ---- */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ---- Header ---- */
.site-header {
  padding: 24px 0 32px;
}
.logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
}
.logo-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* ---- Tool card (input wrapper) ---- */
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 20px 16px;
  margin-bottom: 12px;
}
.tool-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---- Quote input ---- */
.quote-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 9px;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.quote-input::placeholder {
  color: var(--muted-light);
  font-weight: 400;
}
.quote-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(31,122,99,0.12);
  background: var(--card);
}
.input-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}
.input-hint-ex {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11.5px;
  font-family: 'SF Mono', 'Fira Mono', 'Menlo', monospace;
  color: var(--muted);
  margin-left: 3px;
}

/* ---- Price chips ---- */
.price-chips {
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.chips-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  white-space: nowrap;
}
.chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chip {
  padding: 5px 13px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  line-height: 1.4;
}
.chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.chip:active {
  transform: scale(0.96);
}

/* ---- Preview card ---- */
.preview-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 18px;
  margin-bottom: 8px;
}

/* -- Identity area -- */
.preview-identity {
  margin-bottom: 4px;
}
.preview-name-field {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  border-radius: 4px;
  padding: 1px 3px;
  margin: -1px -3px;
  min-height: 1.5em;
  min-width: 80px;
  transition: background 0.13s;
  cursor: text;
}
.preview-name-field:hover  { background: #F0F9F7; }
.preview-name-field:focus  { background: var(--accent-light); box-shadow: 0 0 0 2px rgba(31,122,99,0.15); }

.preview-phone-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}
.preview-phone-icon {
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.preview-phone-field {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  outline: none;
  border-radius: 4px;
  padding: 1px 3px;
  margin: -1px -3px;
  min-height: 1.4em;
  min-width: 60px;
  transition: background 0.13s;
  cursor: text;
}
.preview-phone-field:hover { background: #F0F9F7; }
.preview-phone-field:focus { background: var(--accent-light); box-shadow: 0 0 0 2px rgba(31,122,99,0.15); }

/* Empty state placeholder via ::before */
.preview-empty::before {
  content: attr(data-placeholder);
  color: var(--muted-light);
  font-style: italic;
  font-weight: 400;
  font-size: inherit;
  pointer-events: none;
}
.preview-name-field.preview-empty {
  border-bottom: 1.5px dashed #D1D5DB;
  padding-bottom: 2px;
}
.preview-phone-field.preview-empty {
  border-bottom: 1.5px dashed #D1D5DB;
  padding-bottom: 2px;
}

/* -- Divider inside preview card -- */
.preview-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* -- Preview sections -- */
.preview-section {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.preview-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 18px;
}
.preview-section-price {
  /* no override needed */
}
.preview-field-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 4px;
}
.preview-job {
  font-size: 16px;
  color: var(--text);
}
.preview-price {
  font-size: 44px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.preview-price-empty {
  font-size: 44px;
  color: var(--border);
}
.preview-avail-field {
  font-size: 15px;
  color: var(--text);
  outline: none;
  border-radius: 4px;
  padding: 1px 3px;
  margin: -1px -3px;
  cursor: text;
  transition: background 0.13s;
}
.preview-avail-field:hover { background: #F0F9F7; }
.preview-avail-field:focus { background: var(--accent-light); }

/* -- Accept preview button -- */
.preview-accept-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  text-align: center;
  cursor: default;
  opacity: 0.6;
  user-select: none;
}

/* -- Footer note -- */
.preview-footer {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
  margin-bottom: 20px;
}

/* ---- Send area ---- */
.send-area {
  margin-bottom: 8px;
}
.btn-send {
  display: block;
  width: 100%;
  padding: 15px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: -0.2px;
}
.btn-send:hover:not(:disabled) { background: var(--accent-hover); }
.btn-send:active:not(:disabled) { transform: scale(0.99); }
.btn-send:disabled {
  background: #D1D5DB;
  color: #9CA3AF;
  cursor: not-allowed;
}
.send-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* ---- Result area ---- */
.result-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--success);
  margin-bottom: 14px;
}
.result-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  flex-shrink: 0;
}
.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 14px;
}
.result-block {
  padding: 6px 0 14px;
}
.result-block:first-child { padding-top: 0; }
.result-block:last-child { padding-bottom: 0; }
.result-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 14px;
}
.result-block-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 5px;
}
.result-reply-copy {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 5px;
}
.result-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.result-link {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.2px;
  word-break: break-all;
  flex: 1;
}
.result-link-muted {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

/* -- Copy icon button -- */
.copy-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.14s;
  line-height: 1;
}
.copy-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.copy-icon-btn.copied {
  border-color: var(--success-bdr);
  color: var(--success);
  background: var(--success-bg);
}

/* -- New quote button -- */
.btn-new {
  display: block;
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.14s;
  text-align: center;
  margin-top: 8px;
}
.btn-new:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ---- Recent quotes ---- */
.recent-section {
  margin-top: 40px;
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 10px;
}
.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 15px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 7px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: border-color 0.13s, box-shadow 0.13s;
}
.recent-item:hover {
  border-color: #D1D5DB;
  box-shadow: var(--shadow-sm);
}
.recent-job {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}
.recent-meta {
  font-size: 12.5px;
  color: var(--muted);
}
.recent-status {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  margin-left: 10px;
}
.recent-status.accepted {
  background: var(--success-bg);
  color: var(--success);
}
.recent-status.created {
  background: #F3F4F6;
  color: var(--muted);
}

/* ---- Auth row (secondary, bottom) ---- */
.auth-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.auth-status {
  font-size: 12px;
  color: var(--muted);
}
.btn-auth {
  padding: 6px 14px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.13s;
}
.btn-auth:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ---- Client quote page ---- */
.client-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 16px 60px;
}
.client-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px 22px;
  margin-bottom: 16px;
}
.client-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.client-phone-row {
  margin-bottom: 4px;
}
.client-phone-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}
.client-phone-link:hover { text-decoration: underline; }
.client-divider {
  height: 1px;
  background: var(--border);
  margin: 18px 0;
}
.client-field {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.client-field:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}
.client-field-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 4px;
}
.client-field-value {
  font-size: 16px;
  color: var(--text);
}
.client-price {
  font-size: 42px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1.5px;
  line-height: 1.1;
}
.client-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.btn-accept {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.14s;
  text-align: center;
}
.btn-accept:hover:not(:disabled) { background: var(--accent-hover); }
.btn-accept.accepted-state {
  background: var(--success);
  cursor: default;
}
.btn-call {
  display: block;
  width: 100%;
  padding: 13px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.14s;
}
.btn-call:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.accepted-msg {
  background: var(--success-bg);
  border: 1px solid var(--success-bdr);
  border-radius: 9px;
  padding: 14px 18px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--success);
  font-weight: 500;
  line-height: 1.6;
}
.accepted-time {
  font-size: 12px;
  color: var(--success);
  opacity: 0.8;
  margin-top: 4px;
  font-weight: 400;
}
.client-trust {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ---- Manage page ---- */
.manage-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 16px 60px;
}
.manage-header-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 14px;
}
.manage-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.manage-field {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.manage-field-last {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.manage-field-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 5px;
}
.manage-field-value {
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
}
.manage-price {
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.manage-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: #F3F4F6;
  padding: 5px 13px;
  border-radius: 20px;
}
.manage-status-accepted {
  font-size: 14px;
  font-weight: 600;
  color: var(--success);
}
.manage-accepted-time {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 5px;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
  white-space: nowrap;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Utilities ---- */
.hidden { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .preview-price  { font-size: 38px; }
  .client-price   { font-size: 36px; }
  .preview-card   { padding: 18px 16px 16px; }
  .client-card    { padding: 20px 16px 18px; }
  .manage-card    { padding: 18px 16px; }
  .result-card    { padding: 18px 17px; }
  .site-header    { padding: 18px 0 24px; }
}
