/* =========================================
   SABEMARKET
   Mobile-first stylesheet
========================================= */

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

:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --green: #16a34a;
    --red: #dc2626;

    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;

    --radius: 16px;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}


/* =========================================
   LINKS
========================================= */

a {
    color: inherit;
    text-decoration: none;
}


/* =========================================
   TOPBAR
========================================= */

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1120px;
    margin: auto;

    min-height: 64px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--blue);
}

nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

nav a:hover,
nav a.active {
    color: var(--blue);
}

/* =========================================
   MOBILE MENU
========================================= */

.menu-btn {
    display: none;
    border: 0;
    background: transparent;
    font-size: 26px;
    cursor: pointer;
    padding: 6px;
    color: var(--text);
}

@media (max-width: 768px) {

    .nav-inner {
        position: relative;
    }

    .menu-btn {
        display: block;
        margin-left: auto;
    }

    .nav-inner nav {
        display: none;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 10px 16px;
        flex-direction: column;
        gap: 4px;
        z-index: 1000;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .nav-inner nav.show {
        display: flex;
    }

    .nav-inner nav a {
        display: block;
        width: 100%;
        padding: 13px 10px;
        border-radius: 10px;
        text-decoration: none;
    }

    .nav-inner nav a:hover,
    .nav-inner nav a.active {
        background: #eff6ff;
        color: var(--blue);
    }
}

/* =========================================
   LAYOUT
========================================= */

.container {
    width: 100%;
    max-width: 1120px;

    margin: auto;

    padding: 28px 18px 60px;
}

.page-header {
    margin-bottom: 24px;
}

.eyebrow {
    color: var(--blue);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1px;

    margin-bottom: 6px;
}

.page-header h1 {
    font-size: 30px;
    line-height: 1.15;

    letter-spacing: -0.8px;

    margin-bottom: 8px;
}

.muted {
    color: var(--muted);
}


/* =========================================
   BALANCE CARD
========================================= */

.balance-card {
    background: var(--text);
    color: white;

    border-radius: var(--radius);

    padding: 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 32px;
}

.balance-card .muted {
    color: #94a3b8;

    font-size: 13px;
}

.balance-card h2 {
    font-size: 27px;

    margin-top: 4px;
}


/* =========================================
   BUTTONS
========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 18px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    border: 0;

    cursor: pointer;
}

.btn-primary {
    background: var(--blue);
    color: white;
}

.btn-primary:hover {
    background: var(--blue-dark);
}


/* =========================================
   SECTIONS
========================================= */

.section {
    margin-top: 28px;
}

.section-title {
    margin-bottom: 14px;
}

.section-title h2 {
    font-size: 20px;
    letter-spacing: -0.3px;
}


/* =========================================
   POSITION CARD
========================================= */

.position-card {
    display: block;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 18px;

    margin-bottom: 12px;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.position-card:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.07);
}

.position-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 12px;
}

.category {
    color: var(--muted);

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
}

.position-side {
    padding: 5px 9px;

    border-radius: 7px;

    font-size: 12px;
    font-weight: 800;
}

.position-side.yes {
    background: #dcfce7;
    color: #15803d;
}

.position-side.no {
    background: #fee2e2;
    color: #b91c1c;
}

.position-card h3 {
    font-size: 17px;
    line-height: 1.35;

    margin-bottom: 18px;
}


/* =========================================
   POSITION INFO
========================================= */

.position-info {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    padding-bottom: 16px;

    border-bottom: 1px solid var(--border);
}

.position-info div {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.position-info span {
    color: var(--muted);

    font-size: 11px;
}

.position-info strong {
    font-size: 14px;
}


/* =========================================
   POSITION FOOTER
========================================= */

.position-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-top: 14px;

    font-size: 13px;
}

.position-footer span {
    color: var(--muted);
}

.position-footer strong {
    font-size: 14px;
}


/* =========================================
   EMPTY STATE
========================================= */

.empty-card {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 40px 22px;

    text-align: center;
}

.empty-icon {
    font-size: 36px;

    margin-bottom: 12px;
}

.empty-card h3 {
    font-size: 18px;

    margin-bottom: 7px;
}

