/* =====================================================================
   OGOFX client portal. Reads the landing page's tokens (ogofx-base.css).
   ===================================================================== */

/* The forex pages and the money sheet were written against these names; each one now points
   at an OGOFX token, so they take the landing page's look without being rewritten. */
:root {
    --text-primary:   var(--c-ink);
    --text-secondary: var(--c-ink-2);
    --text-muted:     var(--c-ink-3);
    --border:         var(--c-hairline);
    --border-active:  var(--c-rule);
    --bg-primary:     var(--c-bone);
    --bg-secondary:   var(--c-linen);
    --bg-card:        var(--c-ivory);
    --bg-card-hover:  #F8F5EE;
    --card:           var(--c-ivory);
    --accent-1:       var(--c-bronze);
    --accent-amber:   var(--c-bronze);
    --accent-green:   var(--c-up);
    --success:        var(--c-up);
    --warning:        var(--c-bronze);
    --danger:         var(--c-sell);
    --glass-bg:       rgba(15, 31, 26, .03);
    --shadow-sm:      var(--shadow-1);
    --shadow-md:      var(--shadow-2);
    --shadow-glow:    0 0 0 3px rgba(201, 169, 97, .28);
    --radius-sm:      10px;
    --radius-md:      16px;
    --radius-full:    9999px;
    --t-hero:  30px;
    --t-title: 19px;
    --t-body:  15px;
    --t-label: 12px;
    --t-meta:  12.5px;
}

body.portal {
    min-height: 100vh;
    background: var(--c-bone);
    color: var(--c-ink);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; }
a { color: var(--c-bronze); }

/* ── the band at the top ── */
.p-top {
    background: var(--c-evergreen);
    color: var(--c-pearl);
    border-bottom: 1px solid rgba(243, 239, 229, .08);
    position: sticky; top: 0; z-index: 50;
}
.p-top__in {
    max-width: 1240px; margin: 0 auto; padding: 0 20px;
    height: 64px; display: flex; align-items: center; gap: 22px;
}
.p-top .brand { color: var(--c-pearl); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.p-nav { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.p-nav::-webkit-scrollbar { display: none; }
.p-nav a {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    padding: 8px 12px; border-radius: 9px; text-decoration: none;
    color: var(--c-sage); font-size: 14px; font-weight: 600;
}
.p-nav a svg { width: 16px; height: 16px; }
.p-nav a:hover { color: var(--c-pearl); background: rgba(243, 239, 229, .06); }
.p-nav a.is-on { color: var(--c-pearl); background: var(--c-forest); }
.p-top__end { display: flex; align-items: center; gap: 10px; }
.p-bell { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; color: var(--c-sage); }
.p-bell:hover { background: rgba(243, 239, 229, .06); color: var(--c-pearl); }
.p-bell svg { width: 18px; height: 18px; }
.p-bell b {
    position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--c-champagne); color: var(--c-ink); font-size: 10.5px; line-height: 17px; text-align: center;
}
.p-user { display: flex; align-items: center; gap: 10px; }
.p-user__name { font-size: 13px; color: var(--c-sage); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-user form { margin: 0; }
.p-user button { color: var(--c-lichen); font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 8px; }
.p-user button:hover { color: var(--c-pearl); background: rgba(243, 239, 229, .06); }

/* the risk line the landing page carries at the top, here at the foot of every page */
.p-risk { margin-top: auto; background: var(--c-deep); color: var(--c-lichen); font-size: 12px; line-height: 1.6; }
.p-risk__in { max-width: 1240px; margin: 0 auto; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; }
.p-risk a { color: var(--c-champagne-300); }

/* ── the page ── */
.p-main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 30px 20px 48px; }
.p-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.p-head h1 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; letter-spacing: -0.025em; font-weight: var(--fw-heading); }
.p-head p { color: var(--c-ink-2); margin-top: 6px; max-width: 62ch; }

