/* ===== Nave Trading OS — Shared components: buttons, forms, spinner, toast, modal, FAB, cuentas ===== */
/* Extracted from style.css — 2026-06-19 */

/* ── Buttons v2 ── */
.btn {
    padding: 0.5rem 0.9rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-standard);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    line-height: 1;
}
.btn-primary {
    background: var(--brand-400);
    color: #fff;
    border: 1px solid transparent;
}
.btn-primary:hover {
    background: var(--brand-500);
    box-shadow: none;
}
.btn-secondary {
    background: transparent;
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
}
.btn-secondary:hover {
    background: var(--gray-150);
    border-color: var(--gray-400);
    box-shadow: none;
}
.btn-sm { padding: 0.25rem 0.5rem; font-size: var(--text-xs); }
.btn-danger {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}
.btn-danger:hover {
    background: rgba(37, 99, 235, 0.10);
    border-color: var(--brand-400);
    color: var(--brand-400);
}

/* ── Data Display Utilities v2 ── */
.num {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}
.num--positive { color: var(--brand-400); }
.num--negative { color: var(--gray-950); }
.num--neutral  { color: var(--gray-800); }
.num--large    { font-size: var(--text-xl); font-weight: var(--font-bold); }
.num--medium   { font-size: var(--text-lg); font-weight: var(--font-semibold); }

/* ── Badges v2 ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-xs);
    font-family: var(--font-sans);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}
.badge--success  { background: rgba(37, 99, 235, 0.10); color: var(--brand-400); }
.badge--danger   { background: rgba(226, 232, 239, 0.08); color: var(--gray-950); }
.badge--warning  { background: var(--amber-400-bg); color: var(--amber-500); }
.badge--info     { background: var(--brand-400-bg); color: var(--brand-400); }
.badge--neutral  { background: rgba(107, 114, 132, 0.1); color: var(--gray-600); }


/* ===== CANDLE TIMER ===== */
.candle-timer-wrap {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(15,23,42,0.8);
    border: 1px solid rgba(100,116,139,0.2);
    transition: border-color 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}
.candle-timer-svg {
    display: block;
}
.candle-timer-svg circle {
    transition: stroke 0.5s, stroke-dashoffset 0.8s linear;
}
.ct-urgent {
    border-color: rgba(245,158,11,0.4);
    box-shadow: 0 0 8px rgba(245,158,11,0.15);
}
.ct-closing {
    border-color: rgba(37,99,235,0.5);
    box-shadow: 0 0 10px rgba(37,99,235,0.2);
    animation: ct-pulse 0.5s ease-in-out infinite;
}
@keyframes ct-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(37,99,235,0.2); }
    50% { box-shadow: 0 0 18px rgba(37,99,235,0.45); }
}

/* ===== SPINNER ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}
@keyframes card-glow {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

.spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(11, 15, 25, 0.3);
    border-top-color: #0b0f19;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

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

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    pointer-events: none;
}
.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: toast-in 0.3s ease-out;
    pointer-events: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast.removing { animation: toast-out 0.25s ease-in forwards; }
.toast.success { border-color: rgba(34, 197, 94, 0.4); }
.toast.success .toast-icon { color: var(--win); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }
.toast.error .toast-icon { color: var(--loss); }
.toast .toast-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ===== TRADE CARD GLOW (new/updated) ===== */
.trade-card.just-saved {
    animation: card-glow 1s ease-out;
}

/* ===== MODAL (for image preview) ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: pointer;
}
.modal-overlay.show { display: flex; }
.modal-overlay img { max-width: 90%; max-height: 90%; border-radius: 8px; }

/* ── Cuentas Panel (Inicio) ── */
.cuentas-balance-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 0;
}
.cuentas-balance-row + .cuentas-balance-row {
    border-top: 1px solid var(--border);
}
.cuentas-balance-label {
    display: flex; align-items: center; gap: var(--gap-sm);
    font-size: 0.9rem; color: var(--text-secondary);
}
.cuentas-balance-label strong {
    color: var(--text); font-weight: 500;
}
.cuentas-balance-value {
    font-family: 'Space Grotesk', monospace;
    font-size: 1.05rem; font-weight: 700;
    color: var(--text);
}
.cuentas-divider {
    border: none; border-top: 1px solid var(--border);
    margin: 0.85rem 0;
}
.cuentas-transfer-form {
    display: flex; gap: 0.4rem; align-items: center;
}
.cuentas-transfer-input {
    flex: 1; min-width: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    color: var(--text);
    font-family: 'Space Grotesk', monospace;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}
