:root {
    --ink-900: #0f172a;
    --ink-700: #334155;
    --ink-500: #64748b;
    --surface: #ffffff;
    --line: #e2e8f0;
    --primary: #3b5bff;
    --primary-600: #2f4bff;
    --primary-100: #eef1ff;
    --card-shadow: 0 18px 40px -30px rgba(15, 23, 42, 0.55);
}

body.app-shell {
    background: radial-gradient(1200px 600px at 10% -10%, #f0f5ff 0%, rgba(240, 245, 255, 0) 60%),
        radial-gradient(900px 500px at 100% 0%, #f8f4ff 0%, rgba(248, 244, 255, 0) 55%),
        #f7f8fb;
    color: var(--ink-900);
}

.top-nav {
    backdrop-filter: saturate(120%) blur(6px);
}

.page-shell {
    animation: rise 0.45s ease-out;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.section-title {
    color: var(--ink-900);
    letter-spacing: -0.01em;
}

.muted {
    color: var(--ink-500);
}

.input-base {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #d7deea;
    background: #f4f6fb;
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--ink-900);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input-base:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 91, 255, 0.16);
    background: #ffffff;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 600;
    box-shadow: 0 12px 24px -18px rgba(59, 91, 255, 0.6);
    transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -20px rgba(59, 91, 255, 0.65);
}

.btn-secondary {
    border: 1px solid #c7d2fe;
    background: var(--primary-100);
    color: #1f3bff;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
    background: #e2e8ff;
    border-color: #9aa7ff;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 18px;
    font-weight: 600;
    box-shadow: 0 12px 24px -18px rgba(239, 68, 68, 0.6);
    transition: transform 0.12s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px -20px rgba(239, 68, 68, 0.65);
}

/* ====== Animaciones Custom (Complementan a Tailwind) ====== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Loader simple para botones */
.is-loading {
    position: relative;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Utilidad para ocultar scrollbars pero permitir scroll */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none;  /* Firefox */
}

.expense-description {
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense-description.is-expanded {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

@media (min-width: 768px) {
    .expense-description-cell {
        max-width: 320px;
        width: 35%;
    }
}
