/*
|--------------------------------------------------------------------------
| JOELSTORE - DASHBOARD CSS
|--------------------------------------------------------------------------
| Dashboard
| Wallet
| Profile
| Transaction
| Statistics
|--------------------------------------------------------------------------
*/


/* ==========================================================================
   DASHBOARD WRAPPER
========================================================================== */

.dashboard-page {
    padding: 28px 0 60px;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.dashboard-title h1 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 25px;
    font-weight: 850;
}

.dashboard-title p {
    margin: 0;
    color: #929499;
    font-size: 13px;
}


/* ==========================================================================
   USER HEADER
========================================================================== */

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #ff7415,
        #ff9a45
    );

    color: #fff;
    font-size: 18px;
    font-weight: 850;

    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.user-info small {
    color: #8d8f93;
    font-size: 11px;
}


/* ==========================================================================
   STATISTICS
========================================================================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    position: relative;

    min-width: 0;
    padding: 18px;

    background: #202124;
    border: 1px solid #303134;
    border-radius: 14px;

    overflow: hidden;

    transition:
        transform .2s ease,
        border-color .2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #44464a;
}

.stat-card::after {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    right: -35px;
    bottom: -40px;

    border-radius: 50%;

    background: rgba(255,116,21,.07);
}

.stat-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 9px;

    background: #2c2d30;

    color: #ff7415;

    font-size: 17px;
}

.stat-card small {
    display: block;

    color: #8d8f93;

    font-size: 11px;
}

.stat-card strong {
    display: block;

    margin-top: 5px;

    color: #fff;

    font-size: 21px;
    font-weight: 850;
}

.stat-card .positive {
    color: #5fe58b;
}

.stat-card .negative {
    color: #ff7070;
}


/* ==========================================================================
   BALANCE CARD
========================================================================== */

.balance-card {
    position: relative;

    padding: 23px;

    background:
        linear-gradient(
            135deg,
            #292a2d,
            #1f2022
        );

    border: 1px solid #393a3e;
    border-radius: 16px;

    overflow: hidden;
}

.balance-card::after {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    right: -70px;
    top: -85px;

    border-radius: 50%;

    background: rgba(255,116,21,.08);
}

.balance-label {
    position: relative;
    z-index: 1;

    color: #999b9f;
    font-size: 12px;
}

.balance-amount {
    position: relative;
    z-index: 1;

    margin: 8px 0 17px;

    color: #fff;

    font-size: 30px;
    font-weight: 900;
}

.balance-actions {
    position: relative;
    z-index: 2;

    display: flex;
    gap: 8px;
}

.balance-actions a,
.balance-actions button {
    min-height: 37px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 14px;

    border-radius: 8px;

    font-size: 11px;
    font-weight: 800;

    text-decoration: none;

    cursor: pointer;
}

.balance-primary {
    background: #ff7415;
    color: #fff;

    border: 1px solid #ff7415;
}

.balance-secondary {
    background: #2d2e31;
    color: #ddd;

    border: 1px solid #3a3b3e;
}


/* ==========================================================================
   DASHBOARD GRID
========================================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    gap: 18px;
}

.dashboard-column {
    min-width: 0;
}


/* ==========================================================================
   PANEL
========================================================================== */

.dashboard-panel {
    margin-bottom: 18px;

    background: #202124;

    border: 1px solid #303134;
    border-radius: 14px;

    overflow: hidden;
}

.dashboard-panel-header {
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 0 17px;

    border-bottom: 1px solid #303134;
}

.dashboard-panel-header h2 {
    margin: 0;

    color: #fff;

    font-size: 15px;
    font-weight: 850;
}

.dashboard-panel-header a {
    color: #ff7415;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;
}

.dashboard-panel-body {
    padding: 17px;
}


/* ==========================================================================
   TRANSACTION LIST
========================================================================== */

.transaction-list {
    display: flex;
    flex-direction: column;
}

.transaction-item {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 13px 0;

    border-bottom: 1px solid #2d2e30;
}

.transaction-item:last-child {
    border-bottom: 0;
}

.transaction-icon {
    width: 39px;
    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #2c2d30;

    color: #ff7415;

    font-size: 16px;
}

.transaction-info {
    min-width: 0;
    flex: 1;
}

