/* Portare app — reuses the marketing brand tokens (src/css/main.css). */

/* Self-hosted fonts (latin subset, variable weight) — no Google Fonts CDN. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/fonts/inter-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/playfair-display-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/playfair-display-italic-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  --night:     #1A1A2E;
  --off-white: #F7F4EF;
  --gold:      #C8A96E;
  --green:     #2D5F4F;
  --greige:    #E8E2D9;
  --muted:     #6B6560;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--night);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); }

/* ── NAV ── */
.app-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 6vw;
  background: rgba(26, 26, 46, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  flex-wrap: wrap;
}

.app-nav .nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--off-white);
  text-decoration: none;
}
.app-nav .nav-logo span { color: var(--gold); }

.app-nav-links { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

.app-nav-links a, .app-nav-links button.linklike {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(247,244,239,0.6);
  text-decoration: none;
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: var(--font-body);
  transition: color 0.2s;
}
.app-nav-links a:hover, .app-nav-links button.linklike:hover { color: var(--gold); }
.app-nav-links a.active { color: var(--gold); }

/* ── LAYOUT ── */
.app-main { max-width: 880px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.page-head { margin-bottom: 2rem; }
.page-eyebrow {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.6rem;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 600; line-height: 1.2; margin-bottom: 0.4rem;
}
.page-lead { font-size: 1rem; font-weight: 300; color: var(--muted); max-width: 560px; }

/* ── CARDS ── */
.card {
  background: white;
  border: 1px solid var(--greige);
  border-radius: 6px;
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}
.card-title {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1rem;
}

/* Balance hero card */
.balance-card {
  background: var(--night);
  border-color: var(--night);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.balance-label {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem;
}
.balance-amount {
  font-family: var(--font-display);
  font-size: 2.6rem; font-weight: 600; color: var(--off-white); line-height: 1;
}

/* ── BUTTONS ── */
.btn {
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--night); background: var(--gold);
  border: none; padding: 0.8rem 1.8rem; border-radius: 2px;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { background: #d9bc84; transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: rgba(247,244,239,0.85);
  border: 1px solid rgba(247,244,239,0.3);
}
.btn-ghost:hover { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline {
  background: transparent; color: var(--night);
  border: 1px solid #ccc9c2;
}
.btn-outline:hover { background: transparent; border-color: var(--gold); color: var(--green); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.72rem; }
.btn-danger { background: #A32D2D; color: white; }
.btn-danger:hover { background: #8a2626; }
.btn-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.2rem; }

/* ── FORMS (mirrors marketing .form) ── */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 0.92rem; color: var(--night);
  background: white; border: 1px solid #ccc9c2; border-radius: 2px;
  padding: 0.75rem 1rem; outline: none; transition: border-color 0.2s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 0.74rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.5; }
.checkbox-row { display: flex; align-items: center; gap: 0.6rem; }
.checkbox-row input { width: auto; }
.checkbox-row label { text-transform: none; letter-spacing: 0; font-size: 0.9rem; color: var(--night); }
.input-prefix { position: relative; }
.input-prefix span {
  position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 0.9rem; pointer-events: none;
}
.input-prefix input { padding-left: 3.2rem; }

/* ── COUNTRY COMBOBOX ── */
.combo { position: relative; }
.combo-list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 2px);
  z-index: 50;
  margin: 0; padding: 0.25rem;
  list-style: none;
  background: white;
  border: 1px solid #ccc9c2;
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(26,26,46,0.12);
  max-height: 240px;
  overflow-y: auto;
}
.combo-list[hidden] { display: none; }
.combo-option {
  padding: 0.5rem 0.7rem;
  font-size: 0.9rem;
  color: var(--night);
  cursor: pointer;
  border-radius: 2px;
}
.combo-option[aria-selected="true"],
.combo-option:hover { background: var(--greige); }
.combo-empty { padding: 0.5rem 0.7rem; font-size: 0.85rem; color: var(--muted); }

/* ── TABS ── */
.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--greige); }
.tab {
  font-size: 0.85rem; font-weight: 500; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 0.7rem 0.2rem;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  font-family: var(--font-body); margin-right: 1.2rem;
}
.tab.active { color: var(--night); border-bottom-color: var(--gold); }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.data th {
  text-align: left; font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--greige);
}
table.data td { padding: 0.85rem 0.8rem; border-bottom: 1px solid #efeae2; vertical-align: top; }
table.data tr:last-child td { border-bottom: none; }
table.data a.url { word-break: break-all; }

/* ── BADGES ── */
.badge {
  display: inline-block; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.6rem; border-radius: 999px;
  background: var(--greige); color: var(--muted);
}
.badge-submitted { background: #e7ecf3; color: #3a5573; }
.badge-quoted    { background: #efe7d6; color: #8a6d2b; }
.badge-bidding   { background: #f5e7c8; color: #8a6a1f; }
.badge-won,
.badge-purchased { background: #dff0e6; color: var(--green); }
.badge-shipped,
.badge-delivered { background: #d7ead9; color: #2c6b3a; }
.badge-cancelled { background: #f3dede; color: #A32D2D; }
.badge-pending   { background: #f5e7c8; color: #8a6a1f; }
.badge-confirmed { background: #dff0e6; color: var(--green); }
.badge-rejected  { background: #f3dede; color: #A32D2D; }

/* ── MESSAGES ── */
.alert { padding: 0.9rem 1.1rem; border-radius: 4px; font-size: 0.88rem; margin-bottom: 1rem; }
.alert-error   { background: #f7e4e4; color: #A32D2D; }
.alert-success { background: #e2f0e7; color: var(--green); }
.alert-info    { background: var(--greige); color: var(--muted); }
.muted { color: var(--muted); }
.empty { color: var(--muted); font-size: 0.9rem; padding: 1.5rem 0; text-align: center; }

/* ── AUTH PAGE ── */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 4rem 1.5rem 5rem; }
.auth-card { background: white; border: 1px solid var(--greige); border-radius: 6px; padding: 2.2rem; }
.auth-logo {
  display: block; text-align: center; font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 600; color: var(--night);
  text-decoration: none; margin-bottom: 0.4rem;
}
.auth-logo span { color: var(--gold); }
.auth-sub { text-align: center; color: var(--muted); font-size: 0.88rem; margin-bottom: 1.8rem; }

/* ── SOCIAL LOGIN ── */
.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--night);
  background: white;
  border: 1px solid #ccc9c2;
  border-radius: 2px;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-social:hover { border-color: var(--gold); background: #fffdf9; }
.btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.3rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--greige);
}

/* deposit instruction box */
.instructions { background: var(--off-white); border: 1px dashed #ccc9c2; border-radius: 4px; padding: 1.1rem 1.3rem; }
.instructions h4 { font-size: 0.85rem; margin-bottom: 0.6rem; }
.instructions code {
  background: var(--night); color: var(--gold); padding: 0.15rem 0.5rem;
  border-radius: 3px; font-size: 0.85rem;
}
.instructions ul { list-style: none; font-size: 0.86rem; color: var(--muted); line-height: 1.9; }

@media (max-width: 680px) {
  .form-row { grid-template-columns: 1fr; }
  .app-main { padding: 2rem 1.25rem 4rem; }
}
