/* ═══════════════════════════════════════════════════════════════════════════════
   🎨 PAINEL ADMIN - BLAZE DOUBLE ANALYZER
   Paleta de cores baseada no site oficial da Blaze
   ═══════════════════════════════════════════════════════════════════════════════ */

:root {
    /* Cores principais da Blaze */
    --blaze-red: #ff003f;
    --blaze-red-hover: #e5003a;
    --blaze-dark: #1a1f2e;
    --blaze-darker: #151924;
    --blaze-card: #252a3b;
    --blaze-border: #2f3546;
    --blaze-green: #00ff88;
    --blaze-green-hover: #00e67a;
    --blaze-blue: #00d4ff;
    --blaze-purple: #9945ff;
    --blaze-yellow: #ffd700;
    --blaze-white: #ffffff;
    --blaze-gray: #8da2bb;
    --blaze-gray-light: #b4c2d8;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-neon-red: 0 0 20px rgba(255, 0, 63, 0.4);
    --shadow-neon-green: 0 0 20px rgba(0, 255, 136, 0.4);
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: var(--blaze-dark);
    color: var(--blaze-white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════════ */

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--blaze-darker) 0%, var(--blaze-dark) 100%);
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--blaze-card);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg), var(--shadow-neon-red);
    border: 1px solid var(--blaze-border);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
    animation: pulse 2s ease-in-out infinite;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--blaze-red), var(--blaze-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--blaze-gray);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--blaze-gray-light);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--blaze-darker);
    border: 2px solid var(--blaze-border);
    border-radius: 8px;
    color: var(--blaze-white);
    font-size: 15px;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--blaze-red);
    box-shadow: 0 0 0 3px rgba(255, 0, 63, 0.1);
}

.form-input::placeholder {
    color: var(--blaze-gray);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--blaze-red) 0%, #c70032 100%);
    color: var(--blaze-white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-neon-red);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ═══════════════════════════════════════════════════════════════════════════════ */

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--blaze-darker);
    border-right: 1px solid var(--blaze-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--blaze-border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--blaze-white);
}

.sidebar-logo-icon {
    font-size: 32px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--blaze-gray);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 0, 63, 0.1);
    color: var(--blaze-white);
    border-left-color: var(--blaze-red);
}

.nav-item.active {
    background: rgba(255, 0, 63, 0.15);
    color: var(--blaze-red);
    border-left-color: var(--blaze-red);
    font-weight: 600;
}

.nav-icon {
    font-size: 20px;
    width: 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--blaze-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blaze-red), var(--blaze-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--blaze-gray);
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: rgba(255, 0, 63, 0.1);
    color: var(--blaze-red);
    border: 1px solid var(--blaze-red);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--blaze-red);
    color: var(--blaze-white);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 32px;
    max-width: calc(100% - 280px);
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(90deg, var(--blaze-white), var(--blaze-gray-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--blaze-gray);
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--blaze-card);
    border: 1px solid var(--blaze-border);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--blaze-red), var(--blaze-purple));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

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

.stat-title {
    color: var(--blaze-gray);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-icon {
    font-size: 24px;
    opacity: 0.6;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--blaze-gray);
    font-size: 13px;
}

/* Cards */
.card {
    background: var(--blaze-card);
    border: 1px solid var(--blaze-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--blaze-border);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--blaze-darker);
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--blaze-gray-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--blaze-border);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(255, 0, 63, 0.05);
}

/* Context Menu */
.context-menu {
    position: fixed;
    z-index: 9999;
    display: none;
    min-width: 180px;
    background: var(--blaze-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    animation: fadeIn 0.15s ease-out;
}

.context-menu.active {
    display: block;
}

.context-menu button {
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    color: var(--blaze-white);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.context-menu button:hover {
    background: rgba(255, 0, 63, 0.12);
}

.context-menu button[data-action="delete"] {
    color: var(--blaze-red);
}

.context-menu button[data-action="delete"]:hover {
    background: rgba(255, 0, 63, 0.18);
}

/* Diamond Level Modal */

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(255, 215, 0, 0.15);
    color: var(--blaze-yellow);
}

.badge-active {
    background: rgba(0, 255, 136, 0.15);
    color: var(--blaze-green);
}

.badge-expired {
    background: rgba(255, 0, 63, 0.15);
    color: var(--blaze-red);
}

.badge-blocked {
    background: rgba(138, 138, 138, 0.15);
    color: #8a8a8a;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    min-width: fit-content;
}

.btn-success {
    background: var(--blaze-green);
    color: var(--blaze-darker);
}

.btn-success:hover {
    background: var(--blaze-green-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--blaze-red);
    color: var(--blaze-white);
}

.btn-danger:hover {
    background: var(--blaze-red-hover);
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--blaze-yellow);
    color: var(--blaze-darker);
}

