/* ─────────────────────────────────────────────────────────────────────────────
   GastoDiario — Design System
   Tema oscuro con efectos neón sutiles y layout Bento Grid
   Mobile-first · Font Awesome 6 para iconos
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
    /* Fondos */
    --bg:           hsl(225, 25%, 7%);
    --bg-card:      hsl(225, 20%, 11%);
    --bg-elevated:  hsl(225, 18%, 15%);
    --bg-input:     hsl(225, 18%, 13%);

    /* Bordes */
    --border:       rgba(255,255,255,0.07);
    --border-focus: rgba(99,163,255,0.4);

    /* Texto */
    --text:         hsl(220, 20%, 90%);
    --text-muted:   hsl(220, 10%, 55%);
    --text-subtle:  hsl(220, 10%, 35%);

    /* Acentos neón */
    --neon-cyan:    hsl(185, 100%, 52%);
    --neon-purple:  hsl(265, 80%, 65%);
    --neon-green:   hsl(145, 90%, 50%);
    --neon-red:     hsl(0, 85%, 62%);
    --neon-amber:   hsl(38, 95%, 55%);

    /* Sombras neón */
    --glow-cyan:   0 0 18px rgba(0,220,200,0.18);
    --glow-purple: 0 0 18px rgba(130,80,255,0.18);
    --glow-green:  0 0 18px rgba(50,220,110,0.18);
    --glow-red:    0 0 18px rgba(255,70,70,0.18);

    /* Transiciones */
    --t-fast:   140ms ease;
    --t-normal: 280ms ease;
    --t-spring: 420ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Border radius */
    --r-sm:  8px;
    --r-md:  14px;
    --r-lg:  20px;
    --r-xl:  28px;

    /* Espaciado */
    --sp-xs: 4px;
    --sp-sm: 8px;
    --sp-md: 16px;
    --sp-lg: 24px;
    --sp-xl: 32px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ── Loader inicial ────────────────────────────────────────────────────────── */
.loader-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-xl);
    background: var(--bg);
    z-index: 9999;
}

.loader-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    animation: fadeInUp 0.6s var(--t-spring);
}

/* Ícono FA del loader */
.loader-logo-icon {
    font-size: 3rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 16px rgba(0,220,200,0.5));
    display: block;
    text-align: center;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ── Layout principal ──────────────────────────────────────────────────────── */
#app {
    min-height: 100dvh;
}

.app-layout {
    display: flex;
    min-height: 100dvh;
}

/* ── Barra de navegación ───────────────────────────────────────────────────── */
/* Mobile: barra inferior fija */
.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: var(--sp-sm) 0;
    padding-bottom: max(var(--sp-sm), env(safe-area-inset-bottom));
}

/* Desktop: barra lateral izquierda */
@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 80px;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        border-top: none;
        border-right: 1px solid var(--border);
        padding: var(--sp-xl) 0 var(--sp-lg);
        gap: 4px;
    }
}

/* ── Área de contenido principal ───────────────────────────────────────────── */
.main-content {
    flex: 1;
    padding: var(--sp-md);
    padding-bottom: calc(72px + var(--sp-md)); /* espacio barra bottom mobile */
    min-width: 0;
}

/* Desktop: contenido centrado */
@media (min-width: 768px) {
    .main-content {
        margin-left: 80px;
        padding: var(--sp-xl);
        padding-bottom: var(--sp-xl);
        display: flex;
        justify-content: center;
    }
}

/* Wrapper interno que limita el ancho y centra */
.content-wrapper {
    width: 100%;
}

@media (min-width: 768px) {
    .content-wrapper {
        max-width: 860px;
    }
}

/* ── Nav items ─────────────────────────────────────────────────────────────── */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 14px;
    border-radius: var(--r-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--t-fast);
    border: none;
    background: none;
    position: relative;
    text-decoration: none;
    width: 100%;
}

.nav-item .nav-icon {
    font-size: 1.05rem;    /* FA icons — más chico que emoji */
    transition: transform var(--t-spring);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-item .nav-label {
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
}

.nav-item:hover,
.nav-item.active {
    color: var(--neon-cyan);
}

.nav-item.active .nav-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 5px rgba(0,220,200,0.7));
}

