/* WealthPlan Plus - Agent & Client Access System
   Reuses the exact brand tokens from the live site's style.css. */

:root {
    --brand-primary: #0a4d46;
    --brand-primary-dark: #063530;
    --brand-primary-light: #11685f;
    --brand-accent: #00c49f;
    --brand-accent-hover: #00a887;
    --brand-highlight: #ff5e36;
    --surface-white: #ffffff;
    --surface-light: #f6f8fa;
    --surface-card: #ffffff;
    --text-heading: #1a202c;
    --text-body: #4a5568;
    --text-muted: #718096;
    --line: #e2e8f0;
    --danger: #c0352b;
    --danger-bg: #fdecea;
    --warn-bg: #fef3c7;
    --warn-text: #92400e;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(10, 77, 70, 0.12);
    --radius-pill: 50px;
    --radius-card: 16px;
}

* { box-sizing: border-box; }

body.wpp-portal {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--surface-light);
    color: var(--text-body);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); }

.wpp-shell { max-width: 1040px; margin: 0 auto; padding: 32px 20px 64px; }
.wpp-shell.narrow { max-width: 440px; padding-top: 64px; }

/* ---------- top bar (logged-in pages) ---------- */
.wpp-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 24px; background: var(--brand-primary); color: #fff;
}
.wpp-topbar .brand { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 10px; }
.wpp-topbar .brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-accent); }
.wpp-topbar .right { display: flex; align-items: center; gap: 16px; font-size: 0.9rem; }
.wpp-topbar a.logout {
    color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-pill); padding: 7px 16px; font-weight: 600; font-size: 0.82rem;
}
.wpp-topbar a.logout:hover { background: rgba(255,255,255,0.12); }

/* ---------- cards ---------- */
.wpp-card {
    background: var(--surface-card); border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft); border: 1px solid var(--line);
    padding: 32px;
}
.wpp-card + .wpp-card { margin-top: 20px; }

/* ---------- login ---------- */
.wpp-login-mark {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem;
}
.wpp-login-card { text-align: center; }
.wpp-login-card h1 { font-size: 1.35rem; color: var(--text-heading); margin: 0 0 6px; }
.wpp-login-card .sub { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 26px; line-height: 1.5; }

.wpp-field { text-align: left; margin-bottom: 16px; }
.wpp-field label {
    display: block; font-size: 0.76rem; font-weight: 700; color: var(--text-muted);
    margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.wpp-field input, .wpp-field select, .wpp-field textarea {
    width: 100%; padding: 11px 13px; border-radius: 10px; border: 1.5px solid var(--line);
    background: var(--surface-light); color: var(--text-heading); font-size: 0.95rem;
    font-family: inherit; outline: none;
}
.wpp-field input:focus, .wpp-field select:focus, .wpp-field textarea:focus {
    border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(0,196,159,0.18);
}
.wpp-field small { display: block; margin-top: 5px; color: var(--text-muted); font-size: 0.76rem; }

.wpp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: inherit; font-weight: 700; font-size: 0.92rem; border: none;
    border-radius: var(--radius-pill); padding: 12px 22px; cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none;
}
.wpp-btn-primary { background: var(--brand-primary); color: #fff; width: 100%; }
.wpp-btn-primary:hover { background: var(--brand-primary-light); }
.wpp-btn-accent { background: var(--brand-accent); color: var(--brand-primary-dark); }
.wpp-btn-accent:hover { background: var(--brand-accent-hover); }
.wpp-btn-ghost { background: var(--surface-light); color: var(--text-heading); border: 1px solid var(--line); }
.wpp-btn-ghost:hover { border-color: var(--brand-primary-light); }
.wpp-btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c9c5; }
.wpp-btn-danger:hover { background: #fadbd8; }
.wpp-btn-sm { padding: 7px 14px; font-size: 0.78rem; border-radius: 8px; }
.wpp-btn:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }
.wpp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.wpp-alert { border-radius: 10px; padding: 12px 16px; font-size: 0.86rem; margin-bottom: 18px; line-height: 1.5; }
.wpp-alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c9c5; }
.wpp-alert-success { background: #e7f8f3; color: var(--brand-primary-dark); border: 1px solid #b9ecdd; }
.wpp-alert-info { background: var(--warn-bg); color: var(--warn-text); border: 1px solid #fde4ac; }

.wpp-footnote { margin-top: 18px; font-size: 0.78rem; color: var(--text-muted); text-align: center; }

/* ---------- dashboard / admin tables ---------- */
.wpp-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.wpp-section-head h2 { font-size: 1.15rem; color: var(--text-heading); margin: 0 0 4px; }
.wpp-section-head p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }

.wpp-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--surface-light); margin-bottom: 10px;
}
.wpp-row .who { font-weight: 700; font-size: 0.9rem; min-width: 120px; flex-shrink: 0; color: var(--text-heading); }
.wpp-row .url { font-family: monospace; font-size: 0.76rem; color: var(--text-muted); flex: 1; min-width: 160px; overflow-x: auto; white-space: nowrap; }
.wpp-row .meta { font-size: 0.74rem; color: var(--text-muted); flex-shrink: 0; }
.wpp-row .actions { display: flex; gap: 6px; flex-shrink: 0; }

