* {
    box-sizing: border-box;
}

:root {
    --brand: #f7a600;
    --light-accent: #1f4ed8;
    --bg: #050505;
    --surface: #111111;
    --surface-2: #171717;
    --line: #242424;
    --text: #f5f5f5;
    --muted: #8b8b8b;
    --success: #00c076;
    --danger: #ff4d4f;
    --shadow: 0 20px 40px rgba(0, 0, 0, .35);
}

html[data-theme="light"] {
    --bg: #f4f7ff;
    --surface: #ffffff;
    --surface-2: #eef3ff;
    --line: #d9e2f5;
    --text: #10213f;
    --muted: #5d6b82;
    --brand: var(--light-accent);
    --success: #07895f;
    --danger: #d92d3a;
    --shadow: 0 16px 32px rgba(30, 70, 140, .12);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    display: none;
}

.main {
    min-height: 100vh;
    padding: 82px 14px 92px;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-height: 64px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(16px);
}

.topbar h1 {
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
}

.topbar p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand span,
.profile-mini > span,
.asset-card > span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--brand);
    color: #0d0d0d;
    font-weight: 900;
}

.profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.profile-mini strong,
.profile-mini small {
    display: block;
}

.profile-mini small {
    color: var(--muted);
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
}

.side-nav a:hover {
    background: var(--surface-2);
}

.side-nav i {
    font-size: 22px;
    color: var(--brand);
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-card {
    max-width: 460px;
    margin: 8vh auto 0;
    padding: 22px;
}

.auth-card h2,
.card h2 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    gap: 12px;
}

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

.full-span {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--surface-2);
    color: var(--text);
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
}

.btn {
    min-height: 42px;
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--brand);
    color: #111;
    font-weight: 900;
    cursor: pointer;
}

html[data-theme="light"] .btn {
    color: #fff;
}

.btn.success {
    background: var(--success);
    color: #061711;
}

.btn.ghost,
.icon-btn {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
}

.btn.small {
    min-height: 34px;
    padding: 6px 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-dot {
    position: relative;
}

.notification-dot span {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.notice {
    margin-bottom: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.notice.success {
    border-color: color-mix(in srgb, var(--success) 45%, var(--line));
}

.notice.danger {
    border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.notice.warning {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}

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

.filters,
.admin-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    margin-bottom: 14px;
}

.pill {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--muted);
    background: var(--surface-2);
    font-weight: 800;
    font-size: 13px;
}

.pill.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #111;
}

html[data-theme="light"] .pill.active {
    color: #fff;
}

.ad-list {
    display: grid;
    gap: 12px;
}

.market-hero {
    display: grid;
    gap: 16px;
    margin-bottom: 14px;
    padding: 18px 2px 6px;
}

.market-hero h2 {
    margin: 0 0 8px;
    font-size: 26px;
    line-height: 1.08;
}

.market-hero p {
    margin: 0;
    max-width: 680px;
    color: var(--muted);
    line-height: 1.5;
}

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

.market-hero-stats span {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.market-hero-stats strong,
.market-hero-stats small {
    display: block;
}

.market-hero-stats small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.market-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px;
    box-shadow: none;
}

.segmented-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, 1fr);
    width: min(100%, 180px);
    padding: 4px;
    border-radius: 999px;
    background: var(--surface-2);
}

.segmented-tabs a {
    min-height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 900;
}

.segmented-tabs a.active {
    background: var(--text);
    color: var(--bg);
}

.coin-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.coin-tabs a {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 13px;
    font-weight: 900;
}

.coin-tabs a.active {
    border-color: var(--brand);
    color: var(--text);
}

.coin-tabs span,
.merchant-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #101010;
    font-size: 11px;
    font-weight: 900;
}

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

.currency-display {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    padding: 10px 12px;
    background: var(--surface-2);
    color: var(--text);
    font-weight: 900;
}

.p2p-ad-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    box-shadow: none;
}

.merchant-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.merchant-avatar {
    width: 32px;
    height: 32px;
    background: var(--brand);
}

.merchant-line strong {
    display: block;
    font-size: 15px;
}

.merchant-line i {
    color: #2e7bff;
}

.merchant-line small,
.merchant-line em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.merchant-line em.online {
    color: var(--success);
}

.ad-price-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.ad-price-row small,
.ad-meta-grid small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.ad-price-row h2 {
    margin: 3px 0 0;
    font-size: 29px;
    line-height: 1;
}

.ad-meta-grid {
    display: grid;
    gap: 10px;
}

.ad-meta-grid strong {
    display: block;
    margin-top: 3px;
    font-size: 13px;
}