/* Indicador activo — línea inferior (mobile) */
.nav-item.active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 2px;
    background: var(--neon-cyan);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 8px rgba(0,220,200,0.6);
}

/* Indicador activo — línea lateral (desktop) */
@media (min-width: 768px) {
    .nav-item {
        width: 100%;
        border-radius: 0;
        padding: 12px 0;
    }

    .nav-item.active::before {
        bottom: auto;
        left: -1px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 28px;
        border-radius: 0 3px 3px 0;
    }
}

/* ── Logo en sidebar desktop ───────────────────────────────────────────────── */
.sidebar-logo {
    display: none;
}

@media (min-width: 768px) {
    .sidebar-logo {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 0 var(--sp-lg);
        margin-bottom: var(--sp-sm);
        border-bottom: 1px solid var(--border);
        width: 100%;
    }

    .sidebar-logo-icon {
        font-size: 1.4rem;
        color: var(--neon-cyan);
        filter: drop-shadow(0 0 8px rgba(0,220,200,0.4));
    }
}

/* ── Cards Bento ───────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    position: relative;
    overflow: hidden;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.025) 0%, transparent 60%);
    pointer-events: none;
}

.card-cyan   { border-color: rgba(0,220,200,0.2);  box-shadow: var(--glow-cyan);   }
.card-purple { border-color: rgba(130,80,255,0.2); box-shadow: var(--glow-purple); }
.card-green  { border-color: rgba(50,220,110,0.2); box-shadow: var(--glow-green);  }
.card-red    { border-color: rgba(255,70,70,0.2);  box-shadow: var(--glow-red);    }

/* ── Bento Grid ────────────────────────────────────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
}

.bento-full  { grid-column: 1 / -1; }
.bento-left  { grid-column: 1; }
.bento-right { grid-column: 2; }

@media (min-width: 600px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    .bento-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }
}

/* ── Tipografía ────────────────────────────────────────────────────────────── */
.display-amount {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.label-sm {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.label-md  { font-size: 0.85rem; color: var(--text-muted); }
h2         { font-size: 1.2rem; font-weight: 600; }
h3         { font-size: 1rem; font-weight: 600; }

/* ── Colores ───────────────────────────────────────────────────────────────── */
.text-cyan   { color: var(--neon-cyan);   }
.text-purple { color: var(--neon-purple); }
.text-green  { color: var(--neon-green);  }
.text-red    { color: var(--neon-red);    }
.text-amber  { color: var(--neon-amber);  }
.text-muted  { color: var(--text-muted);  }

/* ── Botones ───────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    padding: 10px 18px;
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--t-fast);
    white-space: nowrap;
    line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, var(--neon-cyan), hsl(200,100%,45%));
    color: hsl(225,25%,7%);
    box-shadow: 0 4px 16px rgba(0,200,190,0.3);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,200,190,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { background: var(--bg-elevated); color: var(--text); border-color: rgba(255,255,255,0.12); }

.btn-danger {
    background: rgba(255,70,70,0.12);
    color: var(--neon-red);
    border: 1px solid rgba(255,70,70,0.2);
}
.btn-danger:hover:not(:disabled) { background: rgba(255,70,70,0.2); }

.btn-block { width: 100%; }
.btn-sm    { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon  { padding: 8px; width: 34px; height: 34px; border-radius: var(--r-sm); }

/* ── FAB ────────────────────────────────────────────────────────────────────── */
.fab {
    position: fixed;
    bottom: calc(68px + var(--sp-md) + env(safe-area-inset-bottom));
    right: var(--sp-md);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--neon-cyan), hsl(200,100%,45%));
    color: hsl(225,25%,7%);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0,200,190,0.4);
    cursor: pointer;
    border: none;
    z-index: 90;
    transition: all var(--t-spring);
}
.fab:hover { transform: scale(1.08); box-shadow: 0 8px 30px rgba(0,200,190,0.55); }

@media (min-width: 768px) {
    .fab { bottom: var(--sp-xl); right: var(--sp-xl); }
}

