:root {
    --sidebar-bg: #002942;
    --sidebar-active: #005890;
    --sidebar-text: #fff;
    --sidebar-text-active: #ffffff;
    --bg-main: #ffffff;
    --bg-card: #fff;
    --text-dark: #282828;
    --text-gray: #4D4D4D;
    --text-gray-amount: #949494;
    --green: #138000;
    --btn-blue: #02669e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Gibson', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    justify-content: center;
    align-items: start;
    min-height: 100vh;
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1366px;
    background-color: var(--bg-main);
}

.sidebar {
    min-width: 160px;
    background-color: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 16px 8px;
}

.logo {
    font-size: 40px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
    display: inline-block;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    color: var(--sidebar-text-active);
    text-decoration: none;
    padding: 8px 16px;
    font-size: 16px;
    letter-spacing: 0.5px;
    line-height: 24px;
    transition: background-color 0.2s;
    border-radius: 12px;
}

.sidebar-nav a:hover:not(.active) {
    background-color: #1D4157;
}

.sidebar-nav a:active,
.sidebar-nav a:hover:active {
    background-color: var(--sidebar-active);
}

.sidebar-nav a.active {
    background-color: var(--sidebar-active);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 24px 160px 24px;
    max-width: 1034px;
    width: 100%;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 12px 0;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    padding: 2px;
    gap: 4px;
    background-color: rgba(118, 118, 128, 0.12);
    border-radius: 10px;
    max-width: 567px;
    width: 100%;
}

.tab {
    padding: 6px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: 0.5px;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
    max-width: 185px;
    width: 100%;
}

.tab:hover:not(.active) {
    background-color: #E0E0E2;
}

.tab.active {
    background: #fff;
    box-shadow:
        0px 3px 8px 0px rgba(0, 0, 0, 0.12),
        0px 3px 1px 0px rgba(0, 0, 0, 0.04);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.item-box {
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 52px;
    height: 40px;
    font-size: 12px;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.2s;
    line-height: 16px;
    letter-spacing: 0.4px;
    text-align: center;
}

.action-item:hover {
    color: #005890;
}

.action-item:hover:active {
    color: var(--text-gray);
}

.action-item:hover:active .item-icon {
    filter: none;
}

.action-item:hover .item-icon {
    filter: brightness(0) saturate(100%) invert(19%) sepia(94%) saturate(2716%) hue-rotate(187deg) brightness(89%) contrast(104%);
}

.action-item .user-photo {
    display: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--text-dark);
}

.action-item:active .avatar-icon {
    display: none;
}

.action-item:active .user-photo {
    display: block;
}

.content-header {
    margin-bottom: 24px;
}

.content-header h1 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 600;
    color: var(--text-dark);
}

.content-wrapper {
    display: flex;
    gap: 64px;
}

.left-panel {
    flex: 1;
    max-width: 466px;
}

.left-panel h2 {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 26px;
}

.balance-table {
    width: 100%;
    border-collapse: collapse;
}

.balance-table td {
    padding: 0 0 8px 0;
    font-size: 16px;
    letter-spacing: 0.5px;
    line-height: 24px;
    color: var(--text-dark);
}

.balance-table tr:last-child td {
    padding-bottom: 0;
}

.balance-table td.amount.bold.dark-text {
    color: var(--text-dark);
}

.balance-table td.amount {
    text-align: right;
    color: var(--text-gray-amount);
    font-weight: 500;
}

.balance-table td.amount.bold {
    color: var(--text-gray);
    letter-spacing: 0.15px;
}

.balance-table td.amount.green {
    color: var(--green);
    font-weight: 500;
    letter-spacing: -0.15px;
}

.summary-heading {
    margin: 24px 0 16px 0;
}

.right-panel {
    width: 466px;
}

.payment-card {
    background: #F5F5F5;
    border-radius: 12px;
    padding: 16px;
}

.first-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.second-row {
    display: flex;
    gap: 16px;
}

.card-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-column2 {
    flex: 1;
    display: flex;
    align-items: start;
    justify-content: end;
}