.cuentas-transfer-input:focus { border-color: var(--accent); }
.cuentas-transfer-select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
}
.cuentas-transfer-select:focus { border-color: var(--accent); }
.cuentas-transfer-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.cuentas-transfer-btn:hover { opacity: 0.85; }
.cuentas-transfer-btn:disabled { opacity: 0.4; cursor: not-allowed; }


/* ===== EXPLICACIONES PAGE ===== */
.explicaciones-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}
.expl-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: border-color 0.2s;
}
.expl-card:hover { border-color: var(--border); }
.expl-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem 0;
}
.expl-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.expl-card-body {
    padding: 1rem 1.5rem 1.5rem;
}
.expl-card-body p {
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}
.expl-card-body p:last-child { margin-bottom: 0; }
.expl-card-body h4 {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-card-body h4:first-child { margin-top: 0; }

/* Diagram */
.expl-diagram {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
}
.expl-flow {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    justify-content: center;
    flex-wrap: wrap;
    min-width: fit-content;
}
.expl-node {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    text-align: center;
    min-width: 80px;
    transition: border-color 0.2s;
}
.expl-node:hover { border-color: var(--accent); }
.expl-node span { font-size: 1.5rem; display: block; margin-bottom: 0.25rem; }
.expl-node small { color: var(--text-secondary); font-size: 0.75rem; font-weight: 500; }
.expl-arrow {
    font-size: 1.25rem;
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

/* Steps */
.expl-steps {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}
.expl-steps li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}
.expl-steps li strong { color: var(--text-primary); }

/* Code blocks */
.expl-code-block {
    background: #0b0f19;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}
.expl-code-block code { color: var(--accent); }

/* Table */
.expl-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}
.expl-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-subtle);
}
.expl-table td {
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.expl-table td strong { color: var(--text-primary); }
.expl-table td code {
    background: var(--bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent);
}

/* Note */
.expl-note {
    background: rgba(18,183,106,0.08);
    border: 1px solid rgba(18,183,106,0.2);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0 0;
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Menu grid */
.expl-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--gap-md);
}
.expl-menu-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-menu-item strong {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}
.expl-menu-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Two column */
.expl-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
    margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
    .expl-two-col { grid-template-columns: 1fr; }
}
.expl-col {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-col h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}
.expl-col p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* List */
.expl-list {
    padding-left: 1.25rem;
    margin: 0.5rem 0 0;
}
.expl-list li {
    padding: 0.3rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}
.expl-list li strong { color: var(--text-primary); }

/* Security grid */
.expl-security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap-md);
    margin-top: 0.75rem;
}
.expl-security-item {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
}
.expl-security-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.expl-security-item p {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.expl-security-item ul {
    padding-left: 1.1rem;
    margin: 0;
}
.expl-security-item ul li {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.15rem 0;
    line-height: 1.4;
}

/* Links */
.explicaciones-page a {
    color: var(--accent);
    text-decoration: none;
}
.explicaciones-page a:hover { text-decoration: underline; }


/* ===== FAB — FLOATING ACTION BUTTON ===== */
.fab-container {
    position: fixed;
    top: 55%;
    left: 0.75rem;
    z-index: 600;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 0.75rem;
    transform: translateY(-50%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Backdrop — closes fab on click */
.fab-backdrop {
    display: none;
}

/* Main trigger button */
.fab-main {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26, 34, 51, 0.75), rgba(17, 24, 39, 0.85));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 0 0 1px rgba(56, 189, 248, 0.06);
    z-index: 601;
    flex-shrink: 0;
    order: 0;
}
.fab-main:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 0 24px rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}
.fab-main:active {
    transform: scale(0.95);
}

