:root {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: #f5f7fb;
	background: #090d14;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	background: radial-gradient(circle at top, #172236 0, #090d14 52%);
}

.shell {
	width: min(1040px, calc(100% - 32px));
	margin: 0 auto;
	padding: 40px 0 128px;
}

header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
}

h1 {
	font-size: 42px;
	margin: 5px 0 28px;
}

.eyebrow,
.label,
.meta {
	color: #8794a8;
	font-size: 12px;
	letter-spacing: 0.16em;
}

.status-stack {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.auth-bar {
	display: flex;
	align-items: center;
	gap: 8px;
}

.btn-logout {
	border: 1px solid #2e3d55;
	background: #151d2c;
	color: #cbd4e2;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.btn-logout:hover {
	background: #1f2b3e;
	color: #f0f4fb;
}

.pill,
.chip {
	border: 1px solid #2b3850;
	border-radius: 999px;
	padding: 8px 12px;
	color: #a8b4c8;
	font-size: 12px;
	white-space: nowrap;
}

.hero,
.panel {
	background: rgba(17, 24, 37, 0.9);
	border: 1px solid #263248;
	border-radius: 22px;
	padding: 26px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
	min-width: 0;
	max-width: 100%;
}

#price {
	display: block;
	font-size: 52px;
	margin-top: 7px;
}

.hourly-volume-card {
	margin-top: 18px;
	background: #0c121d;
	border: 1px solid #202c40;
	border-radius: 17px;
	padding: 14px;
}

.hourly-volume-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.hourly-volume-title {
	margin: 0;
	font-size: 11px;
	color: #8c9bb2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hourly-volume-max {
	font-size: 11px;
	color: #9eb2cd;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.hourly-volume-chart {
	display: block;
	margin-top: 12px;
}

.hourly-volume-plot {
	position: relative;
	width: 100%;
	overflow: visible;
}

.hourly-volume-bars {
	height: 132px;
	display: grid;
	grid-template-columns: repeat(24, minmax(0, 1fr));
	justify-content: center;
	align-items: end;
	gap: 4px;
	padding: 0;
	margin: 0 auto;
}

.hourly-volume-bar {
	appearance: none;
	border: none;
	border-radius: 0;
	background: #7fd8ff;
	padding: 0;
	cursor: pointer;
}

.hourly-volume-bar:hover,
.hourly-volume-bar:focus-visible {
	filter: brightness(1.08);
	outline: 1px solid #a8cbff;
	outline-offset: 1px;
}

.hourly-volume-tooltip {
	position: absolute;
	top: 0;
	left: 0;
	transform: translate(-50%, -108%);
	background: #0a111c;
	border: 1px solid #2b3d59;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 11px;
	color: #d9e5f6;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
	pointer-events: none;
	white-space: nowrap;
	z-index: 4;
}

.hourly-volume-tooltip strong,
.hourly-volume-tooltip span {
	display: block;
}

.hourly-volume-tooltip strong {
	color: #f5f8ff;
	margin-bottom: 2px;
}

.kpis {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
	margin-top: 16px;
	width: 100%;
}

.kpis article,
.signal-grid article,
.plan-grid article {
	background: #0c121d;
	border: 1px solid #202c40;
	border-radius: 17px;
	padding: 14px;
}

.kpis span,
.signal-grid span,
.plan-grid span {
	font-size: 11px;
	color: #8290a5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.kpis strong {
	display: block;
	font-size: 25px;
	margin-top: 7px;
}

.kpi-sub {
	display: block;
	margin-top: 6px;
	color: #8e9bb1;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.dashboard-grid {
	margin-top: 16px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	min-width: 0;
	width: 100%;
}

.dashboard-grid > * {
	min-width: 0;
	max-width: 100%;
}

.view {
	margin-top: 16px;
}

.card {
	margin-top: 16px;
}

