@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;700&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --neon-green: #39ff14; /* Verde Neon Tático */
    --dark-bg: #050505;    /* Preto Profundo */
    --card-bg: #141414;    /* Cinza Muito Escuro para Cards */
    --text-main: #f0f0f0;  /* BRANCO GELO */
    --text-muted: #dcdcdc; /* Cinza claro */
    --white: #ffffff;
}

/* =========================================
   1. ESTILOS GERAIS E TIPOGRAFIA
   ========================================= */
body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding-top: 0;
    font-size: 16px;
    overflow-x: hidden;
    display: flex; /* Para layout admin */
    min-height: 100vh;
}

p, li {
    text-align: justify;
    line-height: 1.7;
    color: var(--text-main);
    font-weight: 400;
}

h1, h2, h3, h4, h5 {
    font-family: 'Rajdhani', sans-serif;
    color: var(--white);
    text-transform: uppercase;
    text-align: left;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

h2 {
    border-bottom: 2px solid var(--neon-green);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 25px;
    font-weight: 700;
}

/* =========================================
   2. NAVBAR E CABEÇALHO (SITE)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: #000;
    border-bottom: 2px solid var(--neon-green);
    z-index: 2000;
    padding: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 100%;
}

.logo-small { 
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.6));
    transition: 0.3s;
}

.nav-links {
    display: flex;
    gap: 0;
    height: 100%;
    align-items: flex-end;
}

.nav-links .btn-neon {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
    margin-bottom: 6px;
    border: 1px solid var(--neon-green); 
    border-radius: 0; 
    background: transparent;
    display: flex;
    align-items: center;
    color: var(--neon-green);
    font-weight: bold;
    text-decoration: none;
    transition: 0.3s;
}

.nav-links .btn-neon:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.5);
    z-index: 1;
}

/* =========================================
   3. HAMBURGER E MENU MOBILE (SITE)
   ========================================= */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2100;
    -webkit-tap-highlight-color: transparent;
}

.bar {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px auto;
    background-color: var(--neon-green);
    transition: 0.3s;
    box-shadow: 0 0 5px var(--neon-green);
}