.payment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.payment-tags span,
.trade-method-card span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.payment-tags span::before,
.trade-method-card span::before {
    content: "";
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: var(--brand);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 34px 16px;
    text-align: center;
}

.empty-state i {
    color: var(--brand);
    font-size: 34px;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.trade-entry {
    display: grid;
    gap: 14px;
    padding-bottom: 86px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-weight: 900;
}

.trade-price-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trade-price-line span,
.trade-price-line small {
    color: var(--muted);
}

.trade-price-line strong {
    color: var(--success);
    font-size: 18px;
}

.security-strip {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--success) 14%, var(--surface));
    color: var(--success);
    font-weight: 800;
    font-size: 13px;
}

.trade-panel {
    padding: 16px;
    box-shadow: none;
}

.trade-tabs {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
}

.trade-tabs button {
    border: 0;
    border-bottom: 2px solid transparent;
    padding: 0 0 8px;
    background: transparent;
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
}

.trade-tabs button.active {
    border-color: var(--text);
    color: var(--text);
}

.trade-amount-label {
    color: var(--muted);
}

.trade-amount-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--line);
}

.trade-amount-input input {
    border: 0;
    background: transparent;
    padding-left: 0;
    font-size: 38px;
}

.trade-amount-input span,
.trade-amount-input button {
    color: var(--text);
    font-weight: 900;
}

.trade-amount-input button {
    border: 0;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
}

.trade-limits,
.trade-receive {
    margin-top: 12px;
    color: var(--muted);
}

.trade-method-card,
.merchant-terms {
    padding: 16px;
}

.trade-method-card h2,
.merchant-terms h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.trade-method-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.trade-method-card h2 {
    width: 100%;
}

.merchant-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.merchant-summary small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.thumb-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-weight: 900;
}

.merchant-terms p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.sticky-trade-action {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 55;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    box-shadow: var(--shadow);
}

.sticky-trade-action strong,
.sticky-trade-action small {
    display: block;
}

.sticky-trade-action small {
    color: var(--muted);
}

.order-room {
    display: grid;
    gap: 14px;
}

.merchant-dashboard {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.merchant-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.merchant-kpis span {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.merchant-kpis strong,
.merchant-kpis small {
    display: block;
}

.merchant-kpis small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.ad-editor-card {
    padding: 16px;
}

.order-summary-card,
.order-actions-card,
.timeline-card {
    padding: 16px;
}

.order-title-line {
    display: grid;
    gap: 12px;
}

.order-title-line h2 {
    margin: 0 0 6px;
}

.order-title-line p {
    margin: 0;
    color: var(--muted);
}

.order-amount-grid {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.order-amount-grid span {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.order-amount-grid small,
.order-amount-grid strong {
    display: block;
}

.order-amount-grid small {
    color: var(--muted);
    font-size: 12px;
}

.order-amount-grid strong {
    margin-top: 4px;
}

.deadline-strip,
.fraud-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.deadline-strip {
    margin-top: 14px;
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    color: var(--brand);
}

.fraud-warning {
    background: color-mix(in srgb, var(--danger) 16%, var(--surface));
    color: var(--danger);
}

.order-split {
    align-items: start;
}

.danger-zone {
    margin-top: 12px;
}

.timeline-card {
    display: grid;
    gap: 12px;
}

.timeline-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
}

.timeline-row > span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--brand);
}

.timeline-row strong,
.timeline-row small {
    display: block;
}

.timeline-row p {
    margin: 3px 0;
    color: var(--muted);
}

.timeline-row small {
    color: var(--muted);
    font-size: 12px;
}

.ad-card {
    display: grid;
    gap: 14px;
    padding: 16px;
}

.ad-card strong {
    display: block;
    font-size: 15px;
}

.ad-card strong i {
    color: #3a7bff;
}

.ad-card small,
.ad-card p {
    color: var(--muted);
}

.ad-card h2 {
    margin: 12px 0 8px;
    font-size: 30px;
}

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

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

.control-card,
.asset-card {
    padding: 16px;
}

.control-card i {
    color: var(--brand);
    font-size: 26px;
}

.row,
.list-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.row:last-child,
.list-row:last-child {
    border-bottom: 0;
}

.list-card {
    padding: 16px;
}

.list-row {
    display: grid;
}

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

.split {
    display: grid;
    gap: 14px;
}

.split > .card {
    padding: 16px;
}

.table-card {
    overflow-x: auto;
    padding: 16px;
}

.export-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 16px;
}

.export-strip h2 {
    margin: 0;
}

.inner-export {
    justify-content: flex-start;
    padding: 16px 0 0;
    box-shadow: none;
}

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

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

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    background: color-mix(in srgb, var(--brand) 18%, transparent);
    color: var(--brand);
    font-weight: 900;
    font-size: 12px;
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form input,
.inline-form select {
    min-width: 120px;
}

