:root {
    --primary-color: #5cb6e7;
    --secondary-color: #3b84ae;
    --accent-color: #fd6c03;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #f8f9fa; min-height: 100vh; }

/* --- Tela de Login --- */
.container { width: 100%; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-container { padding: 40px; width: 100%; }
.login-box { background: white; padding: 40px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 100%; max-width: 400px; text-align: center; margin: auto; }
.logo { width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; color: white; font-size: 24px; font-weight: bold; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.login-title { color: var(--secondary-color); font-size: 28px; font-weight: bold; margin-bottom: 10px; }
.login-subtitle { color: #666; margin-bottom: 30px; }
.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 45px; }
.password-toggle { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 45px; background: transparent; border: none; cursor: pointer; font-size: 18px; color: #888; }
.forgot-password { color: var(--primary-color); text-decoration: none; font-size: 14px; margin-top: 15px; display: inline-block; }
.forgot-password:hover { text-decoration: underline; }

/* --- Estrutura Principal --- */
.main-system { display: none; height: 100vh; width: 100vw; overflow: hidden; }
.header { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; padding: 0 30px; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.header-left { display: flex; align-items: center; gap: 15px; }
.header h1 { font-size: 22px; }
.user-info { display: flex; align-items: center; gap: 15px; }
.logout-btn { background: var(--accent-color); color: white; border: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; font-size: 14px; }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 28px; cursor: pointer; }
.mobile-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
.main-content { display: flex; height: calc(100vh - 70px); }
.sidebar { width: 250px; background: #f8f9fa; border-right: 1px solid #e0e0e0; padding: 20px; transition: left 0.3s ease; }
.nav-item { padding: 12px 15px; margin-bottom: 5px; border-radius: 8px; cursor: pointer; transition: background 0.3s, color 0.3s; color: var(--secondary-color); font-weight: 500; }
.nav-item:hover, .nav-item.active { background: var(--primary-color); color: white; }
.content-area { flex: 1; padding: 30px; overflow-y: auto; }
.section { display: none; }
.section.active { display: block; }

/* --- Componentes --- */
.card { background: white; border-radius: 10px; padding: 25px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); margin-bottom: 20px; }
.card h3 { color: var(--secondary-color); margin-bottom: 20px; font-size: 20px; }
.card h4 { color: var(--secondary-color); margin-bottom: 15px; font-size: 18px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; color: var(--secondary-color); font-weight: 600; margin-bottom: 8px; }
.form-control, .form-group input, .form-group select { width: 100%; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 16px; transition: border-color 0.3s; }
.form-control:focus, .form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary-color); }
.form-row { display: flex; gap: 20px; margin-bottom: 20px; }
.form-row .form-group { flex: 1; margin-bottom: 0; }
.btn { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); color: white; border: none; padding: 12px 30px; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; width: 100%; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.btn-secondary { background: var(--accent-color); }
.btn-small { padding: 5px 10px; font-size: 12px; width: auto; margin-right: 5px; }
.delete-btn { background: #dc3545; color: white; border: none; padding: 5px 10px; border-radius: 5px; cursor: pointer; font-size: 12px; }
.command-list, .selection-list { max-height: 400px; overflow-y: auto; border: 1px solid #e0e0e0; border-radius: 8px; padding: 10px; margin-top: 10px; }
.command-item { background: #f8f9fa; padding: 10px 15px; border-radius: 8px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid var(--primary-color); }
.selection-buttons { margin-top: 10px; }
.lines-textarea { width: 100%; height: 150px; padding: 10px; border: 2px solid #e0e0e0; border-radius: 8px; font-family: monospace; resize: vertical; }
.status-panel { background: #f8f9fa; border-radius: 8px; padding: 20px; }
.status-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #e0e0e0; }
.status-item:last-child { border-bottom: none; }
.success { color: #28a745; font-weight: bold; }
.pending { color: #fd6c03; font-weight: bold; }
.color-picker { width: 100%; height: 40px; border: 1px solid #ccc; border-radius: 5px; cursor: pointer; padding: 0; background-color: white; }

/* --- Dashboard / Monitoramento --- */
.line-item { background: #f8f9fa; padding: 15px; border-radius: 8px; margin-bottom: 10px; border-left: 4px solid var(--primary-color); }
.line-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; cursor: pointer; }
.line-number { font-weight: bold; color: var(--secondary-color); font-size: 16px; }
.line-stats { display: flex; gap: 15px; font-size: 12px; color: #666; }
.chat-container { display: none; background: white; border-radius: 8px; border: 1px solid #e0e0e0; margin-top: 10px; padding: 10px; max-height: 250px; overflow-y: auto; }
.chat-message { padding: 8px 12px; margin-bottom: 10px; border-radius: 15px; max-width: 80%; word-wrap: break-word; clear: both; }
.message-sent { background: var(--primary-color); color: white; float: right; }
.message-received { background: #e9ecef; color: #333; float: left; }
.message-time { font-size: 10px; opacity: 0.8; margin-top: 4px; display: block; text-align: right; }
.message-received .message-time { text-align: left; }

/* --- Modal --- */
.forgot-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; }
.modal-content { background: white; padding: 30px; border-radius: 15px; width: 90%; max-width: 400px; text-align: center; }
.close-modal { float: right; font-size: 28px; cursor: pointer; color: #999; }
.close-modal:hover { color: #333; }

/* --- Responsividade --- */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .header { padding: 0 15px; }
    .header h1 { font-size: 18px; }
    .user-info span { display: none; }
    .sidebar { position: fixed; top: 70px; left: -280px; width: 250px; height: calc(100vh - 70px); z-index: 1000; box-shadow: 5px 0 15px rgba(0,0,0,0.1); }
    .sidebar.mobile-open { left: 0; }
    .mobile-overlay.active { display: block; }
    .content-area { padding: 20px; }
    .form-row { flex-direction: column; gap: 0; margin-bottom: 0; }
    .form-row .form-group { margin-bottom: 20px; }
}