.role-theme-buyer {
    --role-accent: #1f7ae0;
    --role-accent-soft: #edf5ff;
    --role-accent-border: #bcd8ff;
    --role-accent-text: #1457a3;
}

.role-theme-seller {
    --role-accent: #d97a1c;
    --role-accent-soft: #fff4e8;
    --role-accent-border: #ffd4a8;
    --role-accent-text: #a85a0e;
}

.role-theme-buyer .btn-primary,
.role-theme-seller .btn-primary {
    background-color: var(--role-accent);
    border-color: var(--role-accent);
}

.role-theme-buyer .btn-outline-primary,
.role-theme-seller .btn-outline-primary {
    color: var(--role-accent-text);
    border-color: var(--role-accent-border);
}

.role-theme-buyer .btn-outline-primary:hover,
.role-theme-seller .btn-outline-primary:hover {
    color: #fff;
    background-color: var(--role-accent);
    border-color: var(--role-accent);
}

.role-theme-buyer .dash-shell .dash-hero,
.role-theme-seller .dash-shell .dash-hero {
    border-color: var(--role-accent-border);
    background: linear-gradient(120deg, var(--role-accent-soft) 0%, #ffffff 70%);
}

.role-theme-buyer .dt-banner,
.role-theme-seller .dt-banner {
    background: var(--role-accent-soft);
    border-color: var(--role-accent-border);
    color: var(--role-accent-text);
}

.dt-toolbar {
    gap: 12px;
}

.dt-toolbar .dt-toolbar-left,
.dt-toolbar .dt-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dt-toolbar .dt-toolbar-right {
    margin-left: auto;
}

.dt-toolbar .dt-export .dt-export-btn,
.dt-toolbar .dt-buttons .dt-export-btn {
    background: #fff;
    border: 1px solid #d7e2ef;
    color: #2f3f57;
    border-radius: 8px;
    padding: 0.3rem 0.62rem;
    font-weight: 600;
}

.role-theme-buyer .dt-toolbar .dt-export .dt-export-btn,
.role-theme-buyer .dt-toolbar .dt-buttons .dt-export-btn {
    border-color: var(--role-accent-border);
    color: var(--role-accent-text);
}

.role-theme-seller .dt-toolbar .dt-export .dt-export-btn,
.role-theme-seller .dt-toolbar .dt-buttons .dt-export-btn {
    border-color: var(--role-accent-border);
    color: var(--role-accent-text);
}

.dt-toolbar .dt-export .dt-export-btn:hover,
.dt-toolbar .dt-buttons .dt-export-btn:hover {
    color: #fff;
}

.role-theme-buyer .dt-toolbar .dt-export .dt-export-btn:hover,
.role-theme-buyer .dt-toolbar .dt-buttons .dt-export-btn:hover,
.role-theme-seller .dt-toolbar .dt-export .dt-export-btn:hover,
.role-theme-seller .dt-toolbar .dt-buttons .dt-export-btn:hover {
    background-color: var(--role-accent);
    border-color: var(--role-accent);
}

.dt-toolbar .dt-length,
.dt-toolbar .dt-search,
.dt-toolbar .dataTables_length,
.dt-toolbar .dataTables_filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dt-toolbar .dt-search input[type="search"],
.dt-toolbar .dataTables_filter input[type="search"] {
    min-width: 220px;
}

.dt-banner {
    background: rgba(13, 202, 240, 0.12);
    border: 1px solid rgba(13, 202, 240, 0.25);
    color: #0b7285;
}

.dt-filter-panel {
    background: #f8fafd;
    border: 1px solid #e3e9f2;
    padding: 14px 14px 12px;
    border-radius: 12px;
    width: 100%;
    overflow: visible;
}

.dt-filter-panel .dt-filter-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.dt-filter-panel .dt-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dt-filter-panel .dt-filter-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #6b7f99;
    text-transform: uppercase;
}

.dt-filter-panel .form-control,
.dt-filter-panel .form-select {
    min-width: 0;
    height: 36px;
}

.dt-filter-panel .dt-filter-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dt-filter-panel .btn {
    height: 36px;
}

/* Global DataTable skin aligned with buyer/seller transactions pages */
.dataTables_wrapper table.dataTable {
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    overflow: hidden;
}

.dataTables_wrapper table.dataTable thead th {
    background: #f8f9fa;
    border: 1px solid #dfe3e8 !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4f5662;
    white-space: nowrap;
    padding: 10px 11px;
}

