:root {
    --color-bg: #f7f8fa;
    --color-text: #2c3e50;
    --color-primary: #3498db;
    --color-border: #e0e6ed;
    --color-card-bg: #ffffff;
    --color-error: #e74c3c;
    --font-family-sans: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    --font-family-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
body { 
    font-family: var(--font-family-sans);
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
    background: var(--color-bg);
    color: var(--color-text);
}
.main-header { text-align: center; margin-bottom: 2rem; }
.main-header .version { font-size: 0.8rem; color: var(--color-primary); }

.card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    background: var(--color-card-bg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.card.error { border-color: var(--color-error); background: #fff5f5; }

/* --- Formulário Principal --- */
form.card .form-group { margin-bottom: 1rem; }
form.card label { font-weight: 600; display: block; margin-bottom: 0.5rem; }
form.card .mode-selector label { display: inline-flex; align-items: center; margin-right: 1rem; font-weight: normal; }
form.card input[type="url"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
}
form.card button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--color-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
form.card button:hover { background: #2980b9; }

/* --- Resultados --- */
.results-header { margin-bottom: 1.5rem; }
details { margin-top: 1rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
pre { white-space: pre-wrap; background: #2d3440; color: #d7e1ff; border: 1px solid var(--color-border); border-radius: 8px; padding: 1rem; font-family: var(--font-family-mono); font-size: 0.85rem; }

.component-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin: 0.75rem 0;
    padding: 1rem;
    background: #fafbff;
}
.component-header { display: flex; align-items: center; gap: 0.75rem; }
.component-type {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    background: #95a5a6;
}
.C-link { background: #3498db; }
.C-button { background: #2ecc71; }
.C-form { background: #f39c12; }
.C-data_table { background: #9b59b6; }
.C-image { background: #e67e22; }

.component-card .component-details { padding-left: 1rem; margin-top: 0.5rem; }
.component-card .component-details summary { font-weight: normal; font-size: 0.9rem; }
.component-card ul { list-style: none; padding-left: 1rem; font-size: 0.85rem; color: #555; }
.field-card { border-left: 3px solid var(--color-primary); padding-left: 1rem; margin: 0.5rem 0; }

/* --- Modo Gravação --- */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
iframe { width: 100%; height: 75vh; border: 1px solid var(--color-border); border-radius: 12px; }
.log { height: 65vh; overflow: auto; background: #2d3440; color: #d7e1ff; border-radius: 8px; padding: 1rem; font-family: var(--font-family-mono); font-size: 0.8rem; }
.log-line { padding: 4px; border-bottom: 1px solid #444; cursor: pointer; }
.log-line:hover { background: #3c4452; }
.small-btn { padding: 4px 8px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; float: right; }