:root {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #10b981;
    --accent-dark: #059669;
    --border-color: #e2e8f0;
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-color); color: var(--text-main); height: 100vh; overflow: hidden; }

#app {
    max-width: 480px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-color);
}

header {
    background: white;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    z-index: 10;
}

.logo-container { height: 32px; flex: 1; display: flex; justify-content: center; }
#xorka-logo { height: 100%; }

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Separación base mayor para los componentes */
}

.view { display: none; }
.view.active { display: flex; flex-direction: column; gap: 1rem; animation: fadeIn 0.3s ease; }

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

/* Side Menu */
.side-menu {
    position: absolute;
    top: 0; left: -100%;
    width: 80%; height: 100%;
    background: var(--text-main);
    color: white;
    z-index: 100;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.side-menu.open { left: 0; }
.menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.menu-title { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.1em; }

.menu-group { margin-bottom: 1.5rem; }
.group-label { font-size: 0.55rem; color: var(--text-muted); font-weight: 800; letter-spacing: 0.1rem; margin-bottom: 0.5rem; display: block; }

.menu-list { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.menu-list li {
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}
.menu-list li:hover { background: rgba(255,255,255,0.1); }
.menu-list li i { width: 18px; color: var(--accent); }
#menu-close { color: white; }

.logout-menu-btn {
    margin-top: auto;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #ef4444;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
}

.profile-only { display: none; }
body.role-inversor .profile-only[data-profile="inversor"],
body.role-productor .profile-only[data-profile="productor"],
body.role-operador .profile-only[data-profile="operador"] {
    display: block;
}

/* Home View */
.welcome-card { text-align: center; padding: 1.5rem 1rem 0.5rem 1rem; }
.welcome-card h1 { font-size: 1.4rem; font-weight: 800; color: var(--text-main); line-height: 1.2; margin: 0.5rem 0; }
.tagline { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; line-height: 1.4; }

.status-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0fdf4;
    color: var(--accent-dark);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #d1fae5;
    text-transform: uppercase;
}

.dot-pulse {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.home-cta-container {
    padding: 0 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.primary-cta-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.primary-cta-btn:active { transform: scale(0.98); background: var(--accent-dark); }
.cta-subtext { font-size: 0.65rem; color: var(--text-muted); font-weight: 600; }

.operational-pillars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem;
}

.pillar {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border-color);
}

.pillar i { color: var(--accent); width: 24px; height: 24px; }
.pillar-content strong { display: block; font-size: 0.8rem; color: var(--text-main); }
.pillar-content p { font-size: 0.7rem; color: var(--text-muted); }

.alert-card {
    background: #ecfdf5;
    border: 1px solid var(--accent);
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
}
.alert-icon { color: var(--accent); }
.alert-text { display: flex; flex-direction: column; font-size: 0.75rem; }
.alert-text strong { font-size: 0.85rem; }

.prob-card { align-items: center; padding: 1.5rem; }
.prob-circle-container { width: 120px; height: 120px; margin: 1rem 0; }
.prob-circle { position: relative; }
#prob-val { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 1.5rem; font-weight: 800; }
.circular-chart { display: block; margin: 10px auto; max-width: 100%; max-height: 250px; }
.circle-bg { fill: none; stroke: #eee; stroke-width: 2.8; }
.circle { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke: var(--accent); transition: stroke-dasharray 0.3s ease; }
.prob-desc { font-size: 0.65rem; color: var(--text-muted); text-align: center; }

/* Ranking View */
.section-header { margin-bottom: 0.5rem; }
.section-header h2 { font-size: 1.25rem; font-weight: 800; }
.section-header p { font-size: 0.75rem; color: var(--text-muted); }
.price-sync-box { background: white; padding: 1rem; border-radius: 1rem; border: 1px solid var(--border-color); margin-bottom: 1rem; }

.equipment-list { display: flex; flex-direction: column; gap: 1rem; }
.rank-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    box-shadow: var(--shadow);
    border-left: 6px solid #cbd5e1;
    position: relative;
}
.rank-card.gold { border-left-color: #fbbf24; }
.rank-card.silver { border-left-color: #94a3b8; }
.rank-card.bronze { border-left-color: #b45309; }
.rank-badge {
    width: 32px; height: 32px; background: #f1f5f9; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.8rem;
}
.rank-body { flex: 1; }
.rank-body h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 0.5rem; }
.rank-stats { display: flex; gap: 1.5rem; margin-bottom: 0.75rem; }
.stat-item { display: flex; flex-direction: column; }
.s-lab { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; }
.s-val { font-size: 1.1rem; font-weight: 800; }
.stat-item.highlight .s-val { color: var(--accent-dark); }
.rank-features { list-style: none; font-size: 0.7rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 0.25rem; }
.rank-features li { display: flex; align-items: center; gap: 0.4rem; }
.rank-features li i { width: 12px; height: 12px; color: var(--accent); }
.rank-note { font-size: 0.65rem; color: var(--text-muted); font-style: italic; }

/* Why Invest View */
.invest-reasons { display: flex; flex-direction: column; gap: 1rem; }
.reason-item { display: flex; gap: 1rem; background: white; padding: 1rem; border-radius: 1rem; align-items: flex-start; }
.reason-icon { width: 40px; height: 40px; background: #f0fdf4; color: var(--accent); border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.reason-content h4 { font-size: 0.85rem; font-weight: 800; margin-bottom: 0.25rem; }
.reason-content p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

/* About / Contact View */
.about-card { background: white; padding: 1.5rem; border-radius: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.about-intro { font-size: 0.85rem; margin-bottom: 1.5rem; line-height: 1.5; }
.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.team-block { text-align: center; background: #f8fafc; padding: 0.75rem; border-radius: 1rem; font-size: 0.7rem; }
.team-block i { color: var(--accent); margin-bottom: 0.5rem; }
.info-strip { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--border-color); }
.info-strip.highlight { color: var(--accent-dark); font-weight: 600; }
.info-strip i { color: var(--text-muted); width: 16px; }

.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-btn { display: flex; align-items: center; justify-content: center; gap: 0.75rem; padding: 1rem; border-radius: 1rem; text-decoration: none; font-weight: 700; color: white; }
.contact-btn.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.contact-btn.wa { background: #25d366; }

/* Reused Styles from Calculator */
.controls, .dashboard, .kpi-mini-card, .kpi-card, .kpi-card-mini-flat { background: white; border-radius: 1.25rem; padding: 1rem; box-shadow: var(--shadow); }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.control-group { display: flex; flex-direction: column; gap: 0.4rem; }
label { font-size: 0.6rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.input-wrapper { position: relative; display: flex; align-items: center; }
input[type="number"] { width: 100%; padding: 0.5rem 0.5rem 0.5rem 1.5rem; border: 1px solid var(--border-color); border-radius: 0.5rem; font-weight: 700; font-size: 0.9rem; }
input[type="range"] { width: 100%; accent-color: var(--text-main); }
.prefix { position: absolute; left: 8px; color: var(--text-muted); font-size: 0.8rem; }
.kpi-mini-card.wide { grid-column: span 2; }
.mini-label { font-size: 0.6rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.status-tag {
    font-size: 0.55rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}
.status-tag.info { background: #e0f2fe; color: #0369a1; }

.badge-dev {
    font-size: 0.5rem;
    background: #f1f5f9;
    color: #94a3b8;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 800;
    border: 1px solid #e2e8f0;
}

.weather-toggle-stub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: #f8fafc;
    border-radius: 20px;
    margin: 0.5rem 0;
    opacity: 0.7;
}
.stub-label { font-size: 0.65rem; font-weight: 600; color: var(--text-muted); }

.card-header-status { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.input-subtext { font-size: 0.6rem; color: var(--text-muted); margin-top: 2px; }

.warning-box {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.65rem;
    color: #b45309;
    background: #fffbeb;
    padding: 0.4rem;
    border-radius: 0.4rem;
    margin-top: 0.4rem;
    font-weight: 600;
}
.warning-box.hidden { display: none; }

.view-intro { margin-bottom: 1rem; }
.view-intro h2 { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.view-intro p { font-size: 0.75rem; color: var(--text-muted); line-height: 1.4; }

.rank-title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.risk-label { font-size: 0.55rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.risk-label.low { background: #dcfce7; color: #166534; }
.mini-value { font-size: 1.1rem; font-weight: 800; }
.mini-value-large { font-size: 1.5rem; font-weight: 800; }
.kpi-card.highlight { background: var(--text-main); color: white; text-align: center; margin-bottom: 0.5rem; }
.kpi-value { font-size: 2rem; font-weight: 800; display: block; margin: 0.25rem 0; }
.progress-bar { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; }
.bar { height: 100%; background: var(--accent); border-radius: 3px; }

/* Drone Viz Mini */
.drone-visual-container { background: #f8fafc; border-radius: 1rem; padding: 0.75rem; border: 1px solid var(--border-color); }
.drone-visual-wrapper { display: flex; align-items: center; gap: 1rem; }
.drone-svg-stack { position: relative; width: 60px; height: 36px; flex-shrink: 0; }
.drone-silhouette { width: 100%; height: 100%; }
.funding-info { flex: 1; display: flex; flex-direction: column; }
#funding-pct { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.funding-label-row { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.funding-label { font-size: 0.6rem; color: var(--text-muted); font-weight: 600; }
.icon-btn-tiny { background: none; border: none; cursor: pointer; color: var(--text-muted); display: flex; align-items: center; opacity: 0.5; transition: opacity 0.2s; }
.icon-btn-tiny:hover { opacity: 1; }
.icon-btn-tiny svg { width: 14px; height: 14px; }

.mini-edit-box { margin-top: 0.5rem; background: white; padding: 0.5rem; border-radius: 0.5rem; border: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 0.25rem; }
.mini-edit-box label { font-size: 0.5rem; }
.mini-edit-box input { font-size: 0.75rem; padding: 0.3rem; border: 1px solid #e2e8f0; border-radius: 4px; }

/* Switch Styles */
.iva-switch-container { margin-top: 0.5rem; }
.switch-label { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.switch-label .label-text { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--accent); }
input:focus + .slider { box-shadow: 0 0 1px var(--accent); }
input:checked + .slider:before { transform: translateX(14px); }
.slider.round { border-radius: 20px; }
.slider.round:before { border-radius: 50%; }

/* Auth UI */
.profile-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--border-color);
}
.profile-badge i { width: 14px; }
.profile-badge.empty { color: var(--text-muted); background: #f1f5f9; }
.profile-badge.inversor { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.profile-badge.productor { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.profile-badge.operador { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-card {
    background: white;
    width: 85%;
    max-width: 360px;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-text { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pin-input-container { display: flex; flex-direction: column; gap: 0.75rem; }
#auth-pin {
    padding: 1rem;
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    font-weight: 800;
}
.auth-error { color: #ef4444; font-size: 0.7rem; font-weight: 700; text-align: center; margin-top: 0.5rem; }
.auth-error.hidden { display: none; }
.profile-hints { margin-top: 1.5rem; border-top: 1px solid var(--border-color); padding-top: 1rem; font-size: 0.6rem; color: var(--text-muted); text-align: center; }

/* Dashboard and specialized cards */
.dashboard-card, .drone-status-card { background: white; border-radius: 1.25rem; padding: 1.25rem; border: 1px solid var(--border-color); box-shadow: var(--shadow); }
.labor-list { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.labor-item { display: flex; align-items: center; gap: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid #f1f5f9; }
.labor-icon { color: var(--accent); }
.labor-info { flex: 1; display: flex; flex-direction: column; }
.labor-info strong { font-size: 0.8rem; }
.labor-info span { font-size: 0.65rem; color: var(--text-muted); }
.labor-date { font-size: 0.65rem; color: var(--text-muted); font-weight: 700; }

.drone-main-info { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.drone-avatar { width: 44px; height: 44px; background: #f8fafc; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text-main); }
.drone-desc h3 { font-size: 0.9rem; }
.telemetry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-bottom: 1rem; }
.tel-item { background: #f8fafc; padding: 0.5rem; border-radius: 0.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 800; }
.tel-item i { width: 14px; color: var(--text-muted); }

.maintenance-bar { margin-top: 1rem; }
.bar-labels { display: flex; justify-content: space-between; margin-bottom: 0.4rem; }
.op-badge { background: #fff7ed; color: #9a3412; border-color: #ffedd5; }

/* Footer */
footer { padding: 1.5rem 0; text-align: center; font-size: 0.65rem; color: var(--text-muted); }

/* Splash Screen & Pattern Lock */
.splash-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #0f172a;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}
.splash-overlay:not(.active) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 320px;
}
.pattern-lock-area {
    position: relative;
    width: 240px;
    height: 240px;
}
.drone-pattern-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.propellers-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 60px;
    padding: 30px;
    width: 100%;
    height: 100%;
}
.prop-node {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.prop-node span {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0.3;
}
.prop-node.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    transform: scale(1.1);
}
.prop-node.active span {
    opacity: 1;
    background: #10b981;
    box-shadow: 0 0 15px #10b981;
}
.prop-node.error {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}
.prop-node.error span {
    background: #ef4444;
    opacity: 1;
}

.pattern-hint {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2rem;
    text-align: center;
}
.pattern-error {
    color: #ef4444;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: -1rem;
}
.pattern-error.hidden { display: none; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
.shake { animation: shake 0.2s ease-in-out 0s 2; }

/* Recovery Card specific */
.recovery-card.active { background: var(--accent); color: white; }
.recovery-card.active .mini-label, .recovery-card.active .status-text { color: white; }
.net-year-2-card { border-top: 2px solid var(--accent); }
.recovery-content { display: flex; align-items: center; gap: 1rem; }
.recovery-text { display: flex; flex-direction: column; }
.status-text { font-size: 0.85rem; font-weight: 800; }

/* Comparison Table Styles */
.comparison-section {
    background: white;
    padding: 1.5rem 1rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
}

.table-container {
    overflow-x: auto;
    margin-top: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
    min-width: 500px;
}

.comparison-table th, .comparison-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.comparison-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.55rem;
    letter-spacing: 0.05em;
}

.comparison-table .highlight-col {
    background: #f0fdf4;
    color: var(--accent-dark);
}

.comparison-table td:first-child {
    font-weight: 700;
    color: var(--text-main);
    background: #fdfdfd;
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 2px 0 5px rgba(0,0,0,0.02);
}

.comparison-table td.pos {
    color: var(--accent-dark);
    font-weight: 700;
}

.comparison-table td.neg {
    color: #dc2626;
    font-weight: 500;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background-color: #f8fafc;
}

/* Dividend Tracker Styles */
.dividend-tracker-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.tracker-header { display: flex; justify-content: space-between; align-items: center; }
.tracker-summary { background: #f8fafc; padding: 1rem; border-radius: 1rem; border: 1px solid var(--border-color); }
.tracker-main { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
.tracker-total { font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.tracker-pct { font-size: 0.75rem; font-weight: 700; color: var(--accent-dark); }
.tracker-progress { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }

.tracker-input-row { display: flex; gap: 0.5rem; }
.tracker-input-row .input-wrapper { flex: 1; }
.add-btn {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 0 1rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
}
.dividend-list {
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.div-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    font-size: 0.75rem;
}
.div-date { color: var(--text-muted); font-weight: 600; font-size: 0.65rem; }
.div-amt { font-weight: 800; color: var(--text-main); }
.div-del {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.2rem;
}
.clear-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
}

/* Reinvestment simplified */
.reinvest-section { background: #f0fdf4; padding: 0; overflow: hidden; margin-bottom: 0.5rem; }
.reinvest-main-toggle { padding: 1rem; cursor: pointer; }
.reinvest-header-simple { display: flex; justify-content: space-between; align-items: center; }
.reinvest-status-badge { background: white; padding: 0.2rem 0.5rem; border-radius: 1rem; border: 1px solid #d1fae5; font-size: 0.7rem; font-weight: 800; color: var(--accent-dark); }
.reinvest-summary-box { padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.reinvest-final-results { background: white; border-radius: 0.75rem; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.4rem; }
.final-row { display: flex; justify-content: space-between; font-size: 0.75rem; }
.final-row.highlight-roi { border-top: 1px dashed var(--border-color); padding-top: 0.4rem; font-weight: 800; color: var(--accent-dark); }

.kpi-details { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.kpi-details.open { max-height: 1000px; }
.calc-formula { font-size: 0.65rem; color: var(--text-muted); background: #f8fafc; padding: 0.5rem; border-radius: 0.5rem; margin-top: 0.5rem; }
.highlight .calc-formula { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.7); }