.wpp-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 10px; border-radius: var(--radius-pill); }
.wpp-pill.active { background: #e7f8f3; color: var(--brand-primary-dark); }
.wpp-pill.suspended { background: var(--warn-bg); color: var(--warn-text); }
.wpp-pill.revoked { background: var(--danger-bg); color: var(--danger); }

.wpp-empty { color: var(--text-muted); font-size: 0.88rem; padding: 18px 0; text-align: center; }

.wpp-generate-form[hidden] { display: none; }
.wpp-generate-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.wpp-generate-form .wpp-field { margin-bottom: 0; flex: 1; min-width: 180px; }

/* ---------- client portal shell ---------- */
.wpp-client-header {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    color: #fff; padding: 36px 28px; border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.wpp-client-header .tag { font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; margin: 0 0 6px; }
.wpp-client-header h1 { margin: 0 0 4px; font-size: 1.5rem; }
.wpp-client-header p { margin: 0; opacity: 0.85; font-size: 0.92rem; }

.wpp-nav {
    display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface-card);
    border-bottom: 1px solid var(--line); padding: 0 12px;
}
.wpp-nav a {
    display: flex; align-items: center; gap: 7px; padding: 14px 14px; font-size: 0.86rem; font-weight: 600;
    color: var(--text-muted); text-decoration: none; border-bottom: 2.5px solid transparent;
}
.wpp-nav a.active { color: var(--brand-primary); border-bottom-color: var(--brand-accent); }
.wpp-nav a:hover { color: var(--brand-primary); }

.wpp-panel { background: var(--surface-card); border-radius: 0 0 var(--radius-card) var(--radius-card); padding: 32px; }
.wpp-panel h2 { color: var(--text-heading); font-size: 1.15rem; margin: 0 0 12px; }
.wpp-panel p { line-height: 1.65; }

.wpp-coming-soon {
    border: 1.5px dashed var(--line); border-radius: 12px; padding: 28px; text-align: center; color: var(--text-muted);
}
.wpp-coming-soon .icon { font-size: 1.6rem; margin-bottom: 10px; color: var(--brand-accent); }

.wpp-tool-card {
    display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: 12px;
    padding: 18px 20px; margin-bottom: 12px; background: var(--surface-light);
}
.wpp-tool-card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.wpp-tool-card .text { flex: 1; }
.wpp-tool-card .text strong { display: block; color: var(--text-heading); font-size: 0.95rem; }
.wpp-tool-card .text span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- denied ---------- */
.wpp-denied { text-align: center; padding: 70px 20px; }
.wpp-denied .icon {
    width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px;
    background: var(--danger-bg); color: var(--danger); display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.wpp-denied h1 { font-size: 1.3rem; color: var(--text-heading); margin: 0 0 8px; }
.wpp-denied p { max-width: 380px; margin: 0 auto; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

table.wpp-table { width: 100%; border-collapse: collapse; }
table.wpp-table th { text-align: left; padding: 10px 12px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); border-bottom: 1.5px solid var(--line); }
table.wpp-table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 0.88rem; color: var(--text-heading); vertical-align: middle; }
table.wpp-table code { font-family: monospace; font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 640px) {
    .wpp-card { padding: 22px; }
    .wpp-row { flex-direction: column; align-items: flex-start; }
    .wpp-row .url { width: 100%; }
    table.wpp-table, table.wpp-table thead, table.wpp-table tbody, table.wpp-table th, table.wpp-table td, table.wpp-table tr { display: block; }
    table.wpp-table thead { display: none; }
    table.wpp-table tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; padding: 8px 12px; }
    table.wpp-table td { border: none; padding: 6px 0; }
}

.wpp-footer {
    max-width: 640px;
    margin: 28px auto 0;
    padding: 16px 20px 40px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.6;
    color: var(--text-muted);
}
.wpp-footer a { color: var(--text-muted); text-decoration: underline; }
.wpp-footer a:hover { color: var(--brand-primary); }

