/* =============================================
   NEXO 7 PRO — ENTERPRISE BI
   ============================================= */
:root {
    /* === Backgrounds (Absolute Black & Glass) === */
    --bg:        #000000;
    --bg-2:      #09090b;
    --bg-3:      #121214;
    --bg-card:   rgba(18, 18, 20, 0.7);
    --bg-hover:  rgba(255, 255, 255, 0.04);

    /* === Borders (Subtle & Clean) === */
    --border:    rgba(255, 255, 255, 0.12);
    --border-2:  rgba(255, 255, 255, 0.06);
    --border-3:  rgba(255, 255, 255, 0.03);

    /* === Brand Colors — Nexo Pro (Monochrome & iOS inspired) === */
    --nexo-primary:  #ffffff;
    --nexo-accent:   #888888;
    --nexo-grad:     linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
    --nexo-grad-soft: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);

    /* === Palette (Apple iOS Standard Colors) === */
    --purple:    #5E5CE6;
    --purple-2:  #BF5AF2;
    --cyan:      #64D2FF;
    --cyan-2:    #32ADE6;
    --pink:      #FF375F;

    --green:     #30D158;
    --green-2:   #34C759;
    --success:   #34C759;
    --red:       #FF453A;
    --red-2:     #FF3B30;
    --danger:    #FF453A;
    --blue:      #0A84FF;
    --blue-2:    #007AFF;
    --amber:     #FF9F0A;

    /* === Text === */
    --text:      #f4f4f5;
    --text-1:    #ffffff;
    --text-2:    #a1a1aa;
    --text-3:    #71717a;

    /* === Gradients (Subtle for cards) === */
    --grad-main:   linear-gradient(135deg, #27272a, #18181b);
    --grad-green:  linear-gradient(135deg, rgba(48,209,88,0.15), rgba(48,209,88,0.02));
    --grad-red:    linear-gradient(135deg, rgba(255,69,58,0.15), rgba(255,69,58,0.02));
    --grad-blue:   linear-gradient(135deg, rgba(10,132,255,0.15), rgba(10,132,255,0.02));
    --grad-purple: linear-gradient(135deg, rgba(94,92,230,0.15), rgba(94,92,230,0.02));
    --grad-amber:  linear-gradient(135deg, rgba(255,159,10,0.15), rgba(255,159,10,0.02));

    /* === Shadows (Soft & Deep) === */
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:  0 8px 24px rgba(0,0,0,0.6);
    --shadow-lg:  0 16px 40px rgba(0,0,0,0.8);
    --shadow-xl:  0 24px 60px rgba(0,0,0,0.9);

    /* === Radius (Apple style) === */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    /* === Typography === */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    /* === Layout === */
    --sidebar-w: 240px;
    --sidebar-w-collapsed: 68px;
    --topbar-h: 64px;
    --bottom-nav: 68px;
}

/* === Light Theme (Apple Style) === */
body.theme-light {
    --bg:        #f5f5f7;
    --bg-2:      #ffffff;
    --bg-3:      #e5e5ea;
    --bg-card:   rgba(255, 255, 255, 0.85);
    --bg-hover:  rgba(0, 0, 0, 0.04);
    
    --border:    rgba(0, 0, 0, 0.12);
    --border-2:  rgba(0, 0, 0, 0.06);
    --border-3:  rgba(0, 0, 0, 0.03);
    
    --nexo-primary:  #000000;
    --nexo-accent:   #888888;
    --nexo-grad:     linear-gradient(135deg, #1d1d1f 0%, #86868b 100%);
    --nexo-grad-soft: linear-gradient(135deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.01) 100%);
    
    --text:      #1d1d1f;
    --text-1:    #000000;
    --text-2:    #424245;
    --text-3:    #86868b;
    
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.04);
    --shadow-md:  0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg:  0 16px 40px rgba(0,0,0,0.12);
    --shadow-xl:  0 24px 60px rgba(0,0,0,0.16);
    
    --grad-main:   linear-gradient(135deg, #ffffff, #f5f5f7);
}

/* =============================================
   RESET
   ============================================= */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* =============================================
   MARKET WORKSPACE
   ============================================= */
.market-view, .charts-view { max-width: 1440px; margin: 0 auto; padding-bottom: 36px; }
.market-topbar { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; padding:4px 0 24px; border-bottom:1px solid var(--border-2); margin-bottom:24px; }
.market-eyebrow { color:var(--text-3); font-size:0.7rem; font-weight:800; letter-spacing:0.08em; text-transform:uppercase; margin:0 0 6px; }
.market-topbar h2 { font-size:2rem; line-height:1.05; color:var(--text-1); margin:0; }
.market-topbar p:not(.market-eyebrow) { color:var(--text-2); margin:8px 0 0; font-size:0.92rem; }
.market-topbar-actions { display:flex; align-items:center; gap:10px; color:var(--text-3); font-family:var(--mono); font-size:0.72rem; white-space:nowrap; }
.market-opportunity { display:grid; grid-template-columns:1fr auto; gap:24px; align-items:center; border:1px solid rgba(48,209,88,0.42); background:rgba(48,209,88,0.07); border-radius:8px; padding:20px 22px; margin-bottom:28px; }
.market-opportunity.not-viable { border-color:rgba(255,69,58,0.42); background:rgba(255,69,58,0.07); }
.market-opportunity h3 { font-size:1.35rem; color:var(--text-1); margin:0; text-transform:capitalize; }
.market-opportunity h3 span { color:var(--text-3); margin:0 6px; }
.market-opportunity p:not(.market-eyebrow) { color:var(--text-2); font-size:0.86rem; margin:7px 0 0; }
.market-opportunity-value { display:flex; flex-direction:column; align-items:flex-end; font-family:var(--mono); }
.market-opportunity-value strong { color:var(--green-2); font-size:1.7rem; line-height:1; }
.not-viable .market-opportunity-value strong { color:var(--red-2); }
.market-opportunity-value span { color:var(--text-1); font-size:0.77rem; margin-top:6px; }
.market-opportunity-value small { color:var(--text-3); font-size:0.68rem; margin-top:4px; }
.market-section { margin:0 0 28px; }
.market-section-heading { display:flex; justify-content:space-between; align-items:end; gap:16px; margin-bottom:12px; }
.market-section-heading h3 { color:var(--text-1); font-size:1.12rem; margin:0; }
.market-link-button { border:0; background:transparent; color:var(--blue-2); font-weight:700; cursor:pointer; padding:7px 0; }
.market-venues-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(235px, 1fr)); gap:10px; }
.market-venue-card, .market-dollar-card { background:var(--bg-card); border:1px solid var(--border-2); border-radius:8px; padding:15px; transition:border-color .18s ease, transform .18s ease; }
.market-venue-card:hover, .market-dollar-card:hover { border-color:rgba(100,210,255,0.42); transform:translateY(-2px); }
.market-venue-card.best-buy { border-color:rgba(48,209,88,0.42); }
.market-card-name { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--text-1); font-size:0.9rem; font-weight:800; text-transform:capitalize; }
.market-card-name small { color:var(--green-2); background:rgba(48,209,88,0.1); padding:3px 6px; border-radius:4px; font-size:0.62rem; font-weight:800; text-transform:uppercase; }
.market-price-row { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:16px 0; }
.market-price-row div { min-width:0; }
.market-price-row span, .market-dollar-card small { display:block; color:var(--text-3); font-size:0.65rem; font-weight:700; text-transform:uppercase; margin-bottom:4px; }
.market-price-row strong { display:block; font-family:var(--mono); font-size:0.95rem; white-space:nowrap; }
.price-buy { color:var(--green-2); }.price-sell { color:var(--red-2); }
.market-card-footer { display:flex; justify-content:space-between; border-top:1px solid var(--border-2); padding-top:10px; color:var(--text-3); font-size:0.7rem; }
.market-card-footer strong { color:var(--text-2); font-family:var(--mono); }
.market-dollar-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:10px; }
.market-dollar-card { display:grid; grid-template-columns:1fr 0.8fr 0.8fr; gap:10px; align-items:center; }
.market-dollar-card > span { color:var(--text-1); font-size:0.84rem; font-weight:800; }
.market-dollar-card strong { color:var(--text-1); font-family:var(--mono); font-size:0.8rem; }
.market-empty { grid-column:1 / -1; border:1px dashed var(--border); border-radius:8px; padding:26px; text-align:center; color:var(--text-3); }
.market-error { color:var(--danger); }
.chart-selector { display:flex; padding:4px; background:var(--bg-3); border:1px solid var(--border-2); border-radius:8px; }
.chart-selector-button { border:0; background:transparent; color:var(--text-3); padding:8px 12px; font-size:0.78rem; font-weight:700; border-radius:5px; cursor:pointer; }
.chart-selector-button.active { background:var(--blue); color:#fff; }
.chart-stage { background:var(--bg-card); border:1px solid var(--border-2); border-radius:8px; overflow:hidden; }
.chart-stage-header { display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--border-2); }
.chart-stage-header h3 { color:var(--text-1); font-size:1.12rem; margin:0; }
.chart-stage-header > span { color:var(--text-3); font-family:var(--mono); font-size:0.72rem; }
.market-chart-widget { height:620px; width:100%; background:#111318; }

/* =============================================
   AMBIENT BACKGROUND (Subtle mesh)
   ============================================= */
.glass-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-image: 
        radial-gradient(ellipse at 80% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(ellipse at 20% 100%, rgba(10, 132, 255, 0.04) 0%, transparent 40%);
}

/* =============================================
   SIDEBAR — NEXO 7
   ============================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--bg-2);
    border-right: 1px solid var(--border-2);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width 0.3s ease;
    overflow: hidden;
}

/* Logo area */
.sidebar-logo {
    padding: 20px 16px 16px;
    border-bottom: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.sidebar-logo-badge {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    color: #000000;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(255,255,255,0.1);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    min-width: 0;
}

.sidebar-logo-text .brand-name {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.sidebar-logo-text .brand-sub {
    font-size: 0.58rem;
    color: var(--text-3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    margin-top: 2px;
}

/* Nav items */
.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.sidebar-section-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    padding: 12px 10px 6px;
    white-space: nowrap;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.18s ease;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid transparent;
    margin-bottom: 2px;
    user-select: none;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-1);
    border-color: transparent;
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-1);
    border-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.sidebar-item.active .sidebar-item-icon {
    filter: none;
}

.sidebar-item-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-item-label {
    font-size: 0.84rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge en sidebar */
.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    border-radius: 999px;
    padding: 1px 6px;
    min-width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border-2);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    margin-bottom: 8px;
}

.sidebar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--nexo-grad);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.62rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--red-2);
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.18s ease;
    border: 1px solid transparent;
    text-decoration: none;
}

.sidebar-logout:hover {
    background: rgba(244,63,94,0.08);
    border-color: rgba(244,63,94,0.15);
}

/* Collapsed sidebar state */
.sidebar.collapsed {
    width: var(--sidebar-w-collapsed);
}
.sidebar.collapsed .sidebar-item-label,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-logo-text,
.sidebar.collapsed .brand-pdfinanzas-wrapper,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-badge,
.sidebar.collapsed .sidebar-logout span {
    display: none;
}
.sidebar.collapsed .sidebar-logo {
    justify-content: center;
    padding: 16px 0;
}
.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 10px;
}
.sidebar.collapsed .sidebar-item-icon {
    width: 100%;
    font-size: 1.1rem;
    text-align: center;
}
.sidebar.collapsed .sidebar-footer {
    padding: 8px 4px;
}
.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 8px;
}
.sidebar.collapsed .sidebar-logout {
    justify-content: center;
    padding: 8px;
}
.sidebar.collapsed .sidebar-nav {
    padding: 8px 4px;
}
.sidebar.collapsed .sidebar-toggle-btn {
    right: -14px;
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s ease;
}
.main-content.sidebar-collapsed {
    margin-left: var(--sidebar-w-collapsed);
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    background: rgba(7, 8, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-1);
}