.empty-card p {
    color: var(--muted);

    font-size: 14px;

    max-width: 330px;

    margin: 0 auto 20px;
}


/* =========================================
   LOADING
========================================= */

.loading {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 30px;

    text-align: center;

    color: var(--muted);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .nav-inner {
        min-height: 62px;
    }

    .menu-btn {
        display: block;
    }

    nav {
        display: none;

        position: absolute;

        top: 62px;
        left: 0;
        right: 0;

        background: white;

        border-bottom: 1px solid var(--border);

        padding: 14px 18px;

        flex-direction: column;
        align-items: stretch;

        gap: 0;
    }

    nav.open {
        display: flex;
    }

    nav a {
        padding: 13px 4px;

        border-bottom: 1px solid var(--border);
    }

    nav a:last-child {
        border-bottom: 0;
    }

    .container {
        padding: 24px 14px 50px;
    }

    .page-header h1 {
        font-size: 27px;
    }

    .balance-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .balance-card .btn {
        width: 100%;
    }

    .position-info {
        gap: 6px;
    }

    .position-info strong {
        font-size: 13px;
    }
}


/* =========================================
   DESKTOP
========================================= */

@media (min-width: 701px) {

    .position-card {
        padding: 22px;
    }

}

/* =========================================
   ACTIVITY
========================================= */

.activity-card {
    display: flex;

    gap: 14px;

    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 16px;

    margin-bottom: 10px;
}

.activity-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eff6ff;

    color: var(--blue);

    font-size: 20px;
    font-weight: 800;
}

.activity-main {
    flex: 1;
    min-width: 0;
}

.activity-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;
}

.activity-row strong {
    font-size: 14px;
}

.activity-main p {
    color: var(--muted);

    font-size: 13px;

    margin-top: 3px;
}

.activity-main small {
    display: block;

    color: #94a3b8;

    font-size: 11px;

    margin-top: 6px;
}

.activity-amount {
    white-space: nowrap;
}

.activity-amount.positive {
    color: var(--green);
}

.activity-amount.negative {
    color: var(--red);
}


@media (max-width: 500px) {

    .activity-row {
        align-items: flex-start;
        flex-direction: column;

        gap: 3px;
    }

    .activity-amount {
        font-size: 13px;
    }

}

/* =========================================
   SABEMARKET MARKET PAGES
========================================= */

.market-list {
    display: grid;
    gap: 14px;
}


/* MARKET CARD */

.market-card {
    display: block;

    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 18px;

    transition: 0.15s ease;
}

.market-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.07);
}

.market-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 12px;
}

