/* Custom styles beyond Tailwind */

/* Balance color helpers */
.balance-positive { color: #10b981; }
.balance-negative { color: #ef4444; }

/* Transaction status badges */
.status-actual { background-color: #10b981; color: white; }
.status-planned { background-color: #3b82f6; color: white; }
.status-skipped { background-color: #6b7280; color: white; }

/* Dark background for table headers (Tailwind doesn't have bg-gray-750) */
.bg-gray-750 { background-color: #2a2f3a; }
html:not(.dark) .bg-gray-750 { background-color: #e5e7eb; }

/* Light mode: table headers - visible background + strong text */
html:not(.dark) thead th { color: #1f2937 !important; }
html:not(.dark) thead tr { background-color: #e5e7eb !important; border-bottom: 2px solid #d1d5db !important; }

/* Light mode: dividers between table rows */
html:not(.dark) .divide-gray-700\/50 > :not([hidden]) ~ :not([hidden]) { border-color: #e5e7eb; }

/* Smooth transitions for interactive elements */
a, button, input, select, textarea {
    transition-property: color, background-color, border-color, box-shadow;
    transition-duration: 150ms;
    transition-timing-function: ease-in-out;
}

/* Custom scrollbar for dark theme (desktop only) */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #1f2937;
    }

    ::-webkit-scrollbar-thumb {
        background: #4b5563;
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #6b7280;
    }
}

/* Hide custom scrollbar on mobile - use native touch scroll */
@media (max-width: 767px) {
    ::-webkit-scrollbar {
        display: none;
    }
    * {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
}

/* Date input styling for dark theme (Chromium) */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}
html:not(.dark) input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}

/* Light mode scrollbar (desktop) */
@media (min-width: 768px) {
    html:not(.dark) ::-webkit-scrollbar-track { background: #f3f4f6; }
    html:not(.dark) ::-webkit-scrollbar-thumb { background: #d1d5db; }
    html:not(.dark) ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
}

/* Number input spinner styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 0.5;
}

/* HTMX loading indicator */
.htmx-request {
    opacity: 0.7;
    transition: opacity 200ms ease-in;
}

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

/* ── Modal overlay and content ──────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 200ms ease-in-out;
    pointer-events: none;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 40rem;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    transform: scale(0.95);
    transition: transform 200ms ease-in-out;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Light mode modal overrides */
html:not(.dark) .modal-overlay {
    background-color: rgba(0, 0, 0, 0.4);
}

html:not(.dark) .modal-content {
    background-color: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Import matching confidence badges */
.confidence-high { background-color: #065f46; color: #6ee7b7; }
.confidence-medium { background-color: #78350f; color: #fcd34d; }
.confidence-low { background-color: #7c2d12; color: #fdba74; }

html:not(.dark) .confidence-high { background-color: #d1fae5; color: #065f46; }
html:not(.dark) .confidence-medium { background-color: #fef3c7; color: #92400e; }
html:not(.dark) .confidence-low { background-color: #ffedd5; color: #9a3412; }

/* Import tab transitions */
.import-tab-content {
    transition: opacity 150ms ease-in-out;
}

/* Light mode: green/blue stat boxes */
html:not(.dark) .bg-green-600 { color: #ffffff; }
html:not(.dark) .bg-green-700 { color: #ffffff; }

/* Mobile modal: slide up from bottom instead of center scale */
@media (max-width: 767px) {
    .modal-overlay {
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 1rem 1rem 0 0;
        transform: translateY(100%);
        transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    .modal-overlay.active .modal-content {
        transform: translateY(0);
    }
}

/* ── Bottom tab bar ─────────────────────────────── */

.mobile-tab-bar {
    background-color: #1f2937;
    border-top: 1px solid #374151;
}

.mobile-tab-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mobile-tab-item:active {
    opacity: 0.7;
}

.mobile-tab-fab {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.mobile-tab-fab:active {
    transform: scale(0.95);
}

/* Light mode bottom tab bar */
html:not(.dark) .mobile-tab-bar {
    background-color: #ffffff;
    border-top-color: #e5e7eb;
}

/* ── Bottom sheet ───────────────────────────────── */

.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-in-out;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.bottom-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1f2937;
    border-radius: 1rem 1rem 0 0;
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: env(safe-area-inset-bottom);
    max-height: 85vh;
    overflow-y: auto;
}

.bottom-sheet-overlay.active .bottom-sheet-content {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 2.5rem;
    height: 0.25rem;
    background-color: #4b5563;
    border-radius: 9999px;
    margin: 0.75rem auto 0.5rem;
}

/* Light mode bottom sheet */
html:not(.dark) .bottom-sheet-content {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
}

html:not(.dark) .bottom-sheet-handle {
    background-color: #d1d5db;
}

/* ── Touch feedback ─────────────────────────────── */

@media (hover: none) and (pointer: coarse) {
    .touch-feedback:active {
        background-color: rgba(75, 85, 99, 0.5);
    }
}

/* ── Mobile transaction cards ───────────────────── */

.mobile-txn-card {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mobile-txn-card:active {
    background-color: rgba(75, 85, 99, 0.3);
}

html:not(.dark) .mobile-txn-card:active {
    background-color: rgba(229, 231, 235, 0.7);
}

/* ── Drag handle for mobile modals ──────────────── */

.modal-drag-handle {
    width: 2.5rem;
    height: 0.25rem;
    background-color: #4b5563;
    border-radius: 9999px;
    margin: 0 auto 1rem;
}

html:not(.dark) .modal-drag-handle {
    background-color: #d1d5db;
}

/* ── Body scroll lock ───────────────────────────── */

body.scroll-locked {
    overflow: hidden;
    position: fixed;
    width: 100%;
    touch-action: none;
}

/* ── Mobile filter bar ──────────────────────────── */

.filter-bar-summary {
    -webkit-tap-highlight-color: transparent;
}

.filter-bar-summary:active {
    background-color: rgba(75, 85, 99, 0.3);
}
>>>>>>> Stashed changes
