@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');

:root {
    --background-color: #f7f7f7; 
    --primary-color: #002244;
    --secondary-color: #0069ff;       
    --other-colors: #B6DBFF;
    --fade-colors: #C4E500;
    --more-colors: #E6E7E8;
}

* {
    margin: 0;
    padding: 5px;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--background-color);
    color: var(--primary-color);
}

.dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    height: 100vh;
    background-color: white;
    color: white;
    width: 250px;
    line-height: 0.1px;
    display: block;
    border-radius: 20px;
    padding: 1rem;
    box-sizing: border-box;
    position: fixed;
    overflow-y: auto;
    scrollbar-width: thin;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.logo img {
    width: 7rem;
}

.sidebar_profile {
    height: 4rem;
    border-radius: 10px;
    background-color: var(--other-colors);
    display: flex;
    align-items: center;
    padding: 1rem;
    margin-bottom: 15px;
}

.sidebar_profile_icon {
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
    background-color: var(--secondary-color);
}

.sidebar_profile_details {
    line-height: 8px;
    color: var(--primary-color);
}

.sidebar_profile_details h5 {
    font-size: 1rem;
}

.sidebar_profile_details p {
    font-size: 0.8rem;
}

.navbar_title {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.sidebar ul {
    text-align: none;
    display: block;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    list-style-type: none;
    padding: 2px;
    margin: 4px;
}

.sidebar a {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;  
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: 10px;
    padding: 8px;
}

.sidebar a.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar a.active i {
    color: white;
}

.sidebar ul li a i {
    color: var(--secondary-color);
}

.sidebar a:hover {
    background-color: var(--primary-color);
    border-radius: 10px;    
    color: white;
}

header {
    display: flex;
    height: 60px;
    padding: 5px 15px;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 10px;
    margin-left: 270px;
    line-height: 0.5rem;
    position: fixed;
    z-index: 999; 
    width: calc(100% - 300px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.header_content {
    display: flex;
    align-items: center;
    gap: 5px;
}

#menu_toggle {
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    display: none;
}

header h5 {
    color: var(--primary-color);
}

header p {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 15px;
}

.header_details {
    color: white;
}

.header_details a {
    text-decoration: none;
    border-radius: 50%;
    color: white;
    background-color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    padding: 5px;
    height: 30px;
}

main {
    display: block;
    margin-left: 245px;
    margin-top: 80px;
    padding: 15px;
    width: calc(100% - 245px);
    flex: 1;
}

.first_container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.balance_container {
    position: relative;
    background: white;
    border-radius: 10px;
    height: 15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.balance_content {
    display: flex;
    flex-direction: column;
    z-index: 2;
    flex: 1;
}

.balance_illustration {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 1;
}

.balance_illustration img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.balance_icon {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    color: #7f7f7f;
}

.balance_icon i {
    cursor: pointer;
    font-size: 18px;
    margin-top: 6px;
    transition: color 0.3s ease;
}

.balance_icon i:hover {
    color: var(--secondary-color);
}

.balance_amount {
    font-size: 36px;
    color: black;
    font-weight: bolder;
    margin-top: 0;
    margin-bottom: 15px;
    transition: opacity 0.3s ease;
}

.balance_amount.hidden {
    opacity: 0.5;
}

.balance_btn {
    gap: 0.6rem;
    display: flex;
}

.balance_btn a {
    background-color: var(--secondary-color);
    text-decoration: none;
    padding: 10px 30px;
    height: 2rem;
    font-size: 14px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.balance_btn a:hover {
    background-color: var(--primary-color);
}

.services_container {
    padding: 15px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.services_container h5 {    
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 10px;
}

.services_list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.services_list a {
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px;
    height: auto;
}

.services_list a i {
    font-size: 1rem;
    color: white;
    display: inline-flex;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

.services_list a i:hover {
    background-color: var(--primary-color);
}

.services_list a p {
    font-weight: 500;
    font-size: 14px;
    color: var(--primary-color);
    margin-top: 8px;
}

.trnx_container {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    margin-top: 15px;
}

.trnx_head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trnx_head h5 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
}

.trnx_head .trnx_view_all {
    text-decoration: none;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 13px;
    border-radius: 6px;
    background-color: var(--secondary-color);
    color: white;
    transition: background-color 0.3s ease;
}

.trnx_head .trnx_view_all:hover {
    background-color: var(--primary-color);
}

.trnx_wrapper {
    overflow-x: auto;
    border-radius: 6px;
    background-color: white;
}

.transaction-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--primary-color);
    font-size: 13px;
}

.transaction-table thead {
    background: var(--secondary-color);
    color: white;
}

.transaction-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-table th:first-child {
    border-top-left-radius: 6px;
}

.transaction-table th:last-child {
    border-top-right-radius: 6px;
}

.transaction-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--more-colors);
    font-size: 13px;
}

.transaction-table tbody tr {
    background: white;
    transition: background 0.2s ease;
}

.transaction-table tbody tr:hover {
    background: var(--other-colors);
}

.transaction-table tbody tr:last-child td {
    border-bottom: none;
}

.status {
    display: inline-block;
    padding: 5px 10px;
    font-weight: 500;
    font-size: 11px;
    border-radius: 10px;
    text-align: center;
    min-width: 70px;
}

.status.success {
    background: #e6ffed;
    color: #155724;
}

.status.pending {
    background: #fff7e0;
    color: #856404;
}

.status.failed {
    background: #ffe6e8;
    color: #721c24;
}

.mobile_footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    padding: 5px 0;
    min-height: 50px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.mobile_footer nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.mobile_footer a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 5px;
    font-weight: 400;
    padding: 8px 10px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.mobile_footer a i {
    font-size: 10px;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.mobile_footer a.active {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
}

.mobile_footer a.active i {
    color: white;
}

@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    header {
        margin-left: 220px;
        width: calc(100% - 220px);
    }

    main {
        margin-left: 220px;
        width: calc(100% - 220px);
        padding: 12px;
    }

    .first_container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .balance_container {
        height: auto;
        min-height: 12rem;
        padding: 12px;
    }

    .balance_illustration {
        width: 100px;
    }

    .balance_amount {
        font-size: 30px;
    }

    .services_container {
        height: auto;
        min-height: 12rem;
        padding: 12px;
    }

    .services_list {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .services_list a {
        padding: 6px;
    }

    .services_list a i {
        font-size: 0.9rem;
        padding: 10px;
    }

    .services_list a p {
        font-size: 13px;
    }

    .trnx_container {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 240px;
        height: 100%;
        border-right: 1px solid #ececec;
        box-shadow: 1px 0 10px rgba(0,0,0,0.2);
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        padding: 0.8rem;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    #menu_toggle {
        display: block;
    }

    header {
        margin-left: 0;
        width: 100%;
        padding: 8px 12px;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;
        box-sizing: border-box;
    }

    .header_details a:not(:last-child) {
        display: none;
    }

    header p {
        font-size: 12px;
    }

    main {
        margin-left: 0;
        width: 100%;
        margin-top: 70px;
        padding: 10px;
        padding-bottom: 60px;
    }

    .first_container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .balance_container {
        padding: 10px;
        min-height: 10rem;
    }

    .balance_icon {
        margin-bottom: 0;
    } 

    .balance_illustration {
        width: 80px;
        right: 8px;
    }

    .balance_amount {
        font-size: 24px;
        margin-bottom: 0;
    }

    .balance_btn a {
        padding: 6px 16px;
        font-size: 13px;
    }

    .services_container {
        padding: 10px;
    }

    .services_list {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .services_list a {
        padding: 5px;
    }

    .services_list a i {
        font-size: 1.2rem;
        padding: 10px;
    }

    .services_list a p {
        font-size: 12px;
    }

    .trnx_container {
        padding: 10px;
    }

    .trnx_head h5 {
        font-size: 14px;
    }

    .trnx_head .trnx_view_all {
        padding: 5px 10px;
        font-size: 12px;
    }

    .transaction-table {
        min-width: 500px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .status {
        font-size: 10px;
        padding: 4px 8px;
        min-width: 60px;
    }

    .mobile_footer {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
        z-index: 1001;
        padding: 2px 4px;
        min-height: 50px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .mobile_footer nav {
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 6px;
    }

    .mobile_footer nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        text-decoration: none;
        font-size: 10px;
        transition: all 0.3s ease;
        padding: 4px 0;
        line-height: 1;
    }

    .mobile_footer nav a i {
        font-size: 18px;
        margin-bottom: 1px;
        color: var(--secondary-color);
        transition: color 0.3s ease;
    }

    .mobile_footer nav a.active i,
    .mobile_footer nav a:hover i {
        color: var(--primary-color);
    }

    .mobile_footer nav a.active span,
    .mobile_footer nav a.active i,
    .mobile_footer nav a:hover span {
        font-weight: 600;
        color: var(--other-colors);
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 90%;
        max-width: 220px;
        padding: 0.6rem;
    }

    header {
        padding: 6px 10px;
    }

    header h5 {
        font-size: 14px;
    }

    header p {
        font-size: 10px;
    }

    main {
        margin-top: 60px;
        padding: 8px;
        padding-bottom: 55px;
    }

    .first_container {
        gap: 8px;
    }

    .balance_container {
        padding: 8px;
        min-height: 9rem;
    }

    .balance_illustration {
        width: 8rem;
        right: 6px;
    }

    .balance_amount {
        font-size: 20px;
    }

    .balance_icon p {
        font-size: 12px;
    }

    .balance_icon i {
        font-size: 16px; /* Restored to a larger size (was 6px) */
    }

    .balance_btn a {
        padding: 5px 12px;
        font-size: 12px;
    }

    .services_container {
        padding: 8px;
    }

    .services_list {
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
        line-height: 1.3;
    }

    .services_list a {
        padding: 4px;
    }

    .services_list a i {
        font-size: 1.1rem;
        padding: 8px;
    }

    .services_list a p {
        font-size: 11px;
    }

    .trnx_container {
        padding: 8px;
    }

    .trnx_head h5 {
        font-size: 13px;
    }

    .trnx_head .trnx_view_all {
        padding: 4px 8px;
        font-size: 11px;
    }

    .transaction-table {
        min-width: 400px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 6px 8px;
        font-size: 11px;
    }

    .status {
        font-size: 9px;
        padding: 3px 6px;
        min-width: 50px;
    }

    .mobile_footer {
        min-height: 45px;
    }

    .mobile_footer nav {
        padding: 5px;
    }

    .mobile_footer nav a {
        font-size: 9px;
        padding: 3px 0;
    }

    .mobile_footer nav a i {
        font-size: 16px;
        margin-bottom: 0;
    }
}

@media (max-width: 360px) {
    .sidebar {
        width: 100%;
        max-width: 200px;
    }

    header {
        padding: 5px 8px;
    }

    header h5 {
        font-size: 12px;
    }

    header p {
        font-size: 9px;
    }

    main {
        margin-top: 50px;
        padding: 6px;
        padding-bottom: 50px;
    }

    .balance_container {
        padding: 6px;
        min-height: 8rem;
    }

    .balance_illustration {
        width: 50px;
        right: 5px;
    }

    .balance_amount {
        font-size: 18px;
    }

    .balance_icon p {
        font-size: 11px;
    }

    .balance_icon i {
        font-size: 14px; /* Restored to original size (was 14px, consistent with context) */
    }

    .balance_btn a {
        padding: 4px 10px;
        font-size: 11px;
    }

    .services_container {
        padding: 6px;
    }

    .services_list {
        grid-template-columns: repeat(4, 1fr);
        gap: 3px;
    }

    .services_list a {
        padding: 3px;
    }

    .services_list a i {
        font-size: 1rem;
        padding: 7px;
    }

    .services_list a p {
        font-size: 10px;
    }

    .trnx_container {
        padding: 6px;
    }

    .trnx_head h5 {
        font-size: 12px;
    }

    .trnx_head .trnx_view_all {
        padding: 3px 6px;
        font-size: 10px;
    }

    .transaction-table {
        min-width: 360px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 5px 6px;
        font-size: 10px;
    }

    .status {
        font-size: 8px;
        padding: 2px 5px;
        min-width: 45px;
    }

    .mobile_footer {
        min-height: 40px;
    }

    .mobile_footer nav {
        padding: 4px;
    }

    .mobile_footer nav a {
        font-size: 8px;
        padding: 2px 0;
    }

    .mobile_footer nav a i {
        font-size: 14px;
        margin-bottom: 0;
    }
}