.card-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.card h2 {
	margin: 0;
	font-size: 15px;
	letter-spacing: 0.08em;
	min-width: 0;
	word-break: break-word;
}

.signal-grid,
.plan-grid {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.signal-grid {
	grid-template-columns: 1fr;
}

.plan-grid {
	grid-template-columns: repeat(3, 1fr);
}

.signal-grid strong,
.plan-grid strong {
	display: block;
	margin-top: 7px;
	font-size: 20px;
}

.range-track-wrap {
	margin-top: 18px;
	width: 100%;
	min-width: 0;
}

.range-track {
	position: relative;
	height: 14px;
	border-radius: 999px;
	background: linear-gradient(90deg, #1d4f8f 0%, #2a5da1 35%, #7b4c2b 65%, #9f3f2f 100%);
	border: 1px solid #2e3a53;
}

.range-marker {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #f5f7fb;
	border: 2px solid #0a0f17;
	box-shadow: 0 0 0 3px rgba(245, 247, 251, 0.25);
	left: 50%;
}

.range-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 10px;
	color: #f5f8ff;
	font-size: 16px;
	font-weight: 700;
	gap: 8px;
	flex-wrap: wrap;
}

.chip-neutral {
	border-color: #44516a;
	color: #afbccf;
}

.chip-watch {
	border-color: #8b6f2d;
	color: #f3d792;
}

.chip-confirmed {
	border-color: #396d80;
	color: #91d9ef;
}

.chip-high {
	border-color: #2f6e42;
	color: #9ee8b4;
}

.chip-very-high {
	border-color: #30975f;
	color: #a8ffcc;
}

.signal-direction {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	padding: 8px 12px;
	border-radius: 12px;
	background: #0c121d;
	border: 1px solid #2b3850;
	max-width: 100%;
	flex-wrap: wrap;
}

.signal-direction-arrow {
	font-size: 18px;
	line-height: 1;
}

.signal-direction-caption {
	font-size: 10px;
	color: #7f8aa1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.signal-direction-label {
	font-size: 14px;
	letter-spacing: 0.08em;
}

.signal-direction-long {
	border-color: #2f6e42;
	color: #9ee8b4;
}

.signal-direction-short {
	border-color: #8b5348;
	color: #f0b7ad;
}

.signal-direction-neutral {
	border-color: #44516a;
	color: #afbccf;
}

.signal-stepper {
	list-style: none;
	margin: 14px 0 0;
	padding: 4px 0 6px;
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 0;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	white-space: nowrap;
	-webkit-overflow-scrolling: touch;
}

.signal-step {
	position: relative;
	flex: 1 1 0;
	min-width: 130px;
	padding: 18px 0 0;
	display: block;
	text-align: center;
	line-height: 1.2;
	font-size: 11px;
	letter-spacing: 0.01em;
	border: none;
	background: transparent;
	color: #7f8aa1;
}

.signal-step::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 2px solid #42526a;
	background: #0c121d;
	box-shadow: 0 0 0 2px #0c121d;
	z-index: 2;
}

.signal-step::after {
	content: '';
	position: absolute;
	top: 5px;
	left: calc(50% + 10px);
	width: calc(100% - 20px);
	height: 2px;
	background: #25354f;
	z-index: 1;
}

.signal-step:last-child::after {
	display: none;
}

.signal-step-done {
	color: #c2d0e5;
}

.signal-step-done::before {
	border-color: #5878a3;
	background: #304969;
}

.signal-step-active {
	font-weight: 700;
	color: #f5f7fb;
}

.signal-step-active::before {
	width: 14px;
	height: 14px;
	top: -1px;
}

.signal-step-active[data-state="NO_TRADE"] {
	color: #d2d9e6;
}

.signal-step-active[data-state="NO_TRADE"]::before {
	border-color: #7d8ea7;
	background: #44516a;
}

.signal-step-active[data-state="WATCH"] {
	color: #f3d792;
}

