* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

/* ABAS */
.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
    flex-wrap: wrap;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    color: #666;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    min-width: 150px;
}

.tab-button:hover {
    background: #ebebeb;
    color: #333;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

/* CONTEÚDO DAS ABAS */
.tab-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS */
.card {
    background: white;
}

.card h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.description {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.description.warning {
    color: #d32f2f;
    background: #ffebee;
    padding: 10px 15px;
    border-radius: 6px;
    border-left: 4px solid #d32f2f;
}

/* FORMULÁRIOS */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* BOTÕES */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
}

.btn-secondary {
    background: #757575;
    color: white;
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-secondary:hover {
    background: #616161;
}

/* RESULTADOS */
.resultado {
    margin-top: 30px;
    min-height: 50px;
}

.resultado-container {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
}

.resultado-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.resultado-header h3 {
    color: #333;
    font-size: 1.3em;
}

.resultado-stats {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.resultado-list {
    list-style: none;
}

.resultado-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.resultado-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.resultado-item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.resultado-item-meta {
    color: #666;
    font-size: 0.9em;
    display: grid;
    gap: 5px;
}

.resultado-item-meta span {
    display: flex;
    align-items: center;
}

.resultado-item-meta strong {
    color: #667eea;
    margin-right: 5px;
    min-width: 100px;
}

.btn-ver {
    margin-top: 10px;
    display: inline-block;
}

/* ALERTAS */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #d32f2f;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
}

.modal-body {
    margin-top: 20px;
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
}

/* LOADING */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESPONSIVO */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .tab-button {
        flex: 0 0 50%;
        min-width: auto;
    }

    .tab-content {
        padding: 20px;
    }

    .modal-content {
        margin: 20px;
        width: auto;
    }
}