.inline-check {
    display: inline-flex;
    grid-auto-flow: column;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.inline-check input {
    width: auto;
    min-height: auto;
}

.method-editor {
    grid-template-columns: minmax(140px, 1fr);
    align-items: center;
}

.method-editor input,
.method-editor select {
    min-height: 38px;
}

@media (min-width: 900px) {
    .method-editor {
        grid-template-columns: 1.2fr 1fr .8fr 1.4fr auto;
    }
}

.bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    box-shadow: var(--shadow);
}

.bottom-nav a {
    display: grid;
    place-items: center;
    gap: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.bottom-nav i {
    color: var(--brand);
    font-size: 20px;
}

@media (min-width: 900px) {
    .app-shell {
        display: grid;
        grid-template-columns: 292px minmax(0, 1fr);
    }

    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 24px 18px;
        border-right: 1px solid var(--line);
        background: var(--surface-2);
    }

    .main {
        padding: 88px 28px 40px;
    }

    .topbar {
        left: 292px;
        padding: 10px 28px;
    }

    .bottom-nav {
        display: none;
    }

    .market-hero {
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: end;
    }

    .market-hero h2 {
        font-size: 34px;
    }

    .market-filters {
        grid-template-columns: minmax(150px, 1fr) 120px minmax(190px, 1fr) auto;
        align-items: end;
    }

    .ad-meta-grid {
        grid-template-columns: 1.25fr 1fr .7fr;
    }

    .order-title-line {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .order-amount-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sticky-trade-action {
        left: 320px;
        right: 28px;
        bottom: 22px;
    }

    .ad-card {
        grid-template-columns: minmax(0, 1fr) 150px;
        align-items: center;
    }

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

    .split {
        grid-template-columns: 380px minmax(0, 1fr);
    }

    .form-grid.two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .topbar h1 {
        font-size: 17px;
    }

    .topbar p {
        display: none;
    }

    .ad-card h2 {
        font-size: 25px;
    }
}

body.route-market,
body.route-dashboard,
body.route-my-ads,
body.route-trade,
body.route-orders,
body.route-wallet {
    --bg: #000000;
    --surface: #101010;
    --surface-2: #171717;
    --line: #262626;
    --text: #f7f7f7;
    --muted: #8b8b8b;
    --brand: #f7a600;
    --success: #00c076;
    --shadow: none;
    background: #000000;
}

body.route-market .topbar,
body.route-dashboard .topbar,
body.route-my-ads .topbar,
body.route-trade .topbar,
body.route-orders .topbar,
body.route-wallet .topbar {
    background: rgba(0, 0, 0, .96);
    border-bottom-color: #191919;
    backdrop-filter: blur(12px);
}

body.route-market .main,
body.route-dashboard .main,
body.route-my-ads .main,
body.route-trade .main {
    max-width: 1180px;
    margin: 0 auto;
}

body.route-market .card,
body.route-dashboard .card,
body.route-my-ads .card,
body.route-trade .card,
body.route-orders .card,
body.route-wallet .card {
    border-color: #242424;
    background: #101010;
    box-shadow: none;
}

.p2p-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    margin: -4px 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(247, 166, 0, .23);
    border-radius: 8px;
    background: rgba(247, 166, 0, .08);
    color: #f4bd52;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.p2p-notice i {
    font-size: 17px;
}

.p2p-notice a {
    color: #f7a600;
    white-space: nowrap;
}

body.route-market .market-hero {
    margin: 0 0 10px;
    padding: 2px 0 4px;
}

body.route-market .market-hero h2 {
    font-size: 22px;
    letter-spacing: 0;
}

body.route-market .market-hero p {
    font-size: 13px;
}

body.route-market .market-hero-stats span {
    padding: 10px 12px;
    background: #101010;
}

body.route-market .market-toolbar {
    position: relative;
    top: 64px;
    z-index: 20;
    margin: 0 -14px 8px;
    padding: 10px 14px 12px;
    border-width: 1px 0;
    border-radius: 0;
    border-color: #191919;
    background: #000000;
}

body.route-market .segmented-tabs {
    width: 142px;
    padding: 3px;
    background: #191919;
}

body.route-market .segmented-tabs a {
    min-height: 31px;
    font-size: 13px;
}

body.route-market .segmented-tabs a.active:first-child {
    background: #f7a600;
    color: #090909;
}

body.route-market .segmented-tabs a.active:last-child {
    background: #262626;
    color: #f7f7f7;
}

body.route-market .coin-tabs {
    gap: 6px;
    padding-bottom: 0;
}