.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.mobile-menu {
    display: block; position: fixed; top: 80px; left: 0; width: 100%; background-color: #000;
    border-bottom: 2px solid var(--neon-green); overflow: hidden; max-height: 0; transition: max-height 0.5s ease-out; z-index: 1900;
}
.mobile-menu.active { max-height: 100vh; padding: 0; }
.mobile-menu a { display: block; padding: 15px 0; font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; color: #fff; border-bottom: 1px solid #1a1a1a; text-align: center; text-decoration: none; margin: 0; }
.mobile-menu a:hover { background-color: #111; color: var(--neon-green); }

/* =========================================
   4. LAYOUT DE CONTEÚDO (SITE)
   ========================================= */
.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 140px 20px 40px 20px; 
}

.split-section {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 90px;
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.split-section:nth-child(even) { flex-direction: row-reverse; }
.split-text { flex: 1; }
.split-img { flex: 1; text-align: center; }

.split-img img {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.card, .section-box, .info-box, .process-card, .admin-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 6px;
    border: 1px solid #333;
    border-left: 3px solid var(--neon-green);
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card h3, .process-card h4 { color: var(--neon-green); }

.btn-neon {
    background: transparent;
    color: var(--neon-green);
    border: 2px solid var(--neon-green);
    padding: 12px 28px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
    transition: 0.3s;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 1px;
    text-align: center;
}

.btn-neon:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.6);
}

.social-btns { margin-top: 25px; display: flex; gap: 20px; }
.social-icon { font-size: 2rem; color: var(--white); transition: 0.3s; }
.social-icon:hover { color: var(--neon-green); transform: scale(1.1); }

/* =========================================
   5. FORMULÁRIOS GERAIS
   ========================================= */
.contact-form { width: 100%; }

.contact-form input, .contact-form textarea, .contact-form select,
input.contact-form, textarea.contact-form, select.contact-form {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background: #1a1a1a; 
    border: 1px solid #666; 
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.alert { padding: 15px; background: rgba(57, 255, 20, 0.2); border: 1px solid var(--neon-green); color: white; text-align: center; margin-bottom: 20px; border-radius: 4px; font-weight: bold;}
textarea.contact-form { text-align: left; }
@keyframes fadeIn { to { opacity: 1; } }
label { color: var(--white); font-weight: bold; display: block; margin-bottom: 5px; text-align: left; }

/* =========================================
   6. EXTRAS (PARCEIROS, CUPONS)
   ========================================= */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
.partner-card { background: #101010; border: 1px solid #333; border-top: 3px solid var(--neon-green); padding: 30px; text-align: center; border-radius: 6px; transition: 0.3s; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.partner-card:hover { transform: translateY(-5px); box-shadow: 0 5px 20px rgba(57, 255, 20, 0.15); border-color: var(--neon-green); }
.partner-logo-container { height: 120px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; background-image: url('../img/transparent-grid.png'); border-radius: 4px; padding: 10px; }
.partner-logo { max-width: 100%; max-height: 100%; object-fit: contain; }
.coupon-box { background: #1a1a1a; border: 2px dashed #555; padding: 10px; margin: 15px 0; border-radius: 4px; }
.coupon-label { display: block; font-size: 0.8rem; color: #aaa; margin-bottom: 5px; text-align: center; }
.coupon-code { display: block; color: var(--neon-green); font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: bold; letter-spacing: 2px; text-align: center; }

/* =========================================
   7. MODAL DE ALERTAS (SITE)
   ========================================= */
.alert-modal { display: none; position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.85); align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.alert-box { background: #050505; border: 1px solid var(--neon-green); padding: 30px; text-align: center; max-width: 400px; width: 85%; border-radius: 8px; box-shadow: 0 0 25px rgba(57, 255, 20, 0.2); display: flex; flex-direction: column; align-items: center; animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.alert-content-wrapper { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; }
.alert-icon { font-size: 3rem; margin-bottom: 15px; display: block; text-shadow: 0 0 10px rgba(57, 255, 20, 0.5); }
.alert-msg { font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; color: #fff; margin-bottom: 25px; line-height: 1.5; text-align: center; }
.alert-btn-close { background: transparent; border: 1px solid var(--neon-green); color: var(--neon-green); padding: 10px 30px; font-weight: bold; cursor: pointer; transition: 0.3s; text-transform: uppercase; border-radius: 2px; }
.alert-btn-close:hover { background: var(--neon-green); color: #000; }
.alert-success .alert-icon, .alert-success .alert-btn-close { color: var(--neon-green); border-color: var(--neon-green); }
.alert-error .alert-box { border-color: #ff3333; box-shadow: 0 0 25px rgba(255, 51, 51, 0.2); }
.alert-error .alert-icon, .alert-error .alert-btn-close { color: #ff3333; border-color: #ff3333; text-shadow: 0 0 10px rgba(255, 51, 51, 0.5); }
.alert-error .alert-btn-close:hover { background: #ff3333; color: white; }

/* =========================================
   8. ESTRUTURA DO PAINEL ADMIN (SIDEBAR E LAYOUT)
   ========================================= */
.sidebar { width: 260px; background: #080808; border-right: 1px solid #222; display: flex; flex-direction: column; position: fixed; height: 100%; overflow-y: auto; z-index: 1000; left: 0; top: 0; transition: 0.3s; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #222; text-align: center; }
.sidebar-logo { max-width: 120px; display: block; margin: 0 auto 10px; }
.nav-group-title { font-size: 0.75rem; color: #666; text-transform: uppercase; padding: 25px 20px 10px; font-weight: bold; letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; padding: 12px 20px; color: #ccc; text-decoration: none; border-left: 3px solid transparent; transition: 0.2s; font-size: 0.95rem; }
.nav-item i { width: 25px; text-align: center; margin-right: 10px; font-size: 1.1rem; }
.nav-item:hover, .nav-item.active { background: rgba(57, 255, 20, 0.05); color: #fff; border-left-color: var(--neon-green); }
.nav-item.active i { color: var(--neon-green); }
.nav-item.logout { border-top: 1px solid #222; margin-top: auto; }
.nav-item.logout:hover { border-left-color: #ff3333; background: rgba(255, 51, 51, 0.1); color: #ff3333; }

/* Cabeçalho Mobile do Painel (Oculto no Desktop) */
.mobile-header {
    display: none; /* Padrão: invisível */
    background: #000;
    padding: 15px 20px;
    border-bottom: 2px solid var(--neon-green);
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
    box-sizing: border-box;
}

/* Conteúdo Principal (Ajustado para não ter buraco) */
.main-content {
    flex: 1;
    margin-left: 260px;
    width: calc(100% - 260px);
    padding: 20px; /* Reduzido para aproveitar espaço */
    padding-top: 20px;
    box-sizing: border-box;
    background-color: var(--dark-bg);
    min-height: 100vh;
}

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 15px; border-bottom: 1px solid #222; padding-bottom: 15px; }
.admin-title { font-size: 2rem; color: #fff; text-transform: uppercase; letter-spacing: 2px; margin: 0; display: flex; align-items: center; gap: 10px; }
.btn-config { background: transparent; border: 1px solid #aaa; color: #aaa; padding: 8px 15px; border-radius: 4px; cursor: pointer; transition: 0.3s; font-size: 0.9rem; display: flex; align-items: center; gap: 5px; text-decoration: none; }
.btn-config:hover { border-color: var(--neon-green); color: var(--neon-green); }

/* =========================================
   9. DASHBOARD E TABELAS
   ========================================= */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.dash-card { background: #111; border: 1px solid #333; padding: 20px; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; position: relative; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.dash-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.dash-card.green::before { background: var(--neon-green); }
.dash-card.blue::before { background: #00d4ff; }
.dash-card.orange::before { background: orange; }
.dash-info h3 { margin: 0; font-size: 2rem; color: #fff; font-family: 'Rajdhani', sans-serif; }
.dash-info p { margin: 0; font-size: 0.9rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.dash-icon { font-size: 2.5rem; opacity: 0.2; color: #fff; }
.chart-container { background: #111; border: 1px solid #333; padding: 20px; border-radius: 4px; height: 300px; position: relative; }

.filter-box { background: #111; border: 1px solid #333; padding: 20px; margin-bottom: 25px; border-radius: 4px; }
.filter-form { display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap; }
.filter-group { display: flex; flex-direction: column; }
.filter-input, .filter-select { background: #000; border: 1px solid #444; color: #fff; padding: 10px; border-radius: 2px; outline: none; height: 42px; box-sizing: border-box; }
.btn-filter { background: var(--neon-green); color: #000; padding: 0 25px; border: none; font-weight: bold; cursor: pointer; height: 42px; text-transform: uppercase; border-radius: 2px; }

.table-responsive { overflow-x: auto; background: #111; border: 1px solid #333; border-radius: 4px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid #222; vertical-align: middle; }
.admin-table th { background: #080808; color: var(--neon-green); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
.admin-table tr:hover { background: #1a1a1a; }

/* =========================================
   10. MÓDULO O.S. (LISTA E DETALHES)
   ========================================= */
.os-container { display: flex; gap: 25px; align-items: flex-start; margin-top: 20px; }
.os-list { flex: 1; min-width: 350px; height: calc(100vh - 180px); overflow-y: auto; padding-right: 5px; background: #080808; border: 1px solid #222; border-radius: 4px; }
.os-list::-webkit-scrollbar { width: 6px; }
.os-list::-webkit-scrollbar-track { background: #000; }
.os-list::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
.os-list::-webkit-scrollbar-thumb:hover { background: var(--neon-green); }

.os-details { flex: 2; background: #0b0b0b; border: 1px solid #333; padding: 30px; border-radius: 4px; box-shadow: 0 0 30px rgba(0,0,0,0.5); position: relative; border-top: 3px solid var(--neon-green); min-width: 400px; }

/* Badges de Status e Timeline */
.status-badge { padding: 4px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; color: #fff; display: inline-block; border: 1px solid rgba(255,255,255,0.1); white-space: nowrap; }
.timeline { border-left: 2px solid #333; margin-left: 15px; padding-left: 25px; margin-top: 30px; }
.timeline-item { margin-bottom: 30px; position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -32px; top: 6px; width: 12px; height: 12px; background: #000; border: 2px solid var(--neon-green); border-radius: 50%; box-shadow: 0 0 8px var(--neon-green); }
.timeline-date { font-size: 0.8rem; color: var(--neon-green); margin-bottom: 5px; display: block; font-weight: bold; }
.timeline-content { background: #141414; padding: 15px; border: 1px solid #333; border-radius: 4px; font-size: 0.95rem; }
.timeline-img { width: 80px; height: 80px; object-fit: cover; margin-top: 10px; margin-right: 10px; border: 1px solid #444; transition: 0.3s; cursor: pointer; }
.timeline-img:hover { transform: scale(1.1); border-color: var(--neon-green); }

.add-item-box { background: #111; padding: 20px; border: 1px dashed #444; margin-bottom: 20px; border-radius: 4px; display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap; }
.totals-box { background: #050505; border: 1px solid #333; padding: 20px; margin-top: 30px; text-align: right; }
.total-line { font-size: 1rem; margin-bottom: 8px; color: #ccc; display: flex; justify-content: space-between; }
.total-final { font-size: 1.5rem; color: var(--neon-green); font-weight: 800; margin-top: 15px; padding-top: 15px; border-top: 1px solid #333; display: flex; justify-content: space-between; }

/* =========================================
   11. PADRÃO GLOBAL DE FOCO (NEON)
   ========================================= */
select:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
.form-select:focus,
.filter-select:focus,
.contact-form:focus,
.admin-input:focus {
    outline: none !important;
    border-color: var(--neon-green) !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.4) !important;
    background-color: #050505 !important;
    color: #fff !important;
}

select { color-scheme: dark; }

.autocomplete-active {
    background-color: var(--neon-green) !important;
    color: #000 !important;
}

/* =========================================
   12. MODAIS E ELEMENTOS MODERNOS (PADRONIZAÇÃO)
   ========================================= */

/* Overlay Padrão */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

/* Conteúdo do Modal */
.modal-os-content {
    background: #0b0b0b;
    border: 1px solid var(--neon-green);
    padding: 30px;
    width: 90%;
    max-width: 550px;
    border-radius: 6px;
    box-shadow: 0 0 30px rgba(57, 255, 20, 0.15);
    position: relative;
    animation: modalPopIn 0.3s ease-out;
}

@keyframes modalPopIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Botão de Fechar (X) */
.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}
.close-modal:hover { color: var(--neon-green); }

/* --- Form Editor Moderno (Grid Layout para Status/Edições) --- */
.status-editor {
    display: grid;
    grid-template-columns: 1fr 60px auto; /* Nome | Cor | Botões */
    gap: 15px;
    align-items: end;
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    margin-bottom: 20px;
}

.input-group { display: flex; flex-direction: column; gap: 5px; }
.input-group label { font-size: 0.8rem; color: #aaa; font-weight: 600; text-transform: uppercase; }

/* Inputs Modernos (Flat) */
.modern-input {
    background: #000;
    border: 1px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    outline: none;
    transition: 0.3s;
    height: 45px;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

.modern-input:focus {
    border-color: var(--neon-green);
    box-shadow: 0 0 8px rgba(57, 255, 20, 0.3);
}

/* Color Picker Específico */
.modern-input.color-picker {
    padding: 2px;
    cursor: pointer;
    height: 45px;
    width: 100%;
}

/* Botões de Ícone (Salvar/Excluir) */
.action-buttons { display: flex; gap: 8px; }

.btn-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    transition: 0.2s;
    background: transparent;
    font-size: 1.1rem;
}

.btn-icon:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.05);
}

/* --- Tabela Grid Moderna (Substitui table HTML) --- */
.grid-container {
    display: grid;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #333;
    border-radius: 4px;
    background: #000;
    overflow: hidden;
}

.grid-header {
    display: grid;
    grid-template-columns: 50px 1fr 80px; /* ID | Status | Ações */
    background: #222;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #444;
    padding: 12px 0;
    color: var(--neon-green);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.grid-row {
    display: grid;
    grid-template-columns: 50px 1fr 80px;
    align-items: center;
    border-bottom: 1px solid #222;
    padding: 8px 0;
    transition: 0.2s;
}

.grid-row:hover { background: #111; }
.grid-row:last-child { border-bottom: none; }

.grid-cell {
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
}

.btn-grid-action {
    background: transparent;
    border: 1px solid #555;
    padding: 5px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #ccc;
    border-radius: 4px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-grid-action:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* =========================================
   13. RESPONSIVIDADE (MOBILE & TABLET)
   ========================================= */
@media (max-width: 900px) {
    /* Mostra o header apenas no mobile */
    .mobile-header {
        display: flex;
    }
    
    .sidebar { 
        transform: translateX(-100%); 
        width: 280px; 
        box-shadow: 2px 0 10px rgba(0,0,0,0.5); 
        top: 60px; /* Abaixo do header */
    }
    .sidebar.active { transform: translateX(0); }
    
    /* Remove a margem lateral no mobile */
    .main-content { 
        margin-left: 0; 
        width: 100%; 
        padding-top: 90px; /* Espaço para o header */
    } 

    .admin-header { flex-direction: column; align-items: flex-start; }
    .os-container { flex-direction: column; }
    .os-list, .os-details { width: 100%; min-width: 0; height: auto; overflow: visible; }
    .os-list { max-height: 400px; margin-bottom: 20px; }
    
    .status-editor { grid-template-columns: 1fr; }
    .action-buttons { justify-content: flex-end; }
    
    .container { padding-top: 120px !important; }
    .split-section, .split-section:nth-child(even) { flex-direction: column !important; text-align: center; gap: 30px; }
}