:root {
    --primary-color: #0056b3;
    --primary-light: #337bcc;
    --secondary-color: #28a745;
    --secondary-light: #53b969;
    --bg-color: #F8F9FA;
    --surface-color: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-radius: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 86, 179, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Desktop Sidebar Navigation */
.desktop-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: var(--surface-color);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    margin-bottom: 32px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    padding: 0 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
}

.sidebar-footer {
    padding: 0 12px;
    border-top: 1px solid #e9ecef;
    margin-top: auto;
    padding-top: 16px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 0.95rem;
}

.logout-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.main-content {
    margin-left: 0;
    transition: var(--transition);
}

/* Mobile Navigation */
.mobile-nav {
    display: flex;
}

/* Responsive Layout */
@media (min-width: 769px) {
    body {
        background-color: #e9ecef;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-content {
        margin-left: 0px;
        min-height: 100vh;
        background-color: var(--bg-color);
    }

    .mobile-nav {
        display: none !important;
    }

    .desktop-sidebar {
        display: flex !important;
    }

    .app-container {
        max-width: none;
        height: auto;
        border-radius: 0;
        margin: 0;
        border: none;
        box-shadow: none;
        background-color: transparent;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* App Container (Mobile viewport simulation) */
.app-container {
    width: 100%;
    max-width: 414px;
    /* iPhone Max width */
    height: 100vh;
    max-height: 896px;
    background-color: var(--bg-color);
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.app-container>* {
    flex-shrink: 0;
}

/* For desktop view simulating the app, making it look like a phone */
@media (min-width: 450px) {
    .app-container {
        height: 850px;
        border-radius: 36px;
        margin: 20px;
        border: 8px solid #ffffff;
    }
}

/* Hide scrollbar for clean look */
.app-container::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--surface-color);
}

.hello-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.user-name {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--surface-color);
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: var(--transition);
}

.icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    border: 2px solid var(--surface-color);
}

/* Balance Card */
.balance-card {
    margin: 8px 24px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: var(--border-radius);
    padding: 24px;
    color: white;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

/* Glassmorphic decorative effect */
.balance-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.balance-card::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    opacity: 0.9;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.balance-header i {
    cursor: pointer;
    transition: var(--transition);
}

.balance-header i:hover {
    opacity: 0.8;
}

.balance-amount {
    font-size: 2.2rem;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 24px;
    margin-bottom: 32px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.icon-circle {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.icon-circle.primary {
    background-color: var(--surface-color);
    color: var(--primary-color);
}

.icon-circle.success {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.2);
}

.action-btn:hover .icon-circle {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.action-btn span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Sections Common */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
}

.view-all {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.view-all:hover {
    text-decoration: underline;
}

/* Active Loan */
.active-loan {
    margin: 0 24px 32px;
}

.loan-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.loan-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.loan-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.loan-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
}

.loan-details h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.loan-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--secondary-color);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Recent Transactions */
.transactions {
    margin: 0 24px 100px;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    background-color: var(--surface-color);
    padding: 16px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.transaction-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.tx-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 16px;
    font-size: 1rem;
}

.tx-icon.receive {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--secondary-color);
}

.tx-icon.send {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.tx-icon.loan {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
}

.tx-details {
    flex: 1;
}

.tx-details h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.tx-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tx-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.tx-amount.positive {
    color: var(--secondary-color);
}

.tx-amount.negative {
    color: var(--text-primary);
}

/* Bottom Navigation */
.bottom-nav {
    position: sticky;
    bottom: 0;
    width: 100%;
    background-color: var(--surface-color);
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

/* Add padding to the bottom in desktop mock view */
@media (min-width: 450px) {
    .bottom-nav {
        border-radius: 0 0 28px 28px;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-item i {
    font-size: 1.2rem;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item:hover:not(.active) {
    color: var(--primary-light);
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.header {
    animation: slideDown 0.5s ease-out;
}

.balance-card {
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.quick-actions {
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.active-loan {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.transactions {
    animation: fadeIn 0.6s ease-out 0.5s both;
}