.nexa-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nexa-dashboard-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.nexa-kpi-card {
    background: white;
    border: 1px solid var(--nexa-border);
    border-radius: 18px;
    padding: 20px;
    transition: 0.18s;
    box-shadow: var(--nexa-shadow-sm);
}

.nexa-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--nexa-shadow-md);
}

.nexa-kpi-caption {
    color: var(--nexa-text-muted);
    font-size: 0.82rem;
}

.nexa-kpi-value {
    margin-top: 12px;
    font-size: 1.6rem;
    font-weight: 900;
    direction: ltr;
}

.nexa-kpi-positive {
    color: var(--nexa-success);
}

.nexa-kpi-negative {
    color: var(--nexa-danger);
}

.nexa-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.nexa-buy-card {
    background: #edf9f2;
    border: 2px solid #2a9b54;
}

.nexa-sell-card {
    background: #fff4f4;
    border: 2px solid #d64141;
}

.nexa-order-card {
    border-radius: 18px;
    overflow: hidden;
}

.nexa-order-header {
    padding: 16px 20px;
    font-size: 1.05rem;
    font-weight: 800;
    border-bottom: 1px solid var(--nexa-border);
}

.nexa-buy-header {
    color: #16733d;
    background: #eaf8ef;
}

.nexa-sell-header {
    color: #b52222;
    background: #fff0f0;
}

.nexa-order-body {
    padding: 22px;
}

.nexa-order-total {
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nexa-order-total-title {
    color: var(--nexa-text-muted);
}

.nexa-order-total-value {
    font-size: 1.3rem;
    font-weight: 900;
    direction: ltr;
}

.nexa-balance-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.nexa-balance-card {
    background: white;
    border: 1px solid var(--nexa-border);
    border-radius: 18px;
    padding: 22px;
}

.nexa-balance-title {
    color: var(--nexa-text-muted);
    margin-bottom: 10px;
}

.nexa-balance-value {
    font-size: 1.45rem;
    font-weight: 900;
    direction: ltr;
}

.nexa-tabs {
    margin-top: 10px;
}

.nexa-dashboard-section {
    margin-top: 12px;
}

.nexa-dashboard-title {
    margin-bottom: 18px;
    font-size: 1.2rem;
    font-weight: 800;
}

.nexa-activity-card {
    background: white;
    border-radius: 18px;
    border: 1px solid var(--nexa-border);
    padding: 18px;
}

.nexa-activity-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #efefef;
}

.nexa-activity-row:last-child {
    border: none;
}

.nexa-activity-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf4df;
    color: #b98912;
    font-size: 20px;
}

.nexa-activity-title {
    font-weight: 700;
}

.nexa-activity-time {
    font-size: 0.78rem;
    color: var(--nexa-text-muted);
}

.nexa-dashboard-empty {
    min-height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--nexa-text-muted);
    border: 2px dashed var(--nexa-border);
    border-radius: 16px;
}

@media (max-width: 1400px) {
    .nexa-dashboard-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1000px) {
    .nexa-price-row {
        grid-template-columns: 1fr;
    }

    .nexa-balance-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .nexa-dashboard-top {
        grid-template-columns: 1fr;
    }
}

.nexa-price-ticker {
    overflow: visible;
}

.nexa-price-ticker-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--nexa-space-4);
}

.nexa-price-ticker-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--nexa-space-4);
    min-height: 116px;
    padding: var(--nexa-space-4);
    overflow: hidden;
    background: var(--nexa-surface-secondary);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-md);
    transition:
        transform var(--nexa-transition-normal),
        box-shadow var(--nexa-transition-normal),
        border-color var(--nexa-transition-normal);
}

.nexa-price-ticker-item::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 5px;
}

.nexa-price-ticker-item:hover {
    border-color: var(--nexa-border-strong);
    box-shadow: var(--nexa-shadow-sm);
    transform: translateY(-2px);
}

.nexa-price-ticker-buy {
    background: linear-gradient(135deg, var(--nexa-success-soft), var(--nexa-surface));
}

.nexa-price-ticker-buy::before {
    background: var(--nexa-success);
}

.nexa-price-ticker-sell {
    background: linear-gradient(135deg, var(--nexa-danger-soft), var(--nexa-surface));
}

.nexa-price-ticker-sell::before {
    background: var(--nexa-danger);
}

.nexa-price-ticker-update {
    background: linear-gradient(135deg, var(--nexa-info-soft), var(--nexa-surface));
}

.nexa-price-ticker-update::before {
    background: var(--nexa-info);
}

.nexa-price-ticker-spread {
    background: linear-gradient(135deg, var(--nexa-primary-soft), var(--nexa-surface));
}