/* 3 dots — diagonal dice arrangement */
.fab-dots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 5px;
    width: 24px;
    height: 24px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-container.open .fab-dots {
    transform: rotate(45deg);
}
.fab-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.4);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Dice 3 pattern: top-left → center → bottom-right */
.fab-dot:nth-child(1) { grid-column: 1; grid-row: 1; }
.fab-dot:nth-child(2) { grid-column: 2; grid-row: 2; }
.fab-dot:nth-child(3) { grid-column: 3; grid-row: 3; }

.fab-container.open .fab-dot {
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.6);
}

/* Expanded menu — squares stack upward */
.fab-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    align-items: center;
}

.fab-item {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(26, 34, 51, 0.7), rgba(17, 24, 39, 0.8));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.03) inset;
    position: relative;
    opacity: 0;
    transform: translateY(16px) scale(0.85);
    pointer-events: none;
}
.fab-item:nth-child(1) { transition-delay: 0.15s; }
.fab-item:nth-child(2) { transition-delay: 0.10s; }
.fab-item:nth-child(3) { transition-delay: 0.05s; }
.fab-item:nth-child(4) { transition-delay: 0s; }

.fab-container.open .fab-item {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.fab-item:hover {
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.05) inset,
        0 0 20px rgba(56, 189, 248, 0.18);
    transform: translateY(-3px) scale(1.05);
}
.fab-item:active {
    transform: scale(0.9);
}

.fab-item-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}
.fab-item:hover .fab-item-icon {
    transform: scale(1.15);
}

