/* ========================================================
   STYLE.CSS - Sniper Admin (Versão Completa e Original)
   ======================================================== */

/* Reset e Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0f;
    color: #e0e0e0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    -webkit-user-select: none;
    user-select: none;
}

/* ========================================================
   HEADER - Cabeçalho Principal
   ======================================================== */
.header {
    background: linear-gradient(135deg, #12121a, #1a1a2e);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00ff66;
    box-shadow: 0 4px 20px rgba(0, 255, 102, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.header h1 span {
    color: #00ff66;
    background: rgba(0, 255, 102, 0.1);
    padding: 0 8px;
    border-radius: 4px;
}

.menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.menu a {
    color: #c5c6c7;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.menu a:hover,
.menu a.active {
    background: rgba(0, 255, 102, 0.15);
    color: #00ff66;
    border-color: #00ff66;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 102, 0.2);
}

.menu .logout {
    color: #ff4757 !important;
    border-color: rgba(255, 71, 87, 0.3);
}

.menu .logout:hover {
    background: rgba(255, 71, 87, 0.15) !important;
    color: #ff4757 !important;
    border-color: #ff4757 !important;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

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

/* ========================================================
   CONTAINER PRINCIPAL
   ======================================================== */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* ========================================================
   ALERTAS (Mensagens de Sucesso/Erro)
   ======================================================== */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px solid transparent;
    font-weight: 500;
    animation: slideDown 0.4s ease;
}

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

.alert.success {
    background: rgba(0, 255, 102, 0.08);
    border-color: #00ff66;
    color: #00ff66;
}

.alert.error {
    background: rgba(255, 71, 87, 0.08);
    border-color: #ff4757;
    color: #ff4757;
}

/* ========================================================
   STATS CARDS - Cards de Estatísticas
   ======================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: linear-gradient(145deg, #16161f, #1f1f2e);
    padding: 28px 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    color: inherit;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.stat-card:hover::before {
    height: 4px;
}

/* Cores das bordas dos cards */
.stat-card:nth-child(1)::before,
.stat-card:nth-child(2)::before {
    background: #00ff66;
}

.stat-card:nth-child(3)::before {
    background: #ff4757;
}

.stat-card:nth-child(4)::before {
    background: #ffa502;
}

.stat-card:nth-child(5)::before {
    background: #747d8c;
}

.stat-card:nth-child(6)::before {
    background: #00bfff;
}

/* Números e Labels */
.stat-number {
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.3), 0 0 40px rgba(0, 255, 102, 0.2);
}

.stat-card:nth-child(1) .stat-number,
.stat-card:nth-child(2) .stat-number {
    color: #00ff66;
    text-shadow: 0 0 20px rgba(0, 255, 102, 0.3), 0 0 40px rgba(0, 255, 102, 0.2);
}

.stat-card:nth-child(3) .stat-number {
    color: #ff4757;
    text-shadow: 0 0 20px rgba(255, 71, 87, 0.3), 0 0 40px rgba(255, 71, 87, 0.2);
}

.stat-card:nth-child(4) .stat-number {
    color: #ffa502;
    text-shadow: 0 0 20px rgba(255, 165, 2, 0.3), 0 0 40px rgba(255, 165, 2, 0.2);
}

.stat-card:nth-child(5) .stat-number {
    color: #747d8c;
    text-shadow: 0 0 20px rgba(116, 125, 140, 0.3), 0 0 40px rgba(116, 125, 140, 0.2);
}

.stat-card:nth-child(6) .stat-number {
    color: #00bfff;
    text-shadow: 0 0 20px rgba(0, 191, 255, 0.3), 0 0 40px rgba(0, 191, 255, 0.2);
}

.stat-label {
    font-size: 1.05rem;
    color: #a0aec0;
    font-weight: 500;
}

/* ========================================================
   SECTIONS - Seções do Dashboard
   ======================================================== */
.section {
    background: linear-gradient(145deg, #16161f, #1f1f2e);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section h2 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2::before {
    content: '▸';
    color: #00ff66;
    font-weight: 700;
}

/* ========================================================
   TABELAS
   ======================================================== */
.table-container {
    overflow-x: auto;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 15px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: rgba(255, 255, 255, 0.03);
    color: #a0aec0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

td {
    color: #e0e0e0;
}

/* Status Colors */
.status-livre {
    color: #00ff66;
}

.status-ocupada {
    color: #ff4757;
}

.status-manutencao {
    color: #ffa502;
}

.status-offline {
    color: #747d8c;
}

/* ========================================================
   FORMULÁRIOS
   ======================================================== */
.form-section {
    background: linear-gradient(145deg, #16161f, #1f1f2e);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section h2 {
    color: #573ceb;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #a0aec0;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #00ff66;
    box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
    color: #555555;
}

.form-group select option {
    background: #16161f;
    color: #e0e0e0;
}

/* ========================================================
   BOTÕES
   ======================================================== */
.btn-primary {
    background: linear-gradient(135deg, #00ff66, #00cc55);
    color: #000000;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 102, 0.3);
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    color: #a0aec0;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    margin-left: 10px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-edit {
    background: rgba(54, 162, 235, 0.15);
    color: #36a2eb;
    padding: 5px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(54, 162, 235, 0.2);
}

.btn-edit:hover {
    background: rgba(54, 162, 235, 0.25);
    color: #6bc2ff;
}

.btn-delete {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 71, 87, 0.2);
}

.btn-delete:hover {
    background: rgba(255, 71, 87, 0.25);
    color: #ff6b81;
}

/* ========================================================
   GRÁFICOS (CHARTS)
   ======================================================== */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-container {
    background: linear-gradient(145deg, #16161f, #1f1f2e);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-container h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.chart-container canvas {
    max-height: 250px;
    min-height: 250px;
    width: 100% !important;
}

/* ========================================================
   FILTROS E PESQUISA
   ======================================================== */
.filter-section {
    background: #1f2833;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-section label {
    color: #a0aec0;
    font-weight: 500;
}

.filter-section select {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0e0e0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
    transition: all 0.3s ease;
}

.filter-section select:focus {
    outline: none;
    border-color: #00ff66;
    box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.1);
}

.filter-section select option {
    background: #16161f;
    color: #e0e0e0;
}

.filter-section input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9rem;
    flex: 1;
    min-width: 200px;
}

.filter-section input[type="text"]:focus {
    outline: none;
    border-color: #00ff66;
    box-shadow: 0 0 0 3px rgba(0, 255, 102, 0.1);
}

/* ========================================================
   RESPONSIVIDADE (Media Queries)
   ======================================================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .menu a {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 10px;
    }
    
    table {
        font-size: 0.85rem;
    }
    
    th,
    td {
        padding: 10px 12px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}