.p-grid { display: grid; gap: 18px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.p-col-3 { grid-column: span 3; } .p-col-4 { grid-column: span 4; } .p-col-5 { grid-column: span 5; } .p-col-6 { grid-column: span 6; }
.p-col-7 { grid-column: span 7; } .p-col-8 { grid-column: span 8; } .p-col-12 { grid-column: span 12; }
@media (max-width: 900px) { .p-grid > * { grid-column: span 12 !important; } }

.p-card { background: var(--c-ivory); border: 1px solid var(--c-hairline); border-radius: 16px; box-shadow: var(--shadow-1); }
.p-card__h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--c-hairline); }
.p-card__h h2 { font-size: 16px; font-weight: var(--fw-title); letter-spacing: -0.01em; }
.p-card__h a { font-size: 13px; font-weight: 600; text-decoration: none; }
.p-card__b { padding: 20px; }
.p-card--dark { background: var(--c-evergreen); border-color: var(--c-evergreen); color: var(--c-pearl); box-shadow: var(--shadow-dark); }
.p-card--dark .p-k { color: var(--c-lichen); }

.p-k { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); }
.p-fig { font-size: 30px; font-weight: 720; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: 4px; }
.p-fig small { font-size: 14px; font-weight: 600; margin-left: 6px; color: var(--c-ink-3); letter-spacing: 0; }
.p-card--dark .p-fig small { color: var(--c-lichen); }
.p-muted { color: var(--c-ink-3); }
.p-sub { font-size: 13.5px; color: var(--c-ink-2); margin-top: 6px; }

.p-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--c-hairline); border: 1px solid var(--c-hairline); border-radius: 14px; overflow: hidden; }
.p-stats > div { background: var(--c-ivory); padding: 14px 16px; }

/* steps to get going: register → verify → fund → trade */
.p-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
@media (max-width: 760px) { .p-steps { grid-template-columns: 1fr 1fr; } }
.p-step { border: 1px solid var(--c-hairline); border-radius: 14px; padding: 14px 14px 16px; background: var(--c-ivory); }
.p-step b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.p-step b::before {
    counter-increment: s; content: counter(s);
    display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: var(--c-linen); color: var(--c-ink-2); font-size: 12px; font-weight: 700;
}
.p-step.is-done b::before { content: '✓'; background: var(--c-up); color: #fff; }
.p-step.is-now { border-color: var(--c-champagne); box-shadow: 0 0 0 3px rgba(201, 169, 97, .18); }
.p-step.is-now b::before { background: var(--c-champagne); color: var(--c-ink); }
.p-step span { display: block; font-size: 12.5px; color: var(--c-ink-3); margin-top: 6px; }
.p-step a { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; text-decoration: none; }

/* ── notices ── */
.p-note { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; font-size: 14px; line-height: 1.55; border: 1px solid var(--c-hairline); background: var(--c-ivory); margin-bottom: 18px; }
.p-note svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }
.p-note--ok { background: #EAF3EE; border-color: #BFD9CB; color: #0A4F37; }
.p-note--warn { background: var(--c-champagne-050); border-color: #E3CF9F; color: #4D3A0E; }
.p-note--bad { background: var(--c-sell-tint); border-color: #E6B5BE; color: #7D1E31; }
.p-note b { font-weight: 700; }

/* ── forms ── */
.p-form { display: grid; gap: 16px; }
.p-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .p-row2 { grid-template-columns: 1fr; } }
.p-field { display: grid; gap: 6px; align-content: start; }
.p-field label, .p-label { font-size: 13.5px; font-weight: 600; color: var(--c-ink); }
.p-field small { font-size: 12.5px; color: var(--c-ink-3); }
.p-input, .p-select {
    width: 100%; height: 46px; padding: 0 14px; border-radius: 10px;
    border: 1px solid var(--c-rule); background: #fff; color: var(--c-ink); font-size: 15px;
    transition: border-color .15s, box-shadow .15s;
}
.p-select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%2356645E'%3E%3Cpath d='M8 11 3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.p-input:focus, .p-select:focus { outline: none; border-color: var(--c-bronze); box-shadow: 0 0 0 3px rgba(201, 169, 97, .25); }
.p-input.is-wrong, .p-select.is-wrong { border-color: var(--c-sell); }
.p-err { font-size: 12.5px; color: var(--c-sell); font-weight: 600; }
.p-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--c-ink-2); line-height: 1.5; }
.p-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--c-evergreen); flex: 0 0 auto; }
.p-file { border: 1.5px dashed var(--c-rule); border-radius: 12px; padding: 14px; background: var(--c-bone); display: grid; gap: 6px; }
.p-file input { font-size: 13px; }
.p-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.btn--block { width: 100%; justify-content: center; }

