/* Nord Higiene Web - Estilos Globais */

:root {
    --primary-color: #23d7b6;
    --primary-dark: #1fb899;
    --secondary-color: #4ce0c8;
    --bg-color: #071633;
    --card-bg: #081827;
    --text-color: #ecf6f7;
    --text-muted: #9fb0bf;
    --border-color: #0f2a3a;
    --success-color: #7ef0c9;
    --warning-color: #ffc107;
    --error-color: #ff6b6b;
    --danger-color: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3em;
    font-weight: 600;
}

.navbar-brand .logo {
    font-size: 1.5em;
}

.navbar-menu {
    display: flex;
    gap: 5px;
}

.nav-link {
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--border-color);
}

.nav-link.active {
    background: var(--primary-color);
    color: #0c0f14;
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 2em;
    color: var(--primary-color);
}

.page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid var(--primary-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--text-color);
}

/* Section */
.section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Table */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
}

.data-table thead {
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    color: #0c0f14;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: rgba(35, 215, 182, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-pending {
    background: var(--warning-color);
    color: #0c0f14;
}

.status-running {
    background: var(--primary-color);
    color: #0c0f14;
}

.status-completed {
    background: var(--success-color);
    color: #0c0f14;
}

.status-failed {
    background: var(--error-color);
    color: #fff;
}

.status-cancelled {
    background: var(--text-muted);
    color: #0c0f14;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(120deg, var(--primary-color), var(--secondary-color));
    color: #0c0f14;
}

.btn-danger {
    background: var(--danger-color);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85em;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    color: var(--primary-color);
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2em;
    cursor: pointer;
    padding: 0;
}

.close-modal:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 25px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95em;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.progress-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: var(--bg-color);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-message {
    color: var(--text-muted);
    font-size: 0.95em;
}

.progress-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    color: var(--text-color);
}

/* Footer */
.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

/* Utilities */
.text-center {
    text-align: center;
}

.uuid {
    font-family: monospace;
    font-size: 0.9em;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: #0c0f14;
    font-weight: 500;
    z-index: 9999;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: var(--success-color);
    color: #0c0f14;
}

.toast-error {
    background: var(--error-color);
    color: #fff;
}

.toast-warning {
    background: var(--warning-color);
    color: #0c0f14;
}

.toast-info {
    background: var(--primary-color);
    color: #0c0f14;
}

/* Logs Section */
.logs-section {
    margin-top: 30px;
}

.logs-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.logs-container {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.log-entry {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

.log-entry.log-info {
    background: rgba(35, 215, 182, 0.1);
    border-left: 3px solid var(--primary-color);
}

.log-entry.log-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid var(--warning-color);
}

.log-entry.log-error {
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid var(--error-color);
}

.log-entry.log-debug {
    background: rgba(159, 176, 191, 0.05);
    border-left: 3px solid var(--text-muted);
}

.log-timestamp {
    color: var(--text-muted);
    font-size: 0.85em;
    margin-right: 10px;
}

.log-level {
    font-weight: bold;
    margin-right: 10px;
    text-transform: uppercase;
    font-size: 0.85em;
}

.log-level.log-info {
    color: var(--primary-color);
}

.log-level.log-warning {
    color: var(--warning-color);
}

.log-level.log-error {
    color: var(--error-color);
}

.log-level.log-debug {
    color: var(--text-muted);
}

.log-message {
    color: var(--text-color);
}

/* Job Details */
.job-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-item label {
    color: var(--text-muted);
    font-size: 0.9em;
    font-weight: 500;
}

.detail-item span {
    color: var(--text-color);
    font-size: 1em;
}

.error-text {
    color: var(--error-color);
}

/* Config Page */
.keywords-container {
    margin-bottom: 20px;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keyword-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.keyword-item span {
    color: var(--text-color);
}

.keyword-source {
    font-size: 0.8em;
    color: var(--text-muted);
    background: var(--bg-color);
    padding: 2px 8px;
    border-radius: 10px;
}

.credentials-info {
    padding: 15px;
    background: var(--bg-color);
    border-radius: 8px;
}

.credentials-info p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.credentials-info ul {
    list-style: none;
    padding: 0;
}

.credentials-info li {
    margin-bottom: 10px;
    color: var(--text-color);
}

.credentials-info strong {
    color: var(--primary-color);
    margin-right: 10px;
}

.credentials-info code {
    background: var(--card-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        display: none;
    }

    .navbar-menu.active {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 15px;
    }

    .page-actions {
        width: 100%;
    }

    .modal-content {
        width: 95%;
    }
}