.transaction-info strong {
    display: block;

    overflow: hidden;

    color: #eee;

    font-size: 12px;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.transaction-info small {
    display: block;

    margin-top: 3px;

    color: #7e8085;

    font-size: 10px;
}

.transaction-amount {
    flex-shrink: 0;

    text-align: right;
}

.transaction-amount strong {
    display: block;

    color: #fff;

    font-size: 12px;
}

.transaction-amount small {
    display: inline-block;

    margin-top: 4px;

    padding: 3px 7px;

    border-radius: 5px;

    font-size: 9px;
    font-weight: 700;

    background: #2c2d30;
    color: #aaa;
}

.transaction-amount small.success {
    background: rgba(55,180,95,.12);
    color: #5fe58b;
}

.transaction-amount small.pending {
    background: rgba(255,188,65,.12);
    color: #ffbf55;
}

.transaction-amount small.failed {
    background: rgba(255,75,75,.12);
    color: #ff7070;
}


/* ==========================================================================
   ORDER CARD
========================================================================== */

.order-card {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 14px;

    background: #252629;

    border: 1px solid #323336;
    border-radius: 10px;
}

.order-thumb {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: #303134;

    color: #fff;

    font-size: 21px;
}

.order-info {
    min-width: 0;
    flex: 1;
}

.order-info strong {
    display: block;

    color: #fff;

    font-size: 12px;
}

.order-info small {
    display: block;

    margin-top: 4px;

    color: #888a8e;

    font-size: 10px;
}

.order-status {
    flex-shrink: 0;

    padding: 5px 8px;

    border-radius: 6px;

    background: #2f3033;

    color: #aaa;

    font-size: 9px;
    font-weight: 800;
}

.order-status.success {
    color: #5fe58b;
    background: rgba(55,180,95,.11);
}

.order-status.processing {
    color: #ffbd52;
    background: rgba(255,189,82,.11);
}

.order-status.failed {
    color: #ff7070;
    background: rgba(255,80,80,.11);
}


/* ==========================================================================
   PROFILE
========================================================================== */

.profile-card {
    padding: 20px;

    background: #202124;

    border: 1px solid #303134;
    border-radius: 14px;
}

.profile-header {
    display: flex;
    align-items: center;

    gap: 14px;

    padding-bottom: 18px;
    margin-bottom: 18px;

    border-bottom: 1px solid #303134;
}

.profile-avatar {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        #ff7415,
        #ff9a45
    );

    color: #fff;

    font-size: 25px;
    font-weight: 900;

    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.profile-name strong {
    display: block;

    color: #fff;

    font-size: 17px;
}

.profile-name small {
    display: block;

    margin-top: 5px;

    color: #898b8f;

    font-size: 11px;
}

.profile-data {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.profile-data-item {
    padding: 13px;

    background: #28292c;

    border: 1px solid #323336;
    border-radius: 9px;
}

.profile-data-item small {
    display: block;

    margin-bottom: 5px;

    color: #818389;

    font-size: 10px;
}

.profile-data-item strong {
    color: #eee;

    font-size: 12px;
}


/* ==========================================================================
   WALLET
========================================================================== */

.wallet-page {
    padding: 28px 0 60px;
}

.wallet-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 18px;
}

.wallet-history {
    grid-column: 1 / -1;
}

.wallet-methods {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}

.wallet-method {
    min-height: 70px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 12px;

    background: #28292c;

    border: 1px solid #343538;
    border-radius: 10px;

    color: #fff;

    cursor: pointer;

    transition:
        border-color .2s ease,
        background .2s ease;
}

.wallet-method:hover,
.wallet-method.active {
    background: #2d2e30;
    border-color: #ff7415;
}

.wallet-method-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: #343539;

    color: #ff7415;

    font-size: 17px;
}

.wallet-method strong {
    display: block;
    font-size: 11px;
}

.wallet-method small {
    color: #888a8e;
    font-size: 9px;
}


/* ==========================================================================
   ACTIVITY
========================================================================== */

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;

    gap: 11px;

    padding: 12px 0;

    border-bottom: 1px solid #2e2f31;
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-dot {
    width: 9px;
    height: 9px;

    margin-top: 5px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #ff7415;

    box-shadow:
        0 0 0 4px rgba(255,116,21,.08);
}

.activity-content {
    min-width: 0;
}

.activity-content strong {
    display: block;

    color: #ddd;

    font-size: 11px;
}

.activity-content small {
    display: block;

    margin-top: 4px;

    color: #77797d;

    font-size: 9px;
}


/* ==========================================================================
   EMPTY STATE
========================================================================== */

.empty-state {
    padding: 35px 15px;

    text-align: center;

    color: #77797d;
}

.empty-state-icon {
    margin-bottom: 10px;

    font-size: 30px;

    opacity: .55;
}

.empty-state strong {
    display: block;

    color: #aaa;

    font-size: 13px;
}

.empty-state p {
    margin: 6px 0 0;

    font-size: 11px;
}


/* ==========================================================================
   PAGINATION
========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin-top: 20px;
}

.pagination a,
.pagination span {
    min-width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    border: 1px solid #333438;
    border-radius: 7px;

    background: #252629;

    color: #bbb;

    font-size: 11px;
    text-decoration: none;
}

.pagination a:hover,
.pagination .active {
    background: #ff7415;
    border-color: #ff7415;

    color: #fff;
}


/* ==========================================================================
   RESPONSIVE
========================================================================== */

@media (max-width: 900px) {

    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .wallet-grid {
        grid-template-columns: 1fr;
    }

    .wallet-history {
        grid-column: auto;
    }

}

@media (max-width: 600px) {

    .dashboard-page,
    .wallet-page {
        padding-top: 18px;
    }

    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .dashboard-title h1 {
        font-size: 21px;
    }

    .dashboard-title p {
        font-size: 11px;
    }

    .dashboard-stats {
        gap: 8px;
    }

    .stat-card {
        padding: 13px;
        border-radius: 11px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 8px;
        font-size: 14px;
    }

    .stat-card strong {
        font-size: 17px;
    }

    .stat-card small {
        font-size: 9px;
    }

    .balance-card {
        padding: 18px;
    }

    .balance-amount {
        font-size: 25px;
    }

    .dashboard-panel-header {
        min-height: 50px;
        padding: 0 13px;
    }

    .dashboard-panel-body {
        padding: 13px;
    }

    .transaction-item {
        gap: 8px;
    }

    .transaction-icon {
        width: 34px;
        height: 34px;
    }

    .transaction-amount strong {
        font-size: 10px;
    }

    .transaction-info strong {
        font-size: 11px;
    }

    .profile-data {
        grid-template-columns: 1fr;
    }

    .profile-avatar {
        width: 58px;
        height: 58px;
        font-size: 20px;
    }

    .wallet-methods {
        grid-template-columns: 1fr;
    }

}