/* --- TEMA DARK / GN STYLE --- */
:root {
    /* Paleta inspirada na imagem GN */
    --primary: #d60000;       /* Vermelho Sangue/Neon */
    --primary-dark: #990000;  /* Vermelho Escuro para hover */
    --secondary: #0a0a0a;     /* Fundo quase preto */
    --panel-bg: #141414;      /* Fundo dos painéis (cinza muito escuro) */
    --input-bg: #222222;      /* Fundo dos inputs */
    --text: #ffffff;          /* Texto principal branco */
    --text-muted: #b0b0b0;    /* Texto secundário cinza */
    --danger: #ff3333;        /* Vermelho claro para erros/deletar */
    --success: #00c851;       /* Verde mantido para sucesso, mas vibrante */
    --border: #333333;        /* Bordas sutis */
    --shadow: 0 4px 15px rgba(214, 0, 0, 0.15); /* Sombra com brilho vermelho leve */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body {
    background-color: var(--secondary);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- TELA DE ABERTURA (INTRO) --- */
#intro-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer;
    transition: opacity 1s ease;
}

.intro-container {
    position: relative;
    width: 300px; height: 300px;
}

.split-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url('logo.jpg');
    background-size: cover;
    background-position: center;
    transition: transform 1.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.top-half { clip-path: polygon(0 0, 100% 0, 0 100%); z-index: 2; }
.bottom-half { clip-path: polygon(100% 0, 100% 100%, 0 100%); z-index: 1; }

.intro-text {
    margin-top: 20px;
    color: var(--primary); /* Texto vermelho */
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    animation: blink 2s infinite;
    transition: opacity 0.5s;
    text-shadow: 0 0 10px rgba(214, 0, 0, 0.5); /* Neon glow */
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

#intro-screen.animate .top-half { transform: translate(-100vw, -100vh) rotate(-10deg); }
#intro-screen.animate .bottom-half { transform: translate(100vw, 100vh) rotate(10deg); }
#intro-screen.animate .intro-text { opacity: 0; }
#intro-screen.animate { background-color: transparent; pointer-events: none; }

/* --- BOTÃO HOME --- */
#home-btn {
    position: fixed;
    top: 20px; left: 20px;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
    transition: 0.3s;
}
#home-btn:hover { transform: scale(1.1); background-color: var(--primary-dark); box-shadow: 0 0 15px var(--primary); }

/* --- TELAS --- */
.screen {
    display: none;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}
.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- LOGIN --- */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80vh;
    text-align: center;
}
.login-box {
    background: var(--panel-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
}
.subtitle { margin-bottom: 20px; color: var(--text-muted); }

/* --- INPUTS E BOTÕES GERAIS --- */
input[type="text"], input[type="number"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background-color: var(--input-bg);
    color: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 8px rgba(214, 0, 0, 0.3); }

button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.3s, box-shadow 0.3s;
}
button:hover { background: var(--primary-dark); box-shadow: 0 0 15px rgba(214, 0, 0, 0.4); }

/* --- GRID DE JASONS --- */
.jason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.jason-slot {
    background: var(--panel-bg);
    height: 150px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s, border-color 0.2s;
    border: 2px solid var(--border);
    color: var(--text-muted);
}
.jason-slot:hover { transform: translateY(-5px); border-color: var(--primary); color: white; }

