/* Reset e Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    color: #334155;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid #334155;
}

.sidebar-brand h4 {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sidebar-nav {
    padding: 1rem 0;
    height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-main {
    flex: 1;
}

.nav-user {
    border-top: 1px solid #334155;
    padding-top: 1rem;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

.nav-link:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border-right: 3px solid #3b82f6;
}

.nav-link i {
    width: 20px;
    font-size: 1rem;
}

.nav-section-title {
    padding: 1rem 1.5rem 0.5rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid #334155;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section-title:first-of-type {
    border-top: none;
    margin-top: 1rem;
}

/* Avatar Inicial */
.avatar-initial {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    min-height: 100vh;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.topbar {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #64748b;
    font-size: 1rem;
}

/* Cards Modernos */
.card-modern {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.card-modern:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.card-header-modern {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    color: #374151;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.primary {
    border-left-color: #3b82f6;
}

.stat-card.success {
    border-left-color: #10b981;
}

.stat-card.danger {
    border-left-color: #ef4444;
}

.stat-card.warning {
    border-left-color: #f59e0b;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0.8;
}

/* Tabelas Modernas */
.table-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table-modern thead th {
    background: #f8fafc;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-modern tbody td {
    padding: 1rem 1.5rem;
    border: none;
    border-top: 1px solid #f1f5f9;
    vertical-align: middle;
}

.table-modern tbody tr:hover {
    background: #f8fafc;
}

/* Badges Modernos */
.badge-modern {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-live {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: pulse-live 2s infinite;
}

/* Botões Modernos */
.btn-modern {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* Formulários Modernos */
.form-modern {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Animações */
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Responsividade */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: #6b7280;
}

/* Utilitários */
.text-primary { color: #3b82f6 !important; }
.text-secondary { color: #6b7280 !important; }
.text-success { color: #10b981 !important; }
.text-danger { color: #ef4444 !important; }
.text-warning { color: #f59e0b !important; }

.bg-primary { background: #3b82f6 !important; }
.bg-secondary { background: #6b7280 !important; }
.bg-success { background: #10b981 !important; }
.bg-danger { background: #ef4444 !important; }
.bg-warning { background: #f59e0b !important; }

.content-wrapper {
    padding: 2rem;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-selector .btn {
    color: #6b7280;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.language-selector .btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.language-selector .btn:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.language-selector .dropdown-menu {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 180px;
}

.language-selector .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.language-selector .dropdown-item:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #3b82f6;
}

.language-selector .dropdown-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-weight: 500;
}

.language-selector .dropdown-item img {
    border-radius: 3px;
    border: 1px solid #e2e8f0;
}

/* ===== SISTEMA DE SÉRIES ===== */

/* Progress Steps */
.progress-steps {
    text-align: center;
}

.progress-steps .d-flex {
    position: relative;
}

.progress-steps .step {
    flex: 1;
    position: relative;
}

.progress-steps .step::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 100%;
    height: 2px;
    background: #e9ecef;
    z-index: 1;
    transform: translateY(-50%);
}

.progress-steps .step:last-child::before {
    display: none;
}

.progress-steps .step.active::before {
    background: #007bff;
}

.progress-steps .step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-steps .step.active .step-icon {
    background: #007bff;
    color: white;
}

.progress-steps .step-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
}

.progress-steps .step.active .step-title {
    color: #007bff;
}

/* Team Cards */
.team-matchup {
    padding: 20px 0;
    text-align: center;
}

.team-matchup .team1-name,
.team-matchup .team2-name {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin: 0 10px;
}

.team-matchup .team1-name {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.team-matchup .team2-name {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.team-matchup .vs {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6c757d;
    margin: 0 15px;
}

/* Badge Styles */
.badge-lg {
    font-size: 0.9rem;
    padding: 8px 12px;
}

.badge-info {
    background-color: #17a2b8 !important;
    color: white;
}

.badge-warning {
    background-color: #ffc107 !important;
    color: #212529;
}

.badge-success {
    background-color: #28a745 !important;
    color: white;
}

.badge-danger {
    background-color: #dc3545 !important;
    color: white;
}

.badge-secondary {
    background-color: #6c757d !important;
    color: white;
}

/* SteamID Input Enhancement */
.steamid-input.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.8-.8-.8-.8 1.4-1.4L7 7.3l1.4-1.4-1.4-1.4-.8-.8.8-.8-.8-.8L3 4.3l-1.4 1.4 1.4 1.4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

/* Maps Display */
.maps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.map-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-card:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

.map-card.banned {
    background: #f8f9fa;
    border-color: #dc3545;
    opacity: 0.6;
}

.map-card.picked {
    background: #d4edda;
    border-color: #28a745;
}

.map-card .map-image {
    height: 80px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
}

.map-card .map-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.map-card .map-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.map-card .map-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: #e9ecef;
    color: #6c757d;
    display: inline-block;
}

.map-card .map-status.banned {
    background: #f5c6cb;
    color: #721c24;
}

.map-card .map-status.picked {
    background: #d1ecf1;
    color: #0c5460;
}

/* Series Status */
.series-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.scheduled {
    background: #ffc107;
    animation: pulse 2s infinite;
}

.status-indicator.live {
    background: #28a745;
    animation: pulse 1s infinite;
}

.status-indicator.completed {
    background: #6c757d;
}

.status-indicator.cancelled {
    background: #dc3545;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
        opacity: 1;
    }
    70% {
        box-shadow: 0 0 0 10px transparent;
        opacity: 0.5;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .progress-steps .step-title {
        display: none;
    }
    
    .team-matchup .team1-name,
    .team-matchup .team2-name {
        font-size: 1rem;
        margin: 5px 0;
        display: block;
    }
    
    .maps-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}