.topbar-title span {
    color: var(--text-3);
    font-weight: 400;
    font-size: 0.85rem;
    margin-left: 8px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Views container */
.views-container {
    flex: 1;
    padding: 24px;
    max-width: 1500px;
    width: 100%;
}

/* Individual views */
.view {
    display: none;
    animation: fadeIn 0.22s ease;
}

.view.active {
    display: block;
}

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

/* =============================================
   VIEW HEADER
   ============================================= */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.view-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-title h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-1);
}

.view-title-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(255,255,255,0.1);
}

.view-subtitle {
    font-size: 0.8rem;
    color: var(--text-3);
    margin-top: 2px;
    font-weight: 400;
}

.view-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* =============================================
   DASHBOARD KPI CARDS
   ============================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.kpi-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kpi-purple .kpi-icon { color: #ffffff; }
.kpi-green  .kpi-icon { color: var(--green-2); border-color: rgba(52, 199, 89, 0.2); background: rgba(52, 199, 89, 0.05); }
.kpi-red    .kpi-icon { color: var(--red-2); border-color: rgba(255, 59, 48, 0.2); background: rgba(255, 59, 48, 0.05); }
.kpi-blue   .kpi-icon { color: var(--blue-2); }
.kpi-amber  .kpi-icon { color: var(--amber); }

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font); /* Switching to Inter for cleaner look, not mono */
    color: var(--text-1);
    line-height: 1;
    letter-spacing: -0.03em;
}

.kpi-desc {
    font-size: 0.7rem;
    color: var(--text-3);
}

/* =============================================
   DASHBOARD GRID
   ============================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dash-panel {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.dash-panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.01);
}

.dash-panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-panel-body {
    padding: 16px;
}

/* Chart container */
.chart-container-dash {
    height: 340px;
}

/* Recent operations mini-table */
.recent-ops-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.recent-op-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--border-3);
    transition: background 0.15s;
}

.recent-op-item:last-child { border-bottom: none; }

.recent-op-item:hover { background: var(--bg-hover); border-radius: 6px; }

.recent-op-badge {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.recent-op-badge.venta { background: rgba(16,185,129,0.15); }
.recent-op-badge.pago  { background: rgba(244,63,94,0.15); }

.recent-op-info { flex: 1; min-width: 0; }

.recent-op-client {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-op-date {
    font-size: 0.65rem;
    color: var(--text-3);
}

.recent-op-amount {
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--mono);
    white-space: nowrap;
}

.recent-op-amount.positive { color: var(--green-2); }
.recent-op-amount.negative { color: var(--red-2); }

/* =============================================
   PANELS & CARDS (legacy compatible)
   ============================================= */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.02);
    position: sticky;
    top: var(--topbar-h);
    z-index: 50;
}

.panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* =============================================
   SUMMARY CARDS (legacy compatible)
   ============================================= */
.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color 0.2s, transform 0.18s;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.summary-card:hover { border-color: var(--border); transform: translateY(-1px); }

.card-purple::before { background: var(--grad-purple); }
.card-green::before  { background: var(--grad-green); }
.card-red::before    { background: var(--grad-red); }
.card-blue::before   { background: var(--grad-blue); }
.card-gold::before   { background: linear-gradient(90deg, #b45309, #f59e0b); }

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.card-purple .card-icon { background: rgba(139,92,246,0.12); }
.card-green  .card-icon { background: rgba(16,185,129,0.12); }
.card-red    .card-icon { background: rgba(244,63,94,0.12); }
.card-blue   .card-icon { background: rgba(59,130,246,0.12); }
.card-gold   .card-icon { background: rgba(245,158,11,0.12); }

.card-content { flex: 1; min-width: 0; }

.card-content h3 {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    margin-bottom: 4px;
}

.card-content p {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: var(--mono);
    color: var(--text-1);
    line-height: 1.1;
    letter-spacing: -0.5px;
    word-break: break-word;
}

.card-desc {
    font-size: 0.65rem;
    color: var(--text-3);
    display: block;
    margin-top: 3px;
}

/* =============================================
   METRICS GRID (Estadísticas)
   ============================================= */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-card h4 {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}

.metric-card p {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--mono);
    color: var(--text-1);
}

/* =============================================
   OPERATION FORM — NUEVA OPERACIÓN
   ============================================= */
.op-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 16px;
    align-items: start;
}

.op-type-toggle {
    display: flex;
    gap: 6px;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 20px;
}

.op-type-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.op-type-btn.active {
    background: var(--nexo-grad);
    color: #fff;
    box-shadow: 0 2px 10px rgba(139,92,246,0.35);
}

.op-type-btn:not(.active):hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* =============================================
   TABLES
   ============================================= */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-container::-webkit-scrollbar { height: 4px; }
.table-container::-webkit-scrollbar-track { background: transparent; }
.table-container::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 2px; }

.excel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.excel-table thead th {
    background: var(--bg-3);
    color: var(--text-3);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-2);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.excel-table tbody tr {
    border-bottom: 1px solid var(--border-3);
    transition: background 0.15s;
}

.excel-table tbody tr:hover { background: var(--bg-hover); }

.excel-table tbody td {
    padding: 8px 12px;
    color: var(--text-2);
    white-space: nowrap;
}

.excel-table tfoot td {
    padding: 10px 12px;
    font-weight: 700;
    font-family: var(--mono);
    border-top: 1px solid var(--border-2);
    background: var(--bg-3);
    font-size: 0.78rem;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }

.val-positive { color: var(--green-2); }
.val-negative { color: var(--red-2); }

/* Historial filter sticky bar */
.historial-filters {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-2);
    background: var(--bg-2);
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
    position: sticky;
    top: var(--topbar-h);
    z-index: 40;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

.filter-group select,
.filter-group input[type="date"] {
    min-height: 34px;
    padding: 4px 10px;
    font-size: 0.8rem;
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    border-color: var(--purple);
}

/* Client card in historial */
.selected-client-card-bar {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-2);
    background: linear-gradient(135deg, rgba(139,92,246,0.06) 0%, rgba(6,182,212,0.03) 100%);
}

/* =============================================
   DELETE / EDIT BUTTONS
   ============================================= */
.delete-row-btn {
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.15s;
}

.delete-row-btn:hover {
    background: rgba(244,63,94,0.08);
    border-color: rgba(244,63,94,0.3);
    color: var(--red-2);
}

/* =============================================
   FORMS
   ============================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-2);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group { flex: 1; }

input, select, textarea {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-2);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    width: 100%;
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-weight: 500;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

select option { background: #0d1022; color: var(--text); }

input:focus, select:focus, textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
    background: rgba(139,92,246,0.04);
}

.help-text {
    font-size: 0.72rem;
    color: var(--text-3);
    line-height: 1.5;
}

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-icon {
    position: absolute; left: 14px;
    color: var(--text-3); font-weight: 600;
    pointer-events: none; font-size: 0.9rem;
}
.input-with-icon input { padding-left: 34px; }

/* Calculated preview */
.calculated-preview {
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.calculated-preview span { color: var(--text-3); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.calculated-preview strong { font-family: var(--mono); font-size: 1rem; color: var(--green-2); font-weight: 700; }

.warning-preview {
    background: rgba(244,63,94,0.08);
    border: 1px solid rgba(244,63,94,0.2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.warning-preview span { color: var(--text-3); font-size: 0.72rem; font-weight: 600; }
.warning-preview strong { font-family: var(--mono); font-size: 1rem; color: var(--red-2); font-weight: 700; }

/* =============================================
   BUTTONS
   ============================================= */
.submit-btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-purple { background: var(--nexo-grad); color: #fff; box-shadow: 0 4px 16px rgba(139,92,246,0.3); }
.btn-purple:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(139,92,246,0.45); }

.btn-green { background: var(--grad-green); color: #fff; box-shadow: 0 4px 16px rgba(16,185,129,0.25); }
.btn-green:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(16,185,129,0.4); }

.btn-red { background: var(--grad-red); color: #fff; box-shadow: 0 4px 16px rgba(244,63,94,0.25); }
.btn-red:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(244,63,94,0.4); }

.btn-blue { background: var(--grad-blue); color: #fff; box-shadow: 0 4px 16px rgba(59,130,246,0.25); }
.btn-blue:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(59,130,246,0.4); }

.reload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
    white-space: nowrap;
}

.reload-btn:hover { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.25); color: var(--text); }

/* =============================================
   CLIENTS LIST
   ============================================= */
.clientes-list-container { display: flex; flex-direction: column; gap: 0; }

.no-clients { text-align: center; padding: 32px; color: var(--text-3); font-size: 0.85rem; }

.cliente-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-3);
    transition: background 0.15s;
    gap: 10px;
}

.cliente-item:hover { background: var(--bg-hover); }
.cliente-item:last-child { border-bottom: none; }

/* =============================================
   CAJA FINAL
   ============================================= */
.caja-row-section {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--purple-2);
    padding: 6px 12px;
    background: rgba(139,92,246,0.06);
    border-bottom: 1px solid var(--border-3);
}

/* =============================================
   BADGE
   ============================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
}

/* =============================================
   CHAT — ASISTENTE IA
   ============================================= */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-h) - 200px);
    min-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 2px; }

.chat-quick-questions {
    padding: 12px 16px;
    border-top: 1px solid var(--border-2);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(0,0,0,0.15);
}

.quick-question-btn {
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.quick-question-btn:hover {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.3);
    color: var(--text);
}

.chat-input-bar {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-2);
    background: var(--bg-3);
}

.chat-input-bar input {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 0.88rem;
}

/* =============================================
   TICKER / MARKET DATA
   ============================================= */
.ticker-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ticker-item {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    flex: 1;
    min-width: 100px;
    text-align: center;
}

.ticker-exchange {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    margin-bottom: 4px;
}

.ticker-price {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text-1);
}

/* Extractor feedback */
.extractor-feedback {
    background: var(--bg-3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 12px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-2);
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast {
    position: fixed;
    bottom: calc(var(--bottom-nav) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1c2e;
    border: 1px solid var(--border-2);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    max-width: 90vw;
    text-overflow: ellipsis;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.08); color: var(--green-2); }
.toast.error   { border-color: rgba(244,63,94,0.4);  background: rgba(244,63,94,0.08);  color: var(--red-2); }

/* =============================================
   MOBILE BOTTOM NAV
   ============================================= */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav);
    background: rgba(7, 8, 15, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-2);
    z-index: 300;
    padding: 0 4px;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 10px;
    border: none;
    background: none;
    color: var(--text-3);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.18s ease;
    min-width: 48px;
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bottom-nav-btn .nav-icon { font-size: 1.15rem; line-height: 1; }
.bottom-nav-btn .nav-label { font-size: 0.52rem; }
.bottom-nav-btn.active { color: var(--purple-2); }
.bottom-nav-btn:hover { color: var(--text); background: var(--bg-hover); }

/* =============================================
   NOTIFICATION PANEL
   ============================================= */
#notif-panel {
    position: fixed;
    top: calc(var(--topbar-h) + 8px);
    right: 16px;
    width: min(380px, 90vw);
    max-height: 70vh;
    overflow-y: auto;
    background: #0f1326;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    padding: 0;
}

/* =============================================
   UTILITY
   ============================================= */
