:root {
    --bg: #0b0e11;
    --panel: #181a20;
    --panel-2: #20232a;
    --border: #2b3139;
    --text: #f5f5f5;
    --muted: #848e9c;
    --accent: #f0b90b;
    --accent-text: #0b0e11;
    --success: #0ecb81;
    --danger: #f6465d;
    --shadow: 0 20px 60px rgba(0, 0, 0, .28);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.topbar {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 14, 17, .92);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
}

.brand,
.topbar-actions,
.page-head,
.section-title,
.coin-row,
.status-line,
.inline-stats,
.footer {
    display: flex;
    align-items: center;
}

.brand {
    gap: 12px;
}

.brand strong,
.brand span {
    display: block;
}

.brand span {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.topbar-actions {
    gap: 12px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 900;
    letter-spacing: -.03em;
}

.small-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.user-chip {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: 999px;
    padding: 9px 13px;
    color: var(--muted);
    font-size: 13px;
}

.container {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 38px 0 60px;
}

.page-head,
.section-title,
.footer {
    justify-content: space-between;
    gap: 20px;
}

.page-head {
    margin-bottom: 26px;
}

.page-head h1,
.section-title h2 {
    margin: 0;
}

.page-head p,
.section-title p {
    margin: 6px 0 0;
}

.grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: 1.6fr 1fr;
}

.price-grid {
    grid-template-columns: repeat(4, 1fr);
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.hero-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(240, 185, 11, .16), transparent 42%),
        var(--panel);
}

.card-kicker {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.big-number {
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
    word-break: break-word;
}

.inline-stats {
    gap: 32px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.inline-stats span,
.coin-row span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.inline-stats strong {
    display: block;
    margin-top: 4px;
}

.status-line {
    gap: 10px;
    font-size: 23px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 5px rgba(246, 70, 93, .10);
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(14, 203, 129, .10);
}

.section-block {
    margin-top: 34px;
}

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

.coin-row {
    gap: 12px;
}

.coin-badge {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--accent);
    font-weight: 900;
}

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

.table-card {
    padding: 0;
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

th,
td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

tbody tr:last-child td {
    border-bottom: 0;
}

.btn {
    border: 0;
    border-radius: 11px;
    padding: 11px 16px;
    font-weight: 750;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: wait;
    opacity: .55;
    transform: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
}

.btn-ghost {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-block {
    width: 100%;
    margin-top: 18px;
}

.alert {
    border-radius: 12px;
    padding: 13px 15px;
    margin: 14px 0 20px;
    border: 1px solid;
}

.alert-danger {
    color: #ffb4bd;
    background: rgba(246, 70, 93, .09);
    border-color: rgba(246, 70, 93, .25);
}

.alert-success {
    color: #a9f4d3;
    background: rgba(14, 203, 129, .09);
    border-color: rgba(14, 203, 129, .25);
}

.hidden {
    display: none !important;
}

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

.tiny {
    font-size: 12px;
}

.footer {
    margin-top: 36px;
    color: var(--muted);
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 10%, rgba(240, 185, 11, .10), transparent 30%),
        var(--bg);
}

.auth-card {
    width: min(420px, 100%);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.auth-card.wide {
    width: min(520px, 100%);
}

.auth-card h1 {
    margin: 18px 0 2px;
}

.auth-card form {
    margin-top: 22px;
}

.auth-card label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin: 14px 0 7px;
}

.auth-card input {
    width: 100%;
    border: 1px solid var(--border);
    background: #101318;
    color: var(--text);
    border-radius: 11px;
    padding: 12px 13px;
    outline: none;
}

.auth-card input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, .10);
}

.top-gap {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .stats-grid,
    .price-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .topbar {
        padding: 12px 16px;
    }

    .brand span,
    .user-chip {
        display: none;
    }

    .container {
        width: min(100% - 24px, 1180px);
        padding-top: 24px;
    }

    .page-head {
        align-items: flex-start;
    }

    .stats-grid,
    .price-grid {
        grid-template-columns: 1fr;
    }

    .card {
        border-radius: 15px;
    }

    .inline-stats {
        gap: 18px;
    }

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


/* ===== Phase 2 : vente USDT ===== */

.narrow-container {
    max-width: 760px;
}

.form-input {
    width: 100%;
    border: 1px solid var(--border);
    background: #101318;
    color: var(--text);
    border-radius: 11px;
    padding: 12px 13px;
    outline: none;
    margin-top: 7px;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, .10);
}

textarea.form-input {
    resize: vertical;
}

select.form-input {
    appearance: auto;
}

form > label,
.form-grid label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-top: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.check-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 20px 0 !important;
    color: var(--text) !important;
}

.check-row input {
    width: 18px;
    height: 18px;
}

.alert-warning {
    color: #ffe6a3;
    background: rgba(240, 185, 11, .08);
    border-color: rgba(240, 185, 11, .25);
}

.quote-preview {
    margin-top: 14px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 14px;
    background: #101318;
}

.quote-preview span,
.quote-preview small {
    display: block;
    color: var(--muted);
}

.quote-preview strong {
    display: block;
    font-size: 28px;
    margin: 3px 0;
}

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

.order-card {
    box-shadow: none;
}

.order-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.status-pill {
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
    border: 1px solid var(--border);
}

.status-pending_payment {
    color: #ffe6a3;
    background: rgba(240, 185, 11, .08);
}

.status-payment_confirmed,
.status-delivery_pending {
    color: #b7d8ff;
    background: rgba(52, 152, 219, .10);
}

.status-completed {
    color: #a9f4d3;
    background: rgba(14, 203, 129, .09);
}

.status-cancelled {
    color: #ffb4bd;
    background: rgba(246, 70, 93, .09);
}

.order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr;
    gap: 18px;
    margin-top: 20px;
}

.order-grid span,
.order-grid small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.order-grid strong {
    display: block;
    margin: 4px 0;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
}

.receipt {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.receipt > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

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

@media (max-width: 820px) {
    .desktop-link {
        display: none;
    }

    .order-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .order-head {
        flex-direction: column;
    }
}


/* ===== Phase 3 : paiements ===== */

.status-created,
.status-pending {
    color: #ffe6a3;
    background: rgba(240, 185, 11, .08);
}

.status-success {
    color: #a9f4d3;
    background: rgba(14, 203, 129, .09);
}

.status-failed,
.status-cancelled {
    color: #ffb4bd;
    background: rgba(246, 70, 93, .09);
}
