:root {
    --navy: #061327;
    --navy-2: #0b1f3b;
    --ink: #071226;
    --muted: #64748b;
    --line: #d9e2ef;
    --bg: #f6f9fd;
    --card: #ffffff;
    --blue: #2563eb;
    --green: #16a34a;
    --red: #ef4444;
    --orange: #f59e0b;
    --cyan: #06b6d4;
    --purple: #8b5cf6;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.auth-page {
    align-items: center;
    background: radial-gradient(circle at top, #1e3a8a 0, #0f172a 38%, #020617 100%);
    display: flex;
    justify-content: center;
    padding: 24px;
}

.login-box {
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 28px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.38);
    color: #fff;
    max-width: 440px;
    padding: 42px;
    width: 100%;
}

.login-logo {
    display: block;
    height: auto;
    margin-bottom: 20px;
    max-height: 48px;
    width: auto;
}

.eyebrow {
    color: #93c5fd;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.login-logo {
    display: block;
    height: auto;
    margin-bottom: 20px;
    max-height: 48px;
    width: auto;
}

.login-box h1 {
    font-size: 30px;
    margin-bottom: 10px;
}

.login-copy {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 24px;
}

.alert {
    border-radius: 14px;
    font-size: 14px;
    margin-bottom: 18px;
    padding: 13px 14px;
}

.alert-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.32);
    color: #fecaca;
}

.login-form label {
    color: #cbd5e1;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 16px 0 8px;
}