.market-category {
    color: var(--muted);

    font-size: 11px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-status {
    background: #dcfce7;
    color: #15803d;

    padding: 4px 8px;

    border-radius: 6px;

    font-size: 10px;
    font-weight: 800;
}

.market-card h2 {
    font-size: 17px;
    line-height: 1.35;

    margin-bottom: 16px;
}


/* YES / NO PRICES */

.market-prices {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.price-box {
    border-radius: 12px;

    padding: 14px;

    text-align: center;
}

.price-box.yes {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.price-box.no {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.price-label {
    display: block;

    font-size: 12px;
    font-weight: 800;

    margin-bottom: 3px;
}

.price-box.yes .price-label {
    color: var(--green);
}

.price-box.no .price-label {
    color: var(--red);
}

.price-value {
    font-size: 22px;
    font-weight: 800;
}


/* =========================================
   MARKET DETAIL
========================================= */

.market-detail {
    max-width: 760px;
    margin: auto;
}

.back-link {
    display: inline-flex;

    color: var(--muted);

    font-size: 13px;
    font-weight: 600;

    margin-bottom: 18px;
}

.back-link:hover {
    color: var(--blue);
}

.market-detail-header {
    margin-bottom: 22px;
}

.market-detail-header .category {
    display: inline-block;

    margin-bottom: 8px;
}

.market-detail-header h1 {
    font-size: 28px;
    line-height: 1.2;

    letter-spacing: -0.6px;

    margin-bottom: 10px;
}

.market-description {
    color: var(--muted);

    font-size: 15px;
    line-height: 1.6;
}


/* LARGE PRICE DISPLAY */

.market-price-card {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 20px;

    margin-bottom: 16px;
}

.market-price-card h3 {
    font-size: 14px;

    margin-bottom: 14px;
}

.large-prices {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.large-price {
    border-radius: 14px;

    padding: 20px;

    text-align: center;
}

.large-price.yes {
    background: #f0fdf4;
}

.large-price.no {
    background: #fef2f2;
}

.large-price span {
    display: block;

    font-size: 13px;
    font-weight: 800;

    margin-bottom: 5px;
}

.large-price.yes span {
    color: var(--green);
}

.large-price.no span {
    color: var(--red);
}

.large-price strong {
    font-size: 32px;
}


/* =========================================
   TRADING CARD
========================================= */

.trade-card {
    background: var(--card);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 20px;
}

.trade-card h2 {
    font-size: 19px;

    margin-bottom: 5px;
}

.trade-card > p {
    color: var(--muted);

    font-size: 13px;

    margin-bottom: 18px;
}

.trade-input-label {
    display: block;

    color: var(--muted);

    font-size: 12px;
    font-weight: 700;

    margin-bottom: 7px;
}

.trade-input {
    width: 100%;

    height: 48px;

    border: 1px solid var(--border);
    border-radius: 10px;

    padding: 0 14px;

    font-size: 16px;

    outline: none;
}

.trade-input:focus {
    border-color: var(--blue);

    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.trade-buttons {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: 12px;
}

.trade-btn {
    min-height: 50px;

    border: 0;
    border-radius: 10px;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

.trade-btn.yes {
    background: var(--green);
    color: white;
}

.trade-btn.no {
    background: var(--red);
    color: white;
}

.trade-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* =========================================
   TRADE MESSAGE
========================================= */

.trade-message {
    margin-top: 14px;

    padding: 12px;

    border-radius: 10px;

    background: #eff6ff;

    color: #1d4ed8;

    font-size: 13px;

    display: none;
}

.trade-message.show {
    display: block;
}


/* =========================================
   MARKET META
========================================= */

.market-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: 18px;
}

.market-meta span {
    background: #f1f5f9;

    color: var(--muted);

    padding: 6px 9px;

    border-radius: 7px;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================
   MOBILE MARKET
========================================= */

@media (max-width: 600px) {

    .market-detail-header h1 {
        font-size: 25px;
    }

    .large-price {
        padding: 16px 10px;
    }

    .large-price strong {
        font-size: 27px;
    }

    .trade-card {
        padding: 16px;
    }

}

/* =========================================
   AUTH / LOGIN / SIGNUP
========================================= */

.auth-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px 16px;

    background:
        radial-gradient(
            circle at top,
            #dbeafe 0,
            #f8fafc 45%,
            #f8fafc 100%
        );
}

.auth-container {
    width: 100%;
    max-width: 430px;
}

.auth-brand {
    text-align: center;

    margin-bottom: 24px;
}

.auth-brand a {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -1px;
}

.auth-brand span {
    color: var(--blue);
}

.auth-brand p {
    color: var(--muted);

    font-size: 14px;

    margin-top: 6px;
}


/* AUTH CARD */

.auth-card {
    background: white;

    border: 1px solid var(--border);

    border-radius: 20px;

    padding: 24px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.08);
}

.auth-card h1 {
    font-size: 24px;

    letter-spacing: -0.5px;

    margin-bottom: 6px;
}

.auth-card > p {
    color: var(--muted);

    font-size: 14px;

    margin-bottom: 22px;
}


/* TABS */

.auth-tabs {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 4px;

    background: #f1f5f9;

    padding: 4px;

    border-radius: 10px;

    margin-bottom: 22px;
}

.auth-tab {
    border: 0;

    background: transparent;

    border-radius: 7px;

    min-height: 40px;

    color: var(--muted);

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.auth-tab.active {
    background: white;

    color: var(--text);

    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.1);
}


/* FORM */

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;

    font-size: 12px;
    font-weight: 700;

    margin-bottom: 7px;
}

.form-group input {
    width: 100%;

    height: 48px;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 0 14px;

    background: white;

    color: var(--text);

    font-size: 15px;

    outline: none;
}

.form-group input:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* AUTH BUTTON */

.auth-submit {
    width: 100%;

    min-height: 50px;

    border: 0;

    border-radius: 10px;

    background: var(--blue);

    color: white;

    font-size: 15px;
    font-weight: 800;

    cursor: pointer;

    margin-top: 4px;
}

.auth-submit:hover {
    background: var(--blue-dark);
}

.auth-submit:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* MESSAGE */

.auth-message {
    display: none;

    padding: 12px;

    margin-bottom: 16px;

    border-radius: 10px;

    font-size: 13px;

    line-height: 1.4;
}

.auth-message.show {
    display: block;
}

.auth-message.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.auth-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}


/* BOTTOM TEXT */

.auth-footer {
    text-align: center;

    color: var(--muted);

    font-size: 12px;

    margin-top: 18px;
}

.auth-footer strong {
    color: var(--text);
}


/* MOBILE */

@media (max-width: 480px) {

    .auth-page {
        align-items: flex-start;

        padding-top: 45px;
    }

    .auth-card {
        padding: 20px;

        border-radius: 16px;
    }

}

/* =========================================
   SABEMARKET AUTH
========================================= */

.auth-page {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px 16px;

    background:
        radial-gradient(
            circle at top,
            #dbeafe 0%,
            #f8fafc 45%,
            #f8fafc 100%
        );
}

.auth-container {
    width: 100%;
    max-width: 420px;
}


/* BRAND */

.auth-brand {
    text-align: center;

    margin-bottom: 22px;
}

.auth-brand a {
    font-size: 29px;
    font-weight: 900;

    letter-spacing: -1px;
}

.auth-brand a span {
    color: #2563eb;
}

.auth-brand p {
    color: #64748b;

    font-size: 13px;

    margin-top: 6px;
}


/* CARD */

.auth-card {
    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 20px;

    padding: 26px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.08);
}

.auth-card h1 {
    color: #0f172a;

    font-size: 25px;

    line-height: 1.2;

    letter-spacing: -0.5px;

    margin-bottom: 6px;
}

.auth-card > p {
    color: #64748b;

    font-size: 14px;

    margin-bottom: 22px;
}


/* MESSAGE */

.auth-message {
    display: none;

    padding: 11px 13px;

    border-radius: 10px;

    font-size: 13px;

    line-height: 1.4;

    margin-bottom: 16px;
}

.auth-message.show {
    display: block;
}

.auth-message.success {
    color: #166534;

    background: #f0fdf4;

    border: 1px solid #bbf7d0;
}

.auth-message.error {
    color: #991b1b;

    background: #fef2f2;

    border: 1px solid #fecaca;
}


/* FORM */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;

    color: #334155;

    font-size: 12px;

    font-weight: 700;

    margin-bottom: 7px;
}

.form-group input {
    width: 100%;

    height: 49px;

    padding: 0 14px;

    border: 1px solid #cbd5e1;

    border-radius: 10px;

    background: #ffffff;

    color: #0f172a;

    font-size: 15px;

    outline: none;

    transition: 0.15s ease;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}


/* SUBMIT */

.auth-submit {
    width: 100%;

    height: 50px;

    border: 0;

    border-radius: 10px;

    background: #2563eb;

    color: #ffffff;

    font-size: 15px;

    font-weight: 800;

    cursor: pointer;

    margin-top: 4px;

    transition: 0.15s ease;
}

.auth-submit:hover {
    background: #1d4ed8;
}

.auth-submit:active {
    transform: scale(0.99);
}


/* SWITCH */

.auth-switch {
    width: 100%;

    border: 0;

    background: transparent;

    color: #2563eb;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    margin-top: 20px;

    padding: 5px;
}


/* FOOTER */

.auth-footer {
    text-align: center;

    color: #94a3b8;

    font-size: 11px;

    margin-top: 16px;
}


/* MOBILE */

@media (max-width: 480px) {

    .auth-page {
        align-items: flex-start;

        padding-top: 45px;
    }

    .auth-card {
        padding: 21px;

        border-radius: 17px;
    }

    .auth-card h1 {
        font-size: 23px;
    }

}

/* =========================================
   MARKET HEADER
========================================= */

.header-balance {
    display: flex;

    align-items: center;

    gap: 8px;

    background: #f1f5f9;

    border: 1px solid #e2e8f0;

    padding: 7px 11px;

    border-radius: 9px;
}

.header-balance span {
    color: #64748b;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;
}

.header-balance strong {
    color: #0f172a;

    font-size: 13px;

    white-space: nowrap;
}


/* =========================================
   MARKET DESCRIPTION
========================================= */

.market-description {
    color: #64748b;

    font-size: 13px;

    line-height: 1.5;

    margin-bottom: 16px;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =========================================
   MARKET GRID
========================================= */

.market-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}


/* =========================================
   MARKET CARD
========================================= */

.market-card {
    display: block;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    padding: 18px;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.market-card:hover {

    transform: translateY(-2px);

    box-shadow:
        0 10px 30px rgba(15, 23, 42, 0.08);

}


/* TOP */

.market-card-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 12px;

}

.market-category {

    color: #64748b;

    font-size: 11px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.5px;

}

.market-status {

    color: #15803d;

    background: #dcfce7;

    border-radius: 6px;

    padding: 4px 7px;

    font-size: 9px;

    font-weight: 800;

}


/* TITLE */

.market-card h2 {

    color: #0f172a;

    font-size: 17px;

    line-height: 1.35;

    letter-spacing: -0.2px;

    margin-bottom: 10px;

}


/* PRICES */

.market-prices {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 9px;

    margin-top: 4px;

}

.price-box {

    text-align: center;

    border-radius: 11px;

    padding: 12px 8px;

}

.price-box.yes {

    background: #f0fdf4;

    border: 1px solid #bbf7d0;

}

.price-box.no {

    background: #fef2f2;

    border: 1px solid #fecaca;

}

.price-label {

    display: block;

    font-size: 11px;

    font-weight: 800;

    margin-bottom: 2px;

}

.price-box.yes .price-label {

    color: #16a34a;

}

.price-box.no .price-label {

    color: #dc2626;

}

.price-value {

    font-size: 22px;

    font-weight: 900;

}

.price-box.yes .price-value {

    color: #15803d;

}

.price-box.no .price-value {

    color: #b91c1c;

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 700px) {

    .nav-inner {

        position: relative;

        flex-wrap: wrap;

    }

    .header-balance {

        order: 3;

        width: 100%;

        justify-content: space-between;

        margin-top: 8px;

        margin-bottom: 8px;

    }

    .topbar {

        padding-bottom: 8px;

    }

    nav {

        position: absolute;

        top: 62px;

        left: 0;

        right: 0;

        z-index: 50;

    }

    .market-list {

        grid-template-columns: 1fr;

    }

    .market-card {

        padding: 16px;

    }

}

/* ========================================
   PROFILE
======================================== */

.profile-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    flex-shrink: 0;
}