/* ---------- reviews, achievements, brochures (client page + public review page) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpp-stars { color: #f5a623; letter-spacing: 2px; font-size: 1rem; }
.wpp-stars .off { color: #d5dbe1; }
.wpp-rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.wpp-rate input { position: absolute; opacity: 0; }
.wpp-rate label { font-size: 2.1rem; line-height: 1; color: #d5dbe1; cursor: pointer; margin: 0; text-transform: none; letter-spacing: 0; }
.wpp-rate input:checked ~ label, .wpp-rate label:hover, .wpp-rate label:hover ~ label { color: #f5a623; }
.wpp-rate input:focus-visible + label { outline: 2px solid var(--brand-accent); border-radius: 4px; }
.wpp-rating-summary { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; background: var(--surface-light); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 8px 0 18px; }
.wpp-rating-summary .big { font-size: 2.4rem; font-weight: 800; color: var(--text-heading); line-height: 1; }
.wpp-rating-summary p { margin: 0; flex: 1; min-width: 220px; font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.wpp-review { border-top: 1px solid var(--line); padding: 14px 0; }
.wpp-review .who { font-weight: 700; color: var(--text-heading); font-size: .9rem; }
.wpp-review .ver { font-size: .66rem; font-weight: 700; background: #e7f8f3; color: var(--brand-primary-dark); border-radius: 50px; padding: 3px 9px; margin-left: 6px; }
.wpp-review .reply { background: var(--surface-light); border-left: 3px solid var(--brand-accent); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: .84rem; margin-top: 8px; }
.wpp-ach-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.wpp-ach-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.wpp-ach-card img { width: 100%; height: 130px; object-fit: cover; display: block; }
.wpp-ach-card .b { padding: 14px; }
.wpp-ach-card strong { display: block; color: var(--text-heading); font-size: .92rem; }
.wpp-ach-card span { font-size: .8rem; color: var(--text-muted); line-height: 1.45; display: block; margin-top: 4px; }
.wpp-year { font-weight: 800; color: var(--brand-primary); font-size: .76rem; letter-spacing: .06em; }
.wpp-timeline { border-left: 3px solid var(--brand-accent); margin-left: 6px; padding-left: 20px; }
.wpp-timeline .t { position: relative; padding-bottom: 20px; }
.wpp-timeline .t::before { content: ""; position: absolute; left: -29px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--brand-accent); }
.wpp-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.wpp-badge { width: 150px; text-align: center; padding: 16px 10px; border-radius: 16px; background: linear-gradient(160deg, var(--brand-primary), var(--brand-primary-dark)); color: #fff; }
.wpp-badge .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-accent); color: var(--brand-primary-dark); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; font-size: 1.2rem; }
.wpp-badge strong { display: block; font-size: .82rem; line-height: 1.3; }
.wpp-badge span { font-size: .72rem; opacity: .75; }
.wpp-bro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.wpp-bro { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.wpp-bro .cv { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #e0f5f1, #f6f8fa); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--brand-primary); font-size: 1.3rem; overflow: hidden; }
.wpp-bro .cv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wpp-bro .b { padding: 14px; }
.wpp-bro strong { display: block; color: var(--text-heading); font-size: .92rem; }
.wpp-bro .tag2 { display: inline-block; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--brand-highlight); color: #fff; border-radius: 50px; padding: 2px 9px; margin-bottom: 6px; }
.wpp-bro small { color: var(--text-muted); font-size: .76rem; display: block; margin-top: 4px; line-height: 1.4; }
.wpp-bro-list .wpp-bro { flex-direction: row; margin-bottom: 10px; }
.wpp-bro-list .wpp-bro .cv { width: 96px; aspect-ratio: auto; flex-shrink: 0; font-size: 1rem; }
.wpp-bro-spot { grid-column: 1 / -1; flex-direction: row; }
.wpp-bro-spot .cv { width: 45%; aspect-ratio: 16 / 9; flex-shrink: 0; }
.wpp-bro-spot .b { padding: 22px; align-self: center; }
.wpp-bro-spot strong { font-size: 1.15rem; }
@media (max-width: 640px) { .wpp-bro-spot { flex-direction: column; } .wpp-bro-spot .cv { width: 100%; } }

/* Standard WealthPlan Plus logo bar at the top of public tools */
.wpp-brandbar { background: #fff; border-bottom: 1px solid var(--border-subtle, #e2e8f0); }
.wpp-brandbar .bb-in { max-width: 1040px; margin: 0 auto; height: 56px; padding: 0 20px; display: flex; align-items: center; }
.wpp-brandbar .bb-logo { display: inline-flex; align-items: center; font-size: 1.25rem; font-weight: 800; letter-spacing: -.5px; color: #0a4d46; white-space: nowrap; }
.wpp-brandbar .bb-mark { width: 34px; height: 34px; border-radius: 8px; margin-right: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0a4d46 0%, #00c49f 100%); }
.wpp-brandbar .bb-plus { color: #007a64; margin-left: .28em; }
@media (max-width: 768px) { .wpp-brandbar .bb-in { height: 52px; padding: 0 16px; } .wpp-brandbar .bb-logo { font-size: 1.1rem; } .wpp-brandbar .bb-mark { width: 30px; height: 30px; margin-right: 8px; } }
@media print { .wpp-brandbar { display: none; } }