.login-form input {
    background: #101f38;
    border: 1px solid #263b5f;
    border-radius: 14px;
    color: #fff;
    display: block;
    outline: none;
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.login-form input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.login-form button,
.button-link {
    align-items: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 0;
    border-radius: 14px;
    color: #fff;
    display: flex;
    font-weight: 800;
    justify-content: center;
    margin-top: 22px;
    padding: 16px;
    width: 100%;
}

.dashboard-page {
    background: var(--bg);
    display: flex;
}

.sidebar {
    background: linear-gradient(180deg, #08172d 0%, #020b18 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0;
    min-height: 100vh;
    padding: 28px 18px 16px;
    position: relative;
    width: 292px;
    z-index: 20;
}

.sidebar-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 20px;
}

.sidebar-logo {
    display: block;
    height: auto;
    max-height: 150px;
    padding: 0 0 1em 0;
    width: 100%;
    object-fit: contain;
    object-position: center;
}

.side-nav {
    display: grid;
    gap: 8px;
}

.side-nav a {
    align-items: center;
    border-radius: 10px;
    color: #e5edf8;
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    transition: background 0.2s, color 0.2s;
}

.side-nav a i,
.logout-link i {
    color: #9fb0c8;
    display: inline-flex;
    font-size: 16px;
    font-weight: 900;
    justify-content: center;
    min-width: 20px;
}

.side-nav a.active,
.side-nav a:hover {
    background: rgba(37, 99, 235, 0.22);
    color: #fff;
}

.side-nav a.active i {
    color: #60a5fa;
}

.side-nav a.nav-cta {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 4px;
}

.side-nav a.nav-cta i {
    color: #fff;
}

.side-nav a.nav-cta:hover,
.side-nav a.nav-cta.active {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}

.side-nav a.nav-cta:hover i,
.side-nav a.nav-cta.active i {
    color: #fff;
}

.stat-icon i {
    font-size: 26px;
}

.quick-actions span i {
    font-size: 22px;
}

.insight-icon i {
    font-size: 24px;
}

.primary-action i,
.secondary-action i {
    font-size: 18px;
    margin-right: 6px;
}

.alert-icon i {
    font-size: 24px;
}

.topbar-logout i {
    font-size: 16px;
    margin-right: 2px;
}

.rec-icon i {
    font-size: 28px;
}

.time-icon i {
    font-size: 20px;
}

.btn-delete i {
    font-size: 16px;
}

.panel-head button i,
.filters button i {
    margin-right: 4px;
}

.user-card {
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    display: flex;
    gap: 14px;
    padding: 14px 18px;
}

.avatar {
    align-items: center;
    background: linear-gradient(135deg, #24446d, #10213f);
    border-radius: 50%;
    display: flex;
    font-size: 22px;
    font-weight: 800;
    height: 56px;
    justify-content: center;
    width: 56px;
    color: #fff !important;
}

.user-card strong,
.user-card small {
    display: block;
}

.user-card small {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    color: #cbd5e1;
    margin-top: 6px;
    padding: 3px 8px;
    width: fit-content;
}

.score-card {
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 10px;
    padding: 22px;
    text-align: center;
}

.score-card h2 {
    font-size: 18px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.score-ring {
    align-items: center;
    background: conic-gradient(var(--ring, #4ade80) 0%, var(--ring, #4ade80) var(--pct, 87%), rgba(148, 163, 184, 0.16) var(--pct, 87%) 100%);
    border-radius: 50%;
    display: inline-flex;
    height: 118px;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    width: 118px;
}

.score-ring::before {
    background: #061327;
    border-radius: 50%;
    content: "";
    inset: 10px;
    position: absolute;
}

.score-ring strong,
.score-ring span {
    position: relative;
}

.score-ring strong {
    font-size: 34px;
}

.score-ring span {
    color: #cbd5e1;
    font-size: 13px;
    margin-top: 24px;
}

.score-card p {
    color: #bef264;
    font-size: 14px;
}

.logout-link {
    align-items: center;
    border-radius: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    color: #fca5a5;
    display: flex;
    flex-shrink: 0;
    font-weight: 800;
    gap: 14px;
    margin-top: 8px;
    padding: 16px 16px 0;
    transition: background 0.2s, color 0.2s;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.15);
    border-radius: 10px;
    color: #fff;
    padding: 16px;
}

.logout-link i {
    color: #f87171;
    display: inline-flex;
    font-size: 16px;
    justify-content: center;
    min-width: 20px;
}

.dashboard-shell {
    flex: 1;
    min-width: 0;
    padding: 30px;
}

.topbar {
    align-items: flex-start;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 28px;
}

.topbar-right {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 14px;
}

.goal-widget {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    gap: 12px;
    padding: 10px 16px;
}

.goal-widget-content small {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.goal-widget-content strong {
    display: block;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.goal-widget-bar {
    background: #edf2f7;
    border-radius: 999px;
    height: 6px;
    min-width: 60px;
    overflow: hidden;
}

.goal-widget-bar span {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: inherit;
    display: block;
    height: 100%;
    transition: width 0.5s;
}

.topbar-logout {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: #ef4444;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 6px;
    padding: 10px 14px;
    transition: background 0.2s, color 0.2s;
}

.topbar-logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.topbar-user {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    display: flex;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.topbar-user:hover {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}

.topbar-user .avatar {
    font-size: 15px;
    height: 34px;
    width: 34px;
}

.topbar-user-meta {
    line-height: 1.25;
    text-align: left;
}

.topbar-user-meta strong {
    display: block;
    font-size: 13px;
    letter-spacing: -0.01em;
}

.topbar-user-meta small {
    color: #64748b;
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.topbar-user > i {
    color: #94a3b8;
    font-size: 11px;
}

.profile-dropdown {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    display: none;
    min-width: 320px;
    padding: 16px;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    z-index: 60;
}

.profile-dropdown.open {
    display: block;
}

.profile-head {
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
}

.profile-head .avatar.lg {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    font-size: 18px;
    height: 46px;
    width: 46px;
}

.profile-head strong {
    display: block;
    font-size: 15px;
    letter-spacing: -0.01em;
}

.profile-head small {
    color: #64748b;
    display: block;
    font-size: 12px;
    margin-top: 2px;
    word-break: break-all;
}

.profile-security {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    margin-bottom: 4px;
    padding: 10px 12px;
}

.profile-security small {
    color: #94a3b8;
    display: block;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.profile-security .security-q {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
}

.profile-security .security-q.muted {
    color: #94a3b8;
    font-weight: 600;
}

.profile-form {
    padding-top: 8px;
}

.profile-form + .profile-form {
    border-top: 1px solid #edf2f7;
    margin-top: 14px;
}

.profile-form h3 {
    font-size: 13px;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.profile-form label {
    color: #334155;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 10px;
}

.profile-form input {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    display: block;
    font-size: 13px;
    margin-top: 5px;
    padding: 8px 10px;
    width: 100%;
}

.profile-form button {
    background: #2563eb;
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    margin-top: 4px;
    padding: 9px 12px;
    transition: background 0.2s;
    width: 100%;
}

.profile-form button:hover {
    background: #1d4ed8;
}

.form-msg {
    border-radius: 8px;
    display: none;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 8px 10px;
}

.form-msg.ok {
    background: #f0fdf4;
    color: #16a34a;
    display: block;
}

.form-msg.err {
    background: #fef2f2;
    color: #dc2626;
    display: block;
}

.health-indicator {
    align-items: center;
    display: flex;
    gap: 8px;
    padding: 10px 14px;
}

.health-indicator span:last-child {
    color: #16a34a;
    font-size: 13px;
    font-weight: 800;
}

.health-dot {
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    display: block;
    height: 10px;
    width: 10px;
}

.rankings-panel {
    min-height: 300px;
}

.rankings-table th {
    text-align: center;
}

.rankings-table th:first-child,
.rankings-table td:first-child {
    text-align: center;
    width: 60px;
}

.rankings-table th:nth-child(3),
.rankings-table td:nth-child(3) {
    text-align: center;
}

.my-row {
    background: #eff6ff !important;
    border-left: 4px solid #2563eb;
}

.my-row td:first-child {
    border-left: none;
}

.rank-cell {
    text-align: center;
}

.medal {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    font-size: 14px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.medal.gold {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    color: #fff;
}

.medal.silver {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.3);
    color: #fff;
}

.medal.bronze {
    background: linear-gradient(135deg, #fcd34d, #d97706);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
    color: #fff;
}

.rank-num {
    color: #64748b;
    font-size: 16px;
    font-weight: 800;
}

.trader-info {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trader-name {
    font-weight: 800;
}

.trader-role {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
}

.trader-role.admin-badge {
    background: #fef3c7;
    color: #d97706;
}

.you-badge {
    background: #dbeafe;
    border-radius: 999px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
}

.emotion-checkin {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 240px;
    margin-bottom: 22px;
}

.checkin-panel h2 {
    margin-bottom: 4px;
}

.checkin-panel > p {
    color: #475569;
    font-size: 14px;
    margin-bottom: 18px;
}

.emotion-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.emotion-option {
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 80px;
    padding: 16px 10px;
    text-align: center;
    transition: all 0.2s;
}

.emotion-option input {
    display: none;
}

.emotion-option:has(input:checked) {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.emotion-label {
    font-size: 38px;
    line-height: 1;
}

.emotion-option.green .emotion-label { }
.emotion-option.cyan .emotion-label { color: #06b6d4; }
.emotion-option.yellow .emotion-label { color: #ca8a04; }
.emotion-option.orange .emotion-label { color: #ea580c; }
.emotion-option.red .emotion-label { color: #dc2626; }

.emotion-option small {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.note-field {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.note-field span {
    font-size: 13px;
    font-weight: 700;
    color: #1e2d46;
}

.note-field input {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    outline: none;
    padding: 12px 14px;
}

.note-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.current-state {
    text-align: center;
}

.current-mood {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.mood-badge {
    align-items: center;
    border-radius: 50%;
    display: flex;
    font-size: 52px;
    font-weight: 900;
    height: 110px;
    justify-content: center;
    margin: 0 auto;
    width: 110px;
}

.mood-badge.green { background: #dcfce7; color: #166534; }
.mood-badge.cyan { background: #e0f2fe; color: #075985; }
.mood-badge.yellow { background: #fef9c3; color: #854d0e; }
.mood-badge.orange { background: #fed7aa; color: #9a3412; }
.mood-badge.red { background: #fee2e2; color: #991b1b; }

.current-mood strong {
    font-size: 22px;
}

.current-mood small {
    color: #64748b;
    font-size: 13px;
}

.emotion-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr 1fr;
    margin-bottom: 22px;
}

.impact-list {
    display: grid;
    gap: 12px;
}

.impact-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 14px 90px 1fr 50px 80px;
}

.impact-emotion {
    font-size: 14px;
    font-weight: 700;
}

.impact-bar-wrap {
    background: #edf2f7;
    border-radius: 999px;
    height: 18px;
    overflow: hidden;
}

.impact-bar {
    border-radius: inherit;
    height: 100%;
    transition: width 0.3s;
}

.impact-bar.positive { background: linear-gradient(90deg, #22c55e, #16a34a); }
.impact-bar.negative { background: linear-gradient(90deg, #f87171, #ef4444); }

.impact-wr,
.impact-result {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.checkin-list {
    display: grid;
    gap: 8px;
}

.checkin-item {
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    display: grid;
    gap: 10px;
    grid-template-columns: 14px 1fr auto;
    padding: 8px 0;
}

.checkin-item div p {
    color: #64748b;
    font-size: 13px;
    margin-top: 2px;
}

.checkin-item small {
    color: #94a3b8;
    font-size: 12px;
    white-space: nowrap;
}

.dist-chart {
    display: grid;
    gap: 10px;
}

.dist-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 14px 80px 1fr 36px;
}

.dist-label {
    font-size: 13px;
    font-weight: 700;
}

.dist-track {
    background: #edf2f7;
    border-radius: 999px;
    height: 16px;
    overflow: hidden;
}

.dist-fill {
    border-radius: inherit;
    height: 100%;
    transition: width 0.3s;
}

.dist-fill.green { background: #22c55e; }
.dist-fill.cyan { background: #06b6d4; }
.dist-fill.yellow { background: #eab308; }
.dist-fill.orange { background: #f97316; }
.dist-fill.red { background: #ef4444; }

.dist-value {
    font-size: 14px;
    font-weight: 800;
    text-align: right;
}

.timeline {
    display: grid;
    gap: 0;
    padding-left: 20px;
    position: relative;
}

.timeline::before {
    background: #e2e8f0;
    bottom: 0;
    content: "";
    left: 6px;
    position: absolute;
    top: 0;
    width: 2px;
}

.timeline-item {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 14px 1fr;
    padding: 10px 0;
    position: relative;
}

.timeline-dot {
    border-radius: 50%;
    display: block;
    height: 14px;
    margin-top: 4px;
    width: 14px;
    z-index: 1;
}

.timeline-dot.green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.timeline-dot.cyan { background: #06b6d4; box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2); }
.timeline-dot.yellow { background: #eab308; box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.2); }
.timeline-dot.orange { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2); }
.timeline-dot.red { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }

.timeline-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-source {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
}

.timeline-source:empty { display: none; }

.timeline-source:contains("Check-in") { background: #dbeafe; color: #2563eb; }
.timeline-source:contains("Operacion") { background: #dcfce7; color: #16a34a; }

.timeline-item small {
    color: #94a3b8;
    display: block;
    font-size: 12px;
    margin-top: 2px;
}

.timeline-item p {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}

.timeline-result {
    font-size: 13px;
    font-weight: 800;
}

.calendar-panel {
    overflow: hidden;
}

.calendar-nav {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 4px;
}

.calendar-arrow {
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    display: flex;
    font-size: 18px;
    height: 40px;
    justify-content: center;
    transition: all 0.2s;
    width: 40px;
}

.calendar-arrow:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.calendar-title {
    text-align: center;
}

.calendar-title strong {
    display: block;
    font-size: 22px;
}

.calendar-title span {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(7, 1fr);
}

.cal-header {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    padding: 8px 4px;
    text-align: center;
    text-transform: uppercase;
}

.cal-day {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 90px;
    padding: 8px;
    position: relative;
    text-decoration: none;
    transition: all 0.2s;
}

.cal-day:hover {
    border-color: #94a3b8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cal-day.has-trades {
    cursor: pointer;
}

.cal-day.today {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.cal-day.selected {
    background: #eff6ff;
    border-color: #2563eb;
}

.cal-day.positive {
    background: #f0fdf4;
}

.cal-day.negative {
    background: #fef2f2;
}

.cal-day-num {
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
}

.cal-day.today .cal-day-num {
    align-items: center;
    background: #2563eb;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.cal-result {
    font-size: 12px;
    font-weight: 800;
}

.cal-day.positive .cal-result { color: #16a34a; }
.cal-day.negative .cal-result { color: #ef4444; }

.cal-ops {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
}

.cal-bar {
    border-radius: 999px;
    bottom: 0;
    height: 3px;
    left: 0;
    position: absolute;
}

.bg-green { background: #22c55e; }
.bg-yellow { background: #eab308; }
.bg-red { background: #ef4444; }

.cal-empty {
    border: none;
    min-height: 0;
    padding: 0;
}

.day-detail-panel {
    margin-top: 20px;
}

.day-result-badge {
    border-radius: 999px;
    font-size: 16px;
    font-weight: 900;
    padding: 6px 16px;
}

.day-result-badge.positive { background: #dcfce7; color: #166534; }
.day-result-badge.negative { background: #fee2e2; color: #991b1b; }

.settings-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
}

.settings-grid > .panel {
    min-width: 0;
}

.settings-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.settings-form label {
    color: #1e2d46;
    display: grid;
    font-size: 13px;
    font-weight: 900;
    gap: 6px;
}

.settings-form input,
.settings-form select {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    max-width: 100%;
    outline: none;
    padding: 12px 14px;
    width: 100%;
}

.settings-form input:focus,
.settings-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.settings-hint {
    color: #64748b;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 8px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.settings-hint .check,
.settings-hint .fail {
    align-self: flex-start;
}

.action-group {
    display: flex;
    gap: 6px;
}

.btn-icon {
    align-items: center;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    height: 34px;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    width: 34px;
}

.btn-icon:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.system-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, 1fr);
    margin-top: 16px;
}

.sys-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.sys-item small {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.sys-item strong {
    display: block;
    font-size: 20px;
}

.new-user-form {
    display: none;
    margin-top: 16px;
}

.new-user-form.visible {
    display: block;
}

.inline-form {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.inline-form input,
.inline-form select {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    min-height: 44px;
    outline: none;
    padding: 0 14px;
}

.inline-form input:focus,
.inline-form select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.inline-form .primary-action {
    min-height: 44px;
}

.api-key-section {
    margin-top: 16px;
}

.api-key-status {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.score-value {
    border-radius: 999px;
    display: inline-block;
    font-size: 16px;
    font-weight: 900;
    min-width: 36px;
    padding: 4px 10px;
    text-align: center;
}

.score-great { background: #dcfce7; color: #166534; }
.score-good { background: #dbeafe; color: #1e40af; }
.score-ok { background: #fef9c3; color: #854d0e; }
.score-low { background: #fee2e2; color: #991b1b; }

.my-rank-card {
    margin-top: 20px;
}

.my-rank-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(6, 1fr);
}

.my-rank-stat {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.my-rank-stat small {
    color: #64748b;
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.my-rank-stat strong {
    font-size: 24px;
}
.btn-delete {
    align-items: center;
    background: none;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #94a3b8;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    padding: 0;
    transition: all 0.2s;
    width: 34px;
}

.btn-delete:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
}

.topbar h1 {
    font-size: clamp(24px, 2.5vw, 32px);
    letter-spacing: -0.04em;
    margin-bottom: 8px;
}

.topbar p {
    color: #334155;
    font-size: 16px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    justify-content: flex-end;
}

.filters button,
.panel-head button {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #10213f;
    min-height: 42px;
    padding: 0 16px;
}

.filters button:first-child {
    border-radius: 9px 0 0 9px;
}

.filters button:last-child {
    border-radius: 9px;
    margin-left: 10px;
}

.filters button.active {
    background: #203758;
    color: #fff;
}

.stats-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 20px;
}

.stat-card,
.panel,
.insight-card,
.quick-actions a {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-card {
    display: flex;
    justify-content: space-between;
    min-height: 146px;
    padding: 22px;
}

.stat-card p {
    color: #10213f;
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 14px;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    font-size: 30px;
    letter-spacing: -0.04em;
    margin-bottom: 10px;
}

.stat-card small {
    color: var(--green);
    font-weight: 700;
}

.stat-icon {
    align-items: center;
    border-radius: 18px;
    display: flex;
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.stat-icon.blue { background: #e8f0ff; color: var(--blue); }
.stat-icon.purple { background: #efe7ff; color: var(--purple); }
.stat-icon.green { background: #e8f8ee; color: var(--green); }
.stat-icon.orange { background: #fff3df; color: var(--orange); }
.stat-icon.cyan { background: #e4fbff; color: var(--cyan); }

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

.panel {
    padding: 18px;
}

section[id],
.panel[id] {
    scroll-margin-top: 16px;
}

.profile-brokers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}@media (min-width: 1025px) {
    .profile-brokers-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.broker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.broker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.broker-item.linked {
    border-color: #22c55e;
    background: #f0fdf4;
}

.broker-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border-radius: 999px;
    padding: 2px 8px;
    width: fit-content;
}

.broker-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.broker-item-info strong {
    font-size: 14px;
    color: #0f172a;
}

.broker-item-info small {
    font-size: 12px;
    color: #64748b;
}

.broker-item form {
    display: inline;
}

.broker-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.broker-link-btn {
    font-size: 12px;
    padding: 7px 12px;
}

.broker-add-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.broker-add-form input {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
}

.panel h2 {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.panel-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-head button {
    border-radius: 8px;
    min-height: 38px;
}

.line-chart {
    display: grid;
    gap: 10px;
    grid-template-columns: 48px 1fr;
}

.line-chart svg {
    background-image: linear-gradient(#e5eaf2 1px, transparent 1px);
    background-size: 100% 52px;
    height: 260px;
    width: 100%;
}

.axis {
    color: #334155;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    justify-content: space-between;
    padding: 6px 0 22px;
}

.x-axis {
    color: #334155;
    display: flex;
    font-size: 14px;
    grid-column: 2;
    justify-content: space-between;
}

.bar-chart {
    align-items: center;
    background-image: linear-gradient(#e5eaf2 1px, transparent 1px);
    background-size: 100% 44px;
    display: flex;
    gap: 12px;
    height: 245px;
    justify-content: space-between;
    padding: 18px 10px;
    position: relative;
}

.bar-chart::before {
    background: #cbd5e1;
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
    top: 50%;
}

.bar {
    border-radius: 6px 6px 0 0;
    max-height: 108px;
    min-height: 4px;
    width: 10px;
    z-index: 1;
}

.bar.win {
    align-self: flex-start;
    background: #22a464;
    margin-top: 58px;
}

.bar.loss {
    align-self: flex-end;
    background: #ef4444;
    border-radius: 0 0 6px 6px;
    margin-bottom: 58px;
}

.emotions-panel {
    text-align: center;
}

.mood-face {
    align-items: center;
    background: none;
    border-radius: 50%;
    display: flex;
    font-size: 88px;
    height: 110px;
    justify-content: center;
    margin: 12px auto 8px;
    width: 110px;
}

.emotions-panel > strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
}

.emotions-panel > p {
    color: #334155;
    margin-bottom: 22px;
}

.score-panel {
    text-align: center;
}

.score-panel h2 {
    margin-bottom: 18px;
    text-transform: uppercase;
}

.score-panel .score-ring {
    margin-bottom: 14px;
}

.score-panel .score-ring::before {
    background: #ffffff;
}

.score-panel .score-ring strong {
    color: #0f172a;
}

.score-panel .score-ring span {
    color: #94a3b8;
}

.score-panel .score-level {
    color: #334155;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.score-panel .score-level.great { color: #16a34a; }
.score-panel .score-level.good { color: #2563eb; }
.score-panel .score-level.ok { color: #d97706; }
.score-panel .score-level.low { color: #dc2626; }

.emotion-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 12px 72px 1fr 42px;
    margin: 12px 0;
    text-align: left;
}

.dot {
    border-radius: 50%;
    height: 11px;
    width: 11px;
}

.dot.green,
.progress i.green { background: #22c55e; }
.dot.cyan,
.progress i.cyan { background: #06b6d4; }
.dot.yellow,
.progress i.yellow { background: #eab308; }
.dot.orange,
.progress i.orange { background: #f97316; }
.dot.red,
.progress i.red { background: #ef4444; }

.progress {
    background: #edf2f7;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
}

.progress i {
    border-radius: inherit;
    display: block;
    height: 100%;
}

.emotion-row b {
    font-size: 13px;
    text-align: right;
}

.content-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 360px;
    margin-bottom: 28px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 920px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    padding: 13px 10px;
    text-align: left;
}

th {
    background: #f8fafc;
    color: #1e2d46;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.positive { color: #059669; font-weight: 900; }
.negative { color: #ef4444; font-weight: 900; }

.dir-icon {
    height: 26px;
    margin-left: 6px;
    vertical-align: middle;
    width: auto;
}

.pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
}

.emotion-tranquilo { background: #dcfce7; color: #15803d; }
.emotion-normal { background: #dbeafe; color: #2563eb; }
.emotion-ansioso { background: #fef3c7; color: #d97706; }
.emotion-frustrado { background: #fed7aa; color: #ea580c; }
.emotion-enojado { background: #fee2e2; color: #dc2626; }

.check,
.fail {
    border-radius: 999px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 900;
    padding: 4px 7px;
}

.check { background: #dcfce7; color: #16a34a; }
.fail { background: #fee2e2; color: #ef4444; }

.secondary-action {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    margin-top: 16px;
    padding: 11px 14px;
}

.primary-action {
    align-items: center;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border: 0;
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
}

.page-topbar {
    align-items: center;
}

.page-alert {
    border-radius: 10px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 14px 16px;
}

.success-alert {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.error-alert {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.journal-stats {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.journal-panel {
    min-height: 420px;
}

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

.empty-state {
    color: #64748b;
    font-weight: 700;
    padding: 32px 12px;
    text-align: center;
}

.trade-form {
    display: grid;
    gap: 26px;
}

.form-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 24px;
}

.form-section:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.trade-form label {
    color: #1e2d46;
    display: grid;
    font-size: 13px;
    font-weight: 900;
    gap: 8px;
}

.trade-form input,
.trade-form select,
.trade-form textarea {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    outline: none;
    padding: 13px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.trade-form textarea {
    line-height: 1.6;
    resize: vertical;
}

.trade-form input:focus,
.trade-form select:focus,
.trade-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.checkbox-label {
    align-content: center;
    align-items: center;
    display: flex !important;
    gap: 10px !important;
    min-height: 73px;
}

.checkbox-label input {
    height: 18px;
    width: 18px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.stats-filters {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.stats-filters label {
    color: #1e2d46;
    display: grid;
    font-size: 13px;
    font-weight: 900;
    gap: 6px;
}

.stats-filters input,
.stats-filters select {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #0f172a;
    min-height: 44px;
    outline: none;
    padding: 0 14px;
}

.kpi-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
}

.kpi-grid .stat-card {
    min-height: 128px;
    padding: 16px;
}

.kpi-grid .stat-card p {
    font-size: 11px;
    margin-bottom: 10px;
}

.kpi-grid .stat-card strong {
    font-size: 22px;
}

.charts-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 22px;
}

.chart-card h2 {
    margin-bottom: 16px;
}

.chart-bars {
    display: grid;
    gap: 10px;
}

.chart-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 90px 1fr 90px;
}

.chart-label {
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.chart-track {
    background: #edf2f7;
    border-radius: 999px;
    height: 22px;
    overflow: hidden;
}

.chart-fill {
    border-radius: inherit;
    display: block;
    height: 100%;
    transition: width 0.3s;
}

.chart-fill.win {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.chart-fill.loss {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

.chart-value {
    font-size: 13px;
    font-weight: 800;
}

.trade-count {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.stat-icon.red {
    background: #fee2e2;
    color: var(--red);
}

.alerts-bar {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 20px;
}

.alert-card {
    align-items: center;
    border-radius: 12px;
    display: flex;
    gap: 14px;
    padding: 14px 18px;
}

.alert-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.alert-card p {
    font-size: 13px;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert-success .alert-icon {
    background: #22c55e;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 16px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    width: 36px;
    align-items: center;
}

.alert-warning {
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #854d0e;
}

.alert-warning .alert-icon {
    align-items: center;
    background: #eab308;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 16px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.alert-danger {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-danger .alert-icon {
    align-items: center;
    background: #ef4444;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 16px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-info .alert-icon {
    align-items: center;
    background: #3b82f6;
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 16px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.panel-badge {
    background: #e8f0ff;
    border-radius: 999px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 14px;
}

.goal-panel {
    text-align: center;
}

.goal-ring {
    margin: 16px auto;
}

.goal-circle {
    align-items: center;
    background: conic-gradient(#2563eb 0%, #2563eb var(--pct, 0%), #edf2f7 var(--pct, 0%) 100%);
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    height: 160px;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    width: 160px;
}

.goal-circle::before {
    background: #fff;
    border-radius: 50%;
    content: "";
    inset: 14px;
    position: absolute;
}

.goal-circle strong {
    font-size: 36px;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

.goal-circle small {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}

.goal-bar {
    background: #edf2f7;
    border-radius: 999px;
    height: 10px;
    margin: 16px auto;
    max-width: 280px;
    overflow: hidden;
}

.goal-fill {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    border-radius: inherit;
    height: 100%;
    transition: width 0.5s;
}

.goal-detail {
    display: flex;
    font-size: 13px;
    gap: 18px;
    justify-content: center;
}

.goal-detail span {
    color: #475569;
    font-weight: 700;
}

.empty-chart {
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    grid-column: 2;
    height: 240px;
    justify-content: center;
}

.empty-chart p {
    color: #94a3b8;
    font-weight: 700;
}

.tpx-mini {
    align-items: center;
    display: flex;
    gap: 4px;
}

.tpx-mini strong {
    font-size: 34px !important;
    letter-spacing: -0.04em;
}

.tpx-mini span {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
    margin-top: 14px;
}

.insight-tpx {
    background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
    border-color: #bfdbfe !important;
}

.ai-summary {
    margin-bottom: 24px;
}

.ai-empty {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 48px 24px;
    text-align: center;
}

.ai-empty-icon {
    align-items: center;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    color: #fff;
    display: flex;
    font-size: 28px;
    font-weight: 900;
    height: 80px;
    justify-content: center;
    width: 80px;
}

.ai-empty h2 {
    margin-bottom: 0;
}

.ai-empty p {
    color: #64748b;
    line-height: 1.6;
    max-width: 480px;
}

.ai-health-card {
    align-items: center;
    display: flex;
    gap: 28px;
    padding: 28px;
}

.health-good {
    border-left: 5px solid #22c55e;
}

.health-warn {
    border-left: 5px solid #eab308;
}

.health-danger {
    border-left: 5px solid #ef4444;
}

.health-score {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 4px;
}

.health-score strong {
    font-size: 52px;
    letter-spacing: -0.05em;
}

.health-score span {
    color: #94a3b8;
    font-size: 18px;
    font-weight: 700;
    margin-top: 20px;
}

.health-info h2 {
    margin-bottom: 6px;
}

.health-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
    padding: 4px 12px;
    text-transform: uppercase;
}

.health-badge.good { background: #dcfce7; color: #166534; }
.health-badge.warn { background: #fef9c3; color: #854d0e; }
.health-badge.danger { background: #fee2e2; color: #991b1b; }

.health-info p {
    color: #475569;
    font-weight: 600;
    margin-bottom: 10px;
}

.health-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.health-stats span {
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 12px;
}

.ai-section {
    margin-bottom: 24px;
}

.section-header {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 0;
}

.section-badge {
    background: #e8f0ff;
    border-radius: 999px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    padding: 4px 12px;
}

.ai-rec-grid {
    display: grid;
    gap: 14px;
}

.ai-rec-card {
    align-items: flex-start;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    gap: 16px;
    padding: 20px;
}

.rec-success {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
}

.rec-warning {
    background: #fffbeb;
    border-left: 4px solid #eab308;
}

.rec-danger {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
}

.rec-info {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
}

.rec-icon {
    align-items: center;
    border-radius: 12px;
    display: flex;
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.rec-success .rec-icon { background: #dcfce7; color: #16a34a; }
.rec-warning .rec-icon { background: #fef9c3; color: #ca8a04; }
.rec-danger .rec-icon { background: #fee2e2; color: #ef4444; }
.rec-info .rec-icon { background: #dbeafe; color: #2563eb; }

.ai-rec-card strong {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.ai-rec-card p {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.rec-action {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    margin-top: 10px;
    padding: 8px 14px;
}

.ai-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 24px;
}

.risk-meter {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.risk-circle {
    align-items: center;
    background: conic-gradient(#2563eb 0%, #2563eb var(--pct, 0%), #edf2f7 var(--pct, 0%) 100%);
    border-radius: 50%;
    display: inline-flex;
    flex-direction: column;
    height: 130px;
    justify-content: center;
    position: relative;
    width: 130px;
}

.risk-circle::before {
    background: #fff;
    border-radius: 50%;
    content: "";
    inset: 10px;
    position: absolute;
}

.risk-circle strong,
.risk-circle small {
    position: relative;
    z-index: 1;
}

.risk-circle strong {
    font-size: 32px;
}

.risk-circle small {
    color: #64748b;
    font-size: 13px;
}

.risk-circle.good::before { background: #f0fdf4; }
.risk-circle.warn::before { background: #fffbeb; }
.risk-circle.danger::before { background: #fef2f2; }

.risk-level {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    padding: 4px 14px;
}

.badge-good { background: #dcfce7; color: #166534; }
.badge-warn { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.risk-breakdown {
    display: grid;
    gap: 12px;
}

.risk-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 140px 1fr 60px;
}

.risk-label {
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.risk-track {
    background: #edf2f7;
    border-radius: 999px;
    height: 16px;
    overflow: hidden;
}

.risk-fill {
    border-radius: inherit;
    height: 100%;
    transition: width 0.3s;
}

.risk-fill.good { background: linear-gradient(90deg, #22c55e, #16a34a); }
.risk-fill.warn { background: linear-gradient(90deg, #eab308, #ca8a04); }
.risk-fill.danger { background: linear-gradient(90deg, #f87171, #ef4444); }

.risk-val {
    font-size: 13px;
    font-weight: 800;
}

.emotion-analysis {
    display: grid;
    gap: 10px;
}

.emotion-impact-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: 14px 1fr 50px 90px;
    padding: 8px 0;
}

.emotion-name {
    font-size: 14px;
    font-weight: 700;
}

.emotion-wr,
.emotion-result {
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.time-insights {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, 1fr);
}

.time-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.time-card.good { background: #f0fdf4; }
.time-card.danger { background: #fef2f2; }

.time-icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    font-size: 16px;
    font-weight: 900;
    height: 36px;
    justify-content: center;
    margin-bottom: 6px;
    width: 36px;
}

.time-card.good .time-icon { background: #dcfce7; color: #16a34a; }
.time-card.danger .time-icon { background: #fee2e2; color: #ef4444; }

.time-card small {
    color: #475569;
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
}

.time-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 4px;
}

.time-card b {
    font-size: 16px;
}

.notes-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.notes-stat {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.notes-stat small {
    color: #64748b;
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
}

.notes-stat strong {
    font-size: 24px;
}

.notes-meanings {
    display: grid;
    gap: 8px;
    list-style: none;
    margin-top: 16px;
    padding: 0;
}

.notes-meanings li {
    background: #f0f9ff;
    border-left: 3px solid #3b82f6;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 14px;
}

.trend-display {
    align-items: center;
    display: flex;
    gap: 18px;
}

.trend-icon {
    align-items: center;
    border-radius: 50%;
    display: flex;
    flex: 0 0 auto;
    font-size: 32px;
    font-weight: 900;
    height: 60px;
    justify-content: center;
    width: 60px;
}

.trend-icon.improving { background: #dcfce7; color: #16a34a; }
.trend-icon.declining { background: #fee2e2; color: #ef4444; }
.trend-icon.stable { background: #f1f5f9; color: #64748b; }

.trend-label {
    display: block;
    font-size: 18px;
    margin-bottom: 6px;
}

.trend-label.improving { color: #16a34a; }
.trend-label.declining { color: #ef4444; }
.trend-label.stable { color: #64748b; }

.trend-display p {
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.insights-stack {
    display: grid;
    gap: 18px;
}

.insight-card {
    align-items: center;
    display: grid;
    gap: 16px;
    grid-template-columns: 64px 1fr auto;
    padding: 26px 18px;
}

.insight-icon {
    align-items: center;
    border-radius: 18px;
    display: flex;
    font-size: 13px;
    font-weight: 900;
    height: 58px;
    justify-content: center;
    width: 58px;
}

.insight-icon.gold { background: #fef3c7; color: #eab308; }
.insight-icon.red { background: #fee2e2; color: #ef4444; }
.insight-icon.blue { background: #e0f2fe; color: #0284c7; }

.insight-card small,
.quick-actions small {
    color: #475569;
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
}

.insight-card strong {
    display: block;
    font-size: 20px;
}

.quick-actions {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-actions a {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 48px 1fr auto;
    padding: 16px;
}

.quick-actions span {
    align-items: center;
    background: #e8f2ff;
    border-radius: 14px;
    color: #0284c7;
    display: flex;
    font-size: 12px;
    font-weight: 900;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.quick-actions strong {
    display: block;
    margin-bottom: 4px;
}

.quick-actions b {
    font-size: 22px;
}

.mobile-menu {
    background: #10213f;
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: none;
    font-weight: 800;
    left: 16px;
    padding: 10px 16px;
    position: fixed;
    top: 14px;
    z-index: 30;
}

@media (max-width: 1440px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .insights-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .charts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .mobile-menu {
        display: block;
    }

    .sidebar {
        height: 100vh;
        min-height: 100vh;
        overflow-y: auto;
        position: fixed;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .dashboard-shell {
        margin-left: 0 !important;
        padding: 72px 18px 24px;
        width: 100%;
    }

    .topbar {
        flex-direction: column;
        gap: 12px;
    }

    .topbar-right {
        align-self: stretch;
        flex-wrap: wrap;
    }

    .content-grid > *,
    .dashboard-grid > *,
    .insights-stack > * {
        min-width: 0;
    }

    .dashboard-grid,
    .content-grid,
    .insights-stack {
        width: 100%;
        overflow: hidden;
    }

    .goal-widget {
        flex: 1;
        min-width: 0;
    }

    .filters {
        justify-content: flex-start;
    }

    .quick-actions,
    .insights-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }

    .ai-health-card {
        flex-direction: column;
        text-align: center;
    }

    .health-stats {
        justify-content: center;
    }

    .risk-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .time-insights {
        grid-template-columns: 1fr 1fr;
    }

    .my-rank-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .system-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .login-box {
        padding: 30px 22px;
    }

    .dashboard-page {
        overflow-x: hidden;
    }

    .content-grid > *,
    .dashboard-grid > *,
    .insight-card {
        min-width: 0;
    }

    .insights-stack,
    .topbar-right {
        min-width: 0;
        width: 100%;
        overflow: hidden;
    }

    .stats-grid,
    .quick-actions,
    .insights-stack {
        grid-template-columns: 1fr;
    }

    .filters button {
        border-radius: 8px !important;
        margin: 0 8px 8px 0 !important;
    }

    .stat-card {
        min-height: 128px;
    }

    .stat-icon {
        border-radius: 14px;
        height: 42px;
        width: 42px;
    }

    .stat-icon i {
        font-size: 18px;
    }

    .quick-actions span {
        border-radius: 10px;
        height: 38px;
        width: 38px;
    }

    .quick-actions span i {
        font-size: 16px;
    }

    .quick-actions a {
        grid-template-columns: 38px 1fr auto;
    }

    .panel {
        padding: 14px;
    }

    .line-chart {
        grid-template-columns: 38px 1fr;
    }

    .bar-chart {
        gap: 6px;
    }

    .sidebar {
        max-width: 86vw;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .chart-row {
        grid-template-columns: 60px 1fr 60px;
    }

    .ai-grid {
        grid-template-columns: 1fr;
    }

    .emotion-grid {
        grid-template-columns: 1fr;
    }

    .emotion-checkin {
        grid-template-columns: 1fr;
    }

    .time-insights {
        grid-template-columns: 1fr;
    }

    .notes-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .primary-action,
    .form-actions .secondary-action {
        justify-content: center;
        margin: 0;
        text-align: center;
        width: 100%;
    }

    .journal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .journal-panel {
        min-height: 0;
    }

    .topbar-right {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .topbar-right > .goal-widget,
    .topbar-right > .health-indicator,
    .topbar-right > .topbar-user,
    .topbar-right > .topbar-logout {
        align-self: stretch;
        width: 100%;
    }

    .goal-widget {
        flex: none;
        min-width: 0;
    }

    .goal-widget-bar {
        flex: 1;
        min-width: 0;
    }

    .health-indicator {
        background: #f0fdf4;
        border: 1px solid #bbf7d0;
        border-radius: 10px;
    }

    .insight-card {
        gap: 12px;
        grid-template-columns: 48px 1fr auto;
        padding: 18px 14px;
    }

    .insight-icon {
        border-radius: 14px;
        font-size: 12px;
        height: 46px;
        width: 46px;
    }

    .tpx-mini strong {
        font-size: 28px !important;
    }

    .topbar-actions {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
    }

    .topbar-actions .primary-action,
    .topbar-actions .secondary-action {
        margin: 0 !important;
        text-align: center;
    }

    .trades-panel table thead th:nth-child(3),
    .trades-panel table thead th:nth-child(4),
    .trades-panel table thead th:nth-child(6),
    .trades-panel table thead th:nth-child(7),
    .trades-panel table thead th:nth-child(9),
    .trades-panel table thead th:nth-child(10),
    .trades-panel table thead th:nth-child(11),
    .trades-panel table thead th:nth-child(12),
    .trades-panel table tbody tr td:nth-child(3),
    .trades-panel table tbody tr td:nth-child(4),
    .trades-panel table tbody tr td:nth-child(6),
    .trades-panel table tbody tr td:nth-child(7),
    .trades-panel table tbody tr td:nth-child(9),
    .trades-panel table tbody tr td:nth-child(10),
    .trades-panel table tbody tr td:nth-child(11),
    .trades-panel table tbody tr td:nth-child(12) {
        display: none;
    }

    .trades-panel table {
        min-width: 0;
    }

    .my-rank-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .my-rank-stat strong {
        font-size: 18px;
    }

    .rankings-table thead th:nth-child(6),
    .rankings-table thead th:nth-child(7),
    .rankings-table thead th:nth-child(8),
    .rankings-table thead th:nth-child(9),
    .rankings-table tbody tr td:nth-child(6),
    .rankings-table tbody tr td:nth-child(7),
    .rankings-table tbody tr td:nth-child(8),
    .rankings-table tbody tr td:nth-child(9) {
        display: none;
    }

    .rankings-table {
        min-width: 0;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .system-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-head {
        flex-wrap: wrap;
        gap: 8px;
    }

    .users-table thead th:nth-child(3),
    .users-table thead th:nth-child(4),
    .users-table thead th:nth-child(6),
    .users-table tbody tr td:nth-child(3),
    .users-table tbody tr td:nth-child(4),
    .users-table tbody tr td:nth-child(6) {
        display: none;
    }

    .users-table {
        min-width: 0;
    }
}