/* ── Formularios ───────────────────────────────────────────────────────────── */
.form-group   { display: flex; flex-direction: column; gap: var(--sp-xs); }
.form-label   { font-size: 0.82rem; font-weight: 500; color: var(--text-muted); }

.form-input,
.form-select,
.form-textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    padding: 10px 14px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99,163,255,0.1);
}
.form-input::placeholder { color: var(--text-subtle); }

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.form-textarea  { resize: vertical; min-height: 80px; }
.form-error     { color: var(--neon-red); font-size: 0.78rem; margin-top: 2px; }

/* Input con ícono a la derecha (ej: toggle password) */
.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 44px; }
.input-icon-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 4px;
    transition: color var(--t-fast);
}
.input-icon-btn:hover { color: var(--text); }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn var(--t-fast);
}
@media (min-width: 480px) {
    .modal-backdrop { align-items: center; }
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 90dvh;
    overflow-y: auto;
    padding: var(--sp-lg);
    animation: slideUp var(--t-spring);
}
@media (min-width: 480px) {
    .modal { border-radius: var(--r-xl); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
}
.modal-close {
    background: var(--bg-elevated);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all var(--t-fast);
    flex-shrink: 0;
}
.modal-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }

/* ── Toasts ────────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    top: var(--sp-md);
    right: var(--sp-md);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    pointer-events: none;
}
.toast {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 11px 15px;
    min-width: 220px;
    max-width: 300px;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    animation: slideInRight var(--t-spring);
    pointer-events: all;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    font-size: 0.88rem;
}
.toast-success { border-left: 3px solid var(--neon-green); }
.toast-error   { border-left: 3px solid var(--neon-red);   }
.toast-info    { border-left: 3px solid var(--neon-cyan);   }

.toast-icon { font-size: 0.9rem; flex-shrink: 0; }

/* ── Transacciones ─────────────────────────────────────────────────────────── */
.transaction-list  { display: flex; flex-direction: column; gap: var(--sp-sm); }
.transaction-item {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 11px var(--sp-md);
    transition: all var(--t-fast);
    animation: fadeInUp 0.25s ease;
}
.transaction-item:hover { border-color: rgba(255,255,255,0.1); background: var(--bg-elevated); }

.transaction-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.transaction-info  { flex: 1; min-width: 0; }
.transaction-name  { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.92rem; }
.transaction-meta  { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.transaction-amount { font-weight: 700; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* ── Barra de progreso ─────────────────────────────────────────────────────── */
.progress-bar  { background: var(--bg-elevated); border-radius: 999px; height: 6px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1); }

/* ── Badge ─────────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-green  { background: rgba(50,220,110,0.12); color: var(--neon-green);  }
.badge-red    { background: rgba(255,70,70,0.12);  color: var(--neon-red);    }
.badge-cyan   { background: rgba(0,220,200,0.12);  color: var(--neon-cyan);   }
.badge-amber  { background: rgba(255,180,50,0.12); color: var(--neon-amber);  }

/* ── Dot de presencia ──────────────────────────────────────────────────────── */
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online  { background: var(--neon-green); box-shadow: 0 0 6px rgba(50,220,110,0.7); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--text-subtle); }

/* ── Login ─────────────────────────────────────────────────────────────────── */
.login-screen {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-lg);
    background: var(--bg);
}
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: var(--sp-xl);
    width: 100%;
    max-width: 380px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4), var(--glow-cyan);
    animation: scaleIn 0.5s var(--t-spring);
}
.login-logo     { text-align: center; margin-bottom: var(--sp-xl); }
.login-logo-icon {
    font-size: 2.8rem;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 14px rgba(0,220,200,0.5));
    display: block;
    margin-bottom: var(--sp-sm);
}

