/* ==========================
   APP LAYOUT
=========================== */
body {
    background-color: #F3F4F6;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
}

.sidebar-header {
    margin-bottom: 40px;
    padding-left: 10px;
}

.sidebar-header .logo {
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}

.dot {
    color: #4F46E5;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: #4B5563;
    font-weight: 500;
    border-radius: 10px;
    transition: 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #EEF2FF;
    color: #4F46E5;
}

.icon {
    font-size: 18px;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: #DC2626;
    font-weight: 500;
}

/* Main Content */
.app-content {
    flex: 1;
    margin-left: 260px;
    /* Sidebar width */
    padding: 30px 40px;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-title {
    font-size: 24px;
    color: #111827;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    background: white;
    border: 1px solid #E5E7EB;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.user-profile .av {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* ==========================
   DASHBOARD WIDGETS
=========================== */
.dash-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

/* Balance Card */
.balance-card {
    background: linear-gradient(135deg, #4F46E5 0%, #312E81 100%);
    border-radius: 20px;
    padding: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.balance-info .label {
    opacity: 0.8;
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.balance-info .amount {
    font-size: 36px;
    margin-bottom: 10px;
}

.pill-up {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.btn-light {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    margin-left: 10px;
    transition: 0.2s;
}

.btn-light:hover {
    background: white;
    color: #4F46E5;
}

/* Section Boxes */
.section-box {
    background: white;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #E5E7EB;
    margin-bottom: 30px;
}

.box-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-box h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #111827;
}

.link-sm {
    font-size: 14px;
    color: #4F46E5;
    font-weight: 600;
}

/* Transactions */
.trans-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #F3F4F6;
}

.trans-item:last-child {
    border-bottom: none;
}

.trans-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.icon-netflix {
    background: #FEE2E2;
    color: #991B1B;
    font-weight: 800;
    font-size: 14px;
}

.icon-upwork {
    background: #D1FAE5;
    color: #065F46;
    font-size: 12px;
    font-weight: 800;
}

.icon-coffee {
    background: #FEF3C7;
}

.icon-grocery {
    background: #E0E7FF;
}

.trans-details strong {
    display: block;
    font-size: 14px;
    color: #1F2937;
}

.trans-details span {
    font-size: 12px;
    color: #6B7280;
}

.trans-details {
    flex: 1;
}

.trans-amount {
    font-weight: 600;
    font-size: 14px;
}

.trans-amount.negative {
    color: #1F2937;
}

.trans-amount.positive {
    color: #10B981;
}

/* Quick Transfer */
.quick-avatars {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.q-user {
    text-align: center;
    font-size: 12px;
    color: #4B5563;
    cursor: pointer;
}

.q-user .av {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
    color: white;
    transition: 0.2s;
}

.q-user:hover .av {
    transform: translateY(-3px);
}

.av-add {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px dashed #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    margin-bottom: 5px;
}

.transfer-input {
    background: #F9FAFB;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.transfer-input span {
    font-size: 20px;
    font-weight: 600;
    color: #9CA3AF;
    margin-right: 10px;
}

.transfer-input input {
    border: none;
    background: transparent;
    font-size: 24px;
    font-weight: 700;
    width: 100%;
    outline: none;
}

.w-100 {
    width: 100%;
}

/* Savings Goal */
.goal-item {
    margin-bottom: 20px;
}

.goal-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar {
    height: 8px;
    background: #F3F4F6;
    border-radius: 4px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: #10B981;
    border-radius: 4px;
}

/* ==========================
   CARDS PAGE
=========================== */
.cards-layout {
    display: flex;
    gap: 40px;
}

.card-preview-section {
    flex: 1;
    text-align: center;
}

.card-settings-section {
    flex: 1.5;
}

.card-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.tab {
    padding: 8px 16px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.tab.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

/* Controls */
.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #F3F4F6;
}

.control-item:last-child {
    border: none;
}

.control-info strong {
    display: block;
    font-size: 15px;
    color: #1F2937;
}

.control-info p {
    font-size: 13px;
    color: #6B7280;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #E5E7EB;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #4F46E5;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Range Slider */
.limit-slider-box {
    padding: 10px 0;
}

.limit-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.range-slider {
    width: 100%;
    cursor: pointer;
    accent-color: #4F46E5;
}

/* Responsive */
@media (max-width: 900px) {

    .dash-grid,
    .cards-layout {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        display: none;
    }

    /* In real app, add mobile toggle */
    .app-content {
        margin-left: 0;
        padding: 20px;
    }
}