.nexa-price-ticker-spread::before {
    background: var(--nexa-primary);
}

.nexa-price-ticker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: var(--nexa-text-secondary);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--nexa-radius-md);
    box-shadow: var(--nexa-shadow-xs);
    font-size: 1.25rem;
}

.nexa-price-ticker-buy .nexa-price-ticker-icon {
    color: var(--nexa-success);
}

.nexa-price-ticker-sell .nexa-price-ticker-icon {
    color: var(--nexa-danger);
}

.nexa-price-ticker-update .nexa-price-ticker-icon {
    color: var(--nexa-info);
}

.nexa-price-ticker-spread .nexa-price-ticker-icon {
    color: var(--nexa-primary);
}

.nexa-price-ticker-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.nexa-price-ticker-label {
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
    font-weight: 700;
}

.nexa-price-ticker-value {
    direction: ltr;
    margin-top: var(--nexa-space-1);
    color: var(--nexa-text);
    font-size: clamp(1.2rem, 1.7vw, 1.65rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.nexa-price-ticker-date {
    direction: ltr;
    margin-top: var(--nexa-space-1);
    color: var(--nexa-text);
    font-size: var(--nexa-font-lg);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
}

.nexa-price-ticker-unit,
.nexa-price-ticker-time {
    direction: ltr;
    margin-top: 2px;
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
    font-variant-numeric: tabular-nums;
}

.nexa-spin-icon {
    display: inline-block;
    animation: nexa-spin 0.8s linear infinite;
}

@media (max-width: 1280px) {
    .nexa-price-ticker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .nexa-price-ticker-grid {
        grid-template-columns: 1fr;
    }

    .nexa-price-ticker-item {
        min-height: 96px;
    }
}

.nexa-balance-card {
    position: relative;
    overflow: hidden;
}

.nexa-balance-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--nexa-primary);
}

.nexa-balance-footer {
    margin-top: 14px;
    color: var(--nexa-text-muted);
    font-size: 0.78rem;
}

.nexa-balance-value {
    font-size: 1.9rem;
    font-weight: 900;
}

.nexa-trading-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--nexa-space-5);
}

.nexa-trading-card {
    overflow: hidden;
}

.nexa-trading-card-buy {
    border-top: 4px solid var(--nexa-success);
}

.nexa-trading-card-sell {
    border-top: 4px solid var(--nexa-danger);
}

.nexa-trading-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexa-space-4);
    min-height: 104px;
    padding: var(--nexa-space-5);
    border-bottom: 1px solid var(--nexa-border);
}

.nexa-trading-card-buy .nexa-trading-card-header {
    background: linear-gradient(135deg, var(--nexa-success-soft), var(--nexa-surface));
}

.nexa-trading-card-sell .nexa-trading-card-header {
    background: linear-gradient(135deg, var(--nexa-danger-soft), var(--nexa-surface));
}

.nexa-trading-card-heading {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-3);
    min-width: 0;
}

.nexa-trading-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: #fff;
    border-radius: var(--nexa-radius-md);
    box-shadow: var(--nexa-shadow-sm);
    font-size: 1.25rem;
}

.nexa-trading-card-buy .nexa-trading-card-icon {
    background: var(--nexa-success);
}

.nexa-trading-card-sell .nexa-trading-card-icon {
    background: var(--nexa-danger);
}

.nexa-trading-card-title {
    margin: 0;
    font-size: var(--nexa-font-xl);
    font-weight: 800;
}

.nexa-trading-card-subtitle {
    margin: 2px 0 0;
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
}

.nexa-trading-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex: 0 0 auto;
}

.nexa-trading-price span {
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
    font-weight: 700;
}

.nexa-trading-price strong {
    direction: ltr;
    margin-top: 2px;
    color: var(--nexa-text);
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.nexa-trading-price small {
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
}

.nexa-trading-card-body {
    padding: var(--nexa-space-5);
}

.nexa-trading-loading {
    min-height: 260px;
}

.nexa-trading-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--nexa-space-4);
    min-height: 260px;
    padding: var(--nexa-space-6);
    color: var(--nexa-warning);
    background: var(--nexa-warning-soft);
    border: 1px dashed #e8bc62;
    border-radius: var(--nexa-radius-md);
}

.nexa-trading-unavailable > i {
    flex: 0 0 auto;
    font-size: 2rem;
}

.nexa-trading-unavailable div {
    display: flex;
    flex-direction: column;
    gap: var(--nexa-space-1);
}

.nexa-trading-unavailable strong {
    color: #845300;
    font-size: var(--nexa-font-md);
}

