/* main.css - Core Layout, Components, and Global Styles */

/* ==========================================================================
   1.0 CORE VARIABLES & BASE STYLES
   ========================================================================== */

:root {
    --chart-line: #2c5364;
    --chart-fill: rgba(44, 83, 100, 0.1);
    --chart-text: #666666; 
    --chart-grid: #e5e5e5; 
    
    /* Professional B&W Sidebar Variables (Default/Light) */
    --sidebar-bg: #ffffff;
    --sidebar-text: #333333;
    --sidebar-hover: #f0f2f5;
    --sidebar-active: #e9ecef;
    --sidebar-submenu-bg: #f8f9fa;
    --sidebar-submenu-text: #333333;
    --sidebar-width: 280px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;      
    overflow: hidden;   
}

/* ==========================================================================
   2.0 LAYOUT & TYPOGRAPHY
   ========================================================================== */

.app-header {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); 
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 100;
    flex-shrink: 0; 
}

.logo { 
    font-size: 24px; 
    font-weight: bold; 
    letter-spacing: 1px; 
}

.menu-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 5px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.menu-toggle-btn:hover { background: rgba(255,255,255,0.1); }
.header-left, .user-controls { display: flex; align-items: center; }
.user-greeting { font-size: 15px; color: #e0e0e0; }
.logout-link { color: #ff8a8a; text-decoration: none; font-size: 14px; margin-left: 5px; transition: color 0.2s; }
.logout-link:hover { color: #ff5252; }

/* 2.2 Main Content Wrapper & Sidebar */
.app-body-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: absolute;
    left: calc(var(--sidebar-width) * -1);
    top: 0;
    transition: left 0.3s ease;
    z-index: 90;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar.open { left: 0; }

.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 85;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

.sidebar-menu { list-style: none; padding: 15px 0; margin: 0; }
.sidebar-item { border-bottom: 1px solid rgba(0,0,0,0.05); }

.sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
}

.sidebar-link i.chevron { font-size: 12px; transition: transform 0.3s ease; }

.sidebar-item.expanded > .sidebar-link {
    background: var(--sidebar-active);
    color: var(--sidebar-text);
    border-left: 4px solid var(--chart-line);
}

.sidebar-item.expanded > .sidebar-link i.chevron { transform: rotate(180deg); }

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--sidebar-submenu-bg);
    transition: max-height 0.3s ease;
}

.sidebar-submenu a {
    display: block;
    padding: 12px 20px 12px 35px;
    color: var(--sidebar-submenu-text);
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.02);
    border-left: 4px solid transparent; 
    transition: color 0.2s, background 0.2s, border-left-color 0.2s;
}

.sidebar-submenu a:hover {
    color: var(--sidebar-text);
    background: var(--sidebar-hover);
    border-left-color: var(--chart-line); 
}

/* 2.3 Main Content & Page Views */
.main-content {
    flex: 1;                 
    width: 100%;
    max-width: 100%; 
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;        
}

.page-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section {
    background: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow-y: auto; 
}

.split-container {
    display: flex;
    width: 100%;
    flex: 1; 
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden; 
}