.dataTables_wrapper table.dataTable tbody td {
    vertical-align: middle;
    padding: 10px 11px;
    border: 1px solid #e5e8ec !important;
    font-size: 14px;
    color: #535a64;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dataTables_wrapper .dt-toolbar .dt-search input[type="search"],
.dataTables_wrapper .dt-toolbar .dataTables_filter input[type="search"] {
    height: 38px;
    border-radius: 8px;
    border: 1px solid #dfe3e8;
    min-width: 240px;
}

.dataTables_wrapper .dt-toolbar .dt-length select,
.dataTables_wrapper .dt-toolbar .dataTables_length select {
    height: 38px;
    border-radius: 8px;
    border: 1px solid #dfe3e8;
}

.dataTables_wrapper .dt-footer .pagination .page-link {
    border-radius: 6px;
    border-color: #d9e0e7;
    color: #4f5662;
}

.dataTables_wrapper .dt-footer .pagination .active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.dt-footer .dt-info,
.dt-footer .dt-paginate,
.dt-footer .dataTables_info,
.dt-footer .dataTables_paginate {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dt-footer .dt-paginate,
.dt-footer .dataTables_paginate {
    justify-content: flex-end;
}

.dataTables_wrapper .dataTables_info {
    color: #6c757d;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: .25rem .6rem;
    border-radius: .3rem;
}

.api-wizard-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

@media (max-width: 991.98px) {
    .api-wizard-wrap {
        grid-template-columns: 1fr;
    }
}

.api-sidecard {
    border: 1px solid #e9ecef;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 16px;
}

.api-sidecard .api-title {
    font-weight: 700;
    font-size: 1rem;
}

.api-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #eef2f7;
    color: #334155;
}

.api-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.api-steps .api-step {
    flex: 1 1 160px;
    border: 1px dashed #d7dde5;
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: inherit;
    background: #ffffff;
}

.api-steps .api-step.active {
    border-color: #1f8f78;
    box-shadow: 0 0 0 2px rgba(31, 143, 120, 0.12);
}

.api-steps .api-step .step-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #1f8f78;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 8px;
}

.api-section {
    border: 1px solid #eef2f7;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
}

