/* Expense Category Analyzer — Custom Styles */

/* ── Components ───────────────────────── */
.card {
    background: #1F2937;
    border: 1px solid #374151;
    border-radius: 12px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: #6366F1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #4F46E5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #1F2937;
    color: #9CA3AF;
    border: 1px solid #374151;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}

.btn-secondary:hover {
    border-color: #6B7280;
    color: #fff;
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.input-field {
    background: #111827;
    border: 1px solid #374151;
    border-radius: 8px;
    color: #E5E7EB;
    font-family: inherit;
    font-size: 0.875rem;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.input-field::placeholder {
    color: #4B5563;
}

.view-toggle {
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #374151;
    background: transparent;
    color: #6B7280;
    transition: all 0.18s;
}

.view-toggle.active,
.view-toggle:hover {
    background: #374151;
    color: #E5E7EB;
    border-color: #6B7280;
}

/* ── Category Pills ───────────────────── */
.cat-pill {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

.cat-pill:hover {
    opacity: 0.8;
}

/* ── Modal ────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fade-in 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    background: #1F2937;
    border: 1px solid #4B5563;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slide-up 0.22s ease;
}

/* ── Progress Bars ────────────────────── */
.budget-bar-bg {
    height: 6px;
    background: #374151;
    border-radius: 3px;
    overflow: hidden;
}

.budget-bar {
    height: 6px;
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ── Table ────────────────────────────── */
#tx-body tr {
    transition: background 0.15s;
}

#tx-body tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

/* ── Merchant Bar ─────────────────────── */
.merchant-bar-bg {
    height: 4px;
    background: #374151;
    border-radius: 2px;
    margin-top: 4px;
}

.merchant-bar {
    height: 4px;
    background: #6366F1;
    border-radius: 2px;
    transition: width 0.35s ease;
}

/* ── Animations ───────────────────────── */
@keyframes fade-in {
    from {
        opacity: 0;
    }
}

@keyframes slide-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
}

@keyframes slide-in {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
}

/* ── Toast ────────────────────────────── */
.toast {
    padding: 10px 16px;
    background: #1F2937;
    border: 1px solid #374151;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #E5E7EB;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slide-in 0.22s ease;
    max-width: 280px;
}

.toast.success {
    border-color: rgba(99, 102, 241, 0.4);
    color: #818CF8;
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.35);
    color: #F87171;
}

/* ── Drag highlight ───────────────────── */
.drag-over {
    border-color: #6366F1 !important;
    background: rgba(99, 102, 241, 0.08) !important;
}