.text-muted  { color: var(--text-3); }
.cell-client-detail { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

.pulse-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
    display: inline-block;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-2);
    font-size: 0.78rem;
    color: var(--text-2);
}

.mobile-only-block { display: none; }

/* Collapse for WhatsApp in Nueva Op */
.collapsible-section {
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 16px;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-3);
    cursor: pointer;
    user-select: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    transition: all 0.15s;
}

.collapsible-header:hover { background: var(--bg-hover); color: var(--text); }

.collapsible-body {
    padding: 16px;
    border-top: 1px solid var(--border-2);
    display: none;
}

.collapsible-body.open { display: block; }

/* Daily command center: compact information hierarchy for repeated operator use. */
.dashboard-command-metrics { align-items:stretch; }
.dashboard-command-stat {
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    gap:4px;
    padding:12px;
    border:1px solid var(--border-2);
    border-radius:7px;
    background:rgba(255,255,255,.012);
    color:var(--text-1);
    font:inherit;
}
.dashboard-command-stat > span {
    color:var(--text-3);
    font-size:.63rem;
    font-weight:800;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.dashboard-command-stat > strong {
    max-width:100%;
    overflow-wrap:anywhere;
    color:var(--text-1);
    font-family:var(--mono);
    font-size:1rem;
    font-weight:800;
    line-height:1.2;
}
.dashboard-command-stat > small {
    max-width:100%;
    overflow-wrap:anywhere;
    color:var(--text-3);
    font-size:.68rem;
    line-height:1.25;
}
.dashboard-command-stat-action { cursor:pointer; transition:border-color .16s ease, background .16s ease; }
.dashboard-command-stat-action:hover { background:rgba(255,255,255,.045); }
.dashboard-command-stat.is-warning { border-color:rgba(245,158,11,.34); background:rgba(245,158,11,.035); }
.dashboard-command-stat.is-warning > span, .dashboard-command-stat.is-warning > strong { color:#fbbf24; }
.dashboard-command-stat.is-market { border-color:rgba(59,130,246,.32); background:rgba(59,130,246,.035); }
.dashboard-command-stat.is-market > span { color:var(--blue-2); }
.dashboard-command-stat.is-market > strong { font-family:var(--font); font-size:.8rem; }

/* =============================================
   RESPONSIVE (Optimized for iPad Landscape >=992px)
   ============================================= */
@media (max-width: 991px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding-bottom: var(--bottom-nav); }
    .bottom-nav { display: flex; }
    .toast { bottom: calc(var(--bottom-nav) + 12px); }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid-bottom { grid-template-columns: 1fr; }
    .dashboard-command-layout { grid-template-columns: 1fr !important; }
    .dashboard-command-layout > div:first-child { border-right: 0 !important; border-bottom: 1px solid var(--border-2); }
    .dashboard-command-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .op-layout { grid-template-columns: 1fr; }
    .summary-section { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .views-container { padding: 14px; }
    .mobile-only-block { display: block; }
    .historial-filters { top: var(--topbar-h); }
}

@media (max-width: 640px) {
    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .summary-section { grid-template-columns: 1fr 1fr; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .views-container { padding: 10px; }
    .dashboard-command-metrics { grid-template-columns: 1fr 1fr !important; gap:8px !important; }
    .dashboard-command-stat { padding:10px; }
    .dashboard-command-stat > strong { font-size:.9rem; }
    .kpi-value { font-size: 1.2rem; }
    .historial-filters { flex-direction: column; align-items: stretch; }
}

/* Tab compat — legacy hide tabs-header */
.tabs-header { display: none; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* Dashboard panels */
.dash-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dash-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-2);
    flex-shrink: 0;
}

.dash-panel-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dash-panel-body {
    padding: 16px;
    flex: 1;
}

/* Recent ops list in dashboard */
.recent-ops-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 360px;
    overflow-y: auto;
}

.recent-op-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.recent-op-item:hover { background: var(--bg-hover); }

.recent-op-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.recent-op-badge.venta { background: rgba(16,185,129,0.12); }
.recent-op-badge.pago  { background: rgba(244,63,94,0.12); }

.recent-op-info {
    flex: 1;
    min-width: 0;
}

.recent-op-client {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-op-date {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 1px;
}

.recent-op-amount {
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.recent-op-amount.positive { color: var(--green-2); }
.recent-op-amount.negative { color: var(--red-2); }

.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

.card-content p {
    font-size: 1.08rem;
    font-weight: 800;
    font-family: var(--mono);
    color: var(--text-1);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   CAJA VIEW RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    #tab-caja > div[style*="grid-template-columns:400px"] {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================
   P.D FINANZAS CO-BRANDING BRAND STYLES
   ============================================= */
.brand-pdfinanzas-wrapper {
    padding: 10px 14px;
    margin: 8px 12px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(245,158,11,0.06), rgba(245,158,11,0.01));
    border: 1px dashed rgba(245,158,11,0.22);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.brand-pdfinanzas-wrapper:hover {
    border-color: rgba(245,158,11,0.4);
    background: linear-gradient(135deg, rgba(245,158,11,0.09), rgba(245,158,11,0.02));
}

.pdfinanzas-logo-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b45309, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 900;
    color: #fff;
    font-family: var(--font);
    box-shadow: 0 4px 10px rgba(245,158,11,0.25);
    flex-shrink: 0;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.pdfinanzas-logo-circle::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid rgba(245,158,11,0.15);
    pointer-events: none;
}

.pdfinanzas-text-block {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.pdfinanzas-text-block .pd-title {
    font-size: 0.76rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.04em;
}

.pdfinanzas-text-block .pd-sub {
    font-size: 0.52rem;
    color: var(--text-3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
}

/* Badge for Topbar co-branding */
.topbar-co-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.15);
    font-size: 0.72rem;
    color: var(--text-2);
}

.topbar-co-brand strong {
    color: #fbbf24;
    font-weight: 700;
}

/* =============================================
   PRICE CHIP (topbar live price)
   ============================================= */
.price-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.2);
    font-size: 0.72rem;
    font-family: var(--mono);
    font-weight: 700;
    color: var(--text-1);
    cursor: default;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.price-chip.up   { border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.08); }
.price-chip.down { border-color: rgba(244,63,94,0.35);  background: rgba(244,63,94,0.08); }
.price-chip-arrow { font-size: 0.85rem; }
.price-chip-label { font-size: 0.58rem; color: var(--text-3); font-weight: 600; font-family: var(--font); }

/* Alert sound toggle button */
.alert-toggle-btn {
    background: rgba(139,92,246,0.08);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-1);
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.alert-toggle-btn.muted {
    opacity: 0.45;
    border-color: var(--border-2);
    background: transparent;
}
.alert-toggle-btn:hover { border-color: var(--purple); }

/* =============================================
   PRICE ALERT NOTIFICATIONS
   ============================================= */
#price-alerts-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 320px;
}
.price-alert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 14px 16px;
    pointer-events: all;
    animation: alertSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}
.price-alert-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    border-radius: 14px 14px 0 0;
}
.price-alert-card.up   { border-color: rgba(16,185,129,0.3); }
.price-alert-card.up::before { background: var(--grad-green); }
.price-alert-card.down { border-color: rgba(244,63,94,0.3); }
.price-alert-card.down::before { background: var(--grad-red); }
.price-alert-card.hiding {
    animation: alertSlideOut 0.3s ease forwards;
}
.price-alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.price-alert-title {
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.price-alert-close {
    background: none;
    border: none;
    color: var(--text-3);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0;
    line-height: 1;
}
.price-alert-body {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.price-alert-from {
    font-size: 0.78rem;
    color: var(--text-3);
    font-family: var(--mono);
    text-decoration: line-through;
}
.price-alert-to {
    font-size: 1.1rem;
    font-weight: 800;
    font-family: var(--mono);
}
.price-alert-card.up   .price-alert-to { color: var(--green-2); }
.price-alert-card.down .price-alert-to { color: var(--red-2); }
.price-alert-diff {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--mono);
    padding: 2px 7px;
    border-radius: 6px;
}
.price-alert-card.up   .price-alert-diff { background: rgba(16,185,129,0.15); color: var(--green-2); }
.price-alert-card.down .price-alert-diff { background: rgba(244,63,94,0.15);  color: var(--red-2); }
.price-alert-exchange {
    font-size: 0.65rem;
    color: var(--text-3);
    margin-top: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
@keyframes alertSlideIn {
    from { opacity: 0; transform: translateX(60px) scale(0.92); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes alertSlideOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(60px); }
}

/* =============================================
   TV MODAL (Fullscreen chart)
   ============================================= */
#tv-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(4,5,10,0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-direction: column;
    animation: fadeIn 0.22s ease;
}
#tv-modal.open { display: flex; }
#tv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-2);
    flex-shrink: 0;
    background: var(--bg-2);
}
#tv-modal-body {
    flex: 1;
    min-height: 0;
    padding: 10px;
}
#tradingview-modal { width: 100%; height: 100%; }
#tv-modal-close {
    background: rgba(244,63,94,0.1);
    border: 1px solid rgba(244,63,94,0.25);
    border-radius: 10px;
    color: var(--red-2);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 6px;
}
#tv-modal-close:hover { background: rgba(244,63,94,0.2); }

@media (max-width: 991px) {
    #price-alerts-container { bottom: calc(var(--bottom-nav) + 12px); right: 12px; max-width: 280px; }
}

/* =============================================
   OPERATIONAL CONSOLE REFRESH
   ============================================= */
