/* ==========================================================================
   Partner-facing public pages: home (become_a_partner), login, register.
   Self-contained theme — own tokens, not dependent on dashboard-modern-theme.css
   since these pages render outside .dashboard-container.
   ========================================================================== */

:root {
    --bg: #F5F4EF;
    --bg-2: #EDECE4;
    --surface: #FFFFFF;
    --ink: #1A211F;
    --ink-soft: #5C6562;
    --ink-faint: #8B938F;
    --line: #E2E0D6;
    --teal: #0E9384;
    --teal-deep: #0B6F65;
    --teal-wash: #E4F1EE;
    --amber: #B7791F;
    --amber-wash: #F7EDD8;
    --crit: #C4362F;
    --crit-wash: #FBE7E5;
    --good-wash: #E4F4EC;
    --shadow: rgba(26, 33, 31, .08);

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "JetBrains Mono", "Roboto Mono", Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #12211D; --bg-2: #16261F; --surface: #17271F;
        --ink: #ECEAE1; --ink-soft: #A7B1AA; --ink-faint: #67746E; --line: #26372F;
        --teal: #2FBBA8; --teal-deep: #7FE0D1; --teal-wash: #163931;
        --amber: #E0B265; --amber-wash: #352913;
        --crit: #E8615A; --crit-wash: #3A1917; --good-wash: #163931;
        --shadow: rgba(0, 0, 0, .4);
    }
}
:root[data-theme="light"] {
    --bg: #F5F4EF; --bg-2: #EDECE4; --surface: #FFFFFF;
    --ink: #1A211F; --ink-soft: #5C6562; --ink-faint: #8B938F; --line: #E2E0D6;
    --teal: #0E9384; --teal-deep: #0B6F65; --teal-wash: #E4F1EE;
    --amber: #B7791F; --amber-wash: #F7EDD8;
    --crit: #C4362F; --crit-wash: #FBE7E5; --good-wash: #E4F4EC;
    --shadow: rgba(26,33,31,.08);
}
:root[data-theme="dark"] {
    --bg: #12211D; --bg-2: #16261F; --surface: #17271F;
    --ink: #ECEAE1; --ink-soft: #A7B1AA; --ink-faint: #67746E; --line: #26372F;
    --teal: #2FBBA8; --teal-deep: #7FE0D1; --teal-wash: #163931;
    --amber: #E0B265; --amber-wash: #352913;
    --crit: #E8615A; --crit-wash: #3A1917; --good-wash: #163931;
    --shadow: rgba(0,0,0,.4);
}

.pub * { box-sizing: border-box; }
body.pub {
    display: block; margin: 0; padding: 0;
    height: auto; min-height: 100vh; overflow: visible;
    background: var(--bg); color: var(--ink);
    font-family: var(--font-body); font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
.pub a { color: inherit; }
.pub img, .pub svg { display: block; max-width: 100%; }
.pub h1, .pub h2, .pub h3 { font-weight: 700; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
.pub p { margin: 0; }
.pub :focus-visible { outline: 2.5px solid var(--teal); outline-offset: 3px; }

.pub .wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .pub .wrap { padding: 0 20px; } }

.pub .eyebrow {
    font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--teal-deep); font-weight: 650;
}

