/* Reset e Base */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	height: 100%;
}

/* Scrollbar Moderna - Classe genérica para reutilização */
.modern-scrollbar {
	scrollbar-width: thin;
	scrollbar-color: rgba(59, 130, 246, 0.5) rgba(15, 23, 42, 0.3);
}

.modern-scrollbar::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.modern-scrollbar::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.3);
	border-radius: 10px;
}

.modern-scrollbar::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.8));
	border-radius: 10px;
	border: 1px solid rgba(59, 130, 246, 0.2);
	transition: background 0.2s ease;
}

.modern-scrollbar::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 1));
	box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

body {
	margin: 0;
	min-height: 100vh;
	padding: 32px;
	font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
	background: radial-gradient(circle at top, #1d2743, #070b16 55%, #03050b);
	color: #e5e7eb;
	display: flex;
	justify-content: center;
}

/* Container Principal */
.app-shell {
	flex: 1;
	max-width: 1400px;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 24px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: rgba(8, 12, 24, 0.78);
	backdrop-filter: blur(22px);
	border-radius: 28px;
	padding: 32px;
	box-shadow: 0 20px 80px rgba(0, 0, 0, 0.45);
}

/* Header */
.header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.title {
	font-weight: 800;
	font-size: 28px;
	color: #f8fafc;
}

.subtitle {
	margin: 6px 0 0;
	font-size: 14px;
	color: #94a3b8;
}

/* Indicador Live */
.live-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #cbd5f5;
	background: rgba(59, 130, 246, 0.12);
	padding: 10px 16px;
	border-radius: 999px;
	border: 1px solid rgba(59, 130, 246, 0.35);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	transition: background 0.3s ease, border-color 0.3s ease;
}

.live-indicator.is-syncing {
	background: rgba(16, 185, 129, 0.15);
	border-color: rgba(16, 185, 129, 0.45);
}

.live-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #f97316;
	box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
	display: inline-block;
	transition: background 0.3s ease, box-shadow 0.3s ease;
}

.live-indicator.is-syncing .live-dot {
	background: #22c55e;
	box-shadow: 0 0 16px rgba(34, 197, 94, 0.9);
	animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(0.9);
		opacity: 0.7;
	}
	50% {
		transform: scale(1.2);
		opacity: 1;
	}
}

