/* FILE: style.css */
:root {
    --bg-dark: #1e1e1e; --bg-panel: #252526; --bg-input: #3c3c3c;
    --text-main: #d4d4d4; --text-muted: #858585;
    --accent: #4daafc; --accent-hover: #2b85d3;
    --success: #6a9955; --error: #f48771; --border: #444444;
    --font-mono: 'Consolas', 'Monaco', 'Courier New', monospace;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-dark); color: var(--text-main); font-family: var(--font-ui); height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

/* Header */
.app-header { background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 0 20px; height: 60px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 10; }
.status-group { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 0.85rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); transition: 0.3s; }
.status-dot.online { background: var(--success); box-shadow: 0 0 5px var(--success); }
.status-dot.offline { background: var(--error); }
.project-info { color: var(--text-muted); display: flex; align-items: center; }
.project-info strong { color: var(--accent); }
.menu-btn { background: none; border: none; color: var(--text-main); font-size: 1.5rem; cursor: pointer; padding: 5px; }

/* System Buttons */
.system-actions { display: flex; gap: 10px; margin-right: 15px; margin-left: auto; }
.system-actions button { background: #333; border: 1px solid #555; padding: 5px 10px; font-size: 1.2rem; border-radius: 4px; cursor: pointer; color: #ccc; }
.system-actions button:hover { background: #444; border-color: var(--accent); color: #fff; }

/* Chat */
#chat-container { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 15px; scroll-behavior: smooth; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 6px; line-height: 1.5; font-size: 0.95rem; position: relative; }
.msg.user { align-self: flex-end; background: #2d2d2d; border: 1px solid var(--border); color: var(--text-main); }
.msg.ai { align-self: flex-start; background: #252526; border-left: 3px solid var(--accent); }
.msg.system { align-self: center; color: var(--text-muted); font-size: 0.85rem; font-style: italic; background: transparent; border: none; }
.msg.ai pre { background: #1e1e1e; padding: 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: 4px; margin-top: 8px; font-family: var(--font-mono); font-size: 0.9rem; }
.msg.ai code { font-family: var(--font-mono); background: rgba(255,255,255,0.1); padding: 2px 4px; border-radius: 3px; color: #ce9178; }
.msg.ai a { color: var(--accent); text-decoration: none; }

/* Footer */
.app-footer { background: var(--bg-panel); padding: 15px; padding-bottom: 75px; border-top: 1px solid var(--border); }
#command-form { display: flex; gap: 10px; }
#cmd-input { flex: 1; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); padding: 12px; border-radius: 4px; font-family: var(--font-mono); font-size: 1rem; }
#cmd-input:focus { outline: none; border-color: var(--accent); }
.btn-send { background: var(--accent); color: #fff; border: none; padding: 0 20px; border-radius: 4px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-send:hover { background: var(--accent-hover); }

/* Sidebar */
.sidebar { position: fixed; top: 0; right: -280px; width: 280px; height: 100%; background: var(--bg-panel); border-left: 1px solid var(--border); transition: 0.3s; z-index: 100; padding: 20px; display: flex; flex-direction: column; }
.sidebar.open { right: 0; }
.sidebar h3 { color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; }
.btn-new { width: 100%; background: transparent; border: 1px dashed var(--text-muted); color: var(--text-main); padding: 10px; margin-bottom: 20px; cursor: pointer; border-radius: 4px; transition: 0.2s; }
.btn-new:hover { border-color: var(--accent); color: var(--accent); }
#project-list { list-style: none; overflow-y: auto; flex: 1; }
#project-list li { padding: 10px; border-radius: 4px; cursor: pointer; color: var(--text-muted); margin-bottom: 5px; transition: 0.2s; }
#project-list li:hover { background: #37373d; color: var(--text-main); }
#project-list li.active { background: #37373d; color: var(--accent); border-left: 3px solid var(--accent); }
.logout-area { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.btn-logout { width: 100%; background: #3c3c3c; color: var(--error); border: none; padding: 10px; border-radius: 4px; cursor: pointer; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: none; justify-content: center; align-items: center; z-index: 200; backdrop-filter: blur(2px); }
.modal.active { display: flex; }
.modal-content { background: var(--bg-panel); width: 90%; max-width: 1800px; height: 80%; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; padding: 20px; box-shadow: 0 0 20px rgba(0,0,0,0.5); }
.modal-header { display: flex; justify-content: space-between; margin-bottom: 15px; }
.close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
#file-content { flex: 1; background: var(--bg-dark); color: var(--text-main); border: 1px solid #333; padding: 15px; font-family: var(--font-mono); font-size: 0.9rem; resize: none; }
.modal-footer { margin-top: 15px; text-align: right; }
.btn-save { background: var(--success); color: white; padding: 10px 20px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 99; }
.overlay.active { display: block; }

/* Config UI */
#config-ui select, #config-ui input[type="number"] { width: 100%; padding: 10px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); border-radius: 4px; margin-top: 5px; }
#config-ui input[type="range"] { width: 80%; margin-right: 10px; vertical-align: middle; }
#config-ui span { font-family: var(--font-mono); color: var(--accent); font-weight: bold; }

/* Login Page */
.login-container { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; padding: 20px; }
.login-box { background: var(--bg-panel); padding: 30px; border-radius: 8px; border: 1px solid var(--border); width: 100%; max-width: 400px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.login-title { text-align: center; margin-bottom: 25px; font-weight: normal; color: var(--text-main); }
.login-input { width: 100%; padding: 12px; margin-bottom: 15px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-main); border-radius: 4px; }
.login-btn { width: 100%; padding: 12px; background: var(--accent); color: white; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; }

/* Mobile Fix */
@media (max-width: 600px) {
    .app-header { padding: 0 10px; gap: 5px; }
    #vps-text { display: none; }
    .project-info { font-size: 0.75rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .project-info span { display: none; } 
    .system-actions { margin-right: 5px; gap: 5px; }
    .system-actions button { padding: 4px 8px; font-size: 1rem; }
}
/* File Header Style */
.file-header {
    background: #2d2d2d;
    color: #ccc;
    padding: 5px 10px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border: 1px solid var(--border);
    border-bottom: none;
    margin-top: 10px;
}

/* Ajuste para o bloco de código colar no header */
.msg.ai pre {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
/* File Card Style (Clean View) */
.file-card {
    background: #2d2d2d;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}
.file-card .icon { font-size: 1.2rem; }
.file-card .name { color: var(--text-main); font-weight: bold; flex: 1; }
.file-card .status { color: var(--success); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; }
/* Estilo para o Link de Deploy */
.msg.ai a {
    display: inline-block;
    margin-top: 10px;
    background: var(--bg-dark);
    color: var(--neon-green);
    padding: 8px 12px;
    border: 1px solid var(--neon-green);
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.2s;
}

.msg.ai a:hover {
    background: var(--neon-green);
    color: #000;
}