.pane { padding: 20px; display: flex; flex-direction: column; }
.left-pane { width: 50%; min-width: 300px; overflow: hidden; }
.right-pane { flex: 1; min-width: 300px; background: #f0f2f5; overflow-y: auto; gap: 15px; }

.resizer {
    width: 6px;
    background: #e9ecef;
    cursor: col-resize;
    transition: background 0.2s;
    flex-shrink: 0;
}

.resizer:hover, .resizer:active { background: #2c5364; }

.hidden { display: none !important; }
h2 { margin-bottom: 20px; color: #1a1a1a; border-bottom: 2px solid #f0f2f5; padding-bottom: 10px; }
h3 { margin-bottom: 15px; color: #4a4a4a; }


/* ==========================================================================
   3.0 UI COMPONENTS
   ========================================================================== */

input[type="text"], input[type="password"], input[type="email"] {
    width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 5px; font-size: 16px;
}

input[type="number"].item-amount, .goal-input-row input[type="number"] {
    width: 100px; margin-bottom: 0; padding: 8px; text-align: right; border: 1px solid #ccc; border-radius: 5px; font-family: monospace; font-size: 15px;
}

.goal-input-row input[type="number"] { width: 100%; }

input[type="number"].item-amount:focus, .goal-input-row input[type="number"]:focus {
    outline: none; border-color: #2c5364; box-shadow: 0 0 0 2px rgba(44, 83, 100, 0.2);
}

button {
    background-color: #2c5364; color: white; border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; transition: background-color 0.2s;
}

button:hover { background-color: #0f2027; }
button.secondary-btn { background-color: #6c757d; margin-left: 10px; }
button.secondary-btn:hover { background-color: #5a6268; }
.delete-btn { background-color: transparent !important; color: #dc3545 !important; font-weight: bold; padding: 5px 10px; }
.delete-btn:hover { background-color: #ffe6e6 !important; color: #c82333 !important; }
.chevron-btn { background: none !important; color: #666 !important; padding: 8px; font-size: 12px; border: none; margin-left: 5px; }
.chevron-btn:hover { background: #e9ecef !important; color: #333 !important; }

.filter-btn {
    width: 42px; height: 42px; padding: 0; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background-color: #2c5364; color: white; font-size: 20px; font-weight: bold;
    flex-shrink: 0; border: none; cursor: pointer; transition: background-color 0.2s, transform 0.1s;
}

.filter-btn:hover { background-color: #0f2027; }
.filter-btn:active { transform: scale(0.95); }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; }
.toggle-slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .toggle-slider { background-color: #239bcf; }
input:checked + .toggle-slider:before { transform: translateX(20px); }

.user-auth-toggle { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.user-auth-toggle input { transform: scale(1.3); cursor: pointer; }

.status-pill { padding: 5px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; display: inline-block; text-align: center; }
.status-pill.on-track { background-color: #d4edda; color: #155724 !important; }
.status-pill.off-track { background-color: #f8d7da; color: #721c24 !important; }

.color-dot { width: 15px; height: 15px; border-radius: 50%; display: inline-block; margin-right: 10px; vertical-align: middle; }
.item-group-dot { width: 16px; height: 16px; border-radius: 50%; cursor: pointer; display: inline-block; margin-right: 12px; border: 2px solid rgba(0,0,0,0.1); transition: transform 0.2s; flex-shrink: 0; }
.item-group-dot:hover { transform: scale(1.3); box-shadow: 0 0 5px rgba(0,0,0,0.2); }

.progress-bar-container { width: 100%; height: 8px; background-color: #e9ecef; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-bar { height: 100%; border-radius: 4px; transition: width 0.3s ease; }


/* ==========================================================================
   4.0 PAGE SPECIFIC STYLES
   ========================================================================== */

.landing-page { width: 100%; height: 100%; display: flex; gap: 20px; align-items: stretch; overflow-y: auto; }
.landing-col { display: flex; flex-direction: column; gap: 20px; }
.col-left, .col-right { flex: 1; min-width: 250px; }
.col-middle { flex: 2; min-width: 300px; }
.landing-card { background: #ffffff; padding: 30px; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.flex-fill { flex: 1; }
.ad-space { background-color: #e9ecef; border: 2px dashed #ced4da; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #adb5bd; font-weight: bold; text-transform: uppercase; text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.05); background-size: cover; background-position: center; background-repeat: no-repeat; transition: all 0.3s ease; overflow: hidden; }

.app-footer {
    text-align: center; padding: 8px 15px; font-size: 12px; color: #888;
    border-top: 1px solid #ddd; margin-top: auto; background: transparent; width: 100%; flex-shrink: 0;
}
.app-footer a { color: #2c5364; text-decoration: none; font-weight: bold; }

/* 4.2 Dashboard Ledger Elements */
.bank-tabs-container { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #e9ecef; overflow-x: auto; flex-shrink: 0; }
.bank-tab { padding: 8px 16px; border-radius: 20px; background: transparent !important; color: #333; border: 2px solid #333 !important; cursor: pointer; font-weight: bold; font-size: 14px; white-space: nowrap; transition: all 0.2s ease; }
.bank-tab span:not(.color-dot) { color: #333; transition: color 0.2s ease; }
.bank-tab:hover { background: #333 !important; color: #ffffff !important; }
.bank-tab:hover span:not(.color-dot) { color: #ffffff !important; }
.bank-tab.active { background: #333 !important; color: #ffffff !important; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.bank-tab.active span:not(.color-dot) { color: #ffffff !important; }
.add-bank-btn { background: transparent !important; color: #2c5364 !important; border: 2px dashed #2c5364 !important; padding: 6px 12px; border-radius: 20px; font-size: 14px; }
.add-bank-btn:hover { background: #e9ecef !important; }

.tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid #e9ecef; }
.tab-btn { background: none; color: #495057; border-radius: 0; padding: 10px 20px; font-weight: bold; }
.tab-btn:hover { background: #f8f9fa; }
.tab-btn.active { color: #2c5364; border-bottom: 3px solid #2c5364; margin-bottom: -2px; }

#my-list { flex: 1; overflow-y: auto; min-height: 0; padding-right: 10px; margin-bottom: 10px; }
#my-list::-webkit-scrollbar { width: 6px; }
#my-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
#my-list::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
#my-list::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

.list-item-container { margin-bottom: 10px; }
.list-item { display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; padding: 12px 15px; margin-bottom: 0; border-radius: 5px; border-left: 4px solid #2c5364; position: relative; z-index: 2; }
.item-controls { display: flex; align-items: center; gap: 5px; }
.list-total { text-align: right; font-size: 1.25em; font-weight: bold; color: #2c5364; padding: 15px 15px 0 0; margin-top: 10px; border-top: 2px dashed #ccc; flex-shrink: 0; }

.row-settings { margin-top: -5px; position: relative; z-index: 1; }
.row-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 15px; background: #e9ecef; border-radius: 0 0 5px 5px; border-left: 4px solid #2c5364; font-size: 14px; }
.setting-group { display: flex; flex-direction: column; gap: 5px; }
.setting-group label { font-size: 12px; color: #555; font-weight: bold; text-transform: uppercase; }
.setting-group select { padding: 8px; border: 1px solid #ccc; border-radius: 4px; background: #fff; font-size: 14px; cursor: pointer; }
.checkbox-group { flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 5px; }
.checkbox-group input[type="checkbox"] { transform: scale(1.3); cursor: pointer; }
.delete-group { grid-column: 1 / -1; align-items: flex-end; margin-top: 5px; padding-top: 15px; border-top: 1px dashed #ccc; }

.list-item-container.incomplete .list-item { background-color: #fff0f0; border-left-color: #ff4d4d !important; }
.list-item-container.incomplete .list-item span:not(.color-dot) { color: #333; }
.warning-text { font-size: 11px; color: #ff4d4d; font-weight: bold; display: block; margin-top: 5px; }
.pot-completion-info { background-color: #e9ecef; color: #2c5364; padding: 4px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; margin-right: 10px; cursor: help; border: 1px solid #ccc; white-space: nowrap; }

/* Dashboard Cards & Graph Area */
.dashboard-view { flex: 1; display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.dashboard-card { background: #ffffff; padding: 15px 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); border-left: 4px solid #2c5364; width: 100%; }
.control-panel-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.control-panel-header h4 { margin: 0 !important; color: #2c5364; }
.slider-container { display: flex; flex-direction: column; gap: 8px; }
.slider-container label { font-size: 14px; font-weight: bold; color: #4a4a4a; }
.slider-container input[type="range"] { width: 100%; cursor: pointer; }
.graph-card { flex: 1; display: flex; flex-direction: column; min-height: 250px; }
.graph-wrapper { flex: 1; position: relative; width: 100%; min-height: 0; }

.expenses-list-container { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.list-header { display: flex; justify-content: space-between; padding: 10px 15px; border-bottom: 2px solid #e9ecef; font-weight: bold; color: #666; font-size: 14px; text-transform: uppercase; }
.list-item-percent { color: #888; font-size: 13px; margin-left: 10px; }

.goals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.goal-card { background: #f8f9fa; padding: 15px; border-radius: 8px; border-left: 4px solid; display: flex; flex-direction: column; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.goal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 15px; }
.goal-title { font-weight: bold; font-size: 14px; text-transform: uppercase; display: flex; align-items: center; color: #333; }
.goal-amounts { text-align: right; display: flex; flex-direction: column; }
.actual-amount { font-weight: bold; font-size: 18px; color: #2c5364; }
.target-amount { font-size: 11px; color: #888; text-transform: uppercase; }
.goal-percent { text-align: right; font-weight: bold; font-size: 13px; color: #333; }

.audit-grid-header { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; padding: 10px 15px; border-bottom: 2px solid #e9ecef; font-weight: bold; color: #666; font-size: 13px; text-transform: uppercase; gap: 10px; }

/* Simple Ledger Overrides */
body.simple-ledger-active .list-item-container { margin-bottom: 5px !important; }
body.simple-ledger-active .list-item { padding: 6px 12px !important; min-height: 36px; }
body.simple-ledger-active .item-group-dot { width: 8px !important; height: 24px !important; border-radius: 4px !important; margin-right: 10px !important; }
body.simple-ledger-active .warning-text { display: none !important; }
body.simple-ledger-active input[type="number"].item-amount { padding: 4px 8px !important; height: 28px !important; font-size: 14px !important; }
body.simple-ledger-active .list-item span:not(.warning-text) { font-size: 14px !important; }
body.simple-ledger-active .chevron-btn { padding: 4px !important; }


/* ==========================================================================
   5.0 MODALS & POPUPS
   ========================================================================== */

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: #fff; padding: 30px; border-radius: 10px; width: 90%; max-width: 400px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-close { background: none !important; color: #999 !important; font-size: 20px; padding: 0; }
.modal-close:hover { color: #333 !important; }

/* Dropdown Menus */
.user-menu { position: relative; display: inline-block; }
.dropdown-btn { background-color: rgba(255, 255, 255, 0.1); color: white; padding: 10px 15px; font-size: 16px; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 5px; cursor: pointer; transition: background 0.3s; }
.dropdown-btn:hover { background-color: rgba(255, 255, 255, 0.2); }
.dropdown-content, .cp-dropdown-content { display: none; position: absolute !important; top: 100%; right: 0; background-color: #ffffff; min-width: 200px; box-shadow: 0px 8px 16px rgba(0,0,0,0.2); border-radius: 5px; overflow: hidden; z-index: 1000; margin-top: 5px; }
.dropdown-content.show, .cp-dropdown-content.show { display: flex !important; flex-direction: column !important; }
.dropdown-content a, .cp-dropdown-content a { color: #333; padding: 12px 16px; text-decoration: none; display: block !important; font-size: 15px; border-bottom: 1px solid #f0f0f0; white-space: nowrap; }
.dropdown-content a:hover, .cp-dropdown-content a:hover { background-color: #f8f9fa; color: #007bff; }

.cp-actions { display: flex; align-items: center; gap: 10px; }
.cp-menu { position: relative; display: inline-block; }
.cp-menu-btn { background-color: transparent !important; border: 1px solid #2c5364 !important; color: #2c5364 !important; padding: 4px 10px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: bold; transition: background-color 0.2s; }
.cp-menu-btn:hover { background-color: #f0f2f5 !important; }

/* Options Modal Specifics (Strict 2-Column Lock) */
#options-modal .settings-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 15px !important; margin-bottom: 30px; }
#options-modal .setting-card { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: space-between !important; padding: 15px !important; background: #f8f9fa !important; border-left-width: 4px !important; border-left-style: solid !important; border-left-color: #2c5364 !important; }
#options-modal .setting-card h4 { margin-bottom: 0 !important; font-size: 15px; }

@media (max-width: 600px) { #options-modal .settings-grid { grid-template-columns: 1fr !important; } }

/* Quill.js Editor Core Styles */
.ql-toolbar { background: #f8f9fa; border-top-left-radius: 5px; border-top-right-radius: 5px; }
.ql-container { 
    background: #ffffff; 
    color: #000000; 
    font-size: 15px; 
    border-bottom-left-radius: 5px; 
    border-bottom-right-radius: 5px; 
    resize: vertical;         
    overflow-y: auto;         
    min-height: 200px;        
}
.ql-editor { min-height: 100%; }

.rich-text-content { line-height: 1.6; color: #555; font-size: 15px; }
.rich-text-content p { margin-bottom: 15px; }
.rich-text-content h1, .rich-text-content h2, .rich-text-content h3 { margin-bottom: 10px; color: #333; }


/* ==========================================================================
   6.0 RESPONSIVE DESIGN (MOBILE CORE)
   ========================================================================== */

.hidden-desktop { display: none !important; }

@media (max-width: 900px) {
    body, html { overflow-x: hidden; height: auto; overflow-y: auto; }
    .main-content { padding: 0 !important; margin: 0 !important; overflow: visible; }
    .split-container { padding: 0 !important; margin: 0 !important; gap: 0 !important; flex-direction: column; height: auto; overflow: visible; }
    
    .pane { 
        width: 100% !important; 
        min-height: 60vh; 
        padding: 10px 5px !important; 
        margin: 0 !important; 
        border-radius: 0 !important; 
        box-shadow: none !important; 
        border-left: none !important; 
        border-right: none !important; 
    }
    
    .dashboard-card { 
        margin-left: 0 !important; 
        margin-right: 0 !important; 
        border-radius: 0 !important; 
        border-left: none !important; 
        border-right: none !important; 
    }
    
    #my-list { height: 400px; flex: none; }
    .right-pane { padding-top: 10px; border-top: 2px solid #e9ecef; }
    .hidden-desktop { display: flex !important; }
    .resizer { display: none !important; }
    
    .mobile-pane-tabs { 
        width: 100%; 
        background: transparent; 
        padding: 10px 5px; 
        gap: 5px; 
        justify-content: space-between; 
        border-bottom: 2px solid #eee; 
        box-sizing: border-box; 
        border-radius: 0 !important; 
    }
    
    .mobile-tab-btn { 
        flex: 1; 
        padding: 10px; 
        border: 1px solid #ccc; 
        background: #fff; 
        border-radius: 5px; 
        font-weight: bold; 
        color: #555; 
        cursor: pointer; 
        text-align: center; 
        transition: background 0.2s; 
    }
    
    .mobile-tab-btn.active { 
        background: #2c5364; 
        color: #fff; 
        border-color: #2c5364; 
    }
    
    #mobile-active-bank-display { 
        border-radius: 0 !important; 
        width: 100% !important; 
        box-sizing: border-box; 
    }
    
    .mobile-hidden { display: none !important; }
    
    .list-item { 
        flex-direction: column; 
        align-items: flex-start !important; 
        padding: 15px 10px !important; 
        height: auto !important; 
    }
    
    .list-item > div:first-child { width: 100%; margin-bottom: 12px; }
    .item-controls { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
    .item-controls input, .item-controls select { flex: 1 1 30%; margin: 0 !important; min-width: 80px; }
    
    .modal-overlay { padding: 10px; }
    .modal-content { 
        width: 100% !important; 
        max-height: 85vh !important; 
        overflow-y: auto !important;  
        padding: 15px; 
        display: flex; 
        flex-direction: column; 
    }
    
    #new-row-form { width: 100%; box-sizing: border-box; padding: 15px; flex-direction: column; }
    .setting-group { flex: 1 1 100% !important; min-width: 100% !important; margin-bottom: 10px; }
    .bulk-action-panel { flex-direction: column; align-items: stretch !important; }
    .bulk-action-panel span, .bulk-action-panel select, .bulk-action-panel input, .bulk-action-panel button { 
        width: 100% !important; 
        margin-bottom: 5px !important; 
        box-sizing: border-box; 
    }
}