.profile-main h2 {
    margin: 0 0 4px;
    font-size: 21px;
}

.profile-main p {
    margin: 0;
}

.profile-info {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.info-row {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    display: block;
    margin-top: 5px;
    font-size: 16px;
    color: var(--text);
}

.info-label {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

.profile-actions {
    margin-top: 20px;
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #b91c1c;
}


/* MOBILE */

@media (max-width: 700px) {

    .profile-card {
        padding: 20px;
    }

    .profile-avatar {
        width: 56px;
        height: 56px;
        font-size: 21px;
    }

    .profile-main h2 {
        font-size: 19px;
    }

    .info-row {
        padding: 16px;
    }

    .profile-actions .btn {
        width: 100%;
    }

}

/* ========================================
   ADMIN
======================================== */

.admin-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-card-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
}

.admin-card-header p {
    margin: 0;
}

.admin-message {
    min-height: 0;
    margin-bottom: 0;
    border-radius: 10px;
    font-size: 14px;
}

.admin-message.success {
    padding: 12px 14px;
    margin-bottom: 20px;
    background: #dcfce7;
    color: #166534;
}

.admin-message.error {
    padding: 12px 14px;
    margin-bottom: 20px;
    background: #fee2e2;
    color: #991b1b;
}

.admin-card textarea,
.admin-card select,
.admin-card input {
    width: 100%;
    box-sizing: border-box;
}

.admin-markets {
    display: grid;
    gap: 14px;
}

.admin-market {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.admin-market-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.admin-market h3 {
    margin: 8px 0 0;
    font-size: 17px;
    line-height: 1.4;
}

.admin-description {
    margin: 12px 0;
    line-height: 1.5;
}

.admin-status {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.status-open {
    background: #dcfce7;
    color: #166534;
}

.status-resolved {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.admin-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.admin-prices div {
    background: var(--bg);
    border-radius: 10px;
    padding: 12px;
}

.admin-prices span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.admin-prices strong {
    display: block;
    margin-top: 4px;
    font-size: 20px;
}

.resolve-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
}

.resolve-buttons {
    display: flex;
    gap: 8px;
}

.resolve-btn {
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.resolve-btn.yes {
    background: #16a34a;
}

.resolve-btn.no {
    background: #dc2626;
}

.resolve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.resolved-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.resolved-result strong {
    margin-left: 5px;
}


/* MOBILE */

@media (max-width: 700px) {

    .admin-card {
        padding: 18px;
    }

    .admin-card-header {
        align-items: flex-start;
    }

    .admin-market-top {
        flex-direction: column;
    }

    .resolve-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .resolve-buttons {
        width: 100%;
    }

    .resolve-btn {
        flex: 1;
    }

}

/* ========================================
   MARKETS PAGE
======================================== */

.market-page-header {
    margin-bottom: 24px;
}

.market-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.market-card {
    display: block;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.market-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.market-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.market-category {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
}

.market-status {
    font-size: 11px;
    font-weight: 700;
    color: #16a34a;
}

.market-card h2 {
    margin: 0;
    font-size: 19px;
    line-height: 1.4;
}

.market-description {
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.market-prices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.price-box {
    padding: 14px;
    border-radius: 12px;
}

.price-box.yes {
    background: #f0fdf4;
}

.price-box.no {
    background: #fef2f2;
}

.price-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
}

.price-box.yes .price-label {
    color: #16a34a;
}

.price-box.no .price-label {
    color: #dc2626;
}

.price-value {
    display: block;
    margin-top: 4px;
    font-size: 24px;
    line-height: 1;
}

.price-box.yes .price-value {
    color: #15803d;
}

.price-box.no .price-value {
    color: #b91c1c;
}

.market-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.market-arrow {
    color: var(--blue);
    font-size: 18px;
}

.market-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
}

.empty-icon {
    font-size: 32px;
    margin-bottom: 10px;
}


/* MOBILE */

@media (max-width: 700px) {

    .market-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .market-card {
        padding: 18px;
    }

    .market-card h2 {
        font-size: 18px;
    }

}

/* ========================================
   ADMIN ACTIONS
======================================== */

.admin-market-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.admin-market-actions p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.admin-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resolve-btn,
.close-market-btn {
    border: none;
    border-radius: 9px;
    padding: 10px 13px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.resolve-btn {
    color: white;
}

.resolve-btn.yes {
    background: #16a34a;
}

.resolve-btn.no {
    background: #dc2626;
}

.close-market-btn {
    background: white;
    color: #475569;
    border: 1px solid var(--border);
}

.resolve-btn:disabled,
.close-market-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.admin-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

.admin-result span {
    color: var(--muted);
}

.admin-result strong {
    font-size: 14px;
}

.admin-market-title h3 {
    margin-top: 8px;
}


/* MOBILE */

@media (max-width: 700px) {

    .admin-action-buttons {
        display: grid;
        grid-template-columns: 1fr;
    }

    .resolve-btn,
    .close-market-btn {
        width: 100%;
    }

    .admin-result {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

}

/* =========================================
   ADMIN MARKET LIFECYCLE
========================================= */

.status-closed {
    background: #fef3c7;
    color: #92400e;
}

.status-resolved {
    background: #dcfce7;
    color: #166534;
}

.admin-market-actions {
    margin-top: 18px;
}

.close-market-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: #0f172a;
    color: #fff;
}

.close-market-btn:hover {
    opacity: 0.9;
}

.close-market-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.resolve-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.resolve-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.resolve-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.resolve-btn {
    border: 0;
    border-radius: 12px;
    padding: 13px 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.resolve-yes {
    background: #dcfce7;
    color: #166534;
}

.resolve-no {
    background: #fee2e2;
    color: #991b1b;
}

.resolve-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.resolved-result {
    margin-top: 18px;
    padding: 14px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.resolved-result strong {
    font-size: 15px;
}

.resolved-result span {
    font-size: 13px;
    color: var(--muted);
}

@media (max-width: 600px) {

    .resolve-buttons {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   PORTFOLIO
========================================= */

.portfolio-list {
    display: grid;
    gap: 16px;
}

.position-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.position-info {
    margin-bottom: 16px;
}

.position-category {
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.position-info h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

.position-sides {
    display: grid;
    gap: 10px;
}

.position-side {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
}

.position-side > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.position-side span {
    font-size: 12px;
    font-weight: 800;
}

.position-side strong {
    font-size: 17px;
}

.position-side small {
    color: var(--muted);
    font-size: 11px;
}

.yes-side {
    background: #eff6ff;
    color: #1d4ed8;
}

.no-side {
    background: #fff1f2;
    color: #be123c;
}

.position-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    margin-top: 16px;
    padding-top: 15px;
}

.position-footer span {
    color: var(--muted);
    font-size: 13px;
}

.position-footer strong {
    font-size: 16px;
}

.position-link {
    display: block;
    margin-top: 14px;
    text-align: center;
    padding: 11px;
    border-radius: 10px;
    background: #f8fafc;
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.position-link:hover {
    background: #eff6ff;
}

.portfolio-empty {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.portfolio-empty .btn {
    display: inline-block;
    margin-top: 18px;
}

/* =========================================
   SABEMARKET HOMEPAGE
========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--border);
}

.site-header .nav-inner {
    max-width: 1120px;
    margin: auto;

    min-height: 64px;

    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 21px;
    font-weight: 900;
    letter-spacing: -0.6px;
    color: var(--text);
}

.brand span {
    color: var(--blue);
}

.site-header nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-header nav a {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.site-header nav a:hover {
    color: var(--blue);
}


/* =========================================
   HERO
========================================= */

.hero {
    background:
        radial-gradient(
            circle at 80% 10%,
            rgba(37, 99, 235, 0.18),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #eff6ff 0%,
            #f8fafc 100%
        );

    padding: 75px 0 70px;
}

.hero .container {
    padding-top: 0;
    padding-bottom: 0;
}

.hero-content {
    max-width: 760px;
}

.badge {
    display: inline-flex;
    align-items: center;

    padding: 7px 12px;

    border-radius: 999px;

    background: #dbeafe;
    color: #1d4ed8;

    font-size: 12px;
    font-weight: 800;

    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(42px, 8vw, 70px);

    line-height: 1.02;

    letter-spacing: -2.5px;

    max-width: 720px;

    margin-bottom: 20px;
}

.hero p {
    max-width: 650px;

    color: var(--muted);

    font-size: 18px;

    line-height: 1.65;

    margin-bottom: 28px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-secondary {
    background: white;
    color: var(--text);

    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f8fafc;
}


/* =========================================
   HOMEPAGE SECTIONS
========================================= */

.section {
    margin: 0;
    padding: 70px 0;
}

.section .container {
    padding-top: 0;
    padding-bottom: 0;
}

.section-heading {
    max-width: 650px;

    margin-bottom: 30px;
}

.section-heading .eyebrow {
    display: block;
}

.section-heading h2 {
    font-size: 32px;

    line-height: 1.2;

    letter-spacing: -1px;

    margin-bottom: 10px;
}

.section-heading p {
    color: var(--muted);

    font-size: 15px;
}


/* =========================================
   THREE STEPS
========================================= */

.grid-3 {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 16px;
}

.card {
    background: white;

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 24px;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.04);
}

.step-number {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: #eff6ff;

    color: var(--blue);

    font-size: 15px;
    font-weight: 900;

    margin-bottom: 18px;
}

.card h3 {
    font-size: 18px;

    margin-bottom: 8px;
}

.card p {
    color: var(--muted);

    font-size: 14px;

    line-height: 1.6;
}


/* =========================================
   EXAMPLE MARKET
========================================= */

.example-section {
    background: #f1f5f9;
}

.example-card {
    max-width: 800px;

    margin: auto;

    background: white;

    border: 1px solid var(--border);

    border-radius: 20px;

    padding: 30px;

    box-shadow:
        0 15px 40px rgba(15, 23, 42, 0.06);
}

.example-label {
    color: var(--blue);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1px;

    margin-bottom: 12px;
}

.example-card h2 {
    font-size: 27px;

    line-height: 1.3;

    letter-spacing: -0.6px;

    margin-bottom: 12px;
}

.example-card > p {
    color: var(--muted);

    font-size: 15px;

    line-height: 1.6;

    margin-bottom: 24px;
}

.prediction-box {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;
}

.prediction {
    padding: 18px;

    border-radius: 14px;

    text-align: center;
}

.prediction span {
    display: block;

    font-size: 12px;
    font-weight: 800;

    margin-bottom: 4px;
}

.prediction strong {
    font-size: 17px;
}

.prediction.yes {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;

    color: #15803d;
}

.prediction.no {
    background: #fef2f2;
    border: 1px solid #fecaca;

    color: #b91c1c;
}


/* =========================================
   BETA
========================================= */

.beta-card {
    max-width: 800px;

    margin: auto;

    text-align: center;

    background: #0f172a;

    color: white;

    border-radius: 22px;

    padding: 45px 25px;
}

.beta-card .eyebrow {
    color: #60a5fa;

    display: block;
}

.beta-card h2 {
    font-size: 32px;

    line-height: 1.2;

    letter-spacing: -1px;

    margin-bottom: 12px;
}

.beta-card p {
    max-width: 600px;

    margin: 0 auto 25px;

    color: #cbd5e1;

    font-size: 15px;

    line-height: 1.6;
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    background: white;

    border-top: 1px solid var(--border);

    padding: 35px 0 20px;
}

.site-footer .container {
    padding-top: 0;
    padding-bottom: 0;
}

.footer-inner {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.footer-inner strong {
    font-size: 17px;
}

.footer-inner p {
    color: var(--muted);

    font-size: 13px;

    margin-top: 4px;
}

.footer-links {
    display: flex;

    gap: 18px;
}

.footer-links a {
    color: var(--muted);

    font-size: 13px;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--blue);
}

.footer-bottom {
    border-top: 1px solid var(--border);

    margin-top: 25px;
    padding-top: 18px;

    color: #94a3b8;

    font-size: 11px;
}


/* =========================================
   HOMEPAGE MOBILE
========================================= */

@media (max-width: 700px) {

    .site-header .nav-inner {
        min-height: 62px;
    }

    .site-header nav {
        display: none;

        position: absolute;

        top: 62px;
        left: 0;
        right: 0;

        background: white;

        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);

        padding: 10px 16px;

        flex-direction: column;

        gap: 4px;

        box-shadow:
            0 8px 20px rgba(15, 23, 42, 0.08);
    }

    .site-header nav.show {
        display: flex;
    }

    .site-header nav a {
        width: 100%;

        padding: 13px 10px;

        border-radius: 10px;
    }

    .site-header nav a:hover {
        background: #eff6ff;
    }

    .hero {
        padding: 55px 0 50px;
    }

    .hero h1 {
        font-size: 43px;

        letter-spacing: -1.8px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-buttons {
        display: grid;

        grid-template-columns: 1fr;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .section {
        padding: 50px 0;
    }

    .section-heading h2 {
        font-size: 27px;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .example-card {
        padding: 22px 18px;
    }

    .example-card h2 {
        font-size: 23px;
    }

    .beta-card {
        padding: 35px 20px;
    }

    .beta-card h2 {
        font-size: 27px;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        margin-top: 8px;
    }

}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 400px) {

    .hero h1 {
        font-size: 38px;
    }

    .prediction-box {
        grid-template-columns: 1fr;
    }

}