/* ============ Buttons ============ */
.pub .btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; border-radius: 8px;
    font-size: 15px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
    transition: transform .14s ease, background .14s ease, border-color .14s ease;
    font-family: var(--font-body);
}
.pub .btn:hover { transform: translateY(-1px); }
.pub .btn-primary { background: var(--teal); color: #fff; }
.pub .btn-primary:hover { background: var(--teal-deep); color: #fff; }
.pub .btn-ghost { border-color: var(--line); color: var(--ink); }
.pub .btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }
.pub .btn-on-teal { background: #fff; color: var(--teal-deep); }
.pub .btn-on-teal:hover { background: var(--bg); }
.pub .btn-fluid { width: 100%; justify-content: center; }
.pub .btn-lg { padding: 15px 30px; font-size: 16px; }
.pub .btn-text { color: var(--ink-soft); font-size: 14.5px; text-decoration: none; font-weight: 600; }
.pub .btn-text:hover { color: var(--teal-deep); }

/* ============ Masthead ============ */
.pub .masthead { border-bottom: 1px solid var(--line); padding: 16px 0; background: var(--surface); }
.pub .masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.pub .brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.pub .brand img { width: 40px; height: 40px; }
.pub .brand-name { font-weight: 700; font-size: 19px; line-height: 1.1; color: var(--ink); }
.pub .brand-tag { font-size: 12px; color: var(--ink-faint); margin-top: 1px; }
.pub .nav-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pub .nav-buttons { display: flex; align-items: center; gap: 10px; }

/* ============ Hero ============ */
.pub .hero { padding: 72px 0; }
.pub .hero .wrap { display: grid; grid-template-columns: 1.05fr .9fr; gap: 60px; align-items: center; }
@media (max-width: 880px) { .pub .hero .wrap { grid-template-columns: 1fr; gap: 44px; } }
.pub .hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); line-height: 1.1; margin: 14px 0 20px; }
.pub .hero h1 em { font-style: normal; color: var(--teal-deep); }
.pub .hero-sub { font-size: 17px; color: var(--ink-soft); max-width: 47ch; line-height: 1.7; }
.pub .hero-ctas { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }

/* ---- receipt / order ticket ---- */
.pub .ticket-wrap { display: flex; justify-content: center; }
.pub .ticket {
    width: 100%; max-width: 350px; background: var(--surface);
    border: 1px solid var(--line); border-radius: 6px;
    box-shadow: 0 16px 36px var(--shadow);
    animation: pub-feed-in .55s cubic-bezier(.2,.7,.2,1) both;
}
@media (prefers-reduced-motion: reduce) { .pub .ticket { animation: none; } }
@keyframes pub-feed-in { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
.pub .ticket-perf {
    height: 13px;
    background-image: radial-gradient(circle, var(--bg) 4px, transparent 4.1px);
    background-size: 18px 18px; background-position: -3px center;
    border-bottom: 1px dashed var(--line);
}
.pub .ticket-body { padding: 22px 24px 24px; }
.pub .ticket-id { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-faint); display: flex; justify-content: space-between; margin-bottom: 18px; }
.pub .ticket-rows { display: flex; flex-direction: column; gap: 14px; }
.pub .ticket-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.pub .ticket-row .tick { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.pub .tick.done { background: var(--teal-wash); }
.pub .tick.done svg { width: 10px; height: 10px; stroke: var(--teal-deep); stroke-width: 2.5; fill: none; }
.pub .tick.live { background: var(--amber-wash); position: relative; }
.pub .tick.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pub-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .pub .tick.live .dot { animation: none; } }
@keyframes pub-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.pub .ticket-row .label { color: var(--ink); flex: 1; }
.pub .ticket-row .state { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; }
.pub .ticket-row .state.done { color: var(--teal-deep); }
.pub .ticket-row .state.live { color: var(--amber); font-weight: 700; }
.pub .ticket-divider { border: none; border-top: 1px dashed var(--line); margin: 18px 0 16px; }
.pub .ticket-foot { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.pub .ticket-foot .amount { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ Sections ============ */
.pub .section { padding: 66px 0; }
.pub .section-alt { background: var(--bg-2); }
.pub .section-head { max-width: 620px; margin-bottom: 40px; }
.pub .section-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 10px; }

/* ============ Why grid ============ */
.pub .why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 880px) { .pub .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pub .why-grid { grid-template-columns: 1fr; } }
.pub .why-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px 22px; display: flex; flex-direction: column; gap: 13px; }
.pub .why-ic { width: 42px; height: 42px; border-radius: 10px; background: var(--teal-wash); display: flex; align-items: center; justify-content: center; }
.pub .why-ic svg { width: 21px; height: 21px; stroke: var(--teal-deep); stroke-width: 1.7; fill: none; }
.pub .why-card h3 { font-size: 16.5px; font-weight: 700; }
.pub .why-card p { font-size: 14px; color: var(--ink-soft); line-height: 1.65; }

