:root {
    /* Vegas Poker - Cores Vibrantes Roxo/Rosa (mesmas da landing) */
    --primary-color: #a855f7; /* Roxo vibrante */
    --primary-dark: #7c3aed; /* Roxo mais escuro */
    --primary-hover: #c084fc; /* Roxo mais claro para hover */
    --accent: #a855f7; /* Roxo vibrante principal */
    --accent2: #ec4899; /* Rosa vibrante */
    --accent3: #f472b6; /* Rosa claro */
    --purple-light: #c084fc; /* Roxo claro para variações */
    --purple-dark: #7c3aed; /* Roxo escuro para bordas */
    --bg-primary: #0a0a1a; /* Fundo escuro mais profundo */
    --bg-secondary: rgba(255, 255, 255, 0.06); /* Background cards com transparência */
    --bg-tertiary: rgba(255, 255, 255, 0.08);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.75);
    --border-color: rgba(168, 85, 247, 0.25); /* Borda roxa com transparência */
    --hover-bg: rgba(168, 85, 247, 0.15); /* Hover roxo */
    --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.3); /* Brilho roxo */
    
    /* Gradiente vibrante roxo/rosa */
    --vegas-gradient: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(236, 72, 153, 0.90));
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(1200px 800px at 20% 15%, rgba(168, 85, 247, 0.15), transparent 65%),
        radial-gradient(1000px 700px at 80% 20%, rgba(236, 72, 153, 0.12), transparent 60%),
        radial-gradient(1100px 900px at 50% 90%, rgba(244, 114, 182, 0.08), transparent 55%),
        radial-gradient(800px 600px at 10% 50%, rgba(168, 85, 247, 0.08), transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

.page {
    display: flex;
    min-height: 100vh;
    overflow-x: visible;
    width: 100%;
}

/* Sidebar Simples e Clara */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.04);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 1rem 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(168, 85, 247, 0.1);
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 70px;
    padding: 1rem 0;
}


.sidebar.collapsed .menu-section-title {
    display: none;
}

.sidebar.collapsed .list-group-item {
    justify-content: center;
    padding: 0.75rem 0.5rem !important;
    text-align: center;
    position: relative;
}

.sidebar.collapsed .list-group-item span:not(.icon-only) {
    display: none;
}

.sidebar.collapsed .list-group-item .icon-only {
    font-size: 1.5rem;
    display: block;
    margin: 0 auto;
}

.sidebar .list-group-item .icon-only {
    display: inline-block;
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.sidebar.collapsed .btn {
    padding: 0.75rem 0.5rem !important;
    min-height: 44px;
}

.sidebar.collapsed .btn .icon-only {
    display: block;
    margin: 0 auto;
    font-size: 1.5rem;
}

.sidebar.collapsed .btn span:not(.icon-only) {
    display: none;
}

/* Tooltip para menu colapsado */
.sidebar.collapsed .list-group-item {
    position: relative;
}

.sidebar.collapsed .list-group-item:hover::after {
    content: attr(data-title);
    position: absolute;
    left: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

/* Botão para colapsar sidebar (desktop) */
.sidebar-toggle {
    display: none;
    position: relative;
    z-index: 1001;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-toggle .icon-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

@media (min-width: 992px) {
    .sidebar-toggle {
        display: flex;
    }

    .page.sidebar-collapsed main {
        margin-left: 0;
    }
}

.sidebar h5 {
    background: var(--vegas-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 1.25rem;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--primary-color); /* Fallback para browsers que não suportam background-clip */
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
    width: 100%;
    box-sizing: border-box;
    transition: opacity 0.3s ease;
}

.sidebar .list-group {
    background: transparent;
    padding: 0 0.75rem;
    border: none;
}

.sidebar .list-group-item,
.sidebar .list-group-item-action {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.25rem !important;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, padding 0.3s ease;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.sidebar .list-group-item span:not(.icon-only) {
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar .list-group-item:link,
.sidebar .list-group-item:visited,
.sidebar .list-group-item:any-link,
.sidebar .list-group-item-action:link,
.sidebar .list-group-item-action:visited,
.sidebar .list-group-item-action:any-link {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.sidebar .list-group-item:hover,
.sidebar .list-group-item-action:hover {
    background: var(--hover-bg) !important;
    color: var(--primary-hover) !important;
    border-color: rgba(168, 85, 247, 0.3) !important;
    text-decoration: none !important;
    outline: none !important;
    transform: none !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2) !important;
}

.sidebar .list-group-item:focus,
.sidebar .list-group-item:active,
.sidebar .list-group-item-action:focus,
.sidebar .list-group-item-action:active {
    background: var(--hover-bg) !important;
    color: var(--primary-hover) !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.sidebar .list-group-item.active,
.sidebar .list-group-item-action.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(236, 72, 153, 0.85)) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4) !important;
    transform: none !important;
    font-weight: 600 !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
}

.sidebar .list-group-item.active:hover,
.sidebar .list-group-item.active:focus,
.sidebar .list-group-item-action.active:hover,
.sidebar .list-group-item-action.active:focus {
    background: var(--primary-hover) !important;
    color: #ffffff !important;
}

/* Main Content */
main {
    flex: 1;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow-x: visible !important;
    width: 100%;
    min-width: 0;
}

.top-row {
    background: rgba(10, 10, 26, 0.75);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.15), 0 0 0 1px rgba(168, 85, 247, 0.1);
    backdrop-filter: blur(15px);
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
    overflow-x: visible !important;
    width: 100%;
    box-sizing: border-box;
}

.top-row .navbar-brand {
    color: #ffffff !important;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 auto;
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

/* Logo no top-row */
.top-row-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    height: 100%;
}

.top-row-logo-img {
    height: 38px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 10px rgba(168, 85, 247, 0.25));
    transition: all 0.2s ease;
    display: block;
}

.top-row-logo-img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 14px rgba(168, 85, 247, 0.4));
}