.signal-step-active[data-state="WATCH"]::before {
	border-color: #d4ac4a;
	background: #8b6f2d;
}

.signal-step-active[data-state="HIGH"] {
	color: #a5d2ff;
}

.signal-step-active[data-state="HIGH"]::before {
	border-color: #62a9ee;
	background: #2e5f9c;
}

.signal-step-active[data-state="VERY_HIGH"] {
	color: #a8ffcc;
}

.signal-step-active[data-state="VERY_HIGH"]::before {
	border-color: #66d092;
	background: #30975f;
}

.signal-summary {
	margin: 14px 0 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	color: #d7e1f1;
	word-break: break-word;
}

.signal-reason {
	margin: 14px 0 0;
	color: #a8b4c8;
	line-height: 1.5;
	word-break: break-word;
}

.diag {
	margin: 12px 0 0;
	color: #7f8aa1;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.trade-plan {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #23324a;
}

.trade-plan h3 {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.08em;
}

.trade-diagnostics-card {
	margin-top: 16px;
	padding: 16px;
}

.trade-diagnostics-toggle {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	border: 1px solid #22324a;
	border-radius: 14px;
	background: #0f1625;
	color: #d7e2f1;
	padding: 12px 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
}

.trade-diagnostics-toggle:hover {
	background: #121d30;
}

.trade-diagnostics-chevron {
	font-size: 12px;
	line-height: 1;
	color: #a8bad3;
}

.trade-diagnostics-body {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #24344d;
}

.trade-diagnostics-grid article {
	background: #0c121d;
	border: 1px solid #202c40;
	border-radius: 14px;
	padding: 12px;
}

.trade-diagnostics-label {
	margin: 0;
	font-size: 11px;
	color: #8798b2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.trade-diagnostics-grid strong {
	display: inline;
	margin-top: 0;
	font-size: 20px;
	color: #f5f8ff;
}

.trade-diagnostics-detail {
	margin: 8px 0 0;
	display: flex;
	align-items: baseline;
	gap: 6px;
	color: #a8b4c8;
	font-size: 14px;
}

.trade-diagnostics-detail span {
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-size: 11px;
	color: #8798b2;
}

.trade-diagnostics-pivots-title {
	margin: 12px 0 0;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #8798b2;
}

.trade-diagnostics-grid {
	margin-top: 10px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.trade-diagnostics-pivots {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
	color: #f5f8ff;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.15;
}

.trade-diagnostics-pivots li {
	padding: 0;
}

.history-card {
	max-width: 980px;
}

.history-list {
	margin-top: 14px;
	display: grid;
	gap: 12px;
}

.history-item {
	background: #0c121d;
	border: 1px solid #202c40;
	border-radius: 16px;
	padding: 14px;
	display: grid;
	gap: 12px;
}

.history-item-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
}

.history-item-time {
	margin: 0;
	font-size: 13px;
	color: #a8b4c8;
	letter-spacing: 0.05em;
	text-transform: lowercase;
}

.history-item-badges {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.history-badge {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border: 1px solid #2b3850;
	background: #101827;
	color: #cbd4e2;
	white-space: nowrap;
}

.history-side-long {
	border-color: #2f6e42;
	color: #9ee8b4;
}

.history-side-short {
	border-color: #8b5348;
	color: #f0b7ad;
}

.history-side-neutral {
	border-color: #44516a;
	color: #afbccf;
}

.history-status-open {
	border-color: #2f5786;
	color: #b7d3ff;
}

.history-status-closed {
	border-color: #55627a;
	color: #c3cde0;
}

.history-metrics {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
}

.history-metrics article {
	background: #0a1019;
	border: 1px solid #1e2a3d;
	border-radius: 12px;
	padding: 10px;
}

.history-metrics span {
	font-size: 10px;
	color: #8290a5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.history-metrics strong {
	display: block;
	margin-top: 6px;
	font-size: 16px;
	color: #f5f8ff;
	line-height: 1.2;
}

.closed-trade-details {
	display: grid;
	gap: 3px;
	padding-top: 8px;
	border-top: 1px solid #1e2a3d;
}

.closed-trade-row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	border: none;
	background: transparent;
	padding: 2px 0;
	line-height: 1.15;
}