/* ============ Pricing ============ */
.pub .pricing-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 54px; align-items: center; }
@media (max-width: 880px) { .pub .pricing-grid { grid-template-columns: 1fr; gap: 36px; } }
.pub .pricing-art { display: flex; justify-content: center; }
.pub .pricing-art img { width: 100%; max-width: 420px; }
.pub .pricing-copy h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 16px; }
.pub .pricing-copy p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.75; max-width: 46ch; }
.pub .pricing-copy p + p { margin-top: 12px; }
.pub .pricing-receipt { margin-top: 24px; max-width: 340px; }
.pub .receipt { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 14px 30px var(--shadow); }
.pub .receipt-perf { height: 13px; background-image: radial-gradient(circle, var(--bg-2) 4px, transparent 4.1px); background-size: 18px 18px; background-position: -3px center; border-bottom: 1px dashed var(--line); }
.pub .receipt-body { padding: 24px 26px 22px; font-family: var(--font-mono); }
.pub .receipt-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 5px; }
.pub .receipt-line .num { font-variant-numeric: tabular-nums; font-weight: 700; }
.pub .receipt-note { font-size: 12px; color: var(--ink-faint); line-height: 1.55; margin: 3px 0 16px; font-family: var(--font-body); }
.pub .receipt-divider { border: none; border-top: 1px dashed var(--line); margin: 14px 0; }
.pub .receipt-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 14.5px; font-weight: 700; }
.pub .receipt-total .num { color: var(--teal-deep); font-size: 17px; }

/* ============ CTA band ============ */
.pub .cta-band { background: var(--teal-deep); padding: 60px 0; }
.pub .cta-band .wrap { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.pub .cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3.2vw, 2rem); max-width: 32ch; }

/* ============ Footer ============ */
.pub footer { border-top: 1px solid var(--line); padding: 30px 0; background: var(--surface); }
.pub footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.pub .footer-links { display: flex; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-soft); }
.pub .footer-links a { text-decoration: none; padding: 0 12px; border-right: 1px solid var(--line); }
.pub .footer-links a:first-child { padding-left: 0; }
.pub .footer-links a:last-child { border-right: none; }
.pub .footer-links a:hover { color: var(--teal-deep); }
.pub .footer-bottom { font-size: 12.5px; color: var(--ink-faint); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.pub .footer-bottom a { color: var(--ink-faint); }

/* ==========================================================================
   Auth card (login / register)
   ========================================================================== */
.pub .auth-shell { min-height: calc(100vh - 130px); display: flex; align-items: center; justify-content: center; padding: 56px 20px; }
.pub .auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 44px var(--shadow); padding: 36px 34px; }
.pub .auth-card.auth-wide { max-width: 480px; }
.pub .auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.pub .auth-brand img { width: 38px; height: 38px; }
.pub .auth-brand h1 { font-size: 20px; }

.pub .auth-message { border-radius: 8px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; margin-bottom: 18px; }
.pub .auth-message.good { background: var(--good-wash); color: var(--teal-deep); }
.pub .auth-message.bad { background: var(--crit-wash); color: var(--crit); }
.pub .auth-message ul { margin: 0; padding-left: 18px; }

.pub .field { margin-bottom: 16px; }
.pub .field label { display: block; font-size: 12.5px; font-weight: 650; color: var(--ink-soft); margin-bottom: 6px; }
.pub .field .input-wrap { position: relative; }
.pub .field .input-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--ink-faint); stroke-width: 1.8; fill: none; }
.pub .field input, .pub .field textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 8px;
    padding: 11px 14px 11px 38px; font-size: 14.5px; font-family: var(--font-body);
    color: var(--ink); background: var(--surface);
}
.pub .field textarea { padding-left: 14px; min-height: 76px; resize: vertical; }
.pub .field input:focus, .pub .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-wash); }

.pub .auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--ink-faint); font-size: 12.5px; }
.pub .auth-divider::before, .pub .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.pub .auth-foot { margin-top: 20px; text-align: center; font-size: 13.5px; color: var(--ink-soft); }
.pub .auth-foot a { color: var(--teal-deep); font-weight: 600; text-decoration: none; }
.pub .auth-foot a:hover { text-decoration: underline; }
.pub .auth-foot-row { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }

.pub .form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 480px) { .pub .form-grid-2 { grid-template-columns: 1fr; } }
