/* ================= VARIABLES & CONFIG BASE ================= */
:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #064e3b 50%, #022c22 100%);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #10b981;
    --primary-hover: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --danger: #f43f5e;
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-stack);
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ================= TELA DE AUTENTICAÇÃO (EFEITO 3D / VIDRO) ================= */
.autenticacao-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-gradient);
    position: relative;
}

/* Esferas de luz de fundo para criar profundidade 3D */
.autenticacao-container::before,
.autenticacao-container::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    z-index: 0;
}
.autenticacao-container::before { top: 15%; left: 20%; }
.autenticacao-container::after { bottom: 15%; right: 20%; background: #3b82f6; }

.card-auth {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 40px 35px;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--card-shadow), inset 0 1px 1px rgba(255,255,255,0.1);
    text-align: center;
    z-index: 1;
    transform: translateY(0px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s;
}

/* Efeito de flutuar levemente ao passar o mouse */
.card-auth:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(16, 185, 129, 0.1);
}

.logo-recicla {
    font-size: 3.5rem;
    margin-bottom: 15px;
    display: inline-block;
    animation: girarLogo 20s linear infinite;
    filter: drop-shadow(0 10px 15px var(--primary-glow));
}

@keyframes girarLogo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.card-auth h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    background: linear-gradient(to right, #ffffff, #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-auth p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
}

/* INPUTS ESTILO FUTURISTA */
.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #a7f3d0;
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
    background: rgba(15, 23, 42, 0.8);
}

/* BOTÕES PREMIUM COM BRILHO */
.btn-salvar {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-salvar:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.divisor {
    margin: 25px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.divisor::before, .divisor::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.btn-google {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.3s;
}
.btn-google:hover { background: rgba(255, 255, 255, 0.15); }
.btn-google img { width: 18px; height: 18px; }

.auth-links { margin-top: 25px; }
.auth-links a {
    color: var(--primary-hover);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s;
}
.auth-links a:hover { color: #ffffff; text-decoration: underline; }

/* ================= PAINEL DO SISTEMA INTERNO ================= */
header {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }

.usuario-topo { display: flex; align-items: center; gap: 20px; }
.mensagem-boas-vindas { text-align: right; font-weight: 500; }

.btn-excluir {
    background: linear-gradient(135deg, var(--danger) 0%, #be123c 100%);
    color: white; border: none; padding: 10px 16px; border-radius: 8px;
    font-weight: 600; cursor: pointer; transition: all 0.3s;
}
.btn-excluir:hover { transform: scale(1.03); box-shadow: 0 4px 12px rgba(244, 63, 94, 0.4); }

.banner-boas-vindas {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    border: 1px solid var(--glass-border);
    padding: 25px; border-radius: 16px; margin: 30px 0;
}

/* INDICADORES FLUTUANTES */
.indicadores-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin-bottom: 30px;
}
.card-indicador {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 24px; border-radius: 16px;
    display: flex; align-items: center; gap: 20px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.indicador-icon { font-size: 2.5rem; }
.card-indicador h3 { font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; }
.card-indicador p { font-size: 1.8rem; font-weight: 800; margin-top: 5px; }

/* LAYOUT E TABELAS */
.layout-principal { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; }
@media (max-width: 900px) { .layout-principal { grid-template-columns: 1fr; } }

.card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 30px; border-radius: 18px; margin-bottom: 25px;
}
.card h2 { font-size: 1.3rem; margin-bottom: 20px; font-weight: 700; }
.form-row { display: flex; gap: 15px; }
@media (max-width: 600px) { .form-row { flex-direction: column; gap: 0; } }

/* TABELA PREMIUM */
.table-responsive { overflow-x: auto; margin-top: 15px; border-radius: 12px; border: 1px solid var(--glass-border); }
table { width: 100%; border-collapse: collapse; background: rgba(15, 23, 42, 0.3); text-align: left; }
th { background: rgba(15, 23, 42, 0.6); padding: 14px; font-size: 0.85rem; text-transform: uppercase; color: #a7f3d0; }
td { padding: 14px; border-bottom: 1px solid var(--glass-border); font-size: 0.95rem; }
tr:last-child td { border-bottom: none; }

/* BADGES */
.badge-triagem { background: rgba(234, 179, 8, 0.2); color: #fde047; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.badge-processo { background: rgba(59, 130, 246, 0.2); color: #93c5fd; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.badge-pronto { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }
.badge-sucata { background: rgba(244, 63, 94, 0.2); color: #fca5a5; padding: 4px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600; }

.acoes-container { display: flex; gap: 8px; }
.btn-editar { background: #3b82f6; color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; }
.btn-editar:hover { background: #2563eb; }

/* COTAÇÃO */
.lista-precos { list-style: none; }
.lista-precos li {
    display: flex; justify-content: space-between; padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.lista-precos li:last-child { border-bottom: none; }
.material-nome { font-weight: 500; }
.material-valor { color: #10b981; font-weight: 700; }

/* MODAL */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center; z-index: 100;
}
.modal-conteudo { background: #1e293b; padding: 30px; border-radius: 20px; width: 90%; max-width: 400px; border: 1px solid var(--glass-border); }
.modal-botoes { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.btn-cancelar { background: #475569; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }
.btn-confirmar { background: #10b981; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; }