/* Controles */
.controls {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.btn-primary {
	appearance: none;
	border: 0;
	padding: 14px 22px;
	border-radius: 14px;
	color: #fff;
	cursor: pointer;
	font-weight: 700;
	font-size: 14px;
	background: linear-gradient(135deg, #2563eb, #7c3aed);
	box-shadow: 0 10px 30px rgba(37, 99, 235, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-primary:not(:disabled):hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 32px rgba(124, 58, 237, 0.45);
}

.status-pill {
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid rgba(148, 163, 184, 0.4);
	color: #e2e8f0;
	font-size: 13px;
	background: rgba(148, 163, 184, 0.12);
	backdrop-filter: blur(12px);
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.status-pill.error {
	background: rgba(239, 68, 68, 0.15);
	border-color: rgba(239, 68, 68, 0.5);
	color: #fecaca;
}

/* Saldo do Usuário */
.user-balance {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(45, 101, 62, 0.1);
	border: 1px solid rgba(34, 197, 94, 0.3);
	border-radius: 12px;
	padding: 10px 18px;
	color: #e2e8f0;
	font-weight: 600;
	font-size: 14px;
	backdrop-filter: blur(12px);
	transition: all 0.2s ease;
}

.user-balance:hover {
	background: rgba(45, 101, 62, 0.15);
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.user-balance i {
	font-size: 16px;
	color: #22c55e;
}

#balanceAmount {
	color: #22c55e;
	font-weight: 700;
}

/* Container de Stop Win/Loss */
.score-display {
	display: flex;
	align-items: center;
	gap: 8px;
	border-radius: 10px;
	padding: 8px 16px;
	font-size: 16px;
	font-weight: 600;
	backdrop-filter: blur(12px);
	background: rgba(15, 23, 42, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.2s ease;
}

.score-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: rgba(226, 232, 240, 0.7);
}

.score-value {
	font-size: 20px;
	font-weight: 700;
	min-width: 24px;
	text-align: center;
}

.score-separator {
	font-size: 18px;
	color: rgba(226, 232, 240, 0.5);
	margin: 0 4px;
}

.spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	margin-left: 8px;
}

.strategy-loading-spinner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	min-height: 200px;
}

.spinner-large {
	display: inline-block;
	width: 48px;
	height: 48px;
	border: 4px solid rgba(59, 130, 246, 0.2);
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* Grid Dashboard */
.grid-dashboard {
	margin-top: 8px;
	padding: 20px;
	background: linear-gradient(180deg, #0f172a 0%, #0a0e1b 100%);
	border: 1px solid #1f2937;
	border-radius: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
	box-shadow: 0 15px 40px rgba(3, 7, 18, 0.55);
}

.grid-dashboard-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.grid-title {
	font-weight: 800;
	color: #f8fafc;
	font-size: 16px;
	letter-spacing: 0.02em;
}

.grid-subtitle {
	font-size: 12px;
	color: #94a3b8;
	margin-top: 4px;
}

.grid-controls {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex-wrap: wrap;
}

.filter-label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 11px;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.filter-select {
	appearance: none;
	background: #111827;
	border: 1px solid #1f2937;
	color: #e5e7eb;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	min-width: 180px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-select:hover {
	border-color: #3b82f6;
}

.filter-select:focus {
	outline: none;
	border-color: #7c3aed;
	box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.league-grids {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-top: 12px;
}

.league-card {
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(9, 11, 24, 0.95));
	border: 1px solid #1f2937;
	border-radius: 16px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	box-shadow: inset 0 0 30px rgba(12, 16, 30, 0.6);
}

.league-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.league-name {
	font-weight: 700;
	color: #f8fafc;
	font-size: 14px;
}

.league-tag {
	font-size: 10px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(59, 130, 246, 0.15);
	color: #bfdbfe;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	border: 1px solid rgba(59, 130, 246, 0.4);
}

.league-status {
	font-size: 11px;
	color: #93a3b8;
	margin-bottom: 8px;
}

.grid-wrapper {
	overflow-x: auto;
	overflow-y: visible;
	border: 1px solid rgba(30, 41, 59, 0.9);
	border-radius: 14px;
	background: rgba(8, 10, 20, 0.9);
	box-shadow: 0 10px 30px rgba(2, 6, 23, 0.8);
	max-width: 100%;
	scrollbar-width: thin;
	scrollbar-color: rgba(59, 130, 246, 0.5) rgba(15, 23, 42, 0.3);
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

/* Estilos modernos para scrollbar horizontal (Webkit - Chrome, Safari, Edge) */
.grid-wrapper::-webkit-scrollbar {
	height: 8px;
}

.grid-wrapper::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.3);
	border-radius: 10px;
	margin: 0 14px;
}

.grid-wrapper::-webkit-scrollbar-thumb {
	background: linear-gradient(90deg, rgba(59, 130, 246, 0.6), rgba(37, 99, 235, 0.8));
	border-radius: 10px;
	border: 1px solid rgba(59, 130, 246, 0.2);
	transition: background 0.2s ease;
}

.grid-wrapper::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(90deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 1));
	box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.event-grid {
	display: grid;
	grid-auto-rows: 32px;
	grid-auto-columns: minmax(50px, auto);
	font-size: 10px;
	text-align: center;
	color: #e2e8f0;
	/* grid-template-columns será definido dinamicamente via JS */
}

.grid-cell {
	border: 1px solid #1f2937;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
	box-sizing: border-box;
	min-width: 50px;
	max-width: 100%;
	white-space: nowrap;
	overflow: hidden;
}

.grid-minute {
	font-weight: 600;
	background: #0f172a;
	position: sticky;
	top: 0;
	z-index: 2;
	font-size: 9px;
	min-width: 50px;
}

.grid-hour {
	font-weight: 600;
	background: #0f172a;
	position: sticky;
	left: 0;
	z-index: 1;
	font-size: 10px;
	min-width: 60px;
}

.grid-corner {
	background: #0f172a;
	position: sticky;
	top: 0;
	left: 0;
	z-index: 3;
}

.grid-event {
	font-weight: 600;
	border-color: #1e293b;
	background: #0b1120;
	min-height: 32px;
	min-width: 50px;
	line-height: 1.1;
	padding: 2px 4px;
	border-radius: 3px;
	font-size: 9px;
	transition: opacity 0.2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.grid-event[data-league="57"] {
	background: #0f172a;
	border-color: #1d4ed8;
	color: #bfdbfe;
}

.grid-event[data-league="57"].empty {
	background: transparent;
	border-color: #1e3a8a;
	color: #1e3a8a;
}

.grid-event[data-league="57"].future-game {
	background: rgba(29, 78, 216, 0.2) !important;
	border-color: #3b82f6 !important;
	color: #bfdbfe !important;
	font-weight: 400 !important;
	font-size: 8px !important;
	font-style: italic;
	text-shadow: 0 0 3px rgba(29, 78, 216, 0.5);
}

.grid-event[data-league="59"] {
	background: #1b1323;
	border-color: #f97316;
	color: #fed7aa;
}

.grid-event[data-league="59"].empty {
	background: transparent;
	border-color: #c2410c;
	color: #c2410c;
}

.grid-event[data-league="59"].future-game {
	background: rgba(249, 115, 22, 0.2) !important;
	border-color: #fb923c !important;
	color: #fed7aa !important;
	font-weight: 400 !important;
	font-size: 8px !important;
	font-style: italic;
	text-shadow: 0 0 3px rgba(249, 115, 22, 0.5);
}

.grid-event[data-league="63"] {
	background: #130f1f;
	border-color: #a855f7;
	color: #f5d0fe;
}

.grid-event[data-league="63"].empty {
	background: transparent;
	border-color: #7e22ce;
	color: #7e22ce;
}

.grid-event[data-league="63"].future-game {
	background: rgba(168, 85, 247, 0.2) !important;
	border-color: #c084fc !important;
	color: #f5d0fe !important;
	font-weight: 400 !important;
	font-size: 8px !important;
	font-style: italic;
	text-shadow: 0 0 3px rgba(168, 85, 247, 0.5);
}

.grid-event.multiple {
	font-size: 8px;
}

.grid-event.empty {
	color: #1f2937;
	border-color: #111827;
	background: transparent;
}

/* Jogos Futuros (sem placar ainda) */
.grid-event.future-game {
	color: #94a3b8;
	border-color: #475569;
	background: rgba(51, 65, 85, 0.15);
	font-style: italic;
	font-weight: 400;
	font-size: 8px;
	line-height: 1.2;
	text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.grid-event.filter-match {
	background: #10b981 !important;
	border-color: #059669 !important;
	color: #fff !important;
	font-weight: 700;
}

.grid-event.filter-no-match {
	background: #ef4444 !important;
	border-color: #dc2626 !important;
	color: #fff !important;
	font-weight: 700;
	opacity: 0.7;
}

.grid-empty {
	padding: 20px;
	text-align: center;
	color: #94a3b8;
	font-size: 12px;
	border: 1px dashed #1f2937;
	border-radius: 8px;
	background: #0f172a;
}

/* Seção de Histórico */
.history-section {
	margin-top: 24px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 20px;
	max-height: 500px;
	display: flex;
	flex-direction: column;
}

.history-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-title {
	font-weight: 700;
	font-size: 16px;
	color: #f8fafc;
}

.btn-clear {
	background: rgba(239, 68, 68, 0.2);
	color: #fecaca;
	padding: 6px 12px;
	border-radius: 8px;
	font-size: 12px;
	cursor: pointer;
	border: 1px solid rgba(239, 68, 68, 0.4);
	transition: all 0.2s ease;
}

.btn-clear:hover {
	background: rgba(239, 68, 68, 0.3);
	color: #fff;
}

/* Filtros de Tags */
.history-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
	padding: 12px;
	background: rgba(15, 23, 42, 0.4);
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-tag {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
	position: relative;
}

.filter-checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
}

.filter-tag-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #cbd5e1;
	background: rgba(148, 163, 184, 0.1);
	border: 1px solid rgba(148, 163, 184, 0.2);
	transition: all 0.2s ease;
	white-space: nowrap;
}

.filter-tag:hover .filter-tag-label {
	background: rgba(148, 163, 184, 0.15);
	border-color: rgba(148, 163, 184, 0.3);
	color: #e2e8f0;
}

.filter-checkbox:checked + .filter-tag-label {
	background: rgba(59, 130, 246, 0.2);
	border-color: rgba(59, 130, 246, 0.5);
	color: #bfdbfe;
}

.filter-tag-label::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	background: rgba(148, 163, 184, 0.2);
	border: 2px solid rgba(148, 163, 184, 0.4);
	border-radius: 4px;
	margin-right: 6px;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

.filter-checkbox:checked + .filter-tag-label::before {
	content: "✓";
	background: #3b82f6;
	border-color: #3b82f6;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.history-container {
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 420px;
}

.history-entry {
	padding: 12px 16px;
	background: rgba(15, 23, 42, 0.4);
	border-left: 3px solid rgba(148, 163, 184, 0.3);
	border-radius: 6px;
	font-size: 13px;
	color: #e5e7eb;
	line-height: 1.5;
	animation: slideIn 0.2s ease;
	transition: all 0.2s ease;
}

/* Garantir que as cores dos tipos sobrescrevam a cor padrão */
.history-entry.success,
.history-entry.error,
.history-entry.warning,
.history-entry.info {
	color: #fff !important;
}

/* Verde - Ambas marcam, Over 3.5 (mesma cor do filter-match) */
.history-entry.success {
	border-left-color: #059669;
	background: #10b981 !important;
	color: #fff !important;
	font-weight: 600;
}

/* Vermelho - Goleada (mesma cor do filter-no-match) */
.history-entry.error {
	border-left-color: #dc2626;
	background: #ef4444 !important;
	color: #fff !important;
	font-weight: 600;
}

/* Amarelo - Ambas não marcam (0-0) */
.history-entry.warning {
	border-left-color: #d97706;
	background: #f59e0b !important;
	color: #fff !important;
	font-weight: 600;
}

/* Azul - Empate, Over 2.5, outros */
.history-entry.info {
	border-left-color: #2563eb;
	background: #3b82f6 !important;
	color: #fff !important;
	font-weight: 600;
}

/* ===== CORES ESPECÍFICAS PARA OPERAÇÕES ===== */

/* Cinza - Informações de Operação (Entrada, Gale/Martingale) */
.history-entry.operation-info {
	border-left-color: #64748b;
	background: rgba(100, 116, 139, 0.25) !important;
	color: #e2e8f0 !important;
	font-weight: 600;
}

/* Amarelo - Gatilho */
.history-entry.operation-trigger {
	border-left-color: #d97706;
	background: #f59e0b !important;
	color: #fff !important;
	font-weight: 600;
}

/* Verde - GREEN (Vitórias em operações) */
.history-entry.operation-green {
	border-left-color: #059669;
	background: #10b981 !important;
	color: #fff !important;
	font-weight: 700;
}

/* Vermelho - LOSS (Perdas em operações) */
.history-entry.operation-red {
	border-left-color: #dc2626;
	background: #ef4444 !important;
	color: #fff !important;
	font-weight: 700;
}

/* Azul - Assertividade Bloqueada (Entrada não realizada por assertividade baixa) */
.history-entry.operation-blocked {
	border-left-color: #2563eb;
	background: #3b82f6 !important;
	color: #fff !important;
	font-weight: 600;
}

.history-time {
	font-size: 11px;
	color: rgba(255, 255, 255, 0.8);
	margin-right: 8px;
}

.history-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.history-game {
	font-weight: 600;
	color: #fff;
}

.history-score {
	font-size: 14px;
	font-weight: 700;
	color: #fff;
}

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Responsivo - Mobile */
@media (max-width: 768px) {
	body {
		padding: 8px;
	}

	.app-shell {
		padding: 16px;
		gap: 16px;
		border-radius: 20px;
	}

	/* Header responsivo */
	.header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.title {
		font-size: 22px;
	}

	.subtitle {
		font-size: 13px;
	}

	.live-indicator {
		width: 100%;
		justify-content: center;
		font-size: 12px;
		padding: 8px 14px;
	}

	/* Controles responsivos */
	.controls {
		flex-direction: column;
		width: 100%;
		gap: 10px;
	}

	.btn-start-stop,
	.btn-config,
	.btn-strategy,
	.btn-admin {
		width: 100%;
		padding: 12px 16px;
		font-size: 14px;
		justify-content: center;
	}

	/* Login inline responsivo */
	.login-form-inline {
		width: 100%;
		flex-direction: column;
		gap: 8px;
	}

	.login-input {
		width: 100%;
		font-size: 14px;
		padding: 10px 14px;
	}

	.btn-login {
		width: 100%;
		padding: 10px 16px;
		font-size: 14px;
	}

	/* Saldo do usuário responsivo */
	.user-balance {
		width: 100%;
		justify-content: center;
		padding: 12px 16px;
		font-size: 15px;
	}

	#sessionProfit {
		width: 100%;
		justify-content: center;
	}

	.status-pill {
		width: 100%;
		text-align: center;
		padding: 10px 14px;
		font-size: 13px;
	}

	/* Grid Dashboard responsivo */
	.grid-dashboard {
		padding: 12px;
	}

	.grid-dashboard-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.grid-title {
		font-size: 15px;
	}

	.grid-subtitle {
		font-size: 11px;
	}

	.grid-controls {
		width: 100%;
	}

	.filter-label {
		width: 100%;
	}

	.filter-select {
		width: 100%;
		min-width: unset;
		font-size: 13px;
		padding: 10px 14px;
	}

	.grid-wrapper {
		overflow-x: auto;
		overflow-y: auto;
		max-height: 400px;
		max-width: 100%;
	}

	.event-grid {
		font-size: 8px;
		grid-auto-rows: 28px;
		grid-auto-columns: minmax(45px, auto);
	}

	.grid-cell {
		padding: 1px;
		font-size: 8px;
		min-width: 45px;
		max-width: 100%;
		overflow: hidden;
	}

	.grid-minute {
		font-size: 7px;
		min-width: 45px;
	}

	.grid-hour {
		font-size: 8px;
		min-width: 55px;
	}

	.grid-event {
		font-size: 7px;
		min-height: 28px;
		min-width: 45px;
		padding: 1px 3px;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.grid-event.multiple {
		font-size: 6px;
	}

	.grid-event.future-game {
		font-size: 6px !important;
	}

	/* Seção de Histórico responsivo */
	.history-section {
		margin-top: 16px;
		padding: 16px;
		max-height: 400px;
	}

	.history-title {
		font-size: 15px;
	}

	.btn-clear {
		font-size: 11px;
		padding: 6px 10px;
	}

	.history-filters {
		gap: 6px;
		padding: 10px;
	}

	.filter-tag-label {
		font-size: 11px;
		padding: 6px 10px;
		gap: 4px;
	}

	.filter-tag-label::before {
		width: 14px;
		height: 14px;
		margin-right: 4px;
	}

	.history-container {
		max-height: 300px;
	}

	.history-entry {
		padding: 10px 12px;
		font-size: 12px;
	}

	.history-time {
		font-size: 10px;
	}

	.history-score {
		font-size: 13px;
	}

	/* Modal responsivo */
	.modal-overlay {
		display: none; /* Garantir que modals iniciem fechados em mobile */
		padding: 10px;
		align-items: flex-start;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.modal {
		padding: 20px;
		max-height: none;
		width: 100%;
		max-width: 100%;
		margin: 10px 0;
		position: relative;
		z-index: 10001;
	}
	
	.modal * {
		-webkit-tap-highlight-color: transparent;
	}
	
	.modal input,
	.modal select,
	.modal textarea {
		-webkit-tap-highlight-color: rgba(99, 102, 241, 0.2);
	}

	.modal.strategy-modal,
	#strategyModal .modal {
		max-width: 100%;
		width: 100%;
		padding: 16px;
	}

	.modal-title {
		font-size: 20px;
	}

	.modal-close {
		width: 32px;
		height: 32px;
		font-size: 24px;
	}

	/* Form responsivo */
	.form-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.form-label {
		font-size: 13px;
	}

	.form-input {
		padding: 12px 14px;
		font-size: 16px;
		-webkit-appearance: none;
		appearance: none;
		touch-action: manipulation;
		-webkit-user-select: text;
		user-select: text;
		min-height: 48px;
		width: 100%;
	}
	
	.dual-input-item {
		position: relative;
		width: 100%;
	}
	
	.dual-input-item .form-input {
		padding-right: 50px;
		width: 100%;
	}

	.dual-input-group {
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}

	.dual-input-divider {
		display: none;
	}
	
	.input-suffix {
		font-size: 14px;
		right: 14px;
		z-index: 1;
		pointer-events: none;
		user-select: none;
	}
	
	.form-row {
		gap: 16px;
	}
	
	.form-group {
		margin-bottom: 24px;
	}

	.help-text {
		font-size: 11px;
	}

	.btn-add {
		font-size: 13px;
		padding: 10px 16px;
		width: 100%;
	}

	.modal-actions {
		flex-direction: column-reverse;
		gap: 10px;
	}

	.btn-save,
	.btn-cancel {
		width: 100%;
		padding: 12px 20px;
		font-size: 14px;
	}

	/* Entradas responsivas */
	.entrada-item {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 16px;
	}

	.entrada-label {
		min-width: unset;
		font-size: 14px;
		font-weight: 600;
	}
	
	.entrada-item .dual-input-group {
		flex-direction: column;
		gap: 10px;
	}
	
	.entrada-item .dual-input-item {
		width: 100%;
	}
	
	.entrada-item .form-input {
		width: 100%;
		font-size: 16px;
		min-height: 44px;
		padding: 12px 50px 12px 14px;
	}

	.form-select {
		width: 100%;
		font-size: 16px;
		min-height: 44px;
		padding: 10px 12px;
		-webkit-appearance: none;
		appearance: none;
		touch-action: manipulation;
	}

	.btn-remove {
		width: 100%;
		padding: 12px 14px;
		font-size: 14px;
		min-height: 44px;
	}

	/* Estratégias responsivas */
	.strategies-list {
		gap: 10px;
	}

	.strategy-item {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		padding: 12px;
	}

	.strategy-item-name {
		font-size: 13px;
	}

	.strategy-item-actions {
		width: 100%;
		justify-content: space-between;
	}

	.btn-edit,
	.btn-delete-strategy {
		flex: 1;
		padding: 8px 12px;
		font-size: 12px;
	}

	.btn-toggle-strategy {
		width: 100%;
		height: 44px;
		font-size: 18px;
		margin-bottom: 8px;
	}

	/* Grade de Estratégia responsiva */
	.strategy-grid {
		grid-template-columns: repeat(15, minmax(50px, 1fr));
		gap: 6px;
		padding: 12px;
		overflow-x: auto;
	}

	.strategy-cell {
		min-width: 50px;
		min-height: 42px;
		max-height: 46px;
		font-size: 9px;
		padding: 3px;
	}

	.strategy-cell-content {
		font-size: 9px;
	}

	/* Cell Selector responsivo */
	.cell-selector {
		min-width: 200px;
		max-width: 280px;
		max-height: 350px;
		padding: 6px;
	}

	.cell-selector-group-title {
		font-size: 10px;
	}

	.cell-selector-option {
		padding: 7px 10px;
		font-size: 11px;
	}

	/* Stats responsivos */
	.strategy-stats-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.strategy-stats-summary {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.stat-value {
		font-size: 20px;
	}

	.stat-label {
		font-size: 10px;
	}

	.row-info {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		font-size: 11px;
	}

	.row-stats {
		gap: 8px;
		font-size: 11px;
	}

	.row-green,
	.row-red {
		font-size: 12px;
	}
}

/* Responsivo - Mobile Pequeno */
@media (max-width: 480px) {
	body {
		padding: 4px;
	}

	.app-shell {
		padding: 12px;
		gap: 12px;
		border-radius: 16px;
	}

	.title {
		font-size: 20px;
	}

	.subtitle {
		font-size: 12px;
	}

	.live-indicator {
		font-size: 11px;
		padding: 8px 12px;
	}

	.live-dot {
		width: 8px;
		height: 8px;
	}

	.btn-start-stop,
	.btn-config,
	.btn-strategy,
	.btn-admin,
	.btn-login {
		font-size: 13px;
		padding: 10px 14px;
	}

	.login-input {
		font-size: 13px;
		padding: 9px 12px;
	}

	.user-balance {
		font-size: 14px;
		padding: 10px 14px;
	}

	.status-pill {
		font-size: 12px;
		padding: 9px 12px;
	}

	.grid-title {
		font-size: 14px;
	}

	.grid-subtitle {
		font-size: 10px;
	}

	.filter-select {
		font-size: 12px;
		padding: 9px 12px;
	}

	.grid-event {
		font-size: 6px;
		min-height: 26px;
		min-width: 40px;
		padding: 1px 2px;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.grid-event.multiple {
		font-size: 5px;
	}

	.grid-event.future-game {
		font-size: 5px !important;
	}

	.event-grid {
		grid-auto-rows: 26px;
		grid-auto-columns: minmax(40px, auto);
	}

	.grid-cell {
		min-width: 40px;
		max-width: 100%;
		overflow: hidden;
	}

	.grid-minute {
		min-width: 40px;
	}

	.grid-hour {
		min-width: 50px;
	}

	.history-section {
		padding: 12px;
	}

	.history-title {
		font-size: 14px;
	}

	.history-entry {
		padding: 9px 10px;
		font-size: 11px;
	}

	.filter-tag-label {
		font-size: 10px;
		padding: 5px 8px;
	}

	.modal {
		padding: 16px;
		position: relative;
		z-index: 10001;
	}

	.modal-title {
		font-size: 18px;
	}

	.form-input,
	.btn-save,
	.btn-cancel {
		font-size: 16px;
		padding: 12px 14px;
		-webkit-appearance: none;
		appearance: none;
		min-height: 48px;
		touch-action: manipulation;
		-webkit-user-select: text;
		user-select: text;
	}
	
	.dual-input-item {
		width: 100%;
		position: relative;
	}
	
	.dual-input-item .form-input {
		padding-right: 50px;
		width: 100%;
	}
	
	.input-suffix {
		font-size: 14px;
		right: 14px;
		pointer-events: none;
	}
	
	.entrada-item input {
		min-height: 48px;
		font-size: 16px;
	}
	
	.entrada-item .form-input {
		width: 100%;
		min-height: 48px;
		padding: 12px 50px 12px 14px;
	}

	.strategy-grid {
		grid-template-columns: repeat(10, minmax(45px, 1fr));
		gap: 4px;
		padding: 10px;
	}

	.strategy-cell {
		min-width: 45px;
		min-height: 38px;
		max-height: 42px;
		font-size: 8px;
		padding: 2px;
	}
	
	.strategy-cell-content {
		font-size: 8px;
	}

	.strategy-stats-summary {
		grid-template-columns: 1fr;
	}

	.stat-value {
		font-size: 18px;
	}
}

/* Recomendações de Gestão de Banca Responsivas */
@media (max-width: 768px) {
	#configForm div[style*="rgba(59, 130, 246, 0.1)"] {
		padding: 12px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] > div:first-child {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 6px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] strong {
		font-size: 13px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] > div:nth-child(2) {
		font-size: 12px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] p {
		margin: 0 0 10px 0 !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] span[style*="margin-left"] {
		margin-left: 12px !important;
		font-size: 11px !important;
	}

	#configForm div[style*="rgba(239, 68, 68, 0.15)"] {
		padding: 10px !important;
	}

	#configForm div[style*="rgba(239, 68, 68, 0.15)"] span {
		font-size: 11px !important;
	}

	#configNotLoggedWarning {
		padding: 30px 20px !important;
	}

	#configNotLoggedWarning > div:first-child {
		font-size: 40px !important;
		margin-bottom: 16px !important;
	}

	#configNotLoggedWarning h3 {
		font-size: 18px !important;
		margin-bottom: 10px !important;
	}

	#configNotLoggedWarning p {
		font-size: 13px !important;
		margin-bottom: 20px !important;
	}
}