body.route-market .coin-tabs a {
    min-height: 32px;
    padding: 6px 10px;
    border-color: transparent;
    background: transparent;
    color: #9a9a9a;
}

body.route-market .coin-tabs a.active {
    border-color: #f7a600;
    background: rgba(247, 166, 0, .1);
    color: #f7f7f7;
}

body.route-market .market-filters {
    grid-template-columns: minmax(0, 1fr) 88px;
    align-items: end;
}

body.route-market .market-filters label {
    font-size: 11px;
    color: #858585;
}

body.route-market .market-filters label:nth-of-type(3) {
    grid-column: 1 / -1;
}

body.route-market .filter-submit {
    min-width: 88px;
    background: #f7a600;
    color: #0d0d0d;
}

body.route-market .market-filters input,
body.route-market .market-filters select,
body.route-market .currency-display {
    min-height: 38px;
    border-radius: 8px;
    border-color: #252525;
    background: #141414;
    color: #f7f7f7;
}

body.route-market .market-filters .btn {
    min-height: 38px;
    padding: 0 11px;
    border-radius: 8px;
}

body.route-market .ad-list,
body.route-my-ads .ad-list {
    gap: 0;
    margin: 0 -14px;
}

body.route-market .p2p-ad-card,
body.route-my-ads .p2p-ad-card {
    border-width: 0 0 1px;
    border-radius: 0;
    padding: 15px 14px 16px;
    background: #000000;
}

body.route-market .merchant-line,
body.route-my-ads .merchant-line {
    align-items: center;
}

body.route-market .merchant-avatar,
body.route-my-ads .merchant-avatar,
.profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f7a600;
    color: #0b0b0b;
    font-weight: 900;
}

body.route-market .merchant-line strong,
body.route-my-ads .merchant-line strong {
    font-size: 14px;
}

body.route-market .merchant-line small,
body.route-market .merchant-line em,
body.route-my-ads .merchant-line small,
body.route-my-ads .merchant-line em {
    color: #858585;
}

body.route-market .ad-price-row,
body.route-my-ads .ad-price-row {
    align-items: center;
}

body.route-market .ad-price-row h2,
body.route-my-ads .ad-price-row h2 {
    color: #f4f4f4;
    font-size: 27px;
    font-weight: 900;
}

body.route-market .ad-price-row .btn.success {
    min-width: 96px;
    min-height: 40px;
    border-radius: 6px;
    background: #00c076;
    color: #06130e;
    font-weight: 900;
}

body.route-market .ad-meta-grid,
body.route-my-ads .ad-meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

body.route-market .ad-meta-grid strong,
body.route-my-ads .ad-meta-grid strong {
    color: #f2f2f2;
    font-size: 12px;
    line-height: 1.35;
}

body.route-market .payment-tags span,
body.route-my-ads .payment-tags span {
    color: #a7a7a7;
}

body.route-market .payment-tags span::before,
body.route-my-ads .payment-tags span::before {
    width: 3px;
    height: 16px;
    border-radius: 2px;
    background: #d99500;
}

.profile-dashboard {
    display: grid;
    gap: 14px;
    max-width: 980px;
    margin: 0 auto;
}

.profile-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px;
    border: 1px solid #242424;
    border-radius: 8px;
    background: #101010;
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    font-size: 22px;
}

.profile-head h2 {
    margin: 1px 0 9px;
    font-size: 22px;
    line-height: 1.08;
}

.verify-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, max-content));
    flex-wrap: wrap;
    gap: 7px;
}

.verify-strip span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid #242424;
    border-radius: 999px;
    background: #111111;
    color: #cfcfcf;
    font-size: 11px;
    font-weight: 800;
}

.verify-strip i {
    color: #2d7cff;
    font-size: 14px;
}

.verify-strip .pending i {
    color: #f7a600;
}

.advertiser-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #473312, #1a1711 72%);
    color: #f3d289;
}

.advertiser-banner span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(247, 166, 0, .18);
}

.advertiser-banner strong,
.advertiser-banner small {
    display: block;
}

.advertiser-banner small {
    color: rgba(243, 210, 137, .72);
    font-size: 12px;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.profile-stats span {
    min-height: 74px;
    padding: 12px;
    border: 1px solid #242424;
    border-radius: 8px;
    background: #101010;
}

.profile-stats strong,
.profile-stats small {
    display: block;
}

.profile-stats strong {
    color: #00c076;
    font-size: 20px;
}

.profile-stats small {
    margin-top: 5px;
    color: #858585;
    font-size: 11px;
    line-height: 1.35;
}

.profile-menu {
    display: grid;
    border: 1px solid #1f1f1f;
    border-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #101010;
}

.profile-menu a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 0 14px;
    border-bottom: 1px solid #1f1f1f;
    color: #f4f4f4;
    font-weight: 800;
}

