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

:root {
  --bg:          #0d0f14;
  --surface:     #161920;
  --surface2:    #1e2230;
  --border:      #2a2f42;
  --text:        #e4e8f0;
  --muted:       #6b7289;
  --accent:      #4f7ef8;
  --green:       #3ecf8e;
  --red:         #f87171;
  --yellow:      #fbbf24;
  --purple:      #a78bfa;
  --pink:        #f472b6;
  --radius:      10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Layout ── */
.app-container {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 1rem 5rem;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.app-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.app-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--border); }

.btn-icon {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}
.btn-icon:hover { color: var(--text); }

.btn-back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.btn-back:hover { text-decoration: underline; }

.btn-solo-toggle {
  border: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-solo-toggle.partnership {
  background: rgba(79,126,248,0.15);
  color: var(--accent);
}
.btn-solo-toggle.solo {
  background: rgba(251,191,36,0.15);
  color: var(--yellow);
}
.btn-solo-toggle:hover { opacity: 0.75; }

.btn-danger-sm {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-danger-sm:hover { background: rgba(248,113,113,0.1); }

.btn-delete-item {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.btn-delete-item:hover { color: var(--red); background: rgba(248,113,113,0.1); }

/* ── Section ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.section-header h2 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.item-actions { display: flex; gap: 0.4rem; align-items: center; }

.section-card h3 {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 1rem;
}

/* ── Summary card ── */
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.summary-oop-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.summary-oop-value {
  font-size: 1.6rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--red);
  letter-spacing: -0.02em;
}

.summary-oop-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.summary-oop-breakdown {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 0.6rem;
  background: var(--surface2);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}

.summary-oop-partner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.summary-oop-partner-val {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.summary-oop-sep {
  width: 1px;
  height: 2rem;
  background: var(--border);
  margin: 0 1rem;
  flex-shrink: 0;
}

.summary-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.summary-label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.summary-value {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-value.shared { color: var(--purple); }

.summary-sep {
  height: 1px;
  background: var(--border);
  margin: 0.1rem 0;
}

.summary-divider {
  width: 1px;
  height: 2.5rem;
  background: var(--border);
  margin: 0 1.1rem;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .summary-row { flex-wrap: wrap; gap: 0.75rem; }
  .summary-divider { display: none; }
  .summary-stat { min-width: 30%; }
}

/* ── List toolbar (sort + new deal) ── */
.list-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.select-sort {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
}

.btn-sort-dir {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s;
}
.btn-sort-dir:hover { background: var(--border); }

/* ── Date fields ── */
.date-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.date-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.date-field label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-date {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  color-scheme: dark;
}
.input-date:focus { border-color: var(--accent); }

.stat-date { font-size: 0.85rem; }

/* ── Deal list cards ── */
.deal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.deal-card:hover { border-color: var(--accent); background: var(--surface2); }

.deal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.deal-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.deal-name { font-weight: 600; font-size: 1rem; }

.deal-init-cost {
  font-size: 0.8rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.days-ok     { color: var(--text); }
.days-orange { color: var(--yellow); font-weight: 600; }
.days-red    { color: var(--red);    font-weight: 700; }

.badge {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-active  { background: rgba(79,126,248,0.15); color: var(--accent); }
.badge-sold    { background: rgba(62,207,142,0.15); color: var(--green); }
.badge-solo    { background: rgba(251,191,36,0.15); color: var(--yellow); }

.deal-card-stats { display: flex; gap: 2rem; }
.stat { display: flex; flex-direction: column; gap: 0.1rem; }
.stat-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 0.95rem; font-weight: 600; }

.positive { color: var(--green); }
.negative { color: var(--red); }

/* ── Deal detail header inputs ── */
.deal-title-input {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  outline: none;
  letter-spacing: -0.02em;
  transition: border-color 0.15s;
}
.deal-title-input:focus { border-bottom-color: var(--accent); }

.select-status {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
}

/* ── Initial cost card ── */
.initial-cost-card {
  border-color: rgba(79,126,248,0.35);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(79,126,248,0.05) 100%);
}

.initial-cost-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.initial-cost-label {
  font-size: 0.875rem;
  color: var(--muted);
  flex: 1;
  min-width: 160px;
}

/* ── Profit panel ── */
.profit-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.sale-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.sale-price-row label { font-weight: 600; font-size: 1rem; }

.price-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  transition: border-color 0.15s;
}
.price-input-wrap:focus-within { border-color: var(--accent); }

.currency-symbol { color: var(--muted); font-weight: 600; font-size: 1rem; }

.sale-price-input {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  width: 130px;
  text-align: right;
  outline: none;
}
/* hide number spinners */
.sale-price-input::-webkit-outer-spin-button,
.sale-price-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.sale-price-input[type=number] { -moz-appearance: textfield; }

.profit-grid { display: flex; flex-direction: column; gap: 0.45rem; }

.profit-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9rem;
}
.profit-row.indent {
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.83rem;
}
.profit-row.total-costs { font-weight: 600; }
.profit-row.gross {
  font-weight: 700;
  font-size: 1rem;
}
.profit-row.net-each { color: var(--muted); font-size: 0.85rem; }

.profit-divider { height: 1px; background: var(--border); margin: 0.4rem 0; }

.payout-block {
  background: var(--surface2);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}
.payout-block + .payout-block { margin-top: 0.5rem; }

.payout-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.payout-name { font-weight: 600; font-size: 0.9rem; }
.payout-amount { font-weight: 700; font-size: 1.15rem; color: var(--accent); }
.payout-amount.negative { color: var(--red); }
.payout-breakdown { font-size: 0.75rem; color: var(--muted); margin-top: 0.2rem; }

/* ── Items table ── */
.items-table { width: 100%; border-collapse: collapse; }

.items-table th {
  text-align: left;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.items-table th.col-cost  { text-align: right; width: 100px; }
.items-table th.col-paid  { width: 120px; }
.items-table th.col-del   { width: 32px; }

.items-table td {
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.items-table tr:last-child td { border-bottom: none; }

.input-inline {
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 0.875rem;
  padding: 0.28rem 0.4rem;
  border-radius: 4px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.input-inline:focus { border-color: var(--accent); background: var(--surface2); }
.input-inline::-webkit-outer-spin-button,
.input-inline::-webkit-inner-spin-button { -webkit-appearance: none; }
.input-inline[type=number] { -moz-appearance: textfield; }
.input-money { text-align: right; font-variant-numeric: tabular-nums; }

.select-inline {
  background: var(--surface2);
  border: 1px solid transparent;
  color: var(--text);
  font-size: 0.8rem;
  padding: 0.28rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
.select-inline:focus { border-color: var(--accent); }

.paid-you     { color: var(--accent); }
.paid-partner { color: var(--yellow); }
.paid-split   { color: var(--green); }

/* items table footer totals */
.items-table tfoot td {
  border-top: 1px solid var(--border);
  border-bottom: none;
  padding-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.items-table tfoot .total-label { font-size: 0.78rem; color: var(--muted); }
.items-table tfoot .total-val   { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Notes ── */
.notes-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.15s;
}
.notes-input:focus { border-color: var(--accent); }

.field-row { display: flex; gap: 1rem; }
.field-group { flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.field-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.text-input {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.5rem 0.65rem; color: var(--text); font-size: 0.875rem;
  outline: none; transition: border-color 0.15s;
}
.text-input:focus { border-color: var(--accent); }

/* ── Settings ── */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.threshold-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.input-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.input-field:focus { border-color: var(--accent); }

/* ── Misc ── */
.empty {
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
  padding: 1.5rem 0;
}

.section-spacer { margin-top: 2rem; }

@media (max-width: 500px) {
  .deal-card-stats { flex-wrap: wrap; gap: 0.75rem; }
  .sale-price-input { width: 100px; }
  .items-table th.col-paid { width: 90px; }
}

/* ── Header logo ── */
.header-logo {
  width: 200px;
  height: 56px;
  object-fit: contain;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.user-greeting {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.btn-signout {
  font-size: 1rem;
  opacity: 0.6;
}
.btn-signout:hover { opacity: 1; color: var(--red); }

.btn-signout-text {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.btn-signout-text:hover { color: var(--red); border-color: var(--red); }

/* ── Loading screen ── */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1.5rem;
}

.loading-logo {
  width: 192px;
  height: 192px;
  border-radius: 16px;
  opacity: 0.85;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Login screen ── */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.login-logo {
  width: 192px;
  height: 192px;
  border-radius: 20px;
  object-fit: cover;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0.25rem;
}

.login-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.btn-google {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: box-shadow 0.15s, background 0.15s;
}
.btn-google:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.25); background: #f8f8f8; }

.google-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ── Partner UI ── */
.partner-card { margin-bottom: 1rem; }

.partner-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.25rem; }

.partner-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.partner-row:last-child { border-bottom: none; }

.partner-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  flex-shrink: 0;
}

.partner-name  { font-size: 0.875rem; font-weight: 500; }
.partner-email-sub { font-size: 0.72rem; color: var(--muted); display: block; }
.partner-info  { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; }

.badge-shared  { background: rgba(62,207,142,0.15); color: var(--green); }
.badge-pending { background: rgba(251,191,36,0.15);  color: var(--yellow); }

.btn-remove-partner, .btn-remove-known-partner {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 0.8rem; padding: 0.2rem 0.4rem;
  border-radius: 4px; margin-left: auto; flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.btn-remove-partner:hover, .btn-remove-known-partner:hover {
  color: var(--red); background: rgba(248,113,113,0.1);
}

.invite-form {
  background: var(--surface2);
  border-radius: 8px;
  padding: 0.85rem;
  margin-top: 0.75rem;
}

.invite-error {
  color: var(--red);
  font-size: 0.78rem;
  margin-top: 0.5rem;
}

.invite-type-toggle {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}

.btn-type-tab {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-type-tab.active {
  background: rgba(79,126,248,0.15);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.btn-type-tab:hover:not(.active) { background: var(--border); color: var(--text); }

.invite-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.known-partner-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.btn-pick-partner {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-pick-partner:hover { background: rgba(79,126,248,0.15); border-color: var(--accent); color: var(--accent); }

.invite-or {
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.4rem 0;
}

.settings-name-display {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.5rem 0;
}

.login-error {
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.3);
  color: var(--red);
  font-size: 0.8rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  width: 100%;
  text-align: left;
}

/* ── Login tabs ── */
.login-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--surface2);
  border-radius: 8px;
  padding: 0.25rem;
  width: 100%;
}

.btn-login-tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-login-tab.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.btn-login-tab:hover:not(.active) { color: var(--text); }

/* ── Login form ── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.login-form .input-field {
  text-align: left;
}

/* ── Login divider (OR separator) ── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Forgot password link ── */
.btn-forgot {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
  text-align: right;
  align-self: flex-end;
  transition: color 0.15s;
}
.btn-forgot:hover { color: var(--accent); }

/* ── Login success message ── */
.login-success {
  background: rgba(62,207,142,0.12);
  border: 1px solid rgba(62,207,142,0.3);
  color: var(--green);
  font-size: 0.8rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  width: 100%;
  text-align: left;
}

/* ── Connected account indicator (Settings) ── */
.connected-account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(62,207,142,0.1);
  border: 1px solid rgba(62,207,142,0.25);
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  width: 100%;
}

/* ── Share Listing Modal ───────────────────────────────────────────────────── */
.share-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.share-modal-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.share-card {
  background: #fff; color: #111; border-radius: 10px;
  padding: 24px; margin-bottom: 16px;
}
.sc-name  { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.sc-price { font-size: 1.1rem; font-weight: 600; color: #1a7f4f; margin-bottom: 14px; }
.sc-desc  { font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; color: #333; margin-bottom: 18px; }
.sc-contact-block { border-top: 1px solid #e5e7eb; padding-top: 12px; margin-bottom: 16px; }
.sc-contact-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: .07em; color: #999; margin-bottom: 3px; }
.sc-contact-name  { font-weight: 600; font-size: 0.9rem; color: #111; }
.sc-contact-info  { font-size: 0.85rem; color: #555; }
.sc-footer { border-top: 1px solid #e5e7eb; padding-top: 10px; margin-top: 20px; display: flex; align-items: center; gap: 6px; }
.sc-watermark-label { font-size: 0.65rem; color: #aaa; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.sc-logo   { height: 14px; object-fit: contain; opacity: 0.6; }
.share-modal-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.share-modal-actions .btn-danger-sm { margin-left: auto; }

/* ── Photos ── */
.photos-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.photo-thumb {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface2);
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-thumb-local {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.btn-remove-photo {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0,0,0,0.65);
  border: none;
  color: #fff;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-thumb:hover .btn-remove-photo { opacity: 1; }

/* ── Google Photos picker modal ── */
.gp-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 560px) {
  .gp-picker-overlay { align-items: center; }
}

.gp-picker-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 560px) {
  .gp-picker-modal { border-radius: var(--radius); max-height: 80vh; }
}

.gp-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.gp-picker-body {
  overflow-y: auto;
  padding: 1rem;
  flex: 1;
}

.gp-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.4rem;
}

.gp-picker-photo {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  background: var(--surface2);
  transition: border-color 0.15s;
}
.gp-picker-photo:hover { border-color: var(--accent); }
.gp-picker-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