.closed-trade-label {
	font-size: 11px;
	color: #8290a5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	flex-shrink: 0;
	line-height: 1.15;
}

.closed-trade-value {
	font-size: 14px;
	color: #f5f8ff;
	font-weight: 600;
	text-align: right;
	word-break: break-word;
	line-height: 1.15;
}

.history-events {
	border-top: 1px solid #22324a;
	padding-top: 8px;
}

.history-events summary {
	cursor: pointer;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #95a4bb;
	user-select: none;
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.history-events summary::-webkit-details-marker {
	display: none;
}

.history-events summary::before {
	content: '▸';
	font-size: 10px;
	line-height: 1;
	color: #aab7ca;
	transform: translateY(-1px);
}

.history-events[open] summary::before {
	content: '▾';
}

.history-events-list {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 6px;
}

.history-event {
	font-size: 13px;
	color: #cdd7e6;
	line-height: 1.35;
}

.history-event-created {
	color: #a8b4c8;
	font-style: italic;
}

.history-value-positive {
	color: #9ee8b4;
}

.history-value-negative {
	color: #ffb6b6;
}

.hidden {
	display: none;
}

.save-button {
	border: 1px solid #2a3850;
	background: #101827;
	color: #cbd4e2;
	border-radius: 14px;
	padding: 11px 18px;
	font-size: 14px;
	cursor: pointer;
}
.save-button {
	margin-top: 6px;
	background: #153153;
	border-color: #2f5786;
	color: #dbeaff;
}

.save-button:hover {
	background: #1a3f6b;
}

.settings-card {
	max-width: 760px;
}

.settings-form {
	margin-top: 16px;
	display: grid;
	gap: 14px;
}

.form-field {
	background: #0c121d;
	border: 1px solid #202c40;
	border-radius: 16px;
	padding: 14px;
}

.form-field label {
	display: block;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #bdcae0;
	margin-bottom: 8px;
}

.form-field input {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid #304361;
	background: #0a0f18;
	color: #f4f7fd;
	font-size: 18px;
}

.form-field input:focus {
	outline: 2px solid #4b78b6;
	outline-offset: 1px;
}

.field-help {
	margin: 10px 0 0;
	color: #95a4bb;
	line-height: 1.45;
	font-size: 13px;
}

.form-feedback {
	margin: 2px 0 0;
	font-size: 14px;
	color: #aab7ca;
	min-height: 20px;
}

.feedback-success {
	color: #9ee8b4;
}

.feedback-error {
	color: #ffb6b6;
}

.automation-diagnostics {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #23324a;
	display: grid;
	gap: 12px;
}

.automation-diagnostics h3 {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.08em;
}

.automation-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #aab7ca;
}

.automation-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid #2b3850;
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: #0f1624;
}

.automation-status-dot {
	line-height: 1;
	font-size: 12px;
}

.automation-status-neutral {
	border-color: #44516a;
	color: #afbccf;
}

.automation-status-active {
	border-color: #2f6e42;
	color: #9ee8b4;
}

.automation-status-inactive {
	border-color: #55627a;
	color: #c3cde0;
}

.automation-detail {
	margin: 0;
	font-size: 14px;
	color: #aab7ca;
}

.automation-detail strong {
	color: #dbe7f8;
	font-weight: 600;
}

.telegram-diagnostics {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #23324a;
	display: grid;
	gap: 12px;
}

.telegram-diagnostics h3 {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.08em;
}

.telegram-meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: #aab7ca;
}

.telegram-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid #2b3850;
	border-radius: 999px;
	padding: 6px 10px;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: #0f1624;
}