.profile-menu a span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.profile-menu i:first-child {
    color: #f7a600;
    font-size: 21px;
}

.profile-menu strong {
    color: #8d8d8d;
    font-size: 12px;
}

.wallet-strip {
    margin-top: 14px;
}

body.route-dashboard .asset-card {
    padding: 14px;
    background: #101010;
}

body.route-dashboard .asset-card h2 {
    margin-bottom: 2px;
}

body.route-dashboard .profile-lower {
    margin-top: 14px;
}

.quick-actions-card {
    display: grid;
    gap: 0;
}

.action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 12px 0;
    border-bottom: 1px solid #242424;
}

.quick-actions-card .action-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(118px, auto) !important;
    justify-content: stretch;
}

.action-row:last-child {
    border-bottom: 0;
}

.action-row span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.action-row i {
    color: #f7a600;
    font-size: 24px;
}

.action-row strong {
    color: #f7f7f7;
}

.action-row em,
.action-row .btn {
    min-width: 114px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f7a600;
    color: #0d0d0d;
    font-style: normal;
    font-weight: 900;
}

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

.market-ad-summary span {
    padding: 9px 10px;
    border: 1px solid #242424;
    border-radius: 8px;
    background: #101010;
}

.market-ad-summary small,
.market-ad-summary strong {
    display: block;
}

.market-ad-summary small {
    color: #858585;
    font-size: 11px;
}

.market-ad-summary strong {
    margin-top: 4px;
    color: #f7f7f7;
    font-size: 12px;
}

.bybit-offer-card {
    grid-template-columns: minmax(0, 1fr);
}

.offer-main {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.offer-merchant small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.offer-price-block small,
.offer-facts small {
    display: block;
    color: #858585;
    font-size: 12px;
}

.offer-price-block h2 {
    margin: 4px 0 0;
    color: #f7f7f7;
    font-size: 30px;
    line-height: 1;
}

.offer-facts {
    display: grid;
    gap: 8px;
}

.offer-facts strong {
    display: block;
    margin-top: 3px;
    color: #f2f2f2;
    font-size: 13px;
    line-height: 1.35;
}

.offer-payments {
    gap: 10px;
}

.offer-action {
    display: grid;
    gap: 8px;
    align-content: end;
}

.offer-action > span {
    color: #858585;
    font-size: 12px;
    font-weight: 900;
    text-align: right;
}

.offer-action .btn {
    min-width: 110px;
    border-radius: 999px;
}

.ads-level-row,
.ads-tabs-row,
.ads-mode-row {
    border-bottom: 1px solid #1f1f1f;
}

.ads-level-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 52px;
    color: #f4f4f4;
}

.ads-level-row span,
.ads-level-row strong {
    font-size: 13px;
}

.ads-level-row span {
    color: #f7a600;
    font-weight: 900;
}

.ads-level-row strong {
    color: #8d8d8d;
    text-align: right;
}

.ads-tabs-row {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 50px;
}

.ads-tabs-row a {
    color: #8f8f8f;
    font-weight: 900;
}

.ads-tabs-row a.active {
    color: #f4f4f4;
}

.ads-tabs-row .icon-btn {
    margin-left: auto;
}

.ads-mode-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
}

.ads-mode-row strong,
.ads-mode-row small {
    display: block;
}

.ads-mode-row small {
    margin-top: 4px;
    color: #858585;
    line-height: 1.4;
}

.ads-mode-row > span {
    width: 44px;
    height: 24px;
    position: relative;
    border-radius: 999px;
    background: #2a2a2a;
}

.ads-mode-row > span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f4f4f4;
    transition: transform .2s ease;
}

.ads-mode-row > span.on {
    background: #00c076;
}

.ads-mode-row > span.on::after {
    transform: translateX(20px);
}

body.route-my-ads .merchant-dashboard {
    gap: 0;
    margin: -2px 0 14px;
}

body.route-my-ads .merchant-kpis {
    margin-top: 12px;
}

body.route-my-ads .merchant-kpis span {
    padding: 12px;
    background: #101010;
}

body.route-my-ads .merchant-dashboard > .btn {
    margin-top: 12px;
}

.ads-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-height: 330px;
    padding: 72px 16px;
    text-align: center;
    border-bottom: 1px solid #1f1f1f;
    background: #000000;
}

.ads-empty i {
    color: #363636;
    font-size: 58px;
}

.ads-empty h2 {
    margin: 0;
    font-size: 18px;
}

.ads-empty p {
    max-width: 280px;
    margin: 0;
    color: #858585;
}