.btn-warning:hover {
    background: #ffcc00;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--blaze-white);
    border: 1px solid var(--blaze-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--blaze-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--blaze-green);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.alert-error {
    background: rgba(255, 0, 63, 0.1);
    color: var(--blaze-red);
    border: 1px solid rgba(255, 0, 63, 0.3);
}

.alert-warning {
    background: rgba(255, 215, 0, 0.1);
    color: var(--blaze-yellow);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.alert-info {
    background: rgba(0, 212, 255, 0.1);
    color: var(--blaze-blue);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeInOverlay 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--blaze-card);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 0, 63, 0.2);
    border: 1px solid var(--blaze-border);
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-header {
    margin-bottom: 24px;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Code Display */
.code-display {
    background: var(--blaze-darker);
    border: 2px solid var(--blaze-red);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin: 24px 0;
}

.code-value {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 8px;
    color: var(--blaze-red);
    text-shadow: var(--shadow-neon-red);
    font-family: 'Courier New', monospace;
}

/* Responsive */
/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--blaze-gray);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--blaze-gray-light);
}

.empty-state-text {
    font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MENU HAMBURGUER E RESPONSIVIDADE MOBILE
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Botão Hamburguer */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--blaze-red) 0%, #c70032 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 20px rgba(255, 0, 63, 0.5), 
                0 0 30px rgba(255, 0, 63, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 0, 63, 0.6), 
                0 0 40px rgba(255, 0, 63, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.menu-toggle:active {
    transform: translateY(0) scale(0.95);
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 4px;
    background: var(--blaze-white);
    border-radius: 3px;
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animação do X quando aberto */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay para fechar o menu ao clicar fora */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MEDIA QUERIES - MOBILE E TABLET
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Mostrar botão hamburguer */
    .menu-toggle {
        display: flex !important;
    }
    
    /* Sidebar escondida por padrão no mobile */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Sidebar visível quando ativa */
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Main content ocupa tela toda */
    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
        padding-top: 80px !important; /* Espaço para o botão hamburguer */
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }
    
    /* Page header responsivo */
    .page-header {
        padding: 0 !important;
        margin-bottom: 20px !important;
    }
    
    .page-title {
        font-size: 24px !important;
        word-break: break-word !important;
    }
    
    .page-subtitle {
        font-size: 14px !important;
    }
    
    /* Cards em coluna única */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    /* Cards responsivos */
    .stat-card {
        padding: 16px !important;
        min-width: auto !important;
    }
    
    .stat-value {
        font-size: 32px !important;
    }
    
    .stat-label {
        font-size: 13px !important;
    }
    
    /* Ajustes na tabela */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -15px !important;
        padding: 0 15px !important;
        width: calc(100% + 30px) !important;
    }
    
    .table {
        min-width: 800px !important;
        font-size: 13px !important;
    }
    
    /* Card responsivo */
    .card {
        padding: 16px !important;
        margin-bottom: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .card-header {
        padding: 0 0 16px 0 !important;
    }
    
    .card-title {
        font-size: 18px !important;
    }
    
    /* Ajustes nos botões */
    .btn {
        font-size: 13px !important;
        padding: 10px 16px !important;
        white-space: nowrap !important;
    }
    
    .btn-sm {
        font-size: 11px !important;
        padding: 6px 10px !important;
        white-space: nowrap !important;
    }
    
    /* Garantir que botões de ação sejam sempre visíveis */
    .table td:last-child {
        min-width: 200px !important;
    }
    
    /* Modal mais estreito */
    .modal-content {
        max-width: 95% !important;
        margin: 20px;
    }
    
    /* Page header */
    .page-header {
        padding-top: 20px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-subtitle {
        font-size: 13px;
    }
    
    /* Form inputs menores */
    .form-input {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    /* Stat cards */
    .stat-value {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Login page */
    .login-box {
        padding: 30px 20px;
    }
    
    .login-title {
        font-size: 24px;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .menu-toggle {
        width: 52px;
        height: 52px;
        top: 15px;
        left: 15px;
        gap: 4px;
    }
    
    .menu-toggle span {
        width: 26px;
        height: 3px;
    }
    
    .main-content {
        padding: 15px;
        padding-top: 75px;
    }
    
    .page-title {
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .card {
        padding: 16px;
    }
    
    .btn {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .table {
        font-size: 12px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .modal-title {
        font-size: 20px;
    }
}