.api-section .section-title {
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-hero {
    background: linear-gradient(135deg, #0f766e 0%, #1f8f78 60%, #2ea88f 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.api-actions {
    margin-top: 16px;
    margin-bottom: 32px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.api-hero .hero-title {
    font-weight: 700;
    margin: 0;
}

.api-kv {
    display: grid;
    gap: 6px;
}

.api-kv .kv-label {
    font-size: 0.75rem;
    color: #64748b;
}

.api-kv .kv-value {
    font-weight: 600;
    color: #0f172a;
}

/* Topbar wallet + buyer/seller mode visual tuning */
.top-wallet-btn {
    border-width: 1px;
    border-style: solid;
    cursor: default;
    opacity: 1 !important;
    padding: 0.35rem 0.65rem;
}

.top-wallet-btn-buyer {
    color: #0b63c9;
    border-color: #9cc8ff;
    background-color: #edf5ff;
}

/* ===========================
   Auth (Login/Register)
   =========================== */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 18px;
    background:
        radial-gradient(800px 420px at 15% 15%, rgba(31, 143, 120, 0.12) 0%, rgba(31, 143, 120, 0) 60%),
        radial-gradient(700px 380px at 90% 10%, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 62%),
        radial-gradient(900px 520px at 85% 90%, rgba(245, 158, 11, 0.10) 0%, rgba(245, 158, 11, 0) 65%),
        linear-gradient(180deg, #f6f8fb 0%, #eef2f7 100%);
}

.auth-card {
    width: min(1040px, 100%);
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.90);
    box-shadow:
        0 20px 55px rgba(15, 23, 42, 0.12),
        0 2px 0 rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

.auth-split {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 560px;
}

.auth-hero {
    position: relative;
    padding: 34px 30px;
    background:
        linear-gradient(135deg, #dff6f0 0%, #e0f2fe 45%, #e8eaff 100%),
        repeating-linear-gradient(45deg, rgba(15, 118, 110, 0.06) 0, rgba(15, 118, 110, 0.06) 1px, rgba(255,255,255,0) 1px, rgba(255,255,255,0) 14px);
    color: #0f172a;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(560px 360px at 22% 18%, rgba(15, 118, 110, 0.16) 0%, rgba(15, 118, 110, 0) 62%);
    pointer-events: none;
}

.auth-hero > * {
    position: relative;
    z-index: 1;
}

.auth-logo img {
    height: 28px;
    width: auto;
    filter: none;
}

.auth-logo .fw-bold {
    color: #0f172a !important;
    letter-spacing: 0.2px;
}

.auth-hero h2 {
    margin: 22px 0 8px;
    font-size: 1.7rem;
    line-height: 1.2;
    color: #0f172a;
}

.auth-hero p {
    margin-bottom: 18px;
    color: #334155;
}

.auth-points {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.auth-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 118, 110, 0.16);
}

.auth-point i {
    font-size: 1.15rem;
    color: #0f766e;
    margin-top: 2px;
}

.auth-point .t {
    font-weight: 700;
    line-height: 1.15;
    color: #0f172a;
}

.auth-point .d {
    font-size: 0.86rem;
    color: #475569;
}

.auth-form {
    padding: 34px 34px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.96) 100%);
}

.auth-form .input-group-text {
    border-radius: 12px 0 0 12px;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.auth-form .form-control {
    border-radius: 0 12px 12px 0;
    border-color: #e2e8f0;
    padding: 0.62rem 0.85rem;
}

.auth-form .form-control:focus {
    border-color: rgba(31, 143, 120, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(31, 143, 120, 0.14);
}

.auth-form .btn-primary {
    border-radius: 12px;
    padding: 0.70rem 0.95rem;
    font-weight: 700;
}

.auth-form .btn-outline-secondary {
    border-radius: 999px;
}

.auth-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.auth-flash-stack {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    width: min(680px, calc(100% - 26px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}

.auth-flash {
    border-radius: 14px;
    padding: 12px 14px;
    margin: 0;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.20);
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    .auth-shell {
        padding: 26px 14px;
    }
    .auth-split {
        grid-template-columns: 1fr;
        min-height: unset;
    }
    .auth-hero {
        padding: 22px 20px;
    }
    .auth-form {
        padding: 22px 20px;
    }
}

.top-wallet-btn-seller {
    color: #b45a00;
    border-color: #ffd1a3;
    background-color: #fff4e8;
}

.top-mode-badge {
    font-weight: 700;
}

.top-mode-badge-buyer {
    color: #0b63c9;
    background-color: #edf5ff !important;
}

.top-mode-badge-seller {
    color: #b45a00;
    background-color: #fff4e8 !important;
}

.top-mode-select-buyer,
.top-mode-switch-buyer {
    background-color: #edf5ff;
    border-color: #9cc8ff;
    color: #0b63c9;
}

.top-mode-select-seller,
.top-mode-switch-seller {
    background-color: #fff4e8;
    border-color: #ffd1a3;
    color: #b45a00;
}

.newsbar-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.newsbar-item {
    border-radius: 8px;
    border: 1px solid transparent;
    padding: 10px 14px;
    font-size: 0.95rem;
}

.newsbar-title {
    font-weight: 700;
    margin-right: 6px;
}

.newsbar-info {
    background: #edf5ff;
    border-color: #d0e4ff;
    color: #0b63c9;
}

.newsbar-success {
    background: #e9fff6;
    border-color: #c7f5e2;
    color: #0f7a54;
}

.newsbar-warning {
    background: #fff5e8;
    border-color: #ffe0b8;
    color: #b45a00;
}

.newsbar-danger {
    background: #fff1f2;
    border-color: #ffd6dc;
    color: #c0263d;
}

/* =========================
   Auth (Login/Register)
   ========================= */
.auth-shell {
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 14px;
    position: relative;
}

.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 15% 10%, rgba(26, 179, 148, 0.18), rgba(26, 179, 148, 0) 55%),
        radial-gradient(1000px 600px at 85% 25%, rgba(28, 132, 198, 0.16), rgba(28, 132, 198, 0) 55%),
        radial-gradient(900px 500px at 60% 100%, rgba(248, 172, 89, 0.10), rgba(248, 172, 89, 0) 60%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: min(980px, 100%);
    border-radius: 22px;
    overflow: hidden;
    background: var(--ins-secondary-bg);
    border: 1px solid var(--ins-border-color);
    box-shadow: 0 22px 60px rgba(17, 24, 39, 0.12);
}

.auth-split {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 520px;
}

.auth-hero {
    padding: 42px 42px 34px;
    background:
        linear-gradient(135deg, rgba(26, 179, 148, 0.18), rgba(28, 132, 198, 0.12)),
        radial-gradient(700px 380px at 25% 15%, rgba(26, 179, 148, 0.25), rgba(26, 179, 148, 0) 60%),
        radial-gradient(700px 380px at 75% 85%, rgba(28, 132, 198, 0.22), rgba(28, 132, 198, 0) 60%);
    border-right: 1px solid var(--ins-border-color);
}

.auth-hero .auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-hero .auth-logo img {
    height: 34px;
}

.auth-hero h2 {
    margin-top: 18px;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.auth-hero p {
    color: var(--ins-secondary-color);
    margin-bottom: 22px;
}

.auth-points {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.auth-point {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(231, 233, 235, 0.9);
}

html[data-bs-theme=dark] .auth-point {
    background: rgba(30, 31, 39, 0.65);
    border-color: rgba(41, 48, 54, 0.9);
}

.auth-point i {
    margin-top: 1px;
    color: var(--ins-primary);
    font-size: 18px;
}

.auth-point .t {
    font-weight: 700;
    line-height: 1.2;
}

.auth-point .d {
    color: var(--ins-secondary-color);
    font-size: 0.9rem;
    margin-top: 2px;
}

.auth-form {
    padding: 42px 42px 34px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form .form-label {
    font-weight: 700;
}

.auth-form .input-group-text {
    background: var(--ins-light);
}

.auth-form .btn-primary {
    padding: 10px 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.auth-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.auth-flash-stack {
    position: fixed;
    z-index: 1100;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 28px));
    pointer-events: none;
}

.auth-flash {
    pointer-events: auto;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(231, 233, 235, 0.8);
    margin: 0 0 10px 0;
    padding: 10px 14px;
}

@media (max-width: 991.98px) {
    .auth-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .auth-hero {
        border-right: 0;
        border-bottom: 1px solid var(--ins-border-color);
        padding: 26px 24px 22px;
    }
    .auth-form {
        padding: 26px 24px 22px;
    }
}