.ads-empty .btn {
    margin-top: 10px;
    border-style: dashed;
    border-color: #f7a600;
    color: #f7a600;
    background: transparent;
}

body.route-trade .trade-entry {
    gap: 12px;
}

body.route-trade .trade-panel,
body.route-trade .trade-method-card,
body.route-trade .merchant-terms {
    border-color: #202020;
    border-radius: 8px;
    background: #101010;
}

body.route-trade .security-strip {
    border-radius: 8px;
    background: rgba(247, 166, 0, .09);
    color: #f4bd52;
}

body.route-trade .trade-price-line strong {
    color: #00c076;
}

body.route-trade .sticky-trade-action {
    background: #101010;
    border-color: #252525;
}

body.route-trade .sticky-trade-action .btn {
    border-radius: 6px;
    background: #b97800;
    color: #0d0d0d;
}

.admin-overview-card {
    position: relative;
    min-height: 132px;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.admin-overview-card:hover {
    transform: translateY(-2px);
    border-color: #f7a600;
    background: color-mix(in srgb, var(--surface) 86%, #f7a600);
}

.admin-overview-card small {
    position: absolute;
    right: 14px;
    top: 14px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
}

@media (max-width: 899px) {
    body.route-market .main,
    body.route-dashboard .main,
    body.route-my-ads .main,
    body.route-trade .main,
    body.route-orders .main,
    body.route-wallet .main {
        padding: 74px 14px 104px;
    }

    body.route-market .topbar h1 {
        font-size: 18px;
    }

    body.route-market .topbar p,
    body.route-dashboard .topbar p,
    body.route-my-ads .topbar p {
        display: none;
    }

    body.route-market .market-hero {
        display: none;
    }

    .profile-dashboard {
        max-width: none;
    }

    .profile-head {
        padding: 14px;
    }

    .action-row {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 10px;
    }

    .quick-actions-card .action-row {
        grid-template-columns: 1fr !important;
    }

    .action-row em,
    .action-row .btn {
        width: 100%;
    }

    .bottom-nav {
        left: 18px;
        right: 18px;
        bottom: 14px;
        padding: 7px 8px;
        border-radius: 999px;
        border-color: #222222;
        background: rgba(9, 9, 9, .96);
        box-shadow: 0 14px 32px rgba(0, 0, 0, .38);
    }

    .bottom-nav a {
        min-height: 48px;
        border-radius: 999px;
        color: #777777;
        font-size: 10px;
    }

    .bottom-nav i {
        color: currentColor;
        font-size: 22px;
    }

    .bottom-nav a.active {
        color: #f7f7f7;
        background: #181818;
    }
}

@media (min-width: 700px) {
    body.route-market .market-filters {
        grid-template-columns: minmax(180px, 1fr) 120px minmax(240px, 1fr) 116px;
    }

    body.route-market .market-filters label:nth-of-type(3) {
        grid-column: auto;
    }

    body.route-market .p2p-ad-card,
    body.route-my-ads .p2p-ad-card {
        margin-bottom: 10px;
        border-width: 1px;
        border-radius: 8px;
        padding: 18px;
        background: #101010;
    }

    body.route-market .ad-list,
    body.route-my-ads .ad-list {
        gap: 12px;
        margin: 0;
    }

    .profile-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .bybit-offer-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 132px;
        align-items: end;
    }

    .offer-facts {
        grid-template-columns: 1.2fr 1fr .75fr;
    }
}

@media (min-width: 900px) {
    body.route-market .market-toolbar {
        position: static;
        margin: 0 0 14px;
        padding: 14px;
        border-width: 1px;
        border-radius: 8px;
        background: #101010;
    }

    body.route-market .market-filters input,
    body.route-market .market-filters select,
    body.route-market .market-filters .btn {
        min-height: 44px;
    }

    body.route-dashboard .main {
        max-width: 1240px;
    }

    body.route-dashboard .profile-lower {
        align-items: start;
    }
}

html[data-theme="light"] body.route-market,
html[data-theme="light"] body.route-dashboard,
html[data-theme="light"] body.route-my-ads,
html[data-theme="light"] body.route-trade,
html[data-theme="light"] body.route-orders,
html[data-theme="light"] body.route-wallet {
    --bg: #f4f7ff;
    --surface: #ffffff;
    --surface-2: #eef3ff;
    --line: #d9e2f5;
    --text: #10213f;
    --muted: #5d6b82;
    --brand: var(--light-accent);
    --success: #07895f;
    background: var(--bg);
    color: var(--text);
}

html[data-theme="light"] body.route-market .topbar,
html[data-theme="light"] body.route-dashboard .topbar,
html[data-theme="light"] body.route-my-ads .topbar,
html[data-theme="light"] body.route-trade .topbar,
html[data-theme="light"] body.route-orders .topbar,
html[data-theme="light"] body.route-wallet .topbar {
    background: rgba(244, 247, 255, .96);
    border-bottom-color: var(--line);
}

html[data-theme="light"] body.route-market .card,
html[data-theme="light"] body.route-dashboard .card,
html[data-theme="light"] body.route-my-ads .card,
html[data-theme="light"] body.route-trade .card,
html[data-theme="light"] body.route-orders .card,
html[data-theme="light"] body.route-wallet .card,
html[data-theme="light"] .profile-head,
html[data-theme="light"] .profile-menu,
html[data-theme="light"] .market-ad-summary span {
    background: #ffffff;
    border-color: var(--line);
}

html[data-theme="light"] body.route-market .market-toolbar,
html[data-theme="light"] body.route-market .p2p-ad-card,
html[data-theme="light"] body.route-my-ads .p2p-ad-card,
html[data-theme="light"] body.route-dashboard .asset-card,
html[data-theme="light"] .profile-stats span,
html[data-theme="light"] body.route-trade .trade-panel,
html[data-theme="light"] body.route-trade .trade-method-card,
html[data-theme="light"] body.route-trade .merchant-terms,
html[data-theme="light"] body.route-trade .sticky-trade-action {
    background: #ffffff;
    border-color: var(--line);
}

html[data-theme="light"] body.route-market .ad-list,
html[data-theme="light"] body.route-my-ads .ad-list,
html[data-theme="light"] .ads-empty {
    background: transparent;
}

html[data-theme="light"] body.route-market .merchant-line strong,
html[data-theme="light"] body.route-my-ads .merchant-line strong,
html[data-theme="light"] body.route-market .ad-price-row h2,
html[data-theme="light"] body.route-my-ads .ad-price-row h2,
html[data-theme="light"] body.route-market .ad-meta-grid strong,
html[data-theme="light"] body.route-my-ads .ad-meta-grid strong,
html[data-theme="light"] .offer-price-block h2,
html[data-theme="light"] .offer-facts strong,
html[data-theme="light"] .market-ad-summary strong,
html[data-theme="light"] .profile-head h2,
html[data-theme="light"] .profile-menu a,
html[data-theme="light"] .action-row strong {
    color: var(--text);
}

html[data-theme="light"] body.route-market .market-filters input,
html[data-theme="light"] body.route-market .market-filters select,
html[data-theme="light"] body.route-market .currency-display {
    background: #ffffff;
    color: var(--text);
    border-color: var(--line);
}

html[data-theme="light"] body.route-market .coin-tabs a {
    color: var(--muted);
}

html[data-theme="light"] body.route-market .coin-tabs a.active {
    color: var(--text);
    background: color-mix(in srgb, var(--light-accent) 12%, #ffffff);
    border-color: var(--light-accent);
}

html[data-theme="light"] body.route-market .segmented-tabs {
    background: #e6ecfb;
}

html[data-theme="light"] body.route-market .segmented-tabs a.active:first-child,
html[data-theme="light"] body.route-market .filter-submit,
html[data-theme="light"] .action-row em,
html[data-theme="light"] .action-row .btn {
    background: var(--light-accent);
    color: #ffffff;
}

html[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, .96);
    border-color: var(--line);
}

html[data-theme="light"] .bottom-nav a.active {
    color: var(--light-accent);
    background: #eef3ff;
}

.order-flow,
.cancel-order-page {
    display: grid;
    gap: 14px;
    max-width: 980px;
    margin: 0 auto;
}

.order-mobile-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 48px;
}

