/* ========================================================================== */
/* INÍCIO: VARIÁVEIS, RESET E TIPOGRAFIA (ESTILO MINIMALISTA) */
/* ========================================================================== */
:root {
    /* PALETA DARK MINIMALISTA (CHUMBO FOSCO, SEM PRETO PURISTA) */
    --bg: #121212;             
    --panel: #1a1a1a;          
    --panel-border: #2a2a2a;   
    
    /* TIPOGRAFIA UNIFICADA - INTER (LEVE E LIMPA) */
    --text-main: #e5e5e5;      
    --text-muted: #888888;     
    --text-contrast: #ffffff;  
    
    /* CORES DE ACENTO E STATUS */
    --accent: #6366f1;         
    --accent-hover: #4f46e5;   
    --success: #10b981;        
    --danger: #ef4444;         
    --danger-bg: #450a0a;      
}

/* RESET E REGRAS COERCITIVAS FLAT */
*, *::before, *::after {
    box-sizing: border-box;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    padding-top: 0px; 
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    font-weight: 500; 
    letter-spacing: -0.5px;
    margin-top: 0;
}

p, span, td, th, label {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    font-weight: 400; 
}

.text-muted {
    color: var(--text-muted) !important;
    font-size: 0.85rem;
    font-weight: 400;
}
/* ========================================================================== */
/* FIM: VARIÁVEIS, RESET E TIPOGRAFIA */
/* ========================================================================== */


/* ========================================================================== */
/* INÍCIO: ESTRUTURA DE NAVEGAÇÃO SUPERIOR */
/* ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--panel);
    border-bottom: 1px solid var(--panel-border) !important;
    padding: 0 1.5rem;
    height: 65px;
    display: table;
    table-layout: fixed;
    z-index: 99999;
}

.nav-container {
    display: table-row;
}

.left-menu-cell {
    display: table-cell;
    vertical-align: middle;
    text-align: left;
}

.right-menu-cell {
    display: table-cell;
    vertical-align: middle;
    text-align: right;
    width: 300px;
}

.nav-brand {
    font-weight: 600;
    font-size: 1.3rem;
    color: var(--text-contrast);
    text-decoration: none;
    display: inline-block;
    margin-right: 20px;
}

.nav-brand i {
    color: var(--accent);
}
/* ========================================================================== */
/* FIM: ESTRUTURA DE NAVEGAÇÃO SUPERIOR */
/* ========================================================================== */


/* ========================================================================== */
/* INÍCIO: LAYOUTS AVANÇADOS (SIDEBAR, WORKSPACE, FOTOS E FERRAMENTAS) */
/* ========================================================================== */
.app-layout {
    display: flex;
    min-height: calc(100vh - 65px);
    width: 100%;
}

.sidebar {
    width: 260px;
    background-color: var(--panel);
    border-right: 1px solid var(--panel-border) !important;
    padding: 1.5rem;
    flex-shrink: 0;
    overflow-y: auto;
}

.main-workspace {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.main-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main-content, .main-workspace {
        padding: 1rem;
    }
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none !important;
        border-bottom: 1px solid var(--panel-border) !important;
    }
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}

.prompt-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--panel-border) !important;
    overflow: hidden;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prompt-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.prompt-card:hover img {
    transform: scale(1.05);
}

.prompt-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 18, 18, 0.85); 
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.prompt-card:hover .prompt-overlay {
    opacity: 1;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 2rem;
}

.tool-card {
    background: var(--panel);
    border: 1px solid var(--panel-border) !important;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.tool-card:hover {
    background: var(--panel-border);
    border-color: var(--accent) !important;
}

.tool-icon {
    font-size: 1.8rem;
    color: var(--accent);
}
/* ========================================================================== */
/* FIM: LAYOUTS AVANÇADOS */
/* ========================================================================== */


/* ========================================================================== */
/* INÍCIO: COMPONENTES GERAIS (FORMULÁRIOS, BOTÕES E TABELAS) */
/* ========================================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background-color: var(--panel);
    color: var(--text-main);
    border: 1px solid var(--panel-border) !important;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent) !important;
}

select.form-control { height: 45px; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent !important;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary { background-color: var(--accent); color: var(--text-contrast); }
.btn-primary:hover { background-color: var(--accent-hover); }
.btn-secondary { background-color: transparent; color: var(--text-muted); border: 1px solid var(--panel-border) !important; }
.btn-secondary:hover { background-color: var(--panel); color: var(--text-main); border-color: var(--text-muted) !important; }
.btn-danger { background-color: transparent; color: var(--danger); border: 1px solid var(--danger) !important; }
.btn-danger:hover { background-color: var(--danger); color: var(--text-contrast); }
.btn-success { background-color: var(--success); color: var(--text-contrast); }
.btn-success:hover { background-color: #059669; }
.btn-block { width: 100%; display: flex; }

.table-responsive { width: 100%; overflow-x: auto; margin-bottom: 1.5rem; }
.table { width: 100%; border-collapse: collapse; background-color: var(--panel); margin-bottom: 0; }
.table th {
    background-color: #161616;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    text-align: left;
    border-bottom: 2px solid var(--panel-border) !important;
}
.table td { padding: 1rem; font-size: 0.85rem; border-bottom: 1px solid var(--panel-border) !important; vertical-align: middle; }
.table tbody tr:hover { background-color: rgba(255, 255, 255, 0.02); }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0, 0, 0, 0.15); }
/* ========================================================================== */
/* FIM: COMPONENTES GERAIS */
/* ========================================================================== */

/* ========================================================================== */
/* INÍCIO: DROPDOWNS DO HEADER (PAI, FILHO E NETO) */
/* ========================================================================== */
.header-menu-container { display: flex; gap: 30px; align-items: center; }
.nav-item { position: relative; padding: 10px 0; }
.nav-item > a { color: var(--text-main); text-decoration: none; font-weight: 500; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px; }
.nav-item:hover > a { color: var(--text-contrast); }

/* Bloco Flutuante Nível 2 (Filho) */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background-color: var(--panel); border: 1px solid var(--panel-border) !important; min-width: 220px; padding: 10px 0; z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important; }
.nav-item:hover > .dropdown-menu { display: block; }
.dropdown-item { display: block; padding: 10px 20px; color: var(--text-main); text-decoration: none; font-size: 0.85rem; transition: background 0.2s; }
.dropdown-item:hover { background-color: rgba(255,255,255,0.05); color: var(--text-contrast); }

/* Bloco Flutuante Nível 3 (Neto) */
.dropdown-submenu-container { position: relative; }
.dropdown-submenu { display: none; position: absolute; top: -11px; left: 100%; background-color: var(--panel); border: 1px solid var(--panel-border) !important; min-width: 220px; padding: 10px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.8) !important;}
.dropdown-submenu-container:hover > .dropdown-submenu { display: block; }
/* ========================================================================== */
/* FIM: DROPDOWNS DO HEADER */
/* ========================================================================== */