.telegram-status-dot {
	line-height: 1;
	font-size: 12px;
}

.telegram-status-neutral {
	border-color: #44516a;
	color: #afbccf;
}

.telegram-status-configured {
	border-color: #2f6e42;
	color: #9ee8b4;
}

.telegram-status-not-configured {
	border-color: #8b6f2d;
	color: #f3d792;
}

.telegram-status-disabled {
	border-color: #55627a;
	color: #c3cde0;
}

.telegram-last-test {
	margin: 0;
	font-size: 14px;
	color: #aab7ca;
}

.telegram-last-test strong {
	color: #dbe7f8;
	font-weight: 600;
}

#telegram-test-button {
	justify-self: flex-start;
}

.save-button:disabled {
	opacity: 0.72;
	cursor: wait;
}

.bottom-nav {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	padding: 10px 14px max(10px, env(safe-area-inset-bottom));
	background: rgba(8, 12, 19, 0.96);
	border-top: 1px solid #22324a;
	backdrop-filter: blur(8px);
	z-index: 60;
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	height: 64px;
	border-radius: 14px;
	border: 1px solid #2a3850;
	background: #101827;
	color: #cbd4e2;
	font-size: 12px;
	letter-spacing: 0.03em;
	cursor: pointer;
	min-width: 0;
}

.nav-icon {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 23px;
	line-height: 1;
	display: block;
	text-align: center;
	width: 100%;
}

.nav-label {
	line-height: 1.1;
}

.nav-item.active {
	background: #f5f7fb;
	color: #0a0f17;
	border-color: #f5f7fb;
}

@media (max-width: 980px) {
	.dashboard-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 650px) {
	.shell {
		width: calc(100% - 24px);
		padding: 20px 0 132px;
	}

	.hero,
	.panel {
		padding: 18px 16px;
		border-radius: 18px;
	}

	.hourly-volume-bars {
		height: 120px;
		gap: 2px;
	}

	.hourly-volume-max {
		font-size: 10px;
	}

	.hourly-volume-tooltip {
		font-size: 10px;
	}

	.kpis,
	.signal-grid,
	.plan-grid,
	.trade-diagnostics-grid,
	.history-metrics {
		grid-template-columns: 1fr;
	}

	.history-item-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.history-item-badges {
		justify-content: flex-start;
	}

	.signal-stepper {
		font-size: 10px;
		padding-bottom: 8px;
	}

	.signal-step {
		font-size: 10px;
		min-width: 70px;
	}

	.signal-step::after {
		left: calc(50% + 8px);
		width: calc(100% - 16px);
	}

	#price {
		font-size: 38px;
	}

	header {
		flex-direction: column;
		align-items: flex-start;
	}

	.status-stack {
		align-items: flex-start;
	}

	.bottom-nav {
		gap: 8px;
		padding-left: 10px;
		padding-right: 10px;
	}
}

/* ==========================================================================
   BLOQUE 3: Reset, Mantenimiento, Selects y Gráfica PnL Acumulado
   ========================================================================== */

.danger-button {
	border: 1px solid #7d2626;
	background: #4a1515;
	color: #ffc4c4;
	border-radius: 14px;
	padding: 11px 18px;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.danger-button:hover {
	background: #6e1e1e;
	border-color: #9e3232;
	color: #ffe0e0;
}

.danger-button:focus-visible {
	outline: 2px solid #e05252;
	outline-offset: 2px;
}

.cancel-button {
	border: 1px solid #2e3d55;
	background: #151d2c;
	color: #cbd4e2;
	border-radius: 14px;
	padding: 11px 18px;
	font-size: 14px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.cancel-button:hover {
	background: #1f2b3e;
	color: #f0f4fb;
}

.settings-select {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid #304361;
	background: #0a0f18;
	color: #f4f7fd;
	font-size: 16px;
	cursor: pointer;
}

.settings-select:focus {
	outline: 2px solid #4b78b6;
	outline-offset: 1px;
}

.database-maintenance {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #3d2424;
	display: grid;
	gap: 12px;
}

.database-maintenance h3 {
	margin: 0;
	font-size: 14px;
	letter-spacing: 0.08em;
	color: #f87171;
}

.maintenance-description {
	margin: 0;
	font-size: 13px;
	color: #aab7ca;
}

#database-reset-button {
	justify-self: flex-start;
}

/* Modal de confirmación */
.modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 16px;
}