.jason-slot.empty { border: 2px dashed #444; }
.jason-slot.filled { 
    background: linear-gradient(135deg, #1a1a1a, #000); 
    border-color: var(--primary);
    color: var(--primary); 
    text-shadow: 0 0 5px rgba(214,0,0,0.3);
}

/* --- EDITOR --- */
.editor-container {
    background: var(--panel-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.input-row { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; }
.input-group { flex: 1; min-width: 150px; position: relative; }

/* Tooltip */
.tooltip-icon {
    display: inline-block;
    width: 18px; height: 18px;
    background: var(--primary); color: white;
    border-radius: 50%; text-align: center;
    font-size: 12px; line-height: 18px;
    margin-left: 5px; cursor: help;
    position: absolute; top: -25px; right: 0;
}
.tooltip-text {
    visibility: hidden; width: 140px;
    background-color: var(--primary-dark); color: #fff;
    text-align: center; border-radius: 6px;
    padding: 5px; position: absolute;
    z-index: 1; bottom: 120%; right: -10px;
    opacity: 0; transition: opacity 0.3s;
    font-size: 0.8rem; border: 1px solid white;
}
.tooltip-icon:hover + .tooltip-text { visibility: visible; opacity: 1; }

.details-group { width: 100%; margin-top: 15px; }
.details-input { width: 100%; padding: 15px; height: 80px; resize: none; background: var(--input-bg); color: white; border: 1px solid var(--border); }
.details-input:focus { border-color: var(--primary); }

.action-row {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border);
}
.item-total { font-size: 1.2rem; font-weight: bold; color: var(--text); }
#display-item-total { color: var(--primary); text-shadow: 0 0 5px rgba(214, 0, 0, 0.4); }

.add-btn { background: var(--success); color: black; font-weight: 800;}
.add-btn:hover { background: #00e65d; box-shadow: 0 0 10px rgba(0, 200, 81, 0.4); }

/* --- LISTA --- */
.product-list { margin-top: 40px; }
.list-header { 
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 40px;
    padding: 10px;
    background: #222; 
    border-radius: 6px 6px 0 0; 
    font-weight: bold;
    border: 1px solid var(--border);
    border-bottom: none;
    color: var(--primary);
}
.list-item { 
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr 1fr 40px;
    padding: 10px;
    align-items: center;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    margin-bottom: -1px; /* Cola as bordas */
}

.delete-btn {
    background: transparent; color: var(--danger);
    font-weight: bold; font-size: 1.2rem;
    padding: 5px; border: 1px solid var(--danger);
    border-radius: 4px;
    transition: 0.2s;
}
.delete-btn:hover { background: var(--danger); color: white; box-shadow: 0 0 8px var(--danger); }

.final-footer {
    margin-top: 30px; display: flex;
    justify-content: space-between; align-items: center;
    background: black; color: white;
    padding: 20px; border-radius: 8px;
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(214, 0, 0, 0.1);
}
.total-text { font-size: 1.5rem; }
#grand-total { color: var(--primary); font-weight: bold; text-shadow: 0 0 5px rgba(214, 0, 0, 0.6); }

.save-jason-btn { background: var(--primary); font-size: 1.1rem; }

/* --- BOTÃO DE RESET (LIXEIRA) NO JASON --- */
.jason-slot {
    position: relative; /* Necessário para posicionar a lixeira dentro dele */
}

.reset-jason-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 0, 0, 0.2);
    color: #ff3333;
    border: 1px solid #ff3333;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    opacity: 0; /* Começa escondido */
    transition: all 0.3s ease;
    z-index: 10;
}

.jason-slot:hover .reset-jason-btn {
    opacity: 1; /* Aparece no hover */
}

.reset-jason-btn:hover {
    background: #ff3333;
    color: white;
    transform: scale(1.1);
}
/* --- ESTILO DAS BARRAS DE BUSCA --- */
.search-container {
    margin: 15px 0;
    width: 100%;
}

.search-container input {
    background: var(--input-bg);
    border: 1px solid var(--primary);
    color: white;
    padding: 10px 15px;
    border-radius: 20px; /* Arredondado para diferenciar dos outros inputs */
    width: 100%;
    outline: none;
    transition: box-shadow 0.3s;
}

.search-container input:focus {
    box-shadow: 0 0 10px rgba(214, 0, 0, 0.5);
}

/* Esconder itens que não batem na busca */
.hidden-search {
    display: none !important;
}
/* --- TELAS DE MODO E PRIVADO --- */
.mode-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    height: 70vh;
}

.mode-card {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    width: 280px;
}

.mode-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: var(--shadow);
}

.mode-card .icon { font-size: 3rem; margin-bottom: 15px; }

/* Ajuste para inputs de senha */
input[type="password"] {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background-color: var(--input-bg);
    color: white;
    border: 1px solid var(--border);
    border-radius: 6px;
}

/* Badge de última modificação */
.last-mod {
    font-size: 0.7rem;
    color: var(--primary);
    margin-top: 8px;
    font-style: italic;
    background: rgba(214, 0, 0, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
}