.nexa-trading-unavailable span {
    color: #9a701e;
    font-size: var(--nexa-font-sm);
}

@media (max-width: 1100px) {
    .nexa-trading-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nexa-trading-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .nexa-trading-price {
        align-items: flex-start;
        width: 100%;
        padding-top: var(--nexa-space-3);
        border-top: 1px solid var(--nexa-border);
    }
}

.nexa-market-order-form {
    display: flex;
    flex-direction: column;
    gap: var(--nexa-space-4);
}

.nexa-market-order-form .nexa-form-grid {
    align-items: start;
}

.nexa-order-preview > div {
    display: flex;
    flex-direction: column;
}

.nexa-order-preview small {
    margin-top: 2px;
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
}

.nexa-order-form-error {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-2);
    padding: var(--nexa-space-3);
    color: #a12222;
    background: var(--nexa-danger-soft);
    border: 1px solid #efbebe;
    border-radius: var(--nexa-radius-sm);
    font-size: var(--nexa-font-sm);
    font-weight: 700;
}

.nexa-order-form-error i {
    flex: 0 0 auto;
    color: var(--nexa-danger);
    font-size: 1.05rem;
}

.nexa-order-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--nexa-space-2);
    width: 100%;
    min-height: 48px;
    padding: 10px 18px;
    color: #fff;
    border: 0;
    border-radius: var(--nexa-radius-md);
    box-shadow: var(--nexa-shadow-sm);
    font-family: var(--nexa-font-family);
    font-size: var(--nexa-font-md);
    font-weight: 800;
    cursor: pointer;
    transition:
        background-color var(--nexa-transition-fast),
        box-shadow var(--nexa-transition-fast),
        transform var(--nexa-transition-fast),
        opacity var(--nexa-transition-fast);
}

.nexa-order-submit:hover:not(:disabled) {
    box-shadow: var(--nexa-shadow-md);
    transform: translateY(-1px);
}

.nexa-order-submit:active:not(:disabled) {
    transform: translateY(0);
}

.nexa-order-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.nexa-order-submit-buy {
    background: var(--nexa-success);
}

.nexa-order-submit-buy:hover:not(:disabled) {
    background: var(--nexa-success-hover);
}

.nexa-order-submit-sell {
    background: var(--nexa-danger);
}

.nexa-order-submit-sell:hover:not(:disabled) {
    background: var(--nexa-danger-hover);
}

.nexa-order-button-spinner {
    width: 19px;
    height: 19px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nexa-spin 0.75s linear infinite;
}

.nexa-dashboard-page {
    width: 100%;
}

.nexa-dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: var(--nexa-space-4);
}

.nexa-dashboard-kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--nexa-space-4);
    min-height: 112px;
    padding: var(--nexa-space-4);
    overflow: hidden;
    background: var(--nexa-surface);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-lg);
    box-shadow: var(--nexa-shadow-sm);
    transition:
        transform var(--nexa-transition-normal),
        box-shadow var(--nexa-transition-normal);
}

.nexa-dashboard-kpi-card::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 5px;
    background: var(--nexa-primary);
}

.nexa-dashboard-kpi-card:hover {
    box-shadow: var(--nexa-shadow-md);
    transform: translateY(-2px);
}

.nexa-dashboard-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    color: var(--nexa-primary);
    background: var(--nexa-primary-soft);
    border-radius: var(--nexa-radius-md);
    font-size: 1.25rem;
}

.nexa-dashboard-kpi-card > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.nexa-dashboard-kpi-card span {
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
    font-weight: 700;
}

.nexa-dashboard-kpi-card strong {
    direction: ltr;
    margin-top: 2px;
    color: var(--nexa-text);
    font-size: clamp(1.15rem, 1.5vw, 1.5rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.nexa-dashboard-kpi-card small {
    color: var(--nexa-text-muted);
    font-size: var(--nexa-font-xs);
}

.nexa-dashboard-kpi-gold::before {
    background: var(--nexa-primary);
}

.nexa-dashboard-kpi-cash::before {
    background: var(--nexa-info);
}

.nexa-dashboard-kpi-order::before {
    background: var(--nexa-success);
}

.nexa-dashboard-kpi-supply::before {
    background: var(--nexa-warning);
}

.nexa-dashboard-kpi-delivery::before {
    background: #7c3aed;
}

.nexa-dashboard-kpi-cash .nexa-dashboard-kpi-icon {
    color: var(--nexa-info);
    background: var(--nexa-info-soft);
}

.nexa-dashboard-kpi-order .nexa-dashboard-kpi-icon {
    color: var(--nexa-success);
    background: var(--nexa-success-soft);
}

.nexa-dashboard-kpi-supply .nexa-dashboard-kpi-icon {
    color: var(--nexa-warning);
    background: var(--nexa-warning-soft);
}

.nexa-dashboard-kpi-delivery .nexa-dashboard-kpi-icon {
    color: #7c3aed;
    background: #f1ebff;
}

.nexa-dashboard-error {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-4);
    padding: var(--nexa-space-4);
    color: #a12222;
    background: var(--nexa-danger-soft);
    border: 1px solid #efbebe;
    border-radius: var(--nexa-radius-lg);
}

.nexa-dashboard-error > i {
    flex: 0 0 auto;
    font-size: 1.8rem;
}

.nexa-dashboard-error > div {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.nexa-dashboard-error span {
    color: #a74a4a;
    font-size: var(--nexa-font-sm);
}

.nexa-dashboard-initial-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--nexa-space-4);
    min-height: 320px;
}