.modal.hidden {
	display: none !important;
}

.modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(4, 7, 12, 0.82);
	backdrop-filter: blur(4px);
}

.modal-content {
	position: relative;
	background: #111927;
	border: 1px solid #5a2323;
	border-radius: 20px;
	padding: 26px;
	max-width: 480px;
	width: 100%;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
	z-index: 1;
}

.modal-content h3 {
	margin: 0 0 12px;
	font-size: 18px;
	color: #f87171;
}

.modal-warning {
	margin: 0 0 12px;
	font-size: 13px;
	color: #d1d9e6;
}

.modal-list {
	margin: 0 0 20px;
	padding-left: 20px;
	font-size: 13px;
	color: #a3b2c9;
	line-height: 1.6;
}

.modal-list strong {
	color: #f5f7fb;
}

.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

@media (max-width: 650px) {
	.modal-content {
		padding: 20px 16px;
	}
	.modal-actions {
		flex-direction: column-reverse;
		gap: 10px;
	}
	.modal-actions button {
		width: 100%;
		text-align: center;
		justify-content: center;
	}
}

/* Gráfica PnL Acumulado */
.pnl-chart-card {
	margin-top: 16px;
}

.pnl-chart-wrap {
	position: relative;
	margin-top: 16px;
	width: 100%;
}

.pnl-chart-plot {
	position: relative;
	width: 100%;
	background: #0c121d;
	border: 1px solid #202c40;
	border-radius: 16px;
	padding: 12px;
	overflow: visible;
}

.pnl-chart-svg {
	width: 100%;
	height: 260px;
	display: block;
	overflow: visible;
}

.pnl-chart-tooltip {
	position: absolute;
	top: 0;
	left: 0;
	transform: translate(-50%, -115%);
	background: #0a111c;
	border: 1px solid #2b3d59;
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 11px;
	color: #d9e5f6;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
	pointer-events: none;
	white-space: nowrap;
	z-index: 10;
}

.pnl-chart-tooltip strong {
	display: block;
	color: #f5f8ff;
	margin-bottom: 2px;
}

.pnl-chart-tooltip span {
	display: block;
	margin-top: 2px;
}



.trade-plan-card {
	margin-top: 16px;
}

/* Login Page Styles (CSP-compliant without inline <style>) */
.login-wrapper {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.login-card {
	width: 100%;
	max-width: 400px;
	background: #0f1623;
	border: 1px solid #233148;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.login-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 8px 0;
	color: #f5f7fb;
}

.login-subtitle {
	font-size: 13px;
	color: #8794a8;
	margin-bottom: 24px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.08em;
	color: #a8b4c8;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.form-control {
	width: 100%;
	padding: 12px 14px;
	background: #151f30;
	border: 1px solid #2b3a54;
	border-radius: 8px;
	color: #f5f7fb;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s;
}

.form-control:focus {
	border-color: #3b82f6;
}

.btn-submit {
	width: 100%;
	padding: 12px;
	background: #2563eb;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}

.btn-submit:hover {
	background: #1d4ed8;
}

.btn-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.alert-banner {
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 20px;
	font-size: 13px;
	line-height: 1.4;
}

.alert-error {
	background: rgba(239, 68, 68, 0.15);
	border: 1px solid #ef4444;
	color: #fca5a5;
}

.alert-info {
	background: rgba(59, 130, 246, 0.15);
	border: 1px solid #3b82f6;
	color: #93c5fd;
}