.content {
    flex: 1;
    padding: 1.5rem;
    background: transparent;
    color: var(--text-primary);
    overflow-x: visible;
}

main {
    overflow-x: visible !important;
    width: 100%;
}

.content h1 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content h2 {
    font-size: 1.75rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content h4, .content h5 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* Links Grandes e Claros */
a {
    text-decoration: none;
    color: var(--primary-hover);
    font-size: 1rem;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Cards Modernos */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    color: var(--text-primary);
    box-shadow: 0 8px 22px rgba(168, 85, 247, 0.15), 0 0 0 1px rgba(168, 85, 247, 0.1);
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.25), 0 0 0 1px rgba(168, 85, 247, 0.2);
    transform: translateY(-2px);
    border-color: rgba(168, 85, 247, 0.35);
}

.card-body {
    padding: 1.5rem;
    font-size: 1rem;
}

.card-header {
    background: rgba(184, 134, 11, 0.9); /* Amarelo mostarda */
    border-bottom: 1px solid rgba(184, 134, 11, 0.5);
    color: #ffffff;
    padding: 1.25rem 2rem;
    font-weight: bold;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
}

.card-title {
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
}

/* Botões Modernos */
.btn {
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.5px;
}

.btn-success {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(236, 72, 153, 0.85));
    color: #ffffff;
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}

.btn-success:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 1), rgba(236, 72, 153, 0.95));
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}

.btn-success:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(102, 51, 153, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(236, 72, 153, 0.85));
    color: #ffffff;
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 1), rgba(236, 72, 153, 0.95));
    border-color: rgba(168, 85, 247, 0.6);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.btn-outline-light:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--primary-color);
    color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
    transform: translateY(-2px);
}