.nexa-dashboard-tabs-header {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-2);
    padding: var(--nexa-space-3);
    overflow-x: auto;
    background: var(--nexa-surface-secondary);
    border-bottom: 1px solid var(--nexa-border);
}

.nexa-dashboard-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--nexa-space-2);
    min-width: 130px;
    min-height: 43px;
    padding: 7px 14px;
    color: var(--nexa-text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--nexa-radius-sm);
    font-family: var(--nexa-font-family);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition:
        color var(--nexa-transition-fast),
        background-color var(--nexa-transition-fast),
        border-color var(--nexa-transition-fast);
}

.nexa-dashboard-tab:hover {
    color: var(--nexa-text);
    background: var(--nexa-surface);
    border-color: var(--nexa-border);
}

.nexa-dashboard-tab.active {
    color: #72550a;
    background: var(--nexa-primary-soft);
    border-color: var(--nexa-primary-border);
}

.nexa-dashboard-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: var(--nexa-radius-round);
    font-size: var(--nexa-font-xs);
}

.nexa-dashboard-tabs-body {
    min-height: 260px;
    padding: var(--nexa-space-4);
}

@media (max-width: 1400px) {
    .nexa-dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 850px) {
    .nexa-dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .nexa-dashboard-error {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .nexa-dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.nexa-dashboard-tabs {
    overflow: hidden;
}

.nexa-dashboard-tabs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--nexa-space-5);
    padding: var(--nexa-space-5);
    border-bottom: 1px solid var(--nexa-border);
}

.nexa-dashboard-tabs-buttons {
    display: flex;
    align-items: center;
    gap: var(--nexa-space-2);
    flex-wrap: wrap;
}

.nexa-dashboard-tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--nexa-space-2);
    min-height: 40px;
    padding: 7px 14px;
    color: var(--nexa-text-secondary);
    background: var(--nexa-surface-secondary);
    border: 1px solid var(--nexa-border);
    border-radius: var(--nexa-radius-round);
    font-family: var(--nexa-font-family);
    font-weight: 700;
    cursor: pointer;
    transition:
        color var(--nexa-transition-fast),
        background-color var(--nexa-transition-fast),
        border-color var(--nexa-transition-fast),
        box-shadow var(--nexa-transition-fast),
        transform var(--nexa-transition-fast);
}

.nexa-dashboard-tab-button:hover {
    color: var(--nexa-text);
    background: var(--nexa-primary-soft);
    border-color: var(--nexa-primary-border);
    transform: translateY(-1px);
}

.nexa-dashboard-tab-button.active {
    color: #fff;
    background: var(--nexa-primary);
    border-color: var(--nexa-primary);
    box-shadow: 0 6px 16px rgba(184, 138, 22, 0.22);
}

.nexa-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    color: var(--nexa-text-secondary);
    background: rgba(0, 0, 0, 0.06);
    border-radius: var(--nexa-radius-round);
    font-size: var(--nexa-font-xs);
    font-weight: 900;
}

.nexa-dashboard-tab-button.active .nexa-tab-count {
    color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

.nexa-dashboard-tabs-body {
    min-height: 280px;
    padding: var(--nexa-space-5);
}

@media (max-width: 900px) {
    .nexa-dashboard-tabs-header {
        align-items: stretch;
        flex-direction: column;
    }

    .nexa-dashboard-tabs-buttons {
        width: 100%;
    }

    .nexa-dashboard-tab-button {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .nexa-dashboard-tabs-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nexa-dashboard-tab-button {
        width: 100%;
    }

    .nexa-dashboard-tabs-body {
        padding: var(--nexa-space-3);
    }
}