@media (max-width: 480px) {
	#configForm div[style*="rgba(59, 130, 246, 0.1)"] {
		padding: 10px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] > div:first-child span:first-child {
		font-size: 18px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] strong {
		font-size: 12px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] > div:nth-child(2) {
		font-size: 11px !important;
	}

	#configForm div[style*="rgba(59, 130, 246, 0.1)"] span[style*="margin-left"] {
		margin-left: 10px !important;
		font-size: 10px !important;
	}

	#configForm div[style*="rgba(239, 68, 68, 0.15)"] {
		padding: 8px !important;
	}

	#configForm div[style*="rgba(239, 68, 68, 0.15)"] span {
		font-size: 10px !important;
	}

	#configNotLoggedWarning {
		padding: 24px 16px !important;
	}

	#configNotLoggedWarning > div:first-child {
		font-size: 36px !important;
		margin-bottom: 14px !important;
	}

	#configNotLoggedWarning h3 {
		font-size: 16px !important;
		margin-bottom: 8px !important;
	}

	#configNotLoggedWarning p {
		font-size: 12px !important;
		margin-bottom: 18px !important;
	}

	#configNotLoggedWarning p br {
		display: none;
	}
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
	.app-shell {
		padding: 12px;
	}

	.header {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.live-indicator {
		width: auto;
	}

	.controls {
		flex-direction: row;
		flex-wrap: wrap;
	}

	.btn-start-stop,
	.btn-config,
	.btn-strategy,
	.btn-admin,
	.btn-login {
		width: auto;
		flex: 1;
		min-width: 120px;
	}

	.login-form-inline {
		flex-direction: row;
		width: 100%;
	}

	.login-input {
		flex: 1;
		min-width: 150px;
	}

	.user-balance {
		width: auto;
		flex: 1;
	}

	.status-pill {
		width: auto;
		flex: 1;
	}

	.grid-dashboard-header {
		flex-direction: row;
	}

	.history-section {
		max-height: 300px;
	}

	.modal {
		max-height: 85vh;
		overflow-y: auto;
	}
}