.order-mobile-head strong {
    text-align: center;
    font-size: 18px;
}

.order-mobile-head > a:last-child {
    color: var(--brand);
    font-weight: 800;
    font-size: 13px;
}

.order-progress {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.order-progress span {
    height: 3px;
    border-radius: 999px;
    background: var(--line);
}

.order-progress span.active {
    background: var(--text);
}

.deadline-note {
    margin-top: 10px;
    color: var(--danger);
    font-size: 13px;
    font-weight: 800;
}

.counterparty-card {
    padding: 14px;
}

.counterparty-card .merchant-summary {
    margin-bottom: 0;
}

.payment-steps {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0 14px;
    padding: 16px;
}

.step-number {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--text);
    color: var(--bg);
    font-weight: 900;
}

.payment-step-body {
    position: relative;
    padding: 0 0 24px;
}

.payment-step-body:not(:last-child)::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 28px;
    bottom: 6px;
    width: 2px;
    background: var(--text);
}

.payment-step-body h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.payment-field-list {
    display: grid;
    gap: 12px;
}

.payment-field-row {
    display: grid;
    grid-template-columns: minmax(92px, .7fr) minmax(0, 1fr) 28px;
    gap: 8px;
    align-items: center;
}

.payment-field-row span {
    color: var(--muted);
    font-weight: 700;
}