/* ── tables ── */
.p-table-wrap { overflow-x: auto; }
.p-table { width: 100%; font-size: 13.5px; }
.p-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-ink-3); padding: 10px 16px; border-bottom: 1px solid var(--c-hairline); white-space: nowrap; }
.p-table td { padding: 12px 16px; border-bottom: 1px solid var(--c-sand); vertical-align: middle; }
.p-table tr:last-child td { border-bottom: 0; }
.p-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.p-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--c-linen); color: var(--c-ink-2); white-space: nowrap; }
.p-pill--ok { background: #E3F0E9; color: #0A6B4B; }
.p-pill--warn { background: var(--c-champagne-050); color: #6A4F10; }
.p-pill--bad { background: var(--c-sell-tint); color: var(--c-sell); }
.p-empty { padding: 36px 20px; text-align: center; color: var(--c-ink-3); font-size: 14px; }
.p-empty b { display: block; color: var(--c-ink); font-size: 15px; margin-bottom: 4px; }
.p-pager { display: flex; gap: 6px; justify-content: center; padding: 14px; }
.p-pager a, .p-pager span { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--c-hairline); font-size: 13px; text-decoration: none; color: var(--c-ink-2); background: var(--c-ivory); }
.p-pager .is-on { background: var(--c-evergreen); color: var(--c-pearl); border-color: var(--c-evergreen); }

/* ── signing in and opening an account ── */
body.auth { min-height: 100vh; background: var(--c-evergreen); color: var(--c-pearl); display: flex; flex-direction: column; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
.a-top { max-width: 1120px; width: 100%; margin: 0 auto; padding: 22px 20px; display: flex; align-items: center; justify-content: space-between; }
.a-top .brand { color: var(--c-pearl); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.a-top__links { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.a-top__links a { color: var(--c-sage); text-decoration: none; padding: 8px 12px; border-radius: 9px; font-weight: 600; }
.a-top__links a:hover { color: var(--c-pearl); background: rgba(243, 239, 229, .06); }
.a-wrap { flex: 1; display: grid; place-items: start center; padding: 18px 16px 48px; }
.a-card { width: 100%; max-width: 460px; background: var(--c-ivory); color: var(--c-ink); border-radius: 20px; padding: 30px 28px; box-shadow: var(--shadow-dark); }
.a-card--wide { max-width: 620px; }
.a-card h1 { font-size: 26px; letter-spacing: -0.025em; font-weight: var(--fw-heading); line-height: 1.15; }
.a-card .a-lead { color: var(--c-ink-2); margin: 8px 0 22px; font-size: 14.5px; }
.a-foot { text-align: center; margin-top: 18px; font-size: 14px; color: var(--c-ink-2); }
.a-foot a { font-weight: 700; text-decoration: none; }
.a-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.a-type { position: relative; }
.a-type input { position: absolute; opacity: 0; inset: 0; }
.a-type span { display: block; text-align: center; padding: 10px 6px; border: 1px solid var(--c-rule); border-radius: 10px; font-size: 13.5px; font-weight: 700; cursor: pointer; background: #fff; }
.a-type span small { display: block; font-weight: 500; color: var(--c-ink-3); font-size: 11.5px; margin-top: 2px; }
.a-type input:checked + span { border-color: var(--c-evergreen); background: var(--c-evergreen); color: var(--c-pearl); }
.a-type input:checked + span small { color: var(--c-lichen); }
.a-type input:focus-visible + span { box-shadow: 0 0 0 3px rgba(201, 169, 97, .4); }
.a-risk { max-width: 1120px; width: 100%; margin: 0 auto; padding: 18px 20px 26px; font-size: 12px; line-height: 1.6; color: var(--c-lichen); }
.a-code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: .3em; text-align: center; }

@media (max-width: 760px) {
    .p-top__in { height: auto; flex-wrap: wrap; padding: 10px 16px 0; gap: 10px; }
    .p-nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
    .p-user__name { display: none; }
    .p-main { padding: 22px 16px 40px; }
    .a-card { padding: 24px 18px; }
}

/* the forex pages' buttons and links are not underlined text links */
.fxa a.fxa-btn, .fxa .fxa-actions a, .fxa-wallet { text-decoration: none; }