.btn-outline-light:disabled,
.btn-outline-light.disabled,
button.btn-outline-light:disabled,
button.btn-outline-light[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn:disabled,
.btn.disabled,
button.btn:disabled,
button.btn[disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    min-height: 44px;
}

/* Tabelas Modernas */
.table-dark {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    font-size: 1.1rem;
    box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

.table-dark thead th {
    background: rgba(147, 51, 234, 0.85); /* Roxo mais quente e menos azulado */
    border: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.15rem;
    padding: 1.5rem 2rem;
    text-align: left;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

.table-dark tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.table-dark tbody tr:hover {
    background: var(--hover-bg);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.table-dark tbody td {
    padding: 1.5rem 2rem;
    border: none;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.03);
}

/* Badges Grandes */
.badge {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
}

.bg-success {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(236, 72, 153, 0.85)) !important;
    color: #ffffff !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3) !important;
}

.bg-secondary {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Badges de Status do Torneio - Cores específicas sem gradiente */
.badge.bg-success {
    background-color: #28a745 !important;
    background-image: none !important;
    box-shadow: none !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    background-image: none !important;
}

.badge.bg-primary {
    background-color: #007bff !important;
    background-image: none !important;
}

.badge.bg-info {
    background-color: #17a2b8 !important;
    background-image: none !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    background-image: none !important;
    color: #212529 !important;
}

/* Formulários Modernos e Grandes */
.form-control {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 1.125rem 1.5rem;
    font-size: 1.35rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 64px;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.1);
}

/* Select e Option - garantir legibilidade */
select.form-control {
    cursor: pointer;
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Opções do select - garantir legibilidade mesmo quando dropdown está aberto */
select.form-control option {
    background-color: #1a1a2e !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem;
}

/* Opção selecionada */
select.form-control option:checked {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Opção em hover (quando dropdown está aberto) */
select.form-control option:hover {
    background-color: rgba(168, 85, 247, 0.3) !important;
    color: #ffffff !important;
}

.form-control:hover {
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

.form-control:focus {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25), 0 6px 16px rgba(0, 0, 0, 0.2);
    outline: none;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: var(--text-muted);
    font-size: 1.25rem;
    opacity: 0.7;
}

/* Select dropdown - corrigir opções brancas */
select.form-control {
    cursor: pointer;
    background-color: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Garantir que as opções do select sejam legíveis */
select.form-control option {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
}

/* Quando uma opção está selecionada */
select.form-control option:checked {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Hover nas opções (quando o dropdown está aberto) */
select.form-control option:hover {
    background-color: var(--hover-bg) !important;
    color: var(--text-primary) !important;
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.875rem;
    font-size: 1.3rem;
    display: block;
    letter-spacing: 0.3px;
}

.form-text {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}

.form-check-label {
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
}

/* Alertas Grandes e Claros */
.alert {
    border: 2px solid;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #ffcccc;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #fff3cd;
}

.alert-info {
    background: rgba(13, 202, 240, 0.15);
    border-color: #0dcaf0;
    color: #cff4fc;
}

.alert strong {
    font-weight: bold;
    font-size: 1.2rem;
}

/* List Group Simples */
.list-group {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.1);
}

.list-group-item {
    background: var(--bg-secondary);
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    font-size: 1.1rem;
    transition: background 0.2s, box-shadow 0.2s;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item-action:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.15);
}

.list-group-item strong {
    font-size: 1.25rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.list-group-item small {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* Utilities */
.text-muted {
    color: var(--text-muted) !important;
    font-size: 1rem;
}

.text-light {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.border-secondary {
    border-color: var(--border-color) !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.75rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

/* Sidebar Utilities */
.sidebar .h-100 {
    height: 100% !important;
}

.sidebar .d-flex {
    display: flex !important;
}

.sidebar .flex-column {
    flex-direction: column !important;
}

.sidebar .flex-grow-1 {
    flex-grow: 1 !important;
}

.sidebar .mt-auto {
    margin-top: auto !important;
}

.sidebar .w-100 {
    width: 100% !important;
}

.sidebar .pt-3 {
    padding-top: 1.5rem !important;
}

.sidebar .p-2 {
    padding: 0.75rem !important;
}

.sidebar .p-3 {
    padding: 1rem !important;
}

/* Melhorias de Acessibilidade */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.25);
}

/* Logo no sidebar */
.sidebar-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem 1rem 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    position: relative;
}

.sidebar-logo-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
}

.sidebar-logo-img {
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 10px rgba(168, 85, 247, 0.25));
    transition: all 0.2s ease;
    display: block;
}

.sidebar-logo-img:hover {
    transform: scale(1.03);
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 14px rgba(168, 85, 247, 0.4));
}

/* Logo quando sidebar está colapsado */
.sidebar.collapsed .sidebar-logo-container {
    padding: 0.75rem 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}

.sidebar.collapsed .sidebar-logo-container::after {
    display: none;
}

.sidebar.collapsed .sidebar-logo-img {
    height: 36px;
    max-width: 50px;
}

/* Títulos de seção do menu */
.menu-section-title {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
}

.menu-section-title:first-child {
    margin-top: 0;
}

/* ============================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ============================================ */

/* Menu Hambúrguer para Mobile */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1001;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(236, 72, 153, 0.85));
    border: 1px solid rgba(168, 85, 247, 0.5);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4), 0 0 15px rgba(168, 85, 247, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile First - Base para telas pequenas */
@media (max-width: 991.98px) {
    .page {
        flex-direction: column;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-overlay {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .top-row {
        padding: 0.75rem 0.25rem 0.75rem 2rem !important; /* Espaço mínimo para o botão hambúrguer */
        min-height: 56px;
        gap: 0.25rem !important;
        overflow: visible !important;
        margin: 0 !important;
    }
    
    .top-row.px-4 {
        padding-left: 2rem !important;
        padding-right: 0.25rem !important;
    }

    .top-row .navbar-brand {
        font-size: 0.9rem !important;
        letter-spacing: 0.5px;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
        margin: 0;
    }

    .top-row-logo-container {
        height: 100%;
    }

    .top-row-logo-img {
        height: 32px;
        max-width: 130px;
    }

    .content {
        padding: 1rem;
        width: 100%;
    }

    .content h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .content h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .content h4, .content h5 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    /* Cards otimizados para mobile */
    .card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .card-body {
        padding: 1.5rem;
        font-size: 1rem;
    }

    /* Botões maiores para touch */
    .btn {
        min-height: 48px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .btn-sm {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

/* Formulários otimizados */
.form-control {
    min-height: 48px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Campo de nome de torneio - maior para evitar cortes */
.tournament-name-input {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    font-size: 1.1rem;
    padding: 0.875rem 1.25rem;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-name-input:focus {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

    .form-label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    /* Tabelas responsivas */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }


    .table-dark {
        font-size: 0.9rem;
    }

    .table-dark thead th {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .table-dark tbody td {
        padding: 1rem;
        font-size: 0.9rem;
    }

    /* Garantir que coluna de ações desktop não apareça no mobile */
    .table-dark thead th.d-none.d-md-table-cell,
    .table-dark tbody td.d-none.d-md-table-cell {
        display: none !important;
    }

    /* Alertas */
    .alert {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }

    /* List group */
    .list-group-item {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }

    /* Sidebar menu items */
    .sidebar .list-group-item,
    .sidebar .list-group-item-action {
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
        min-height: 48px;
    }

    /* Permitir scroll no container do menu no mobile - remover altura fixa */
    .sidebar > div.h-100 {
        height: auto !important;
    }

    /* Ajustar flex-grow-1 no mobile para permitir scroll */
    .sidebar .flex-grow-1 {
        flex-grow: 0 !important;
    }

    /* Badges */
    .badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    /* Fixar coluna Jogador (nome) à esquerda no mobile para ComandasTorneio */
    .table-responsive {
        position: relative;
    }

    /* Para position sticky funcionar, não pode ter overflow: hidden na tabela */
    .comandas-torneio-table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
        overflow: visible !important;
    }

    /* Fixar APENAS a coluna Ações à direita no mobile para ComandasTorneio */
    .comandas-torneio-table thead th:last-child,
    .comandas-torneio-table tbody td:last-child {
        position: sticky !important;
        right: 0 !important;
        background-color: #1a1a2e !important;
        background-image: none !important;
        z-index: 1000 !important;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 1) !important;
        min-width: 150px;
        border-left: 4px solid #1a1a2e !important;
        overflow: visible !important;
        opacity: 1 !important;
    }

    .comandas-torneio-table thead th:last-child {
        z-index: 1001 !important;
        background-color: #9333ea !important;
        background-image: none !important;
        border-left: 4px solid #9333ea !important;
        opacity: 1 !important;
    }

    .comandas-torneio-table tbody tr.table-secondary td:last-child {
        background-color: #1a1a2e !important;
        background-image: none !important;
        border-left: 4px solid #1a1a2e !important;
        opacity: 1 !important;
    }

    .comandas-torneio-table tbody tr:not(.table-secondary) td:last-child {
        background-color: #1a1a2e !important;
        background-image: none !important;
        border-left: 4px solid #1a1a2e !important;
        opacity: 1 !important;
    }

    /* Sobrescrever qualquer transparência do table-striped */
    .comandas-torneio-table.table-striped tbody tr:nth-of-type(odd) td:last-child {
        background-color: #1a1a2e !important;
        background-image: none !important;
    }

    .comandas-torneio-table.table-striped tbody tr:nth-of-type(even) td:last-child {
        background-color: #1a1a2e !important;
        background-image: none !important;
    }

    /* Ajustar espaçamento entre botão e label para ComandasTorneio */
    .comandas-torneio-table .d-flex.flex-column {
        gap: 0.125rem;
    }

    .comandas-torneio-table .d-flex.flex-column small {
        font-size: 0.7rem !important;
        text-align: center !important;
        line-height: 1;
        white-space: nowrap;
        margin: 0;
        padding: 0;
    }

    .comandas-torneio-table .d-flex.flex-column .btn-sm {
        margin-bottom: 0 !important;
    }

    /* FORÇAR ocultação da tabela no mobile - garantir que d-none.d-md-block não apareça */
    .d-none.d-md-block {
        display: none !important;
    }
    
    /* Garantir que cards apareçam no mobile */
    .d-md-none {
        display: block !important;
    }
}

/* Tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        width: 240px;
    }

    .content {
        padding: 2rem;
    }

    .btn {
        width: auto;
        min-width: 200px;
    }
}

/* Desktop - Mantém layout atual */
@media (min-width: 992px) {
    .sidebar {
        position: relative;
        left: 0;
        width: 260px;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .mobile-overlay {
        display: none;
    }

    .btn {
        width: auto;
    }

    /* Garantir que linha mobile de ações não apareça no desktop */
    table tr.d-md-none {
        display: none !important;
    }
}

/* Melhorias para telas muito pequenas (smartphones pequenos) */
@media (max-width: 575.98px) {
    .content {
        padding: 0.75rem;
    }
}

/* Scrollbar personalizado - maior e mais visível */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.5);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.7);
}

/* Para Firefox */
html {
    scrollbar-width: thick;
    scrollbar-color: rgba(168, 85, 247, 0.5) rgba(255, 255, 255, 0.05);
}

/* Botões de Scroll Flutuantes */
.scroll-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scroll-btn {
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: rgba(192, 132, 252, 0.9); /* Roxo claro */
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(168, 85, 247, 0.5);
}

.scroll-btn:hover {
    color: rgba(192, 132, 252, 1); /* Roxo claro mais intenso no hover */
    transform: translateY(-3px);
    text-shadow: 0 4px 12px rgba(168, 85, 247, 0.7);
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
}

.scroll-btn:active {
    transform: translateY(-1px);
    color: rgba(168, 85, 247, 1);
}

@media (max-width: 768px) {
    .scroll-buttons {
        right: 15px;
        bottom: 15px;
        gap: 12px;
    }
    
    .scroll-btn {
        font-size: 28px;
    }
}

@media (max-width: 991.98px) {
    .top-row {
        padding: 0.75rem 0.25rem 0.75rem 2rem !important;
        min-height: 56px;
        gap: 0.25rem !important;
        overflow: visible !important;
        margin: 0 !important;
    }
    
    .top-row.px-4 {
        padding-left: 2rem !important;
        padding-right: 0.25rem !important;
    }

    .top-row .navbar-brand {
        font-size: 0.85rem !important;
        letter-spacing: 0.3px;
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
        margin: 0;
    }

    .top-row-logo-container {
        height: 100%;
    }

    .top-row-logo-img {
        height: 28px;
        max-width: 110px;
    }

    .card-body {
        padding: 1rem;
    }

    .content h1 {
        font-size: 1.5rem;
    }

    .content h3 {
        font-size: 1.1rem;
    }

    /* Cards em coluna única */
    .row {
        margin: 0;
    }

    .row > [class*="col-"] {
        padding: 0;
        margin-bottom: 1rem;
    }

    /* Inputs full width em mobile */
    .form-control {
        width: 100%;
    }
}

/* Orientação landscape em mobile */
@media (max-width: 991.98px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }

    .top-row {
        min-height: 50px;
        padding: 0.5rem 1rem 0.5rem 3.5rem;
    }

    .top-row-logo-container {
        height: 100%;
    }

    .top-row-logo-img {
        height: 26px;
        max-width: 100px;
    }
}

/* Melhorias de acessibilidade e touch */
@media (hover: none) and (pointer: coarse) {
    /* Dispositivos touch */
    .btn, .list-group-item, .card {
        -webkit-tap-highlight-color: rgba(102, 51, 153, 0.3);
    }

    .btn:active {
        transform: scale(0.98);
    }
}

/* Prevenir zoom em inputs no iOS */
@supports (-webkit-touch-callout: none) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px !important; /* Previne zoom automático no iOS */
    }
}

/* Otimizações específicas para páginas públicas */
.tournament-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tournament-card:active {
    transform: scale(0.98);
}

.tournament-logo img {
    width: 100%;
    height: auto;
}

.tournament-info h4 {
    font-size: 1.25rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.tournament-registration {
    position: sticky;
    top: 1rem;
}

@media (max-width: 991.98px) {
    .tournament-registration {
        position: relative;
        top: 0;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    .tournament-logo {
        text-align: center;
        margin-bottom: 1rem;
    }

    .tournament-logo img {
        max-width: 80px;
        max-height: 80px;
    }

    .tournament-info h4 {
        font-size: 1.1rem;
        text-align: center;
    }
}

/* Melhorias de espaçamento em mobile */
@media (max-width: 575.98px) {
    .tournament-card .card-body {
        padding: 1rem;
    }

    .tournament-info {
        text-align: center;
    }

    .tournament-info .mb-2 {
        font-size: 0.9rem;
    }
}

/* Links de telefone otimizados para mobile */
a[href^="tel:"] {
    color: var(--primary-hover);
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

a[href^="tel:"]:hover,
a[href^="tel:"]:active {
    background: rgba(102, 51, 153, 0.2);
    color: var(--primary-color);
}

/* Cards de clubes otimizados */
.clube-card {
    transition: transform 0.2s ease;
}

.clube-card:active {
    transform: scale(0.98);
}

/* Melhorias para formulários de login */
.login-card {
    max-width: 500px;
    margin: 0 auto;
}

@media (max-width: 575.98px) {
    .login-card {
        max-width: 100%;
    }
}

/* Gap utilities para flexbox */
.gap-2 {
    gap: 0.5rem !important;
}

.gap-3 {
    gap: 1rem !important;
}

.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

/* Flex utilities */
.flex-fill {
    flex: 1 1 auto !important;
}

/* Modal de Comanda - Fundo Branco */
.comanda-modal-card {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.comanda-modal-card .card-header {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-bottom: 1px solid #dee2e6 !important;
}

.comanda-modal-card .card-body {
    background-color: #ffffff !important;
    color: #212529 !important;
}

.comanda-modal-card .card-footer {
    background-color: #ffffff !important;
    border-top: 1px solid #dee2e6 !important;
}

/* =========================================================
   Vegas Poker - Resumo (padrão utilizado em Comandas)
   Classes reaproveitáveis: vp-resumo-*
   ========================================================= */
.vp-resumo-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.9;
    margin: 0.6rem 0 0.35rem 0;
}

.vp-resumo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.35rem;
}

/* Valores: 4 boxes por linha no desktop */
.vp-resumo-grid--valores {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vp-resumo-pill {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(157, 78, 221, 0.28);
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    min-width: 0;
}

.vp-resumo-pill .vp-resumo-top {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.vp-resumo-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.vp-resumo-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    font-weight: 900;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.95);
}

.vp-resumo-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    flex-shrink: 0;
    font-size: 1rem;
}

.vp-resumo-label {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.92;
}

.vp-money {
    color: #9d4edd;
}

.vp-resumo-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(157, 78, 221, 0.18);
    border: 1px solid rgba(157, 78, 221, 0.45);
    color: rgba(255,255,255,0.92);
    flex-shrink: 0;
}

.vp-resumo-badge--tight {
    margin-left: 0;
}

.vp-resumo-subrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
    font-size: 0.82rem;
    font-weight: 800;
    opacity: 0.92;
    white-space: nowrap;
}

/* Mobile: deixar o resumo mais confortável */
@media (max-width: 992px) {
    .vp-resumo-grid--valores {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .vp-resumo-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .vp-resumo-pill {
        padding: 0.55rem 0.65rem;
    }

    .vp-resumo-icon {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .vp-resumo-label {
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-height: 1.15;
        font-size: 0.85rem;
    }

    .vp-resumo-right {
        font-size: 1.02rem;
    }

    .vp-resumo-section-title {
        margin-top: 0.75rem;
    }
}