.payment-field-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.copy-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 7px;
    display: inline-grid;
    place-items: center;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.copy-btn.copied {
    color: var(--success);
}

.payment-help,
.payment-rules {
    color: var(--muted);
    line-height: 1.45;
}

.payment-rules {
    margin: 0 0 14px;
    padding-left: 18px;
}

.payment-complete-form {
    display: grid;
    gap: 12px;
}

.payment-complete-btn {
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    background: var(--brand);
    color: #0b0b0b;
}

.release-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.release-panel h2 {
    margin: 0;
}

.proof-grid {
    display: grid;
    gap: 10px;
}

.proof-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

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

.proof-item a,
.report-link {
    color: var(--brand);
    font-weight: 800;
}

.order-primary-action {
    width: 100%;
    min-height: 48px;
}

.order-warning,
.cancel-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--danger) 16%, var(--surface));
    color: var(--danger);
    font-weight: 800;
    line-height: 1.35;
}

.chat-panel {
    display: grid;
    min-height: 520px;
    overflow: hidden;
}

.chat-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.chat-head strong,
.chat-head small {
    display: block;
    text-align: center;
}

.chat-head small {
    color: var(--muted);
    font-size: 12px;
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 360px;
    padding: 16px;
}

.chat-bubble {
    max-width: 82%;
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    line-height: 1.35;
}

.chat-bubble.mine {
    align-self: flex-end;
    background: color-mix(in srgb, var(--brand) 22%, var(--surface-2));
}

.chat-bubble.theirs,
.chat-bubble.system {
    align-self: flex-start;
}

.chat-bubble.warning {
    max-width: 100%;
    align-self: stretch;
    background: color-mix(in srgb, var(--danger) 20%, var(--surface-2));
    color: var(--danger);
}

.chat-bubble strong {
    font-size: 12px;
}

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

.chat-bubble a {
    color: var(--brand);
    font-weight: 800;
}

.chat-input-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 9px;
    align-items: center;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.chat-input-row input[name="message"] {
    min-height: 46px;
    border-radius: 8px;
}

.file-chip {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text);
    cursor: pointer;
}

.file-chip input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    opacity: 0;
    pointer-events: none;
}

.compact-timeline {
    display: grid;
    gap: 12px;
}

.order-cancel-link {
    justify-self: center;
}

.cancel-alert {
    background: color-mix(in srgb, var(--brand) 18%, var(--surface));
    color: var(--brand);
}

.cancel-reason-card {
    display: grid;
    gap: 16px;
    padding: 16px;
}

.cancel-reason-card h2,
.cancel-reason-card h3,
.cancel-reason-card p {
    margin: 0;
}

.cancel-reason-card h3 {
    color: var(--muted);
    font-size: 15px;
}

.reason-list {
    display: grid;
    gap: 4px;
}

.reason-list label,
.confirm-check {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.reason-list input,
.confirm-check input {
    width: 20px;
    min-height: 20px;
    accent-color: var(--brand);
}

@media (max-width: 899px) {
    body.route-order-detail .main,
    body.route-cancel-order-page .main {
        padding: 74px 14px 104px;
    }

    body.route-order-detail .topbar,
    body.route-cancel-order-page .topbar {
        display: none;
    }

    body.route-order-detail .main,
    body.route-cancel-order-page .main {
        padding-top: 18px;
    }
}

@media (min-width: 900px) {
    .payment-steps {
        padding: 22px;
    }

    .release-panel {
        padding: 22px;
    }

    .chat-panel {
        min-height: 620px;
    }

    .payment-complete-form {
        grid-template-columns: 1fr 1fr;
        align-items: end;
    }

    .payment-complete-form .payment-complete-btn {
        grid-column: 1 / -1;
    }
}

html[data-theme="light"] body.route-order-detail,
html[data-theme="light"] body.route-cancel-order-page {
    background: var(--bg);
    color: var(--text);
}

html[data-theme="light"] body.route-order-detail .card,
html[data-theme="light"] body.route-cancel-order-page .card,
html[data-theme="light"] .proof-item,
html[data-theme="light"] .chat-bubble {
    background: #ffffff;
    border-color: var(--line);
}

html[data-theme="light"] .chat-bubble.mine {
    background: color-mix(in srgb, var(--light-accent) 13%, #ffffff);
}

html[data-theme="light"] .payment-complete-btn {
    background: var(--light-accent);
    color: #ffffff;
}