:root {
    --bg: #080a0d;
    --bg-2: #0d1014;
    --bg-3: #14181d;
    --bg-card: #101419;
    --bg-hover: #181d23;
    --border: rgba(173, 184, 196, 0.22);
    --border-2: rgba(173, 184, 196, 0.12);
    --border-3: rgba(173, 184, 196, 0.07);
    --text: #dfe5ea;
    --text-1: #f5f7f9;
    --text-2: #a8b3be;
    --text-3: #71808d;
    --purple: #0f766e;
    --purple-2: #2dd4bf;
    --green: #16a34a;
    --green-2: #4ade80;
    --blue: #2563eb;
    --blue-2: #7aa7ff;
    --amber: #eab308;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

body { background: var(--bg); }
body::before {
    display:none;
}
.glass-bg { background: transparent !important; }

.sidebar { background: #0b0e12; border-right-color: rgba(173,184,196,.13); }
.sidebar-logo { padding: 18px 16px 12px; }
.sidebar-logo-badge { background: #dce8e6; color: #0d5f56; border-radius: 6px; box-shadow: none; }
.sidebar-logo-text .brand-name { letter-spacing: 0; }
.sidebar-logo-badge { font-family: var(--font-mono); font-size: .78rem; font-weight: 600; }
.sidebar-item-icon { display: inline-flex; align-items: center; justify-content: center; font-size: 0; }
.sidebar-item-icon svg, .sidebar-logout svg, .topbar-title svg { width: 17px; height: 17px; stroke-width: 1.8; }
.sidebar-item-icon svg { color: currentColor; }
.topbar-title { display: flex; align-items: center; gap: 7px; }
.topbar-title span { margin-left: 3px; }
.sidebar-logout { gap: 9px; }
.sidebar-logout svg { width: 16px; height: 16px; flex-shrink: 0; }
.brand-pdfinanzas-wrapper { background: #11151a; border: 1px solid rgba(173,184,196,.14); border-radius: 6px; }
.brand-pdfinanzas-wrapper:hover { border-color: rgba(173,184,196,.28); background: #151a20; }
.pdfinanzas-logo-circle { border-radius: 6px; background: #1c242c; box-shadow: none; color: #d8e2eb; border-color: rgba(173,184,196,.16); }
.pdfinanzas-logo-circle::after { display: none; }
.pdfinanzas-text-block .pd-title { color: #d8e2eb; letter-spacing: 0; }
.pdfinanzas-text-block .pd-sub { color: #7f92a6; letter-spacing: 0; }
.sidebar-item { border-radius: 6px; padding: 9px 11px; color: #91a0ad; }
.sidebar-item:hover { background: #151a20; color: #f5f7f9; }
.sidebar-item.active { background: rgba(45,212,191,.09); border-color: rgba(45,212,191,.22); color: #e0fffa; box-shadow: inset 3px 0 0 #2dd4bf; }
.sidebar-section-label { color: #65778a; padding-top: 15px; }
.sidebar-user { background: #151e27; border-radius: 8px; }
.sidebar-user-avatar { background: #0f766e; border-radius: 7px; }

.topbar { height: 68px; background: rgba(11,14,18,.97); border-bottom-color: rgba(173,184,196,.12); padding: 0 24px; }
.topbar-title { font-size: 1.05rem; }
.topbar-actions { gap: 8px; }
.topbar .reload-btn, .topbar-actions > button { border-radius: 7px !important; box-shadow: none !important; }
.price-chip { border-radius: 7px !important; background: #17212b !important; border-color: rgba(45,212,191,.24) !important; }

.workspace-commandbar { min-height: 52px; padding: 0 24px; border-bottom: 1px solid var(--border-2); background: #0d1116; display:flex; align-items:center; justify-content:space-between; gap:16px; }
.workspace-commandbar-context, .workspace-commandbar-actions { display:flex; align-items:center; gap:9px; }
.workspace-commandbar-context { color: var(--text-3); font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.07em; }
.workspace-commandbar-context strong { color: var(--text-2); font-family:var(--mono); font-size:.68rem; font-weight:600; }
.workspace-status-dot { width:8px; height:8px; border-radius:50%; background:#34d399; box-shadow:0 0 0 4px rgba(52,211,153,.12); }
.workspace-action { min-height:32px; padding:0 11px; border:1px solid rgba(173,184,196,.18); border-radius:6px; background:#151a20; color:var(--text-2); font-size:.75rem; font-weight:800; cursor:pointer; transition:background .18s,border-color .18s,color .18s; }
.workspace-action:hover { background:#1d242c; color:#fff; border-color:rgba(122,167,255,.48); }
.workspace-action-primary { background:#0f766e; border-color:#0f766e; color:#ecfdf5; }
.workspace-action-primary:hover { background:#0d9488; border-color:#0d9488; }
.workspace-action-icon { width:32px; padding:0; font-size:1rem; }

/* Theme selection */
.theme-picker { position:relative; }
.theme-picker-menu { display:none; position:absolute; top:calc(100% + 10px); right:0; width:228px; padding:10px; background:#111923; border:1px solid rgba(148,163,184,.24); border-radius:10px; box-shadow:0 18px 44px rgba(0,0,0,.34); z-index:1200; }
.theme-picker.open .theme-picker-menu { display:block; }
.theme-picker-title { padding:4px 7px 9px; color:#7f91a5; font-size:.65rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.theme-option { width:100%; min-height:38px; padding:0 7px; display:grid; grid-template-columns:22px 1fr auto; gap:8px; align-items:center; border:0; border-radius:7px; background:transparent; color:#c5d1dd; text-align:left; font-size:.78rem; font-weight:700; cursor:pointer; }
.theme-option:hover, .theme-option.active { background:#1b2835; color:#fff; }
.theme-option b { color:#5eead4; font-size:.62rem; font-weight:800; }
.theme-swatch { width:18px; height:18px; display:block; border-radius:5px; border:1px solid rgba(255,255,255,.18); }
.theme-swatch-graphite { background:linear-gradient(135deg,#111923 55%,#2dd4bf 56%); }.theme-swatch-light { background:linear-gradient(135deg,#f7fafc 55%,#2563eb 56%); }.theme-swatch-midnight { background:linear-gradient(135deg,#101827 55%,#60a5fa 56%); }.theme-swatch-emerald { background:linear-gradient(135deg,#071a16 55%,#34d399 56%); }

body.theme-light { --bg:#edf2f7; --bg-2:#ffffff; --bg-3:#e5edf5; --bg-card:#ffffff; --bg-hover:#edf5fb; --border:rgba(30,41,59,.22); --border-2:rgba(30,41,59,.13); --border-3:rgba(30,41,59,.08); --text:#1e293b; --text-1:#0f172a; --text-2:#475569; --text-3:#64748b; --purple:#2563eb; --purple-2:#0ea5e9; --green:#16a34a; --green-2:#059669; }
body.theme-light .sidebar, body.theme-light .topbar { background:#f8fafc; }
body.theme-light .sidebar-item.active { background:#e0f2fe; border-color:#bae6fd; color:#0c4a6e; }
body.theme-light .summary-card, body.theme-light .dash-panel, body.theme-light .panel, body.theme-light .metric-card { background:#fff; box-shadow:0 8px 22px rgba(15,23,42,.06); }
body.theme-light .dash-panel-header, body.theme-light .workspace-commandbar { background:#f8fafc; }
body.theme-light input, body.theme-light select, body.theme-light textarea { background:#fff !important; color:#17202a !important; }
body.theme-light .theme-picker-menu { background:#fff; box-shadow:0 18px 44px rgba(15,23,42,.16); }
body.theme-light .theme-option { color:#475569; } body.theme-light .theme-option:hover, body.theme-light .theme-option.active { background:#eaf2fb; color:#0f172a; }
body.theme-light .views-container [style*="color:#fff"]:not(button):not(button *),
body.theme-light .views-container [style*="color:#ffffff"]:not(button):not(button *),
body.theme-light .workspace-commandbar [style*="color:#fff"]:not(button):not(button *) { color:#0f172a !important; }
body.theme-light .views-container [style*="background:rgba(0,0,0"] { background:#f8fafc !important; }
body.theme-light .excel-table thead th { background:#e7eef6; color:#334155; }
body.theme-light .topbar-title, body.theme-light .view-title h2 { color:#0f172a; }

body.theme-midnight { --bg:#0a101c; --bg-2:#0e1726; --bg-3:#152238; --bg-card:#111c2d; --bg-hover:#1a2a42; --border:rgba(125,167,216,.24); --border-2:rgba(125,167,216,.14); --border-3:rgba(125,167,216,.09); --text:#e5edf7; --text-1:#f8fbff; --text-2:#b3c5dc; --text-3:#7187a2; --purple:#2563eb; --purple-2:#60a5fa; --green:#10b981; --green-2:#5eead4; }
body.theme-midnight .sidebar, body.theme-midnight .topbar { background:#0c1421; } body.theme-midnight .workspace-commandbar, body.theme-midnight .dash-panel-header { background:#101c2d; }
body.theme-midnight .summary-card, body.theme-midnight .dash-panel, body.theme-midnight .panel, body.theme-midnight .metric-card { background:#111c2d; border-color:rgba(96,165,250,.2); box-shadow:0 14px 34px rgba(2,6,23,.34); }
body.theme-midnight .workspace-action-primary { background:#1d4ed8; border-color:#1d4ed8; } body.theme-midnight .sidebar-item.active { background:rgba(96,165,250,.13); border-color:rgba(96,165,250,.27); color:#dbeafe; }
body.theme-midnight .glass-bg { background:radial-gradient(ellipse at 88% 0%,rgba(37,99,235,.2),transparent 42%), linear-gradient(180deg,rgba(30,64,175,.14),transparent 320px) !important; }

body.theme-emerald { --bg:#071310; --bg-2:#0b1b17; --bg-3:#112720; --bg-card:#0d201a; --bg-hover:#16352a; --border:rgba(94,234,212,.24); --border-2:rgba(94,234,212,.14); --border-3:rgba(94,234,212,.09); --text:#e4f3ec; --text-1:#f2fff8; --text-2:#b8d4c7; --text-3:#7ca899; --purple:#059669; --purple-2:#5eead4; --green:#22c55e; --green-2:#86efac; --blue:#0f766e; --blue-2:#5eead4; }
body.theme-emerald .sidebar, body.theme-emerald .topbar { background:#091712; } body.theme-emerald .workspace-commandbar, body.theme-emerald .dash-panel-header { background:#0d211a; }
body.theme-emerald .summary-card, body.theme-emerald .dash-panel, body.theme-emerald .panel, body.theme-emerald .metric-card { background:#0d201a; border-color:rgba(94,234,212,.2); box-shadow:0 14px 34px rgba(0,0,0,.34); }
body.theme-emerald .workspace-action-primary { background:#047857; border-color:#047857; } body.theme-emerald .sidebar-item.active { background:rgba(94,234,212,.12); border-color:rgba(94,234,212,.25); color:#d1fae5; }
body.theme-emerald .glass-bg { background:radial-gradient(ellipse at 90% 0%,rgba(16,185,129,.18),transparent 40%), linear-gradient(180deg,rgba(5,150,105,.1),transparent 320px) !important; }

.views-container { max-width: 1680px; padding: 22px 24px 32px; }
.view-header { margin-bottom: 16px; }
.view-title h2 { font-size:1.45rem; }
.view-title-icon { border-radius:8px; background:#17343a; color:#5eead4; box-shadow:none; }

.summary-section { grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; }
.summary-card, .dash-panel, .panel, .metric-card, .kpi-card { border-radius:8px; background:#101419; border-color:rgba(173,184,196,.14); box-shadow:0 12px 28px rgba(0,0,0,.16); }
.summary-card { min-height:128px; padding:16px; }
.summary-card:hover, .dash-panel:hover { border-color:rgba(122,167,255,.3); transform:none; }
.summary-card::before { height:3px; }
.card-purple::before { background:#2dd4bf; }.card-green::before { background:#34d399; }.card-gold::before { background:#fbbf24; }.card-red::before { background:#fb7185; }
.card-icon { width:38px; height:38px; border-radius:8px; }
.card-content h3, .metric-card h4 { font-size:.65rem; color:#8da0b4; }
.card-content p { font-size:1.2rem; letter-spacing:0; }
.dash-panel-header { min-height:56px; padding:14px 16px; background:#13181e; }
.dash-panel-title { font-size:.78rem; letter-spacing:.045em; text-transform:uppercase; }
.dash-panel-body { padding:16px; }
.dashboard-grid { grid-template-columns:minmax(0, 1.25fr) minmax(320px, .75fr); gap:12px; }
.dashboard-grid-bottom { gap:12px; }
.recent-op-item { padding:11px 4px; }
.recent-op-badge { border-radius:7px; }

.form-group label, label { color:#96a4b1; font-size:.7rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
input, select, textarea { background:#0c1014 !important; border-color:rgba(173,184,196,.2) !important; color:#f5f7f9 !important; border-radius:6px !important; }
input:focus, select:focus, textarea:focus { outline:0; border-color:#2dd4bf !important; box-shadow:0 0 0 3px rgba(45,212,191,.1) !important; }
.submit-btn { border-radius:6px; min-height:44px; font-weight:800; box-shadow:none; }
.btn-purple { background:#0f766e; }.btn-blue { background:#1d4ed8; }.btn-green { background:#15803d; }.btn-red { background:#be123c; }
.reload-btn { border-radius:6px; background:#151a20; border-color:rgba(173,184,196,.18); color:#b5c0ca; }
.reload-btn:hover { background:#1d242c; border-color:rgba(122,167,255,.42); color:#fff; }

.table-container, .excel-table { border-color:rgba(148,163,184,.14); }
.excel-table thead th { background:#151a20; color:#91a3b5; font-size:.64rem; letter-spacing:.08em; }
.excel-table tbody td { border-bottom-color:rgba(173,184,196,.09); }
.excel-table tbody tr:hover { background:rgba(122,167,255,.045); }
.modal-content, #notif-panel { background:#101419 !important; border-color:rgba(173,184,196,.2) !important; border-radius:8px !important; }

h1, h2, h3, h4 { letter-spacing:0; font-weight:750; }
.view-subtitle { color:var(--text-3); font-size:.8rem; line-height:1.45; }
.summary-card, .metric-card, .bi-section, .chart-container { animation:none !important; }
.summary-card .card-desc { color:var(--text-3); font-size:.7rem; }
.summary-card .card-content p, .metric-card p { font-family:var(--mono); font-weight:700; }
.table-container { border-radius:8px; background:#0e1217; }

/* Motion system: short, deliberate feedback without delaying operational work. */
:root { --motion-spring: cubic-bezier(.2, .8, .2, 1); --motion-enter: cubic-bezier(.16, 1, .3, 1); }
.view { animation: nexo-view-in 320ms var(--motion-enter) both; }
.modal-content { animation: nexo-modal-in 260ms var(--motion-enter) both; }
.sidebar-item, .workspace-action, .reload-btn, .submit-btn, .dashboard-command-stat-action, .conciliador-kpi {
    transition: background-color 180ms var(--motion-spring), border-color 180ms var(--motion-spring), color 180ms var(--motion-spring), transform 180ms var(--motion-spring), box-shadow 180ms var(--motion-spring);
}
.sidebar-item:active, .workspace-action:active, .reload-btn:active, .submit-btn:active, .dashboard-command-stat-action:active, .conciliador-kpi:active { transform:scale(.985); }
.submit-btn:hover, .reload-btn:hover, .workspace-action:hover { transform:translateY(-1px); }
.summary-card, .dash-panel { transition:border-color 220ms var(--motion-spring), background-color 220ms var(--motion-spring); }
.summary-card:hover, .dash-panel:hover { transform:none; }
@keyframes nexo-view-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes nexo-modal-in { from { opacity:0; transform:scale(.985) translateY(8px); } to { opacity:1; transform:scale(1) translateY(0); } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration:1ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; transition-duration:1ms !important; }
}

.client-analytics-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin:0 0 14px; }
.client-analytics-heading h3 { margin:3px 0 5px; font-size:1.12rem; color:var(--text-1); }
.client-analytics-heading p:not(.client-analytics-eyebrow) { margin:0; max-width:700px; color:var(--text-2); font-size:.82rem; line-height:1.45; }
.client-analytics-eyebrow { margin:0; color:var(--cyan-2); font-size:.66rem; font-weight:900; letter-spacing:.09em; }
.client-analytics-export { white-space:nowrap; border-color:rgba(16,185,129,.45); color:var(--green-2); }
.client-analytics-filters { display:grid; grid-template-columns:minmax(220px, 1.5fr) minmax(145px, .8fr) minmax(145px, .8fr) auto; gap:10px; margin:0 0 14px; }
.client-analytics-filters input, .client-analytics-filters select { min-height:42px; }
.client-analytics-filters .reload-btn { min-height:42px; white-space:nowrap; }
.client-analytics-metrics { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; margin:0 0 14px; }
.client-analytics-metrics .metric-card { min-height:106px; padding:14px; }
.client-analytics-metrics .metric-card p { margin-top:8px; font-size:1.05rem; }
.client-analytics-usdt { color:var(--cyan-2); font-family:var(--mono); }
.client-analytics-small { font-size:.82rem !important; white-space:nowrap; }
.client-analytics-table-wrap { border:1px solid var(--border-2); border-radius:8px; overflow:hidden; background:rgba(255,255,255,.018); }
.client-analytics-caption { margin-top:3px; color:var(--text-3); font-size:.7rem; }
.client-analytics-empty { padding:20px; text-align:center; color:var(--text-3); font-size:.82rem; }

/* Conciliador web: revisión operativa de pagos. */
.conciliador-kpis { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:10px; margin:0 0 14px; }
.conciliador-kpi, .conciliador-progress-card { min-height:108px; padding:14px; border:1px solid var(--border-2); border-radius:8px; background:#111923; text-align:left; }
.conciliador-kpi { cursor:pointer; color:var(--text); transition:border-color .18s ease, background .18s ease; }
.conciliador-kpi:hover { background:#15212b; }
.conciliador-kpi span, .conciliador-progress-card span { display:block; color:#8da0b4; font-size:.68rem; font-weight:800; text-transform:uppercase; }
.conciliador-kpi strong { display:block; margin:7px 0 2px; color:var(--text-1); font-family:var(--mono); font-size:1.35rem; }
.conciliador-kpi small, .conciliador-progress-card small { color:var(--text-2); font-family:var(--mono); font-size:.76rem; }
.conciliador-kpi-pending { border-top:3px solid #fb7185; }.conciliador-kpi-ok { border-top:3px solid #34d399; }.conciliador-kpi-issue { border-top:3px solid #fbbf24; }
.conciliador-kpi-pending strong { color:#fda4af; }.conciliador-kpi-ok strong { color:#6ee7b7; }.conciliador-kpi-issue strong { color:#fcd34d; }
.conciliador-progress-card { display:flex; flex-direction:column; justify-content:center; gap:8px; }
.conciliador-progress-card > div:first-child { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.conciliador-progress-card strong { color:#d8fffa; font-family:var(--mono); font-size:1.1rem; }
.conciliador-progress-track { height:6px; overflow:hidden; border-radius:4px; background:#24313d; }.conciliador-progress-track span { display:block; width:0; height:100%; border-radius:4px; background:#2dd4bf; transition:width .25s ease; }
.conciliador-workspace { border:1px solid var(--border-2); border-radius:8px; overflow:hidden; background:#111923; }
.conciliador-filters { display:grid; grid-template-columns:minmax(190px,1.4fr) minmax(135px,.8fr) minmax(135px,.8fr) minmax(150px,.9fr) minmax(190px,1.2fr) 38px; gap:10px; align-items:end; padding:14px; border-bottom:1px solid var(--border-2); background:#131d27; }
.conciliador-filters label { display:block; margin-bottom:5px; }.conciliador-filters input, .conciliador-filters select { width:100%; min-height:38px; box-sizing:border-box; }
.conciliador-clear-btn { width:38px; height:38px; padding:0; display:grid; place-items:center; }.conciliador-clear-btn svg { width:16px; height:16px; }
.conciliador-bulkbar { min-height:62px; display:flex; align-items:center; gap:14px; padding:10px 14px; border-bottom:1px solid var(--border-2); background:#0f1820; }
.conciliador-select-all { display:flex; align-items:center; gap:8px; color:var(--text-2); font-size:.78rem; cursor:pointer; }.conciliador-select-all input, .conciliador-check input { width:18px; height:18px; accent-color:#10b981; cursor:pointer; }
.conciliador-selection { margin-left:auto; display:flex; align-items:baseline; gap:10px; }.conciliador-selection strong { color:#cbd5e1; font-size:.78rem; }.conciliador-selection span { color:#6ee7b7; font-family:var(--mono); font-weight:800; font-size:.9rem; }
.conciliador-confirm-btn { width:auto; min-height:38px; margin:0; padding:0 14px; display:flex; align-items:center; gap:7px; font-size:.77rem; }.conciliador-confirm-btn svg { width:16px; height:16px; }.conciliador-confirm-btn:disabled { cursor:not-allowed; opacity:.45; }
.conciliador-list { min-height:260px; max-height:calc(100vh - 365px); overflow:auto; }
.conciliador-row { display:grid; grid-template-columns:34px minmax(260px,1fr) minmax(150px,.45fr) 96px; align-items:center; gap:12px; min-height:78px; padding:10px 14px; border-bottom:1px solid rgba(148,163,184,.1); }
.conciliador-row:last-child { border-bottom:0; }.conciliador-row:hover { background:rgba(148,163,184,.045); }.conciliador-row.is-selected { background:rgba(16,185,129,.09); box-shadow:inset 3px 0 #34d399; }
.conciliador-check { display:grid; place-items:center; }.conciliador-check svg { width:19px; height:19px; }.conciliador-row.is-ok .conciliador-check svg { color:#34d399; }.conciliador-row.is-issue .conciliador-check svg { color:#fbbf24; }
.conciliador-main { min-width:0; }.conciliador-primary { display:flex; align-items:center; gap:8px; min-width:0; }.conciliador-primary strong { overflow:hidden; color:var(--text-1); font-size:.85rem; text-overflow:ellipsis; white-space:nowrap; }.conciliador-primary span, .conciliador-reviewed-date { color:#8093a5; font-family:var(--mono); font-size:.68rem; white-space:nowrap; }
.conciliador-detail { overflow:hidden; margin-top:5px; color:var(--text-2); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }.conciliador-meta { display:flex; gap:7px; min-height:14px; margin-top:4px; }.conciliador-note { overflow:hidden; max-width:360px; color:#fcd34d; font-size:.67rem; text-overflow:ellipsis; white-space:nowrap; }
.conciliador-amount { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }.conciliador-amount > strong { color:#fda4af; font-family:var(--mono); font-size:.9rem; white-space:nowrap; }.conciliador-status { display:inline-flex; align-items:center; gap:4px; font-size:.67rem; font-weight:800; white-space:nowrap; }.conciliador-status svg { width:13px; height:13px; }.conciliador-status.is-pending { color:#fda4af; }.conciliador-status.is-ok { color:#6ee7b7; }.conciliador-status.is-issue { color:#fcd34d; }
.conciliador-review-btn { min-height:34px; display:flex; align-items:center; justify-content:center; gap:5px; border:1px solid rgba(148,163,184,.22); border-radius:6px; background:#17212b; color:#cbd5e1; font-size:.72rem; font-weight:700; cursor:pointer; }.conciliador-review-btn:hover { background:#21303d; color:#fff; }.conciliador-review-btn svg { width:14px; height:14px; }
.conciliador-empty { padding:46px 20px; color:var(--text-3); text-align:center; font-size:.84rem; }.conciliador-error { color:#fda4af; }.conciliador-export-btn { border-color:rgba(45,212,191,.36); color:#99f6e4; }.conciliador-export-btn svg, .view-actions .reload-btn svg { width:15px; height:15px; vertical-align:middle; }

/* The IA view is independent; it must not remain visible under reconciliation. */
#tab-ai.active { display:flex; }
#tab-conciliador-web { width:100%; min-height:calc(100vh - 170px); }
#tab-conciliador-web .conciliador-list { min-height:420px; max-height:calc(100vh - 300px); }
#modal-conciliacion .modal-content { width:min(760px, 92vw) !important; max-width:760px !important; }
#modal-conciliacion textarea { min-height:120px; }

/* Transaction editing can contain many fields: keep the full dialog reachable. */
#edit-transaction-modal { align-items:flex-start !important; overflow-y:auto; padding:16px; box-sizing:border-box; }
#edit-transaction-modal .modal-content { width:min(720px, 100%) !important; max-width:720px !important; max-height:calc(100dvh - 32px); margin:auto; overflow-y:auto; box-sizing:border-box; }
#edit-transaction-modal .modal-header { position:sticky; top:-28px; z-index:2; background:#0f1326; padding-top:2px; }
#edit-transaction-modal .modal-footer { position:sticky; bottom:-28px; z-index:2; background:#0f1326; padding-bottom:2px; }

/* Calculadora financiera */
.calculator-layout { display:grid; grid-template-columns:minmax(0, 1fr) 330px; gap:14px; align-items:start; }
.financial-calculators { display:grid; grid-template-columns:repeat(auto-fit, minmax(330px, 1fr)); gap:14px; }
.financial-calculator, .calculator-history-panel { background:#111923; border:1px solid var(--border-2); border-radius:8px; overflow:hidden; }
.financial-calculator > header, .calculator-history-header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; background:#131d27; border-bottom:1px solid var(--border-2); }
.financial-calculator > header span, .calculator-history-header span { display:block; color:var(--text-1); font-size:.82rem; font-weight:800; }.financial-calculator > header small { display:block; margin-top:2px; color:var(--text-3); font-size:.67rem; }
.calculator-close-btn, .calculator-history-header .reload-btn { width:32px; height:32px; display:grid; place-items:center; padding:0; }.calculator-close-btn svg, .calculator-history-header svg { width:15px; height:15px; }
.calculator-display { padding:14px; border-bottom:1px solid var(--border-2); }.calculator-display input { width:100%; min-height:43px; box-sizing:border-box; font-family:var(--mono); font-size:.9rem; }.calculator-display strong { display:block; overflow:hidden; margin-top:9px; color:#d8fffa; font-family:var(--mono); font-size:1.4rem; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.calculator-pad { display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; padding:12px 14px; }.calculator-pad button { min-height:38px; border:1px solid rgba(148,163,184,.18); border-radius:6px; background:#17212b; color:#e2e8f0; font-family:var(--mono); font-size:.88rem; font-weight:700; cursor:pointer; }.calculator-pad button:hover { background:#21303d; }.calculator-pad .is-equals { background:#0f766e; border-color:#0f766e; color:#ecfeff; }.calculator-pad .is-clear { color:#fda4af; }
.calculator-finance { margin:0 14px 14px; border:1px solid rgba(45,212,191,.18); border-radius:7px; background:rgba(13,28,31,.55); }.calculator-finance-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:10px; border-bottom:1px solid rgba(45,212,191,.14); }.calculator-finance-heading span { color:#9aabba; font-size:.71rem; font-weight:800; text-transform:uppercase; }.calculator-finance-heading button { display:flex; align-items:center; gap:5px; border:0; background:transparent; color:#99f6e4; font-size:.7rem; font-weight:800; cursor:pointer; }.calculator-finance-heading svg { width:14px; height:14px; }
.calculator-finance-inputs { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; padding:10px; }.calculator-finance-inputs label { color:#91a3b5; font-size:.66rem; font-weight:800; }.calculator-finance-inputs input { width:100%; min-height:35px; box-sizing:border-box; margin-top:4px; font-family:var(--mono); font-size:.8rem; }
.calculator-receipt-inputs { display:grid; grid-template-columns:.8fr 1.2fr; gap:8px; padding:0 10px 10px; }.calculator-receipt-inputs label { color:#91a3b5; font-size:.66rem; font-weight:800; }.calculator-receipt-inputs input, .calculator-receipt-inputs select { width:100%; min-height:35px; box-sizing:border-box; margin-top:4px; font-size:.8rem; }
.calculator-finance-results { display:grid; grid-template-columns:repeat(3, 1fr); border-top:1px solid rgba(45,212,191,.14); }.calculator-finance-results div { min-width:0; padding:9px; border-right:1px solid rgba(45,212,191,.12); }.calculator-finance-results div:last-child { border-right:0; }.calculator-finance-results span { display:block; color:#7f92a6; font-size:.61rem; font-weight:800; text-transform:uppercase; }.calculator-finance-results strong { display:block; overflow:hidden; margin-top:4px; color:#d8fffa; font-family:var(--mono); font-size:.75rem; text-overflow:ellipsis; white-space:nowrap; }

/* NEXO 7 GRAPHITE: executive monochrome workspace. */
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) {
    --bg:#0c0d0f; --bg-2:#121417; --bg-3:#1b1e22; --bg-card:#15181b; --bg-hover:#22262b;
    --border:rgba(203,213,225,.16); --border-2:rgba(203,213,225,.10); --border-3:rgba(203,213,225,.06);
    --text:#eef0f2; --text-1:#fafafa; --text-2:#b7bdc4; --text-3:#838b94;
    --purple:#9ca3af; --purple-2:#d1d5db; --blue:#9ca3af; --blue-2:#cbd5e1;
    --cyan:#cbd5e1; --cyan-2:#e2e8f0; --pink:#e5e7eb;
    --nexo-primary:#e5e7eb; --nexo-accent:#cbd5e1;
    --nexo-grad:linear-gradient(135deg,#f1f5f9 0%,#9ca3af 100%);
    --nexo-grad-soft:linear-gradient(135deg,rgba(226,232,240,.10),rgba(148,163,184,.02));
    --grad-main:linear-gradient(135deg,#202429,#121417);
    --grad-blue:linear-gradient(135deg,rgba(203,213,225,.12),rgba(148,163,184,.02));
    --grad-purple:linear-gradient(135deg,rgba(226,232,240,.10),rgba(148,163,184,.02));
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar { background:#101214; border-right-color:rgba(203,213,225,.11); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .topbar { background:rgba(16,18,20,.97); border-bottom-color:rgba(203,213,225,.11); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-commandbar, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel-header { background:#181b1f; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .summary-card, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .panel, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .metric-card, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .kpi-card { background:#15181b; border-color:rgba(203,213,225,.13); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item.active { background:rgba(203,213,225,.10); border-color:rgba(226,232,240,.32); color:#f8fafc; box-shadow:inset 3px 0 0 #d1d5db; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-user-avatar, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-action-primary, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .btn-purple { background:#475569; border-color:#475569; color:#f8fafc; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-action-primary:hover, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .btn-purple:hover { background:#334155; border-color:#334155; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .btn-blue, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .btn-green, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .calculator-pad .is-equals { background:#52575e; border-color:#52575e; color:#f8fafc; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) input:focus, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) select:focus, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) textarea:focus { border-color:#cbd5e1 !important; box-shadow:0 0 0 3px rgba(203,213,225,.12) !important; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .view-title-icon { background:#24292f; color:#e2e8f0; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .card-purple::before { background:#cbd5e1; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .conciliador-progress-track span { background:#cbd5e1; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .conciliador-row.is-selected { background:rgba(203,213,225,.09); box-shadow:inset 3px 0 #cbd5e1; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .calculator-finance { border-color:rgba(203,213,225,.22); background:rgba(29,33,37,.58); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .calculator-finance-heading { border-bottom-color:rgba(203,213,225,.16); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .calculator-finance-heading button { color:#e2e8f0; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-logo-badge { background:#111315; border:1px solid rgba(203,213,225,.26); border-radius:7px; box-shadow:none; object-fit:cover; color:transparent; }
.sidebar-extract-link { margin:3px 8px 7px; border:1px solid rgba(203,213,225,.28); background:rgba(203,213,225,.07); color:#e2e8f0 !important; text-decoration:none; }
.sidebar-extract-link:hover { background:rgba(203,213,225,.13); border-color:rgba(226,232,240,.48); color:#fff !important; }
.sidebar-extract-link .sidebar-extract-arrow { width:14px; height:14px; margin-left:auto; opacity:.72; }
.sidebar-nav { display:flex; flex-direction:column; }.sidebar-nav > .sidebar-section-label:first-child { order:-2; }.sidebar-extract-link { order:-1; }
.sidebar-extract-link .sidebar-item-label, .mobile-extract-link span { font-size:.78rem; font-weight:850; }
.sidebar-legacy-extract-link, .mobile-legacy-extract-link { display:none !important; }
.mobile-extract-link { position:relative; min-height:78px; padding:12px 34px 12px 44px; display:grid; align-content:center; gap:3px; border:1px solid rgba(203,213,225,.34); border-radius:8px; background:rgba(203,213,225,.07); color:#f8fafc; text-decoration:none; overflow:hidden; }
.mobile-extract-link > svg:first-child { position:absolute; left:13px; top:50%; width:20px; height:20px; transform:translateY(-50%); color:#e2e8f0; }
.mobile-extract-link span { font-size:.78rem; font-weight:850; }.mobile-extract-link small { color:#aeb6c0; font-size:.65rem; font-weight:700; }.mobile-extract-arrow { position:absolute; right:12px; top:50%; width:15px; height:15px; transform:translateY(-50%); color:#e2e8f0; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) { animation:nexo-graphite-tone 52s ease-in-out infinite; }
@keyframes nexo-graphite-tone { 0%,100% { background-color:#0e0d11; } 33% { background-color:#100e13; } 67% { background-color:#0d0d10; } }
@media (prefers-reduced-motion: reduce) { body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) { animation:none; } }

/* Engineering polish: controlled hierarchy over decorative surfaces. */
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .glass-bg { display:none; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar { box-shadow:none; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-section-label { margin:16px 10px 6px; padding:0; color:#747d87; font-size:.61rem; font-weight:800; letter-spacing:.09em; }

/* =============================================
   NEXO 7 SIGNATURE — PRIVATE CAPITAL EDITION
   A lightweight visual layer: richer hierarchy without costly effects.
   ============================================= */
:root {
    --font: 'Manrope', 'Segoe UI', sans-serif;
    --mono: 'DM Mono', ui-monospace, SFMono-Regular, monospace;
    --nexo-gold: #d9b875;
    --nexo-sky: #82aaff;
    --nexo-ink: #0a0d14;
    --nexo-surface: #121824;
}

body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) {
    --bg: #060708;
    --bg-2: #0a0b0d;
    --bg-3: #111317;
    --bg-card: #101215;
    --bg-hover: rgba(130,170,255,.075);
    --border: rgba(167,190,224,.18);
    --border-2: rgba(167,190,224,.105);
    --text: #e8edf7;
    --text-1: #f8faff;
    --text-2: #aebbd0;
    --text-3: #71809a;
    --purple: #628cff;
    --purple-2: #a9beff;
    --blue: #477dff;
    --blue-2: #82aaff;
    --cyan: #7dd3fc;
    --green: #35c790;
    --green-2: #6ee7b7;
    --amber: #d9b875;
    --grad-main: linear-gradient(135deg, #8facff, #d9b875);
    animation: none;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse at 88% -12%, rgba(81,111,196,.14), transparent 34rem),
        radial-gradient(ellipse at 5% 108%, rgba(120,92,41,.09), transparent 30rem),
        repeating-linear-gradient(115deg, rgba(255,255,255,.012) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(25deg, rgba(0,0,0,.15) 0 1px, transparent 1px 7px);
}

body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar {
    background: linear-gradient(180deg, #0d0e10 0%, #070809 100%);
    border-right-color: rgba(167,190,224,.12);
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .topbar {
    background: rgba(10,11,13,.94);
    border-bottom-color: rgba(167,190,224,.12);
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-commandbar,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel-header {
    background: rgba(17,19,23,.9);
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .summary-card,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .panel,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .metric-card,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .kpi-card {
    background: linear-gradient(145deg, rgba(20,22,26,.98), rgba(12,13,16,.98));
    border-color: rgba(225,231,241,.12);
    box-shadow: 0 14px 34px rgba(0,0,0,.28) !important;
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .summary-card:hover,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel:hover {
    border-color: rgba(130,170,255,.36);
    background: linear-gradient(145deg, rgba(27,30,35,.98), rgba(14,16,19,.98));
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: .005em;
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item:hover {
    background: rgba(130,170,255,.085);
    color: #f7faff;
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item.active {
    background: linear-gradient(90deg, rgba(97,128,221,.22), rgba(97,128,221,.04));
    border-color: rgba(160,185,255,.24);
    box-shadow: inset 2px 0 0 #d9b875;
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-logo-badge {
    border-color: rgba(217,184,117,.45);
    box-shadow: 0 8px 22px rgba(0,0,0,.28);
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .brand-name,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .view-title h2 {
    letter-spacing: .04em;
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-action-primary,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .btn-purple {
    background: linear-gradient(135deg, #5b7ff0, #4167d8);
    border-color: #7899ff;
    box-shadow: 0 8px 18px rgba(44,80,190,.23);
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-action-primary:hover,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .btn-purple:hover { background: linear-gradient(135deg, #7292ff, #4f73e5); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) input:focus,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) select:focus,
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) textarea:focus {
    border-color: #82aaff !important;
    box-shadow: 0 0 0 3px rgba(130,170,255,.13) !important;
}

/* Motion is deliberate and compositor-friendly. */
@keyframes capital-enter { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@keyframes live-indicator { 0%,100% { box-shadow:0 0 0 0 rgba(110,231,183,.32); } 50% { box-shadow:0 0 0 5px rgba(110,231,183,0); } }
.view.active { animation: capital-enter 280ms cubic-bezier(.16,1,.3,1) both; }
.workspace-status-dot, .pulse-dot { animation: live-indicator 2.4s ease-out infinite; }
.reload-btn, .submit-btn, .workspace-action, .sidebar-item { transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.reload-btn:hover, .submit-btn:hover, .workspace-action:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
    .view.active, .workspace-status-dot, .pulse-dot { animation: none !important; }
    .reload-btn:hover, .submit-btn:hover, .workspace-action:hover { transform: none; }
}
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item { min-height:38px; margin:1px 5px; padding:8px 10px; border:1px solid transparent; border-radius:6px; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item:hover { background:#1c2024; border-color:rgba(203,213,225,.10); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .sidebar-item-label { font-size:.78rem; font-weight:700; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .views-container { max-width:1720px; padding:20px 24px 30px; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .summary-card, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .panel, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .metric-card { box-shadow:none !important; backdrop-filter:none; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .summary-card::before { height:2px; opacity:.8; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel-header { min-height:52px; padding:12px 16px; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .dash-panel-title, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .view-title h2 { letter-spacing:.01em; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) input, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) select, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) textarea { background:#101316 !important; border-radius:5px !important; box-shadow:none !important; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .submit-btn, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .reload-btn, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .workspace-action { border-radius:5px; box-shadow:none !important; font-weight:800; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) button[style*="linear-gradient"] { background:#4b5563 !important; box-shadow:none !important; }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .excel-table thead th { background:#1a1e22; color:#9ea7b1; border-bottom-color:rgba(203,213,225,.16); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .excel-table tbody tr:hover { background:rgba(203,213,225,.045); }
body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) .modal-content, body:not(.theme-light):not(.theme-midnight):not(.theme-emerald) #notif-panel { box-shadow:0 20px 48px rgba(0,0,0,.42) !important; }
.dashboard-activity-grid { grid-template-columns:minmax(280px,.62fr) minmax(0,1.38fr) !important; }
.dashboard-activity-grid > .dash-panel:nth-child(2) { display:none; }
.dashboard-activity-panel .dash-panel-body { display:flex; min-height:272px; flex-direction:column; justify-content:space-between; }
.dashboard-activity-date { color:var(--text-3); font-family:var(--mono); font-size:.68rem; }
.dashboard-activity-primary { padding:6px 0 18px; border-bottom:1px solid var(--border-2); }.dashboard-activity-primary span, .dashboard-activity-metrics span { display:block; color:var(--text-3); font-size:.62rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; }.dashboard-activity-primary strong { display:block; margin-top:8px; color:var(--green-2); font-family:var(--mono); font-size:1.55rem; }
.dashboard-activity-metrics { display:grid; grid-template-columns:1fr; gap:0; }.dashboard-activity-metrics div { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--border-2); }.dashboard-activity-metrics div:last-child { border-bottom:0; }.dashboard-activity-metrics strong { color:var(--text-1); font-family:var(--mono); font-size:.82rem; white-space:nowrap; }
.dashboard-activity-grid > .dash-panel:last-child .recent-ops-list { min-height:300px; max-height:360px; overflow-y:auto; }
@media (max-width:1180px) { .dashboard-activity-grid { grid-template-columns:1fr !important; }.dashboard-activity-panel .dash-panel-body { min-height:0; }.dashboard-activity-grid > .dash-panel:last-child .recent-ops-list { max-height:none; } }
.decision-radar-panel { margin-bottom:16px; overflow:hidden; border-color:rgba(148,163,184,.24); }
.decision-radar-header { background:rgba(148,163,184,.035); }
.decision-radar-subtitle { margin-top:4px; color:var(--text-3); font-size:.72rem; }
.decision-radar-status { border:1px solid var(--border-2); border-radius:999px; padding:4px 9px; color:var(--text-2); font-size:.65rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.decision-radar-status.is-ready { color:var(--green-2); border-color:rgba(16,185,129,.28); background:rgba(16,185,129,.055); }
.decision-radar-status.is-watch { color:#fbbf24; border-color:rgba(245,158,11,.3); background:rgba(245,158,11,.055); }
.decision-radar-status.is-risk { color:#fb7185; border-color:rgba(244,63,94,.3); background:rgba(244,63,94,.055); }
.decision-radar-body { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(260px,.85fr); }
.decision-radar-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-right:1px solid var(--border-2); }
.decision-radar-metric { min-width:0; min-height:126px; padding:16px; border:0; border-right:1px solid var(--border-2); background:transparent; color:inherit; text-align:left; font:inherit; }
button.decision-radar-metric { cursor:pointer; transition:background-color 180ms var(--motion-spring); }
button.decision-radar-metric:hover { background:rgba(255,255,255,.035); }
.decision-radar-metric:last-child { border-right:0; }
.decision-radar-metric span, .decision-priority-label { display:block; color:var(--text-3); font-size:.62rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.decision-radar-metric strong { display:block; overflow:hidden; margin:9px 0 5px; color:var(--text-1); font-family:var(--mono); font-size:1rem; text-overflow:ellipsis; white-space:nowrap; }
.decision-radar-metric small { display:block; overflow:hidden; color:var(--text-3); font-size:.68rem; text-overflow:ellipsis; white-space:nowrap; }
.decision-radar-priority { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:16px 18px; background:rgba(255,255,255,.018); }
.decision-radar-priority strong { margin-top:7px; color:var(--text-1); font-size:.88rem; }
.decision-radar-priority p { margin:5px 0 12px; color:var(--text-3); font-size:.72rem; line-height:1.45; }
.decision-radar-priority .reload-btn { margin:0; }
@media (max-width:1180px) { .decision-radar-body { grid-template-columns:1fr; }.decision-radar-metrics { border-right:0; border-bottom:1px solid var(--border-2); }.decision-radar-priority { min-height:100px; } }
@media (max-width:640px) { .decision-radar-header { align-items:flex-start; gap:8px; }.decision-radar-metrics { grid-template-columns:1fr 1fr; }.decision-radar-metric { min-height:106px; padding:13px; border-bottom:1px solid var(--border-2); }.decision-radar-metric:nth-child(2) { border-right:0; }.decision-radar-metric:nth-child(n+3) { border-bottom:0; }.decision-radar-metric strong { font-size:.88rem; }.decision-radar-priority { padding:14px; } }

/* =============================================
   NEXO 7 / OPERATING DESK
   Deliberately restrained financial workstation UI.
   ============================================= */
:root {
    --bg:#0d0f12;
    --bg-2:#12151a;
    --bg-3:#1a1e24;
    --bg-card:#15181d;
    --bg-hover:#20252d;
    --border:rgba(202,210,220,.2);
    --border-2:rgba(202,210,220,.115);
    --border-3:rgba(202,210,220,.06);
    --text:#d9dee7;
    --text-1:#f7f9fc;
    --text-2:#a9b3c1;
    --text-3:#778292;
    --purple:#4f7cff;
    --purple-2:#93adff;
    --blue:#4f7cff;
    --blue-2:#9db5ff;
    --green:#19b77a;
    --green-2:#51d59d;
    --amber:#e7ad3a;
    --nexo-primary:#f7f9fc;
    --nexo-accent:#4f7cff;
    --nexo-grad:#4f7cff;
    --nexo-grad-soft:rgba(79,124,255,.1);
    --grad-main:#15181d;
    --font:'Manrope', 'Segoe UI', sans-serif;
    --mono:'DM Mono', ui-monospace, monospace;
    --radius-xs:4px;
    --radius-sm:6px;
    --radius-md:10px;
    --radius-lg:12px;
    --radius-xl:16px;
    --sidebar-w:256px;
    --topbar-h:70px;
}
body {
    background-color:var(--bg);
    background-image:linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size:32px 32px;
    color:var(--text);
}
.glass-bg { display:none; }
.sidebar { background:#101216; border-right:1px solid rgba(202,210,220,.13); }
.sidebar-logo { min-height:76px; padding:20px 18px 14px !important; border-bottom:1px solid rgba(202,210,220,.1) !important; }
.sidebar-logo-badge { width:34px; height:34px; border-radius:7px; background:#e7ecf5; box-shadow:0 5px 16px rgba(0,0,0,.22); }
.sidebar-logo-text .brand-name { color:#f8fafc; font-size:.98rem; font-weight:700; letter-spacing:.045em; }
.sidebar-logo-text .brand-sub { color:#7e8998; font-size:.56rem; font-weight:600; letter-spacing:.12em; }
.brand-pdfinanzas-wrapper { margin:12px 14px 4px; padding:10px; background:#161a20; border-color:rgba(202,210,220,.11); border-radius:8px; }
.pdfinanzas-logo-circle { width:30px; height:30px; background:#242a33; border-color:rgba(202,210,220,.15); color:#dbe5ff; font-size:.68rem; }
.sidebar-nav { padding:8px 10px 18px; }
.sidebar-section-label { margin:12px 8px 5px; padding:0; color:#687485; font-size:.58rem; font-weight:700; letter-spacing:.13em; }
.sidebar-item { min-height:38px; margin:2px 0; padding:8px 10px; border:1px solid transparent; border-radius:6px; color:#9ba7b6; font-size:.8rem; font-weight:500; }
.sidebar-item-icon { width:18px; color:#7e8b9a; }
.sidebar-item:hover { background:#1a1f26; border-color:rgba(202,210,220,.1); color:#f3f6fb; }
.sidebar-item.active { background:#1a2337; border-color:rgba(111,145,255,.32); box-shadow:inset 2px 0 0 #78a0ff; color:#f3f6ff; }
.sidebar-item.active .sidebar-item-icon { color:#9db5ff; }
.sidebar-user { margin:10px; background:#171b21; border:1px solid rgba(202,210,220,.11); border-radius:8px; }
.sidebar-user-avatar { background:#365bc4; border-radius:6px; }
.sidebar-logout { color:#b5bfcc; border-top-color:rgba(202,210,220,.1); }
.topbar { height:var(--topbar-h); background:rgba(16,18,22,.94); border-bottom:1px solid rgba(202,210,220,.11); backdrop-filter:blur(16px); padding:0 26px; }
.topbar-title { color:#f7f9fc; font-size:1.02rem; font-weight:650; }
.topbar-title svg { color:#94adff; }
.topbar-title span { color:#778292; font-size:.77rem; font-weight:500; }
.workspace-commandbar { min-height:50px; background:rgba(18,21,26,.9); border-bottom-color:rgba(202,210,220,.1); padding:0 26px; }
.workspace-status-dot { background:#51d59d; box-shadow:0 0 0 4px rgba(81,213,157,.11); }
.workspace-action { min-height:32px; background:#1a1f26; border-color:rgba(202,210,220,.14); border-radius:5px; color:#bcc6d2; font-weight:650; }
.workspace-action:hover { background:#232a34; border-color:rgba(157,181,255,.5); color:#fff; }
.workspace-action-primary, .btn-purple { background:#4f7cff; border-color:#4f7cff; color:#fff; }
.workspace-action-primary:hover, .btn-purple:hover { background:#668cff; border-color:#668cff; }
.views-container { max-width:1760px; padding:24px 28px 40px; }
.view-header { margin-bottom:20px; }
.view-title h2 { color:#f5f7fb; font-size:1.55rem; font-weight:650; }
.view-title-icon { background:#1b2333; color:#9db5ff; border:1px solid rgba(157,181,255,.18); border-radius:7px; }
.view-subtitle { color:#8894a3; }
.summary-section { gap:10px; }
.summary-card, .dash-panel, .panel, .metric-card, .kpi-card { background:#15181d; border:1px solid rgba(202,210,220,.13); border-radius:9px; box-shadow:0 10px 28px rgba(0,0,0,.17); }
.summary-card { min-height:124px; padding:15px; }
.summary-card::before { height:2px; opacity:.9; }
.summary-card:hover, .dash-panel:hover { border-color:rgba(157,181,255,.28); background:#171b21; }
.card-content h3, .metric-card h4 { color:#7e8b9a; font-size:.61rem; letter-spacing:.09em; }
.card-content p { color:#f6f8fc; font-size:1.22rem; font-weight:600; }
.card-icon { width:36px; height:36px; border-radius:7px; }
.dash-panel-header { min-height:54px; background:#181c22; border-bottom-color:rgba(202,210,220,.1); padding:13px 16px; }
.dash-panel-title { color:#dce3ed; font-size:.7rem; font-weight:700; letter-spacing:.075em; }
.dash-panel-body { padding:16px; }
.reload-btn { min-height:32px; background:#1b2027; border-color:rgba(202,210,220,.15); border-radius:5px; color:#bbc5d2; font-size:.74rem; font-weight:650; box-shadow:none; }
.reload-btn:hover { background:#252c36; border-color:rgba(157,181,255,.45); color:#fff; }
.submit-btn { min-height:42px; border-radius:5px; font-weight:700; letter-spacing:.01em; box-shadow:none; }
.btn-blue { background:#3d63d8; }.btn-green { background:#198d64; }.btn-red { background:#c2415a; }
input, select, textarea { background:#101318 !important; border-color:rgba(202,210,220,.17) !important; border-radius:5px !important; color:#edf1f7 !important; }
input:hover, select:hover, textarea:hover { border-color:rgba(202,210,220,.3) !important; }
input:focus, select:focus, textarea:focus { border-color:#7197ff !important; box-shadow:0 0 0 3px rgba(79,124,255,.13) !important; }
.table-container { background:#12151a; border-color:rgba(202,210,220,.11); border-radius:8px; }
.excel-table thead th { background:#1b2027; border-bottom-color:rgba(202,210,220,.16); color:#93a0b0; font-size:.61rem; }
.excel-table tbody td { border-bottom-color:rgba(202,210,220,.075); }
.excel-table tbody tr:hover { background:#1a2029; }
.modal-content, #notif-panel { background:#171b21 !important; border-color:rgba(202,210,220,.18) !important; border-radius:10px !important; box-shadow:0 24px 60px rgba(0,0,0,.48) !important; }
.decision-radar-panel { border-color:rgba(111,145,255,.24); }
.decision-radar-header { background:#171c27; }
.decision-radar-metric:hover { background:#1c2330; }
.decision-radar-priority { background:#171b22; }
.decision-radar-status.is-ready { color:#8ce8ba; border-color:rgba(81,213,157,.28); background:rgba(81,213,157,.08); }
.decision-radar-status.is-watch { color:#f0c968; border-color:rgba(231,173,58,.28); background:rgba(231,173,58,.08); }
.decision-radar-status.is-risk { color:#ff9cac; border-color:rgba(255,113,133,.27); background:rgba(255,113,133,.08); }
.view { animation:desk-enter 280ms cubic-bezier(.16,1,.3,1) both; }
.summary-section .summary-card { animation:desk-enter 360ms cubic-bezier(.16,1,.3,1) both; }
.summary-section .summary-card:nth-child(2) { animation-delay:35ms; }.summary-section .summary-card:nth-child(3) { animation-delay:70ms; }.summary-section .summary-card:nth-child(4) { animation-delay:105ms; }
.sidebar-item, .workspace-action, .reload-btn, .submit-btn { transition:background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease; }
.sidebar-item:active, .workspace-action:active, .reload-btn:active, .submit-btn:active { transform:translateY(1px); }
@keyframes desk-enter { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
@media (max-width:1180px) { .views-container { padding:18px 16px 30px; }.topbar, .workspace-commandbar { padding-left:16px; padding-right:16px; } }
@media (max-width:640px) { body { background-size:24px 24px; }.topbar { height:62px; }.views-container { padding:14px 12px 26px; }.view-title h2 { font-size:1.28rem; }.summary-card { min-height:108px; }.dash-panel-header { min-height:48px; padding:11px 12px; }.dash-panel-body { padding:12px; }.workspace-commandbar { padding:7px 10px; }.reload-btn { min-height:30px; } }
@media (prefers-reduced-motion:reduce) { .view, .summary-section .summary-card { animation:none; } }
.calculator-history-panel { position:sticky; top:84px; }.calculator-history-header strong { display:block; margin-top:3px; color:#8da0b4; font-size:.68rem; }.calculator-history-panel > input { width:calc(100% - 28px); min-height:36px; box-sizing:border-box; margin:12px 14px; }.calculator-history-list { max-height:calc(100vh - 260px); overflow-y:auto; border-top:1px solid var(--border-2); }.calculator-history-item { display:flex; justify-content:space-between; gap:10px; padding:11px 14px; border-bottom:1px solid rgba(148,163,184,.1); }.calculator-history-item div { min-width:0; }.calculator-history-item span, .calculator-history-item strong, .calculator-history-item small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.calculator-history-item span { color:#7f92a6; font-size:.64rem; }.calculator-history-item strong { margin-top:3px; color:#cbd5e1; font-family:var(--mono); font-size:.72rem; }.calculator-history-item small { margin-top:3px; color:#8da0b4; font-size:.63rem; }.calculator-history-item > b { align-self:center; color:#99f6e4; font-family:var(--mono); font-size:.75rem; white-space:nowrap; }.calculator-new-btn { width:auto; min-height:36px; margin:0; padding:0 12px; display:flex; align-items:center; gap:6px; font-size:.75rem; }.calculator-new-btn svg { width:15px; height:15px; }

@media (max-width: 1180px) {
    .topbar-actions > button[title*="Celular"], .topbar-co-brand, .alert-toggle-btn { display:none !important; }
    .summary-section { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .dashboard-grid { grid-template-columns:1fr; }
    .workspace-commandbar { padding:0 16px; }
    .views-container { padding:18px 16px 28px; }
    .conciliador-kpis { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .conciliador-filters { grid-template-columns:repeat(3, minmax(0, 1fr)); }
    .calculator-layout { grid-template-columns:1fr; }.calculator-history-panel { position:static; }.calculator-history-list { max-height:360px; }
}

@media (max-width: 768px) {
    .workspace-commandbar { min-height:48px; padding:7px 12px; }
    .workspace-commandbar-context { display:none; }
    .workspace-commandbar-actions { width:100%; display:grid; grid-template-columns:1.2fr 1fr 1fr 36px; gap:6px; }
    .workspace-action { min-height:34px; padding:0 7px; font-size:.69rem; white-space:nowrap; }
    .topbar { padding:0 12px; }
    .topbar-title { font-size:.95rem; }
    .topbar-actions .price-chip, .topbar-actions .reload-btn, #theme-toggle-btn { display:none !important; }
    .summary-section { grid-template-columns:1fr 1fr; gap:8px; }
    .summary-card { min-height:112px; padding:12px; }
    .card-content p { font-size:1rem; }
    .card-icon { width:32px; height:32px; font-size:.95rem; }
    .dash-panel, .summary-card { border-radius:8px; }
    .client-analytics-heading { flex-direction:column; gap:10px; }
    .client-analytics-export { width:100%; min-height:44px; }
    .client-analytics-filters { grid-template-columns:1fr; }
    .client-analytics-metrics { grid-template-columns:1fr 1fr; gap:8px; }
    .client-analytics-metrics .metric-card { min-height:96px; padding:11px; }
    .client-analytics-table { min-width:760px; }
    .conciliador-kpis { grid-template-columns:1fr 1fr; gap:8px; }.conciliador-kpi, .conciliador-progress-card { min-height:94px; padding:11px; }
    .conciliador-progress-card { grid-column:1 / -1; }.conciliador-filters { grid-template-columns:1fr 1fr; gap:8px; padding:12px; }.conciliador-client-filter, .conciliador-search-filter { grid-column:1 / -1; }
    .conciliador-clear-btn { grid-column:2; justify-self:end; }.conciliador-bulkbar { flex-wrap:wrap; gap:10px; padding:11px 12px; }.conciliador-selection { margin-left:auto; }.conciliador-confirm-btn { width:100%; justify-content:center; }
    .conciliador-list { max-height:none; }.conciliador-row { grid-template-columns:28px minmax(0,1fr) auto; gap:9px; min-height:86px; padding:11px 12px; }.conciliador-amount { align-items:flex-end; }.conciliador-review-btn { grid-column:2 / -1; width:100%; }.conciliador-primary { flex-wrap:wrap; gap:4px 7px; }.conciliador-detail { max-width:calc(100vw - 115px); }.conciliador-note { max-width:180px; }
    .financial-calculators { grid-template-columns:1fr; }.calculator-finance-inputs { grid-template-columns:1fr 1fr; }.calculator-finance-inputs label:last-child { grid-column:1 / -1; }.calculator-receipt-inputs { grid-template-columns:1fr; }.calculator-history-list { max-height:none; }
}

 / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
       E N T R Y   A N I M A T I O N S   ( A p p l e   S t y l e ) 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 @ k e y f r a m e s   f a d e I n U p   { 
         f r o m   {   o p a c i t y :   0 ;   t r a n s f o r m :   t r a n s l a t e Y ( 1 2 p x ) ;   } 
         t o   {   o p a c i t y :   1 ;   t r a n s f o r m :   t r a n s l a t e Y ( 0 ) ;   } 
 } 
 
 . m e t r i c - c a r d ,   . s u m m a r y - c a r d ,   . b i - s e c t i o n ,   . c h a r t - c o n t a i n e r   { 
         a n i m a t i o n :   f a d e I n U p   0 . 5 s   c u b i c - b e z i e r ( 0 . 1 6 ,   1 ,   0 . 3 ,   1 )   f o r w a r d s ; 
 } 
 
 / *   S t a g g e r e d   d e l a y s   f o r   c h i l d   c a r d s   i n   m e t r i c s - g r i d   * / 
 . m e t r i c s - g r i d   . m e t r i c - c a r d : n t h - c h i l d ( 1 )   {   a n i m a t i o n - d e l a y :   0 . 0 5 s ;   } 
 . m e t r i c s - g r i d   . m e t r i c - c a r d : n t h - c h i l d ( 2 )   {   a n i m a t i o n - d e l a y :   0 . 1 s ;   } 
 . m e t r i c s - g r i d   . m e t r i c - c a r d : n t h - c h i l d ( 3 )   {   a n i m a t i o n - d e l a y :   0 . 1 5 s ;   } 
 . m e t r i c s - g r i d   . m e t r i c - c a r d : n t h - c h i l d ( 4 )   {   a n i m a t i o n - d e l a y :   0 . 2 s ;   } 
  
 
