* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f3f5f9;
    color: #1c1e21;
    margin: 0;
    padding: 24px;
}
.container { max-width: 760px; margin: 0 auto; }
.header { text-align: center; margin-bottom: 24px; }
.header h1 { margin: 0 0 6px; color: #1877f2; font-size: 28px; }
.subtitle { color: #606770; margin: 0; }

.card {
    background: #fff;
    padding: 28px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

hr { border: none; border-top: 1px solid #e4e6eb; margin: 22px 0; }

.form-row { margin-bottom: 16px; display: flex; flex-direction: column; }
.form-row label { font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #1c1e21; }
.form-row small { color: #606770; margin-top: 4px; font-size: 12px; }

input[type="text"],
input[type="url"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 3px rgba(24,119,242,.15);
}
textarea { resize: vertical; }
select:disabled { background: #f5f6f7; color: #8a8d91; }

.actions { margin-top: 20px; text-align: right; }
.btn-primary {
    background: #1877f2;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-primary:hover { background: #166fe5; }
.btn-primary:disabled { background: #8ab4f5; cursor: not-allowed; }

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background: #e4e6eb;
    color: #1c1e21;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
}
.btn-secondary:hover { background: #d8dadf; }

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
    border-left: 4px solid;
}
.alert-error   { background: #ffebe9; border-color: #d73a49; color: #86181d; }
.alert-success { background: #e6ffed; border-color: #28a745; color: #155724; }
.alert ul { margin: 6px 0 0 18px; }

.debug-box {
    background: #f6f8fa;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    padding: 10px 14px;
    margin-top: 12px;
    font-size: 13px;
}
.debug-box pre {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
    margin: 8px 0 0;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
    font-size: 14px;
}
.result-table th, .result-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e4e6eb;
    text-align: left;
    vertical-align: top;
}
.result-table th { background: #f5f6f7; font-weight: 600; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-error   { background: #f8d7da; color: #721c24; }

.footer { text-align: center; margin-top: 18px; color: #606770; }
code { background: #f0f2f5; padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* Credenciais */
.creds-card { margin-bottom: 18px; border-top: 4px solid #1877f2; }
.creds-title { margin: 0 0 14px; font-size: 18px; color: #1c1e21; }
.creds-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.creds-grid > div { display: flex; flex-direction: column; }
.creds-actions { display: flex; align-items: center; gap: 10px; }
.creds-actions .btn-secondary { padding: 12px 18px; }
.creds-status { font-size: 13px; color: #606770; }
.creds-status-success { color: #155724; }
.creds-status-error   { color: #86181d; }

.is-disabled { opacity: 0.55; pointer-events: none; }
.is-disabled .alert { opacity: 1; pointer-events: auto; }

/* Progresso */
.progress-bar {
    width: 100%;
    height: 22px;
    background: #e4e6eb;
    border-radius: 11px;
    overflow: hidden;
    margin: 12px 0 18px;
    position: relative;
}
.progress-fill {
    height: 100%;
    background: #1877f2;
    color: #fff;
    text-align: center;
    line-height: 22px;
    font-size: 12px;
    font-weight: 600;
    transition: width .25s ease;
    width: 0%;
}
.upload-list { list-style: none; padding: 0; margin: 0; }
.upload-item {
    padding: 8px 12px;
    border-left: 4px solid #ccd0d5;
    background: #f5f6f7;
    margin-bottom: 6px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}
.upload-item.pending { border-color: #1877f2; }
.upload-item.success { border-color: #28a745; background: #e6ffed; }
.upload-item.error   { border-color: #d73a49; background: #ffebe9; }
.upload-label { font-weight: 600; margin-right: 8px; }
.upload-detail code { background: rgba(0,0,0,0.05); }
.upload-summary { margin-top: 14px; font-size: 14px; }

/* Radio group (modo de nomenclatura) */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f5f6f7;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #e4e6eb;
}
.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}
.radio-option input[type="radio"] {
    width: auto;
    margin: 3px 0 0;
    cursor: pointer;
}
.radio-option em { color: #1877f2; font-style: normal; font-weight: 600; }