/* Botão Iniciar/Parar */
.btn-start-stop {
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 120px;
	justify-content: center;
}

.btn-start-stop:hover {
	background: linear-gradient(135deg, #059669, #047857);
	transform: translateY(-1px);
}

.btn-start-stop.stopped {
	background: linear-gradient(135deg, #10b981, #059669);
}

.btn-start-stop.running {
	background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-start-stop.running:hover {
	background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-start-stop .spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

/* Botão de Configurações */
.btn-config {
	background: linear-gradient(135deg, #64748b, #475569);
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
}

.btn-config:hover {
	background: linear-gradient(135deg, #475569, #334155);
	transform: translateY(-1px);
}

/* Botão de Estratégia */
.btn-strategy {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
}

.btn-strategy:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	transform: translateY(-1px);
}

/* Botão de Admin */
.btn-admin {
	background: linear-gradient(135deg, #f59e0b, #d97706);
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-admin:hover {
	background: linear-gradient(135deg, #d97706, #b45309);
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

/* Formulário de Login Inline */
.login-form-inline {
	display: flex;
	align-items: center;
	gap: 8px;
}

.login-input {
	padding: 8px 12px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: #e5e7eb;
	font-size: 13px;
	width: 180px;
	transition: all 0.2s ease;
}

.login-input:focus {
	outline: none;
	border-color: #6366f1;
	background: rgba(15, 23, 42, 0.8);
}

.login-input::placeholder {
	color: #64748b;
}

.btn-login {
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.btn-login:hover {
	background: linear-gradient(135deg, #059669, #047857);
	transform: translateY(-1px);
}

.btn-login:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.btn-login.connected {
	background: linear-gradient(135deg, #22c55e, #16a34a);
	cursor: default;
}

.btn-login.connected:hover {
	background: linear-gradient(135deg, #16a34a, #15803d);
	transform: none;
}

/* Modal */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 20px;
	-webkit-overflow-scrolling: touch;
}

.modal-overlay.active {
	display: flex;
}

.modal {
	background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 32px;
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* Modal de estratégia - mais largo para caber a grade de 30 colunas */
.modal.strategy-modal,
#strategyModal .modal {
	max-width: min(95vw, 1600px);
	width: min(95vw, 1600px);
	padding: 24px;
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
	font-size: 24px;
	font-weight: 800;
	color: #f8fafc;
}

.modal-close {
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #94a3b8;
	padding: 0;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	transition: all 0.2s ease;
}

.modal-close:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #f8fafc;
}

.form-group {
	margin-bottom: 20px;
}

.form-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #f8fafc;
	margin-bottom: 8px;
}

.form-input {
	width: 100%;
	padding: 12px 16px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: #e5e7eb;
	font-size: 14px;
	transition: all 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	touch-action: manipulation;
	-webkit-user-select: text;
	user-select: text;
}

.form-input:focus {
	outline: none;
	border-color: #6366f1;
	background: rgba(15, 23, 42, 0.8);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Dual Input Group (Valor e Percentual) */
.dual-input-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.dual-input-item {
	flex: 1;
	position: relative;
}

.dual-input-item .form-input {
	padding-right: 45px;
}

.input-suffix {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 14px;
	font-weight: 600;
	pointer-events: none;
	user-select: none;
	z-index: 1;
}

.dual-input-divider {
	color: #64748b;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	padding: 0 4px;
	flex-shrink: 0;
}

.help-text {
	font-size: 12px;
	color: #64748b;
	margin-top: 6px;
}

.btn-add {
	background: #10b981;
	color: #fff;
	padding: 10px 18px;
	border-radius: 10px;
	font-size: 13px;
	cursor: pointer;
	border: none;
	margin-top: 8px;
	transition: all 0.2s ease;
}

.btn-add:hover {
	background: #059669;
	transform: translateY(-1px);
}

.modal-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-save {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	padding: 12px 24px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
}

.btn-save:hover {
	background: linear-gradient(135deg, #4f46e5, #7c3aed);
	transform: translateY(-1px);
}

.btn-cancel {
	background: rgba(148, 163, 184, 0.2);
	color: #cbd5e1;
	padding: 12px 24px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid rgba(148, 163, 184, 0.3);
	transition: all 0.2s ease;
}

.btn-cancel:hover {
	background: rgba(148, 163, 184, 0.3);
	color: #f8fafc;
}

/* Estratégias */
.strategies-list {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.strategy-item {
	display: flex;
	gap: 12px;
	align-items: center;
	padding: 14px;
	background: rgba(15, 23, 42, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	transition: all 0.2s ease;
}

.strategy-item:hover {
	background: rgba(15, 23, 42, 0.7);
	border-color: #6366f1;
}

.strategy-item.active {
	background: rgba(99, 102, 241, 0.2);
	border-color: #6366f1;
}

/* Estratégia Desativada */
.strategy-item.inactive {
	opacity: 0.5;
	background: rgba(15, 23, 42, 0.3);
	border-color: rgba(100, 116, 139, 0.3);
}

.strategy-item.inactive:hover {
	background: rgba(15, 23, 42, 0.4);
	border-color: rgba(100, 116, 139, 0.5);
}

.strategy-item.inactive .strategy-item-name {
	text-decoration: line-through;
	color: #94a3b8;
}

.strategy-item-name {
	flex: 1;
	font-weight: 600;
	color: #f8fafc;
	font-size: 14px;
}

.strategy-item-actions {
	display: flex;
	gap: 8px;
}

.btn-edit {
	background: #3b82f6;
	color: #fff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
}

.btn-edit:hover {
	background: #2563eb;
}

.btn-delete-strategy {
	background: #ef4444;
	color: #fff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	border: none;
	transition: all 0.2s ease;
}

.btn-delete-strategy:hover {
	background: #dc2626;
}

/* Botão Toggle (Ativar/Desativar Estratégia) */
.btn-toggle-strategy {
	background: rgba(34, 197, 94, 0.2);
	color: #22c55e;
	border: 1px solid rgba(34, 197, 94, 0.4);
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
}

.btn-toggle-strategy:hover {
	background: rgba(34, 197, 94, 0.3);
	border-color: rgba(34, 197, 94, 0.6);
	transform: scale(1.05);
}

/* Botão quando estratégia está desativada */
.strategy-item.inactive .btn-toggle-strategy {
	background: rgba(100, 116, 139, 0.2);
	color: #94a3b8;
	border-color: rgba(100, 116, 139, 0.4);
}

.strategy-item.inactive .btn-toggle-strategy:hover {
	background: rgba(100, 116, 139, 0.3);
	border-color: rgba(100, 116, 139, 0.6);
}

.strategy-grid {
	display: grid;
	grid-template-columns: repeat(30, minmax(60px, 1fr));
	grid-template-rows: repeat(5, 1fr);
	gap: 8px;
	padding: 16px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 10px;
	overflow: auto;
	width: 100%;
	box-sizing: border-box;
}

.strategy-cell {
	min-width: 60px;
	width: 100%;
	min-height: 50px;
	max-height: 55px;
	background: rgba(8, 12, 24, 0.8);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 11px;
	font-weight: 600;
	color: #cbd5e1;
	transition: all 0.2s ease;
	position: relative;
	box-sizing: border-box;
	padding: 4px;
}

.strategy-cell:hover {
	border-color: #6366f1;
	background: rgba(99, 102, 241, 0.2);
}

.strategy-cell.has-trigger {
	background: rgba(251, 146, 60, 0.2);
	border-color: #fb923c;
	color: #fb923c;
}

.strategy-cell.has-bet {
	background: rgba(34, 197, 94, 0.2);
	border-color: #22c55e;
	color: #22c55e;
}

.strategy-cell-content {
	text-align: center;
	word-break: break-word;
	padding: 3px;
	font-size: 11px;
	line-height: 1.3;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Seletor de Células */
.cell-selector {
	position: fixed;
	z-index: 10001;
	background: #1e293b;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	padding: 8px;
	min-width: 220px;
	max-width: 300px;
	max-height: 400px;
	overflow-y: auto;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
	margin-top: 4px;
}

.cell-selector-group {
	margin-bottom: 12px;
}

.cell-selector-group-title {
	font-size: 11px;
	font-weight: 700;
	color: #94a3b8;
	text-transform: uppercase;
	margin-bottom: 6px;
	padding: 4px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cell-selector-option {
	padding: 8px 12px;
	cursor: pointer;
	border-radius: 4px;
	font-size: 12px;
	color: #e5e7eb;
	transition: all 0.15s ease;
	margin-bottom: 2px;
}

.cell-selector-option:hover {
	background: rgba(99, 102, 241, 0.3);
	color: #fff;
}

.cell-selector-option strong {
	display: block;
	margin-bottom: 2px;
}

.cell-selector-option small {
	display: block;
	font-size: 10px;
}

.cell-selector-option.clear {
	color: #ef4444;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 4px;
	padding-top: 8px;
}

.cell-selector-option.clear:hover {
	background: rgba(239, 68, 68, 0.2);
}

/* Mensagem de erro no seletor */
.cell-selector-group-title[style*="color: #f87171"] {
	color: #f87171 !important;
	font-size: 13px;
}

/* Form Row */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 20px;
}

/* Entradas Individuais */
.entradas-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 12px;
}

.entrada-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: rgba(15, 23, 42, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
}

.entrada-label {
	font-size: 13px;
	font-weight: 600;
	color: #f8fafc;
	min-width: 80px;
	flex-shrink: 0;
}

.entrada-item .dual-input-group {
	flex: 1;
}

.form-select {
	padding: 8px 12px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	color: #e5e7eb;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 60px;
	-webkit-appearance: none;
	appearance: none;
	touch-action: manipulation;
}

.form-select:focus {
	outline: none;
	border-color: #6366f1;
	background: rgba(15, 23, 42, 0.8);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.entrada-valor {
	flex: 1;
}

.btn-remove {
	background: rgba(239, 68, 68, 0.2);
	color: #fecaca;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	cursor: pointer;
	border: 1px solid rgba(239, 68, 68, 0.4);
	transition: all 0.2s ease;
	white-space: nowrap;
}

.btn-remove:hover {
	background: rgba(239, 68, 68, 0.3);
	color: #fff;
}

/* Estatísticas de Estratégia */
.strategy-stats {
	margin-top: 16px;
}

.strategy-stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 16px;
}

.strategy-stats-card {
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 20px;
	transition: all 0.3s ease;
}

.strategy-stats-card:hover {
	border-color: rgba(255, 255, 255, 0.2);
	background: rgba(15, 23, 42, 0.8);
}

/* Card geral destacado */
.strategy-stats-card.overall-card {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.15));
	border: 2px solid rgba(59, 130, 246, 0.4);
	box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
	grid-column: 1 / -1; /* Ocupar largura total em grid */
}

.strategy-stats-card.overall-card:hover {
	border-color: rgba(59, 130, 246, 0.6);
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 51, 234, 0.2));
	box-shadow: 0 6px 25px rgba(59, 130, 246, 0.3);
}

.strategy-stats-card.overall-card .strategy-stats-header h3 {
	font-size: 20px;
	background: linear-gradient(135deg, #60a5fa, #a78bfa);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.strategy-stats-header {
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.strategy-stats-header h3 {
	font-size: 18px;
	font-weight: 600;
	color: #f8fafc;
	margin: 0;
}

.strategy-stats-summary {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

.stat-item {
	background: rgba(30, 41, 59, 0.5);
	border-radius: 8px;
	padding: 12px;
	text-align: center;
}

.stat-item.stat-green {
	border: 1px solid rgba(34, 197, 94, 0.3);
	background: rgba(34, 197, 94, 0.1);
}

.stat-item.stat-red {
	border: 1px solid rgba(239, 68, 68, 0.3);
	background: rgba(239, 68, 68, 0.1);
}

.stat-item.stat-total {
	border: 1px solid rgba(148, 163, 184, 0.3);
	background: rgba(148, 163, 184, 0.1);
}

.stat-item.stat-rate {
	border: 1px solid rgba(59, 130, 246, 0.3);
	background: rgba(59, 130, 246, 0.1);
}

.stat-label {
	font-size: 11px;
	color: #94a3b8;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 4px;
}

.stat-value {
	font-size: 24px;
	font-weight: 700;
	color: #f8fafc;
}

.stat-item.stat-green .stat-value {
	color: #22c55e;
}

.stat-item.stat-red .stat-value {
	color: #ef4444;
}

.stat-item.stat-rate .stat-value {
	color: #3b82f6;
}

.strategy-stats-rows {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.strategy-stats-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.strategy-stats-row:last-child {
	border-bottom: none;
}

.row-info {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	font-size: 13px;
}

.row-label {
	color: #94a3b8;
	font-weight: 500;
}

.row-trigger {
	color: #fbbf24;
	font-weight: 600;
	background: rgba(251, 191, 36, 0.15);
	padding: 2px 8px;
	border-radius: 4px;
}

.row-arrow {
	color: #64748b;
	margin: 0 4px;
}

.row-bet {
	color: #60a5fa;
	font-weight: 600;
	background: rgba(96, 165, 250, 0.15);
	padding: 2px 8px;
	border-radius: 4px;
}

.row-stats {
	display: flex;
	gap: 12px;
	align-items: center;
}

.row-green {
	color: #22c55e;
	font-weight: 600;
	font-size: 13px;
}

.row-red {
	color: #ef4444;
	font-weight: 600;
	font-size: 13px;
}

@media (max-width: 1200px) {
	.strategy-stats-grid {
		grid-template-columns: 1fr;
	}
}

