:root {
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --card-bg: rgba(255, 255, 255, 0.8);
    --primary: #FFC107;
    /* SpendHive Amber */
    --primary-hover: #FFB300;
    --secondary: #e5e7eb;
    --border: #e5e7eb;
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    --bg-color: #111827;
    --text-color: #f9fafb;
    --card-bg: rgba(31, 41, 55, 0.7);
    --primary: #FFC107;
    --primary-hover: #FFB300;
    --secondary: #374151;
    --border: #374151;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* Glassmorphism */
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.hidden {
    display: none !important;
}

input,
textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    margin-top: 8px;
    outline: none;
    transition: border 0.2s;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.2s;
}

.primary-btn {
    background: var(--primary);
    color: #333;
    width: 100%;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.secondary-btn {
    background: var(--secondary);
    color: var(--text-color);
}

/* Auth Section */
#auth-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top right, var(--primary), transparent 40%),
        radial-gradient(circle at bottom left, #121212, transparent 60%);
}

.login-card {
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

/* Dashboard Layout */
#dashboard-section {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    margin: 16px;
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 10;
}

.sidebar nav li {
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.sidebar nav li:hover,
.sidebar nav li.active {
    background: var(--primary);
    color: #333;
    opacity: 1;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 16px 0;
    overflow-y: initial;
}

.top-bar {
    padding: 16px 24px;
    margin-bottom: 16px;
}

/* Bank List Styles */
.bank-list-container {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.bank-card {
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bank-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bank-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    padding: 2px;
}

.bank-logo-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bank-color-badge {
    height: 20px;
    width: 100%;
    border-radius: 4px;
}

.bank-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.bank-actions button {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    width: 90%;
    max-width: 400px;
    padding: 30px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.nav-section {
    list-style: none;
    overflow: hidden;
    transition: max-height 0.3s;
    max-height: 0;
}

.nav-section.active {
    max-height: 400px;
}

.nav-section li {
    padding-left: 30px !important;
}

/* Config Layouts */
.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.hidden-desktop {
    display: none !important;
}

.bottom-nav,
.bottom-sheet,
.bottom-sheet-overlay {
    display: none !important;
}

@media (max-width: 992px) {
    .input-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .hidden-desktop {
        display: flex !important;
    }

    .sidebar {
        display: none !important;
    }

    .main-content {
        padding: 20px;
        padding-bottom: 90px;
    }

    /* Mobile Bottom Navigation */
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: var(--card-bg);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        justify-content: space-around;
        align-items: center;
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-color);
        opacity: 0.6;
        transition: all 0.3s;
        flex: 1;
        cursor: pointer;
    }

    .bottom-nav-item.active {
        opacity: 1;
        color: var(--primary);
    }

    .bottom-nav-item .icon {
        font-size: 1.5rem;
    }

    .bottom-nav-item span:not(.icon) {
        font-size: 0.75rem;
        font-weight: 600;
    }

    /* Bottom Sheet */
    .bottom-sheet-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1001;
    }

    .bottom-sheet {
        display: flex !important;
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-radius: 24px 24px 0 0;
        padding: 20px;
        z-index: 1002;
        transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 80vh;
        overflow-y: auto;
        border-top: 1px solid var(--glass-border);
        flex-direction: column;
    }

    .bottom-sheet.active {
        bottom: 0;
    }

    .bottom-sheet-drag-handle {
        width: 40px;
        height: 4px;
        background: var(--secondary);
        border-radius: 2px;
        margin: 0 auto 20px;
    }

    .bottom-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .bottom-sheet-header h4 {
        font-size: 1.2rem;
        font-weight: 700;
    }

    .bottom-sheet-label {
        padding: 12px 16px 8px;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--primary);
        opacity: 0.8;
    }

    .bottom-sheet-list {
        list-style: none;
        padding: 0;
    }

    .bottom-sheet-list li {
        padding: 16px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .bottom-sheet-list li:active {
        background: var(--secondary);
    }

    .bottom-sheet-list li .icon {
        font-size: 1.2rem;
    }
}


.bottom-sheet-list li .icon {
    font-size: 1.2rem;
}

.config-group h4 {
    margin-bottom: 15px;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.content-area>div {
    padding: 0;
}