/* ===========================================
   MOBILE-ONLY STYLES - Light Theme
   =========================================== */

/* Light theme variables applied when data-theme="light" (or default) */
:root,
:root[data-theme="light"] {
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-hover: #f5f5f5;
    --bg-active: #e9ecef;
    /* Text colors */
    --text-primary: #1f2937;
    --text-secondary: #865d36;
    --text-muted: #6b7280;
    --text-inverse: #ffffff;
    /* Border colors */
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;
    --border-light: #f1f3f5;
    /* Accent colors */
    --accent-primary: #865d36;
    --accent-secondary: #a67c52;
    --accent-gradient: linear-gradient(135deg, #865d36 0%, #a67c52 100%);
    /* Status colors */
    --success: #28a745;
    --warning: #f59e0b;
    --danger: #e11d48;
    --info: #2563eb;
    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --brand-primary: #865D36;
    --brand-secondary: black;
    --brand-disabled: #1e1e1e;
    --brand-secondary-disabled: #c28851;
    --bg-activity: white;
    --bg-tab: white;
    --bs-btn-color: #000;
    --bs-btn-bg: #0dcaf0;
    --bs-btn-border-color: #0dcaf0;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #31d2f2;
    --bs-btn-hover-border-color: #25cff2;
    --bs-btn-focus-shadow-rgb: 11, 172, 204;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #3dd5f3;
    --bs-btn-active-border-color: #25cff2;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #0dcaf0;
    --bs-btn-disabled-border-color: #0dcaf0;
    --bank-bg: #1e1e1e;
    --border-navbar: 0px;
    --bb-input-search: #f8f8f8;
    --org-dark-bg-primary: #ffffff;
    --org-dark-bg-secondary: #ffffff;
    --org-dark-bg-tertiary: #21262d;
    --org-dark-bg-card: #ffffff;
    --org-dark-border: #30363d;
    --org-dark-border-light: #3d444d;
    --org-dark-text-primary: #e6edf3;
    --org-dark-text-secondary: #8b949e;
    --org-dark-text-muted: #6e7681;
    --org-dark-accent-purple: #a371f7;
    --org-dark-accent-blue: #58a6ff;
    --org-dark-accent-green: #3fb950;
    --org-dark-accent-orange: #d29922;
    --org-dark-accent-red: #f85149;
    --org-dark-accent-cyan: #39d0d6;
    --org-dark-glow-purple: rgba(163, 113, 247, 0.15);
    --org-dark-glow-blue: rgba(88, 166, 255, 0.15);
    --org-dark-glow-green: rgba(63, 185, 80, 0.15);
    --label-primary: #7c5f3c;
    --bb-btn-input-file: #c28851;
    --btn-white: #ffffff;
    --bb-dash-section-card: #e8e8e8;
    --bb-dash-title: #1a1a2e;
}

/* iOS Safari: prevent zoom on form fields */
@supports (-webkit-touch-callout: none) {
    html { -webkit-text-size-adjust: 100%; }
    body { font-size: 16px; }
    input,
    select,
    textarea,
    button,
    .form-control,
    .form-select,
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"] {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
}
  .page-link:hover {
    color: var(--brand-secondary-disabled) !important;
    pointer-events: none;
    background-color: var(--brand-primary) !important;
    border-color: #dee2e6
}
.page-item.disabled [data-theme="dark"] .page-link {
    color: var(--brand-secondary-disabled) !important;
    pointer-events: none;
    background-color: var(--brand-secondary-disabled) !important;
    border-color: #dee2e6
}

 .pagination {
    gap: 4px;
}

 .page-item [data-theme="dark"] .page-link {
    color: var(--brand-primary) !important;
    border-radius: var(--radius-sm);
}

.active >  .page-link, .page-link.active {
    color: var(--brand-secondary) !important;
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.page-link {
    color: var(--brand-secondary) !important;
    border-color: rgba(134, 93, 54, 0.3) !important;
    transition: all var(--transition-normal) !important;
    background-color: var(--bg-card);
}

  .page-link:hover {
        color: var(--brand-primary) !important;
        background-color: var(--brand-secondary) !important;
        border-color: var(--brand-secondary) !important;
    }

 .active > .page-link,.page-link.active {
        color: var(--brand-primary) !important;
        background-color: var(--brand-primary) !important;
        border-color: var(--brand-primary) !important;
    }


@media (max-width: 991px) {

/* Prevent iOS Safari zoom on form fields */
input,
select,
textarea,
button,
.form-control,
.form-select {
    font-size: 16px !important;
}

/* Mobile Save Container */
.mobile-save-container {
    position: fixed !important;
    /* bottom: 70px !important;*/
    left: 0 !important;
    right: 0 !important;
    padding: 16px !important;
    /* background: white !important;*/
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    z-index: 999 !important;
}

.mobile-save-btn {
    width: 100% !important;
    padding: 14px !important;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

    .mobile-save-btn:hover:not(:disabled) {
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
    }

    .mobile-save-btn:disabled {
        opacity: 0.6 !important;
        cursor: not-allowed !important;
    }

.mobile-search-header {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    /*border-bottom: 1px solid #e5e7eb;*/
}

.search-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-wrapper {
    flex: 1;
    min-width: 0;
}

    .search-wrapper :deep(input) {
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 15px;
        border: 1px solid #e5e7eb;
    }

.mobile-search-spacer {
    height: 0px;
}

/* Mobile Date Filters */
.mobile-date-filters {
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.date-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-filter-item {
    flex: 1;
    min-width: 0;
}

.date-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .date-filter-item .form-control {
        padding: 8px 10px;
        font-size: 14px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        font-size: 16px !important;
    }

/* Mobile Header */
.mobile-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.btn-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-back:hover {
        background: #e9ecef;
    }

    .btn-back i {
        font-size: 1.25rem;
        color: #495057;
    }

.mobile-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    flex: 1;
    text-align: center;
}

.btn-add {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .btn-add:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .btn-add i {
        font-size: 1.25rem;
        color: white;
    }

/* Header Spacer */
/*.mobile-header-spacer {
    height: 65px;
}
*/
/* Mobile Fixed Header */
/*.mobile-edit-header {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    height: 56px !important;
    color: white !important;
    background: linear-gradient(135deg, #865d36 0%, #a67c52 100%) !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    padding: 0 12px !important;
    z-index: 1000 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}*/

.mobile-save-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: linear-gradient(135deg, #865d36 0%, #a67c52 100%);
    border-radius: 10px;
    font-size: 20px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(134, 93, 54, 0.3);
}

    .mobile-save-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .mobile-save-btn:not(:disabled):active {
        transform: scale(0.95);
    }



.content {
    direction: ltr;
    flex: 1;
    max-width: 100vw;
    padding: 0.2rem 0.4rem .1rem !important;
    width: 100vw;
}

.mobile-header {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: white;
    z-index: 1000;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-search-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mobile-add-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    background: linear-gradient(135deg, #865d36 0%, #a67c52 100%);
    border-radius: 10px !important;
    color: white !important;
    font-size: 20px !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(134, 93, 54, 0.3) !important;
    transition: transform 0.2s ease !important;
}

    .mobile-add-btn:active {
        transform: scale(0.95);
    }

    .mobile-add-btn:hover {
        color: white;
    }

.mobile-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #865d36 !important;
    margin-bottom: 6px;
}

    .mobile-input {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 12px 14px !important;
        border-radius: 10px !important;
        border: 0.5px solid #c28851 !important;
    }

    .mobile-input:focus {
        border-color: #865d36;
        box-shadow: 0 0 0 3px rgba(134, 93, 54, 0.1);
    }

    .mobile-input::placeholder {
        color: #adb5bd;
    }

    .mobile-input:disabled {
        background: #f5f5f5;
        color: #888;
        cursor: not-allowed;
    }

/* Mobile Edit Header */
/*.mobile-edit-header {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #e5e7eb;
}*/



/* Mobile Header Actions */


.mobile-edit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .mobile-edit-btn:hover {
        transform: scale(1.1);
    }



.mobile-action-btn:disabled {
    opacity: 0.5;
}

.mobile-back-btn {
    background: rgb(139 109 73);
    border: none;
    color: white !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

    .mobile-back-btn:hover,
    .mobile-back-btn:active {
        background: rgba(255, 255, 255, 0.3);
    }

/* Empty State */
.mobile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

    .mobile-empty-state i {
        font-size: 4rem;
        color: #475569;
        margin-bottom: 16px;
    }

    .mobile-empty-state p {
        color: #64748b;
        font-size: 1rem;
        margin: 0;
    }

.mobile-grid-container {
    padding: 0rem 0.9rem .1rem !important;
}

/* View Toggle Header */
    .mobile-view-header {
        background: var(--bb-input-search) !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 4px;
        margin-top: 0px;
    }

.view-toggle-btns {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 3px;
}

.view-toggle-btn {
    width: 36px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .view-toggle-btn.active {
        background: #865d36;
        color: white;
        box-shadow: 0 1px 3px rgba(134, 93, 54, 0.3);
    }

    .view-toggle-btn:not(.active):hover {
        background: rgba(134, 93, 54, 0.1);
    }

.mobile-navbar-hide {
    height: 0 !important;
    display: none !important;
}

/* iOS coarse pointers: enforce 16px on form controls to stop zoom */
@supports (-webkit-touch-callout: none) and (pointer: coarse) {
    @media (max-width: 991px) {
        html, body { font-size: 16px !important; }
        input,
        select,
        textarea,
        button,
        .form-control,
        .form-select,
        input[type="text"],
        input[type="search"],
        input[type="email"],
        input[type="number"],
        input[type="tel"],
        input[type="url"],
        input[type="password"],
        input[type="date"],
        input[type="time"],
        input[type="datetime-local"],
        :root input,
        :root select,
        [data-theme] input,
        [data-theme] select,
        .search-wrapper :deep(input),
        .mobile-search-header input,
        .mobile-input,
        .x-search-box,
        .mobile-date-filters .form-control,
        .mobile-pagination ::deep .page-link {
            font-size: 16px !important;
            line-height: 1.4 !important;
        }
    }
}

} /* End @media (max-width: 991px) */

/* Extra small mobile adjustments */
@media (max-width: 576px) {
 /*   .mobile-edit-header {
        padding: 10px 12px;
    }*/

 /*   .mobile-header-actions {
        gap: 6px;
    }

    .mobile-edit-btn,
    .mobile-info-btn {
        width: 36px;
        height: 36px;
    }*/
}

/* Tablet specific adjustments */
@media (max-width: 768px) {
    .content {
        direction: ltr;
        flex: 1;
        max-width: 100vw;
        padding: 0.2rem 0.4rem .1rem !important;
        width: 100vw;
    }
}
/* Mobile Pagination */
.mobile-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    padding: 0.5rem;
}

    .mobile-pagination ::deep .pagination {
        margin: 0;
        gap: 0.25rem;
    }

    .mobile-pagination ::deep .page-link {
        min-width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 8px !important;
    }

@media screen and (max-width: 991px) {
    .x-row-activity {
        padding-top: 39px !important;
        background: var(--bg-activity) !important;
    }

   
}

/* Mobile Tabs */
.mobile-tabs {
    display: flex;
    background: var(--bg-tab);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

    .mobile-tab.active {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }

    .mobile-tab i {
        font-size: 1rem;
    }


.x-search-box::placeholder {
    font-size: 14px !important;
    font-style: italic !important;
}


  .btn-info {
    color: var(--bs-btn-hover-color);
    background-color: var(--bs-btn-hover-bg);
    border-color: var(--bs-btn-hover-border-color);
}
/* Bank Accounts Section */
.mobile-add-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .mobile-add-item-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

/* Fallback: force 16px on all form controls to prevent iOS zoom */
input,
select,
textarea,
button,
.form-control,
.form-select,
input[type="text"],
input[type="search"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    font-size: 16px !important;
    line-height: 1.4 !important;
}

.mobile-bank-accounts-list {
    margin-top: 16px;
}

.mobile-bank-account-item {
    background: var( --bank-bg: #1e1e1e);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

    .mobile-bank-account-item:last-child {
        margin-bottom: 0;
    }

.mobile-bank-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 8px;
    display: block;
}

.mobile-input-with-action {
    display: flex;
    gap: 8px;
}

    .mobile-input-with-action .mobile-input {
        flex: 1;
    }

.mobile-delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

    .mobile-delete-btn:hover {
        background: #c82333;
    }

.mobile-empty-message {
    text-align: center;
    padding: 24px;
    color: #6c757d;
    font-size: 0.9rem;
}

.mobile-header-spacer {
    height: 0px !important;
}

/*.modern-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-image: url("/img/brown-wood.png");
 
    border-bottom: var(--border-navbar) solid var(--text-primary);
}*/

.x-mobile-back-btn {
    background: linear-gradient(135deg, #865d36 0%, #C28851 100%) !important;
    border: none !important;
    color: var(--btn-white) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
    flex-shrink: 0 !important;
}