.card-label {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    font-weight: 500;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.card-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 32px;
}

.card-subtext {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.25px;
    color: var(--text-gray);
    margin-top: 4px;
}

.card-note {
    letter-spacing: 0.4px;
    font-size: 12px;
    line-height: 16px;
    color: var(--text-gray-amount);
    text-align: center;
}

.btn-primary {
    width: 188px;
    color: #fff;
    border: 0;
    border-top: 0.5px solid rgba(148, 148, 148, 0.75);
    /* #949494BF */
    box-shadow:
        0px 0px 0px 0.5px rgba(0, 0, 0, 0.05),
        /* #0000000D */
        0px 0.5px 2.5px 0px rgba(0, 0, 0, 0.30);
    /* #0000004D */
    background: linear-gradient(357.03deg, #005890 2.66%, #2A78A8 109.42%);
    border-radius: 24px;
    padding: 5.5px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 0.15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #015083;
}

.mobile-header {
    display: none;
}

/* Tablet breakpoint */
@media (max-width: 1200px) {

    .content-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .right-panel {
        order: -1;
        width: 100%;
        padding: 0 0 40px;
        max-width: 460px;
    }

    .left-panel {
        order: 0;
        max-width: 100%;
        max-width: 460px;
    }

    .tabs {
        display: flex;
        justify-content: space-between;
        max-width: 436px;
        width: 100%;
        flex-wrap: nowrap;
    }

    .tab {
        padding: 6px 0;
        max-width: 141px;
    }

    .card-note {
        text-align: left;
    }

    .second-row {
        gap: 8px;
    }

    .payment-card {
        gap: 24px;
    }

    .card-column {
        align-items: flex-start;
        text-align: left;
    }

    .card-column2-btn {
        display: flex;
        justify-content: flex-end;
        flex: none;
    }

}

/*Mobile breakpoint */
@media (max-width: 576px) {

    .sidebar {
        display: none;
    }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background-color: var(--sidebar-bg);
        padding: 9px 20px;
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .mobile-hamburger {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        color: #fff;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3px;
        width: 24px;
        height: 24px;
    }

    .mobile-hamburger span {
        display: block;
        width: 18px;
        height: 2px;
        background-color: currentColor;
        border-radius: 1px;
    }

    .mobile-logo {
        font-size: 24px;
        font-weight: 600;
        color: #fff;
        line-height: 24px;
    }

    .mobile-avatar {
        display: flex;
        align-items: center;
    }

    .mobile-avatar .avatar-icon {
        width: 20px;
        height: 20px;
        color: #fff;
        border: 2px solid white;
        border-radius: 50%;
    }

    .app-container {
        flex-direction: column;
        max-width: 100%;
        box-shadow: none;
    }

    .main-content {
        padding: 16px 16px 34px 16px;
    }

    .top-nav {
        flex-direction: column;
        margin-bottom: 0;
        padding: 0;
    }

    .user-actions {
        display: none;
    }

    .tabs {
        width: 100%;
        padding: 2px;
        gap: 2px;
    }

    .tab {
        flex: 1;
        min-width: 0;
        padding: 6px 0;
    }

    .content-header {
        margin: 24px 0;
    }

    .content-header h1 {
        font-size: 28px;
    }

    .right-panel {
        padding: 0;
    }

    .card-note {
        text-align: left;
        color: #6D6D6D;
    }

    .payment-card {
        padding: 16px;
        gap: 16px;
    }

    .btn-primary {
        padding: 6px 0;
        text-align: center;
        font-size: 16px;
        border-radius: 24px;
        letter-spacing: 0.15px;
        line-height: 24px;
        font-weight: 600;
        width: 140px;
    }

    .left-panel {
        padding: 24px 0 0 0;
    }

    .left-panel h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .card-column2-btn {
        display: flex;
        justify-content: unset;
        flex: 1;
    }

    .first-row {
        gap: 32px;
    }

    .second-row {
        gap: 32px;
    }
}