/* ── Page header ───────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
}
.page-title { font-size: 1.35rem; font-weight: 700; }

/* ── Dividers ──────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-md) 0; }

/* ── Flex utils ────────────────────────────────────────────────────────────── */
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-xs         { gap: var(--sp-xs); }
.gap-sm         { gap: var(--sp-sm); }
.gap-md         { gap: var(--sp-md); }
.gap-lg         { gap: var(--sp-lg); }
.flex-1         { flex: 1; }
.mb-sm          { margin-bottom: var(--sp-sm); }
.mb-md          { margin-bottom: var(--sp-md); }
.mb-lg          { margin-bottom: var(--sp-lg); }
.mt-md          { margin-top: var(--sp-md); }
.mt-lg          { margin-top: var(--sp-lg); }

/* ── Skeleton ──────────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-card) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--r-sm);
}

/* ── Empty state ───────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: var(--sp-xl) var(--sp-lg); color: var(--text-muted); }
.empty-state .empty-icon { font-size: 2rem; margin-bottom: var(--sp-md); display: block; opacity: 0.4; color: var(--text-subtle); }

/* ── Métodos de pago ───────────────────────────────────────────────────────── */
.pm-cash     { background: rgba(50,220,110,0.1); color: var(--neon-green); }
.pm-card     { background: rgba(130,80,255,0.1); color: var(--neon-purple); }
.pm-transfer { background: rgba(0,220,200,0.1);  color: var(--neon-cyan); }

/* ── Type toggle buttons (income/expense) ──────────────────────────────────── */
.type-toggle {
    display: flex;
    background: var(--bg-elevated);
    border-radius: var(--r-md);
    padding: 4px;
    gap: 4px;
}
.type-toggle .btn { flex: 1; }

/* ── Animaciones ───────────────────────────────────────────────────────────── */
@keyframes fadeIn       { from { opacity:0 } to { opacity:1 } }
@keyframes fadeInUp     { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:translateY(0) } }
@keyframes slideUp      { from { transform:translateY(100%) } to { transform:translateY(0) } }
@keyframes slideInRight { from { opacity:0; transform:translateX(16px) } to { opacity:1; transform:translateX(0) } }
@keyframes scaleIn      { from { opacity:0; transform:scale(0.94) } to { opacity:1; transform:scale(1) } }
@keyframes spin         { to { transform:rotate(360deg) } }
@keyframes pulse        { 0%,100%{ opacity:1 } 50%{ opacity:0.6 } }
@keyframes shimmer      { to { background-position:-200% 0 } }
@keyframes shake {
    0%,100% { transform: translateX(0) }
    20%     { transform: translateX(-7px) }
    40%     { transform: translateX(7px) }
    60%     { transform: translateX(-4px) }
    80%     { transform: translateX(4px) }
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }

/* ── Pantalla "Mis fijos" — filas verticales compactas (mobile-first) ─────── */
.fx-list { display: flex; flex-direction: column; gap: 10px; }

.fx-row {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--r-md); padding: 12px;
    transition: border-color var(--t-fast);
}
.fx-row:focus-within { border-color: var(--border-focus); }

.fx-head {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
}
.fx-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex-shrink: 0;
    background: var(--bg-elevated);
}
.fx-name {
    flex: 1; font-weight: 600; font-size: 0.95rem;
    min-width: 0;
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}

.fx-amount-line {
    display: flex; align-items: stretch; gap: 8px;
}
.fx-amount-line .fx-amount { flex: 1; }

.fx-meta-line { display: flex; gap: 8px; }
.fx-meta-line > * { flex: 1; min-width: 0; }

.fx-input {
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text);
    padding: 10px 12px; font-size: 0.95rem; font-family: inherit;
    min-width: 0; width: 100%;
    -webkit-appearance: none; appearance: none;
}
.fx-input:focus { outline: none; border-color: var(--border-focus); }
.fx-input:disabled { opacity: 0.5; cursor: not-allowed; }

.fx-input.fx-amount {
    text-align: right; font-weight: 700; font-size: 1.15rem;
    letter-spacing: 0.02em;
}
.fx-input.fx-date { font-size: 0.88rem; }
.fx-input.fx-freq {
    font-size: 0.88rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='%23888' d='M6 9L1.5 4h9z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.fx-action {
    flex-shrink: 0;
    min-width: 48px;
    padding: 0 14px; font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px;
}