.fab-item-label {
    position: absolute;
    left: -5.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    color: var(--text-secondary);
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.fab-item:hover .fab-item-label {
    opacity: 1;
}
.fab-container.open .fab-item-label {
    opacity: 0.7;
}

/* Mobile — smaller, same position */
@media (max-width: 768px) {
    .fab-container {
        top: 55%;
        bottom: auto;
        left: 0.5rem;
        transform: translateY(-50%);
        gap: var(--gap-sm);
    }
    .fab-main {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    .fab-dots {
        width: 20px;
        height: 20px;
        gap: 4px;
    }
    .fab-dot {
        width: 4px;
        height: 4px;
    }
    .fab-item {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    .fab-item-icon {
        font-size: 1rem;
    }
    .fab-menu {
        gap: var(--gap-sm);
    }
    .fab-item-label {
        left: -4.5rem;
        font-size: 0.55rem;
    }
}

/* ===== CUENTAS MODAL — VAULT ===== */
.fab-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 4, 10, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: cm-fade 0.25s ease;
}
@keyframes cm-fade { from { opacity: 0; } to { opacity: 1; } }

.cm-shell {
    background: linear-gradient(175deg, #0c1220 0%, #060913 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    width: 420px;
    max-width: calc(100vw - 2rem);
    max-height: 92vh;
    overflow-y: auto;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.015) inset,
        0 0 120px rgba(56, 189, 248, 0.03);
    animation: cm-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    padding: 1.75rem 1.5rem 1.5rem;
}
@keyframes cm-pop {
    from { transform: scale(0.82) translateY(48px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.cm-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #334155;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}
.cm-close:hover { color: #f87171; }

/* ── Header ── */
.cm-header {
    text-align: center;
    margin-bottom: 1.35rem;
}
.cm-header h3 {
    font-size: 0.7rem;
    font-weight: 500;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 0.25rem;
}
.cm-header-total {
    font-size: 2.4rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    color: #fff;
    letter-spacing: -0.8px;
    transition: all 0.3s ease;
}

/* ── Vault ── */
.cm-vault {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    margin-bottom: 1.35rem;
    background: rgba(255, 255, 255, 0.012);
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 18px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}
.cm-vault:has(.cm-vault-side:hover) {
    border-color: rgba(255, 255, 255, 0.06);
}

.cm-vault-side {
    padding: 1.35rem 0.9rem 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease;
}
.cm-vault-side.left  { background: rgba(56, 189, 248, 0.025); }
.cm-vault-side.right { background: rgba(167, 139, 250, 0.025); }
.cm-vault-side:hover { background: rgba(255, 255, 255, 0.02); }

.cm-vault-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.25;
    top: -20px;
    transition: opacity 0.4s ease;
}
.cm-vault-side:hover .cm-vault-glow { opacity: 0.4; }
.cm-vault-side.left  .cm-vault-glow { background: #38bdf8; left: -20px; }
.cm-vault-side.right .cm-vault-glow { background: #a78bfa; right: -20px; }

.cm-vault-icon {
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
    margin-bottom: 0.15rem;
}

.cm-vault-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}
.cm-vault-amount {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Space Grotesk', monospace;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
    transition: all 0.3s ease;
}
.cm-vault-side.left  .cm-vault-amount { color: #7dd3fc; }
.cm-vault-side.right .cm-vault-amount { color: #c4b5fd; }

.cm-vault-desc {
    font-size: 0.6rem;
    color: #3b4558;
    position: relative;
    z-index: 1;
    margin-top: 0.15rem;
}

/* ── Divider ── */
.cm-vault-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 36px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.cm-divider-line {
    flex: 1;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 30%,
        rgba(255, 255, 255, 0.06) 70%,
        transparent 100%
    );
}

.cm-divider-pill {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cm-divider-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.cm-divider-arrow {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

/* ── Transfer ── */
.cm-transfer {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 1rem;
}
.cmt-tabs {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
    background: rgba(255, 255, 255, 0.012);
    border-radius: 10px;
    padding: 3px;
}
.cmt-tab {
    flex: 1;
    padding: 0.4rem 0.35rem;
    border: none;
    background: transparent;
    color: #3b4558;
    font-size: 0.67rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    letter-spacing: 0.15px;
    white-space: nowrap;
}
.cmt-tab:hover { color: #94a3b8; }
.cmt-tab.active {
    background: rgba(255, 255, 255, 0.035);
    color: #e2e8f0;
    font-weight: 600;
}

.cmt-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cmt-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.cmt-currency {
    position: absolute;
    left: 0.75rem;
    color: #3b4558;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Space Grotesk', monospace;
    pointer-events: none;
    transition: color 0.2s;
}
.cmt-input-wrap:focus-within .cmt-currency { color: #94a3b8; }

.cmt-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    color: #fff;
    padding: 0.6rem 0.75rem 0.6rem 1.55rem;
    font-size: 0.9rem;
    font-family: 'Space Grotesk', monospace;
    font-weight: 500;
    outline: none;
    transition: all 0.2s;
}
.cmt-input:focus {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.025);
}
.cmt-input::placeholder { color: #1a2233; }

.cmt-btn {
    padding: 0.6rem 1rem;
    background: #fff;
    color: #060913;
    border: none;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
}
.cmt-btn:hover {
    background: #e2e8f0;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}
.cmt-btn:active { transform: scale(0.97) translateY(0); }

.cuentas-modal-msg {
    margin-top: 0.55rem;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    animation: cm-msg-in 0.2s ease;
}
@keyframes cm-msg-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cuentas-modal-msg.success {
    background: rgba(34, 197, 94, 0.07);
    color: #4ade80;
}
.cuentas-modal-msg.error {
    background: rgba(239, 68, 68, 0.07);
    color: #f87171;
}

@media (max-width: 768px) {
    .cm-shell {
        width: calc(100vw - 1.25rem);
        border-radius: 20px;
        padding: 1.4rem 0.9rem 1.1rem;
    }
    .cm-header-total { font-size: 2rem; }
    .cm-vault-side { padding: 1.1rem 0.4rem 0.85rem; }
    .cm-vault-amount { font-size: 1.25rem; }
    .cm-vault-icon { font-size: 1.2rem; }
    .cm-vault-label { font-size: 0.6rem; }
    .cm-vault-divider { width: 28px; }
    .cm-divider-pill { width: 24px; height: 24px; border-radius: 7px; }
    .cm-divider-arrow { font-size: 0.7rem; }
}
