:root {
    --azul: #0d8fd1;
    --azul-escuro: #086ea1;
    --azul-medio: #59bfd8;
    --azul-claro: #eaf6fc;
    --amarelo: #f6c105;
    --fundo: #f2f4f7;
    --texto: #1f2937;
    --box: #fdf7df;
    --borda: #e5e7eb;
    --borda-azul: #d9e4ec;
    --verde-claro: #e8f8e5;
    --cabecalho-tabela: #59bfd8;
    --linha-clara: #eef9fd;
    --linha-branca: #ffffff;
    --vermelho: #ef4444;
    --cinza: #6b7280;
    --radius: 5px;
    --radius-sm: 4px;
}

/* =========================================================
   BASE GERAL
========================================================= */

* {
    box-sizing: border-box;
}

body {
    background: var(--fundo);
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--texto);
    font-size: 13px;
    margin: 0;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

label {
    font-size: 12.5px;
}

.form-control,
.form-select,
input,
select,
textarea {
    font-size: 13px;
    border-radius: var(--radius-sm) !important;
}

.container {
    max-width: 1120px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.alert {
    font-size: 13px;
    border-radius: var(--radius) !important;
}

/* =========================================================
   TOPO PÚBLICO E ÁREA DO AUTOR
========================================================= */

.top-header {
    background: #ffffff;
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--borda);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand h1 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #111827;
}

.brand span,
.brand small {
    font-size: 11.5px;
    color: #4b5563;
}

.btn-login {
    background: var(--amarelo);
    color: #111827;
    font-weight: 700;
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    border: none;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-login:hover {
    background: #e5b400;
    color: #111827;
}

.top-author-box {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 5px 12px 5px 5px;
}

.top-author-avatar,
.avatar,
.author-avatar,
.photo-preview,
.photo-preview img,
.info-icon,
.filter-card i {
    border-radius: 50%;
}

.top-author-avatar {
    width: 34px;
    height: 34px;
    background: var(--amarelo);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 12px;
}

.top-author-name {
    font-size: 12.5px;
    font-weight: 800;
    color: #111827;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================
   MENU AZUL
========================================================= */

.nav-bar {
    min-height: 50px;
    background: var(--azul);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a,
.nav-menu button {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #ffffff;
    text-decoration: none;
    padding: 15px 12px;
    font-size: 12.5px;
    font-weight: 600;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
}

.nav-menu a:hover,
.nav-menu a.active,
.nav-menu button:hover {
    background: rgba(255,255,255,.14);
    color: #ffffff;
}

.search-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-area input {
    width: 270px;
    height: 34px;
    border-radius: var(--radius-sm) !important;
    border: 1px solid rgba(255,255,255,.30);
    background: rgba(255,255,255,.10);
    padding: 0 14px;
    color: #ffffff;
    outline: none;
    font-size: 12px;
}

.search-area input::placeholder {
    color: #ebf6fb;
}

.search-area button {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--amarelo);
    color: #111827;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.btn-author-logout {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #ffffff;
    background: var(--vermelho);
    border: none;
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-size: 12.5px;
    font-weight: 700;
    margin-left: 6px;
}

.btn-author-logout:hover {
    background: #dc2626;
}

/* =========================================================
   PÁGINA INICIAL
========================================================= */

.hero {
    background: #ffffff;
    padding: 48px 0 34px;
    border-bottom: 1px solid var(--borda);
}

.hero h2 {
    font-weight: 800;
    color: #111827;
}

.hero p {
    color: #4b5563;
}

.main-search-box {
    background: var(--azul);
    padding: 18px;
    border-radius: var(--radius);
    max-width: 1000px;
    margin: 28px auto 0;
}

.main-search-box input,
.main-search-box select {
    height: 48px;
    border-radius: var(--radius-sm) !important;
    border: none;
    font-size: 13px;
    padding-left: 14px;
}

.main-search-box input {
    font-size: 17px;
    font-style: italic;
    padding-left: 18px;
}

.main-search-box button {
    height: 48px;
    width: 70px;
    border-radius: var(--radius-sm);
    background: var(--amarelo);
    color: #111827;
    border: none;
    font-size: 22px;
}

.filter-box,
.info-card,
.stats-card {
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    overflow: hidden;
}

.info-card {
    border: none;
    height: 100%;
}

.stats-card {
    border: none;
    background: var(--box);
}

.filter-card {
    width: 100%;
    background: #ffffff;
    color: #111827;
    padding: 14px 16px;
    font-weight: 700;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: .2s ease;
}

.filter-card:hover {
    color: var(--azul-escuro);
    background: #fbfdff;
}

.filter-card i,
.info-icon {
    background: var(--amarelo);
    color: #111827;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.info-icon {
    width: 46px;
    height: 46px;
    font-size: 22px;
    margin-bottom: 14px;
}

.filter-list {
    border-top: 1px solid #edf1f5;
    background: #ffffff;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    color: #374151;
    border-bottom: 1px solid #edf1f5;
    font-size: 12.5px;
}

.filter-row:hover {
    background: var(--azul-claro);
    color: var(--azul-escuro);
}

.filter-row b,
.facet-count,
.badge,
.badge-status,
.badge-area,
.badge-posicao {
    border-radius: var(--radius-sm) !important;
}

.filter-row b {
    background: #eef2f7;
    color: #111827;
    min-width: 25px;
    height: 25px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.filter-empty {
    padding: 12px 14px;
    color: #6b7280;
    font-size: 12.5px;
}

/* =========================================================
   CABEÇALHO DE PÁGINAS INTERNAS
========================================================= */

.page-header {
    background: #ffffff;
    padding: 34px 0;
    border-bottom: 1px solid var(--borda);
}

.page-header h3 {
    color: #111827;
    font-weight: 800;
    margin-bottom: 6px;
    font-size: 26px;
}

.page-header p {
    color: #6b7280;
    margin-bottom: 0;
}

.breadcrumb-line {
    color: var(--azul-escuro);
    font-size: 13px;
    margin-bottom: 8px;
}

/* =========================================================
   BUSCA / REPOSITÓRIO
========================================================= */

.search-box,
.table-card,
.facet-box,
.ranking-card,
.filter-panel,
.info-panel,
.identifier-box,
.metadata-card,
.section-box,
.empty-state,
.public-card,
.author-panel,
.profile-panel,
.author-top-card,
.author-table-card,
.author-summary-card,
.correction-top-card,
.correction-form-card {
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
    overflow: hidden;
}

.search-box {
    padding: 16px;
    margin-bottom: 18px;
}

.search-box label {
    font-weight: 700;
    font-size: 12px;
    color: #374151;
    margin-bottom: 5px;
}

.search-box input,
.search-box select {
    height: 38px;
    border: 1px solid #d1d5db;
}

.btn-search,
.btn-clean,
.btn-details,
.btn-voltar,
.btn-limpar,
.btn-open-file,
.btn-back,
.btn-main,
.btn-light-soft,
.btn-author-primary,
.btn-author-small,
.btn-author-view,
.btn-author-correct,
.btn-author-light,
.btn-profile-primary,
.btn-profile-light,
.btn-correction-submit,
.btn-correction-light,
.btn-primary-repo,
.btn-submit,
.btn-continuar,
.btn-secondary-repo,
.btn-cancelar {
    border-radius: var(--radius-sm) !important;
}

.btn-search,
.btn-details,
.btn-author-primary,
.btn-profile-primary,
.btn-main,
.btn-primary-repo,
.btn-submit,
.btn-continuar {
    background: var(--azul);
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    font-weight: 700;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-search:hover,
.btn-details:hover,
.btn-author-primary:hover,
.btn-profile-primary:hover,
.btn-main:hover,
.btn-primary-repo:hover,
.btn-submit:hover,
.btn-continuar:hover {
    background: var(--azul-escuro);
    color: #ffffff;
}

.btn-clean,
.btn-voltar,
.btn-limpar,
.btn-back,
.btn-light-soft,
.btn-author-light,
.btn-profile-light,
.btn-correction-light,
.btn-secondary-repo,
.btn-cancelar {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-clean:hover,
.btn-voltar:hover,
.btn-limpar:hover,
.btn-back:hover,
.btn-light-soft:hover,
.btn-author-light:hover,
.btn-profile-light:hover,
.btn-correction-light:hover,
.btn-secondary-repo:hover,
.btn-cancelar:hover {
    background: #e5e7eb;
    color: #111827;
}

.result-bar,
.table-title {
    background: var(--cabecalho-tabela);
    color: #ffffff;
    padding: 13px 16px;
    font-weight: 700;
    margin-bottom: 18px;
    border-radius: var(--radius-sm);
}

.table-title {
    margin-bottom: 0;
}

.table-card {
    border-color: #b7dce9;
}

.table-card table,
.ranking-card .table,
.public-card .table,
.file-table,
.author-table,
.author-submission-table,
.author-approved-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
}

.table-card table thead th,
.author-table th,
.author-submission-table th,
.author-approved-table th,
.public-card .table th,
.file-table th {
    background: #f8fafc;
    color: #374151;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 10px;
    border-bottom: 1px solid var(--borda);
    text-align: left;
}

.table-card table tbody td,
.author-table td,
.author-submission-table td,
.author-approved-table td,
.public-card .table td,
.file-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    font-size: 12.5px;
}

.item-title {
    color: #0075a8;
    font-weight: 700;
}

.item-title:hover {
    color: var(--azul-escuro);
    text-decoration: underline;
}

.facet-title {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}

.facet-box {
    margin-bottom: 14px;
}

.facet-head {
    background: #00708b;
    color: #ffffff;
    padding: 12px 14px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.facet-head:hover {
    background: var(--azul-escuro);
}

.facet-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.facet-list li {
    border-bottom: 1px solid #edf1f5;
}

.facet-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    color: #0f5132;
    font-size: 12.5px;
    gap: 10px;
}

.facet-list a:hover {
    background: #f8fafc;
    color: var(--azul-escuro);
}

.facet-count {
    background: #e5e7eb;
    color: #374151;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    min-width: 25px;
    text-align: center;
}

.pagination .page-link {
    color: var(--azul-escuro);
    font-size: 12.5px;
}

.pagination .active .page-link {
    background: var(--azul);
    border-color: var(--azul);
    color: #ffffff;
}

/* =========================================================
   RANKING
========================================================= */

.ranking-card {
    border: none;
}

.ranking-card-header {
    background: #ffffff;
    padding: 16px 18px;
    border-bottom: 1px solid var(--borda);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ranking-card-header h5 {
    margin: 0;
    font-weight: 800;
    color: #111827;
}

.badge-area {
    background: var(--amarelo);
    color: #111827;
    padding: 5px 11px;
    font-size: 10.5px;
    font-weight: 800;
}

.ranking-card .table thead th {
    background: var(--azul);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    border: none;
    padding: 12px;
}

.ranking-card .table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #edf1f5;
}

.ranking-card .table tbody tr:hover {
    background: #fbfdff;
}

.badge-posicao {
    background: var(--amarelo);
    color: #111827;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    display: inline-block;
    min-width: 35px;
    text-align: center;
}

.score-final {
    color: var(--azul-escuro);
    font-weight: 800;
}

.info-panel {
    background: var(--box);
    padding: 14px 16px;
    border: 1px solid #f3e9b8;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-panel {
    padding: 16px;
    margin-bottom: 18px;
}

.filter-panel label {
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    font-size: 12.5px;
}

.filter-panel select {
    height: 38px;
    font-size: 12.5px;
}

/* =========================================================
   DETALHES DO DOCUMENTO
========================================================= */

.identifier-box {
    padding: 15px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    border-color: var(--borda-azul);
}

.identifier-box code {
    color: #b91c1c;
    background: #fff5f5;
    padding: 4px 7px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
}

.metadata-card,
.section-box {
    border-color: var(--borda-azul);
    margin-bottom: 24px;
}

.metadata-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    border-bottom: 1px solid #dbeaf2;
}

.metadata-row:last-child {
    border-bottom: none;
}

.metadata-row:nth-child(odd) {
    background: var(--linha-clara);
}

.metadata-row:nth-child(even) {
    background: var(--linha-branca);
}

.metadata-label,
.metadata-value {
    padding: 12px 14px;
    color: #111827;
}

.metadata-label {
    font-weight: 700;
}

.metadata-value {
    line-height: 1.6;
}

.metadata-value a {
    color: var(--azul-escuro);
    font-weight: 600;
}

.section-head {
    background: var(--azul-medio);
    color: #ffffff;
    padding: 13px 16px;
    font-weight: 800;
    font-size: 15px;
}

.btn-open-file {
    background: var(--azul);
    color: #ffffff;
    padding: 8px 16px;
    font-size: 12.5px;
    font-weight: 700;
}

.action-area {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.copyright-box {
    background: var(--azul-medio);
    color: #ffffff;
    padding: 14px 16px;
    margin-top: 28px;
    font-size: 12.5px;
}

.empty-file {
    padding: 18px;
    color: #6b7280;
}

/* =========================================================
   CONTRIBUIÇÃO / EMAIL / OTP / PEDIDO
========================================================= */

.page-wrap {
    max-width: 920px;
    margin: 38px auto;
    padding: 0 16px;
}

.public-card {
    max-width: 100%;
}

.public-card-head,
.contrib-card-header,
.contribuicao-card-header,
.public-auth-card-header,
.auth-card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--borda);
    padding: 18px 20px;
}

.public-card-head h2,
.contrib-card-header h3,
.contribuicao-card-header h3,
.public-auth-card-header h3,
.auth-card-header h3 {
    font-size: 20px;
    font-weight: 800;
    margin: 0;
    color: #111827;
}

.public-card-head p,
.contrib-card-header p,
.contribuicao-card-header p,
.public-auth-card-header p,
.auth-card-header p {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.public-card-body,
.contrib-card-body,
.contribuicao-card-body,
.public-auth-card-body,
.auth-card-body {
    padding: 20px;
}

.public-card .form-label,
.contrib-form label,
.contribuicao-form label,
.public-auth-form label,
.auth-form label {
    font-size: 12.5px;
    font-weight: 700;
    color: #374151;
}

.public-card .form-control,
.public-card .form-select {
    min-height: 40px;
}

.btn-main,
.btn-light-soft {
    min-height: 40px;
    padding: 0 18px;
    font-weight: 800;
    font-size: 12.8px;
    border: none;
}

.note-box,
.small-note {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius);
    padding: 11px 13px;
    color: #4b5563;
    font-size: 12.5px;
}

.public-card-body .d-flex.justify-content-end {
    padding-top: 4px;
}

/* =========================================================
   ÁREA DO AUTOR / PAINEL
========================================================= */

.author-shell {
    max-width: 1120px;
    margin: 28px auto;
    padding: 0 16px;
}

.author-header {
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 14px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar,
.author-avatar {
    width: 46px;
    height: 46px;
    background: var(--azul);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    overflow: hidden;
}

.author-title {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 3px;
}

.author-subtitle {
    color: #6b7280;
    font-size: 12px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.stat-card,
.author-summary-card {
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.stat-label,
.author-summary-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-number,
.author-summary-number {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}

.content-grid,
.profile-grid,
.author-summary-grid,
.correction-form-grid {
    display: grid;
    gap: 16px;
}

.content-grid {
    grid-template-columns: 1.5fr 0.8fr;
}

.profile-grid {
    grid-template-columns: 0.8fr 1.6fr;
}

.author-summary-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 16px;
}

.correction-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.author-panel-head,
.profile-panel-head,
.author-table-head,
.correction-form-head {
    padding: 15px 16px;
    border-bottom: 1px solid var(--borda);
    background: #f8fafc;
}

.author-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.author-panel-title,
.profile-panel-title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}

.author-panel-desc,
.profile-panel-desc,
.author-table-head small,
.correction-form-head small {
    color: #6b7280;
    font-size: 12px;
    margin-top: 3px;
}

.author-panel-body,
.profile-panel-body,
.correction-form-body {
    padding: 16px;
}

.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-actions a {
    border: 1px solid var(--borda);
    padding: 12px;
    border-radius: var(--radius-sm);
    color: #111827;
    font-weight: 700;
    background: #fafafa;
}

.quick-actions a:hover {
    border-color: var(--azul);
    color: var(--azul);
    background: #f0f9ff;
}

.codigo {
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.titulo {
    font-weight: 700;
    color: #111827;
}

.muted,
.author-obs-box {
    color: #6b7280;
    font-size: 11px;
    margin-top: 3px;
}

.badge,
.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    min-height: 24px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-success,
.badge-aprovado {
    background: #dcfce7;
    color: #166534;
}

.badge-info,
.badge-analise {
    background: #e0f2fe;
    color: #075985;
}

.badge-warning,
.badge-reenviado,
.badge-pendente {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger,
.badge-rejeitado {
    background: #fee2e2;
    color: #991b1b;
}

.badge-devolvido {
    background: #eef2ff;
    color: #3730a3;
}

.badge-muted {
    background: #f3f4f6;
    color: #374151;
}

.author-empty,
.author-empty-box,
.empty-state {
    padding: 28px;
    text-align: center;
    color: #6b7280;
}

.author-empty-title {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 6px;
}

.author-empty-text {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* =========================================================
   PERFIL DO AUTOR
========================================================= */

.photo-box {
    text-align: center;
}

.photo-preview {
    width: 130px;
    height: 130px;
    background: var(--azul);
    color: #ffffff;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 800;
    overflow: hidden;
    border: 4px solid #eef7fc;
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.photo-email {
    color: #6b7280;
    font-size: 12px;
    word-break: break-word;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.profile-form-group,
.correction-form-group {
    margin-bottom: 14px;
}

.profile-form-group.full,
.correction-form-full {
    grid-column: 1 / -1;
}

.profile-form-group label,
.correction-form-group label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    color: #374151;
    margin-bottom: 6px;
}

.profile-form-group input,
.profile-form-group textarea,
.correction-form-group .form-control,
.correction-form-group .form-select,
.correction-form-body .form-control,
.correction-form-body .form-select {
    width: 100%;
    border: 1px solid #d1d5db;
    padding: 9px 10px;
    font-size: 13px;
    outline: none;
    background: #ffffff;
}

.profile-form-group input,
.correction-form-group .form-control,
.correction-form-group .form-select {
    min-height: 39px;
}

.profile-form-group input:focus,
.profile-form-group textarea:focus,
.correction-form-group .form-control:focus,
.correction-form-group .form-select:focus {
    border-color: var(--azul);
    box-shadow: 0 0 0 2px rgba(13,143,209,0.12);
}

.profile-form-group input[readonly] {
    background: #f9fafb;
    color: #6b7280;
}

.profile-form-group textarea,
.correction-form-body textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.error-text {
    color: #b91c1c;
    font-size: 11px;
    margin-top: 4px;
}

.profile-actions,
.correction-actions,
.author-actions,
.author-approved-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-actions {
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--borda);
    margin-top: 4px;
}

.author-actions {
    justify-content: flex-end;
}

.author-obs-box {
    max-width: 280px;
    line-height: 1.4;
}

/* =========================================================
   SUBMETER DOCUMENTO
========================================================= */

.public-card .nav-tabs {
    border-bottom: 1px solid var(--borda);
}

.public-card .nav-tabs .nav-link {
    color: #374151;
    font-size: 12.5px;
    font-weight: 800;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    padding: 10px 14px;
}

.public-card .nav-tabs .nav-link.active {
    color: #ffffff;
    background: var(--azul);
    border-color: var(--azul);
}

.public-card .nav-tabs .nav-link:hover {
    border-color: var(--azul-claro);
    color: var(--azul-escuro);
}

.public-card textarea.form-control {
    min-height: 105px;
    resize: vertical;
}

.public-card .form-check-label {
    font-size: 12.5px;
    color: #374151;
    line-height: 1.5;
}

.public-card .btn-outline-danger {
    border-radius: var(--radius-sm) !important;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 10px;
}

.campo-ranking {
    transition: all .2s ease;
}

#btn_adicionar_anexo {
    margin-top: 4px;
}

/* =========================================================
   CORRIGIR SUBMISSÃO
========================================================= */

.correction-page-box,
.author-page-box {
    max-width: 1120px;
    margin: 0 auto;
}

.correction-top-card,
.author-top-card {
    padding: 18px 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.correction-top-card h3,
.author-top-card h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}

.correction-top-card p,
.author-top-card p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
}

.correction-note {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.correction-note strong {
    display: block;
    margin-bottom: 5px;
    color: #312e81;
}

.correction-file-info {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 11px 13px;
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 10px;
}

.correction-file-info strong {
    color: #111827;
}

.correction-anexo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.btn-correction-submit {
    min-height: 42px;
    border: none;
    background: #16a34a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    padding: 0 22px;
}

.btn-correction-submit:hover {
    background: #15803d;
    color: #ffffff;
}

/* =========================================================
   FOOTER E RESPONSIVO
========================================================= */

footer {
    background: #ffffff;
    border-top: 1px solid var(--borda);
    color: #777;
}

.footer {
    text-align: center;
    color: #777777;
    font-size: 12px;
    margin: 28px 0;
}

@media (max-width: 900px) {
    .top-header,
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .search-area,
    .search-area input,
    .top-author-box {
        width: 100%;
    }

    .main-search-box .d-flex,
    .public-card .d-flex.justify-content-end,
    .profile-actions,
    .correction-actions,
    .form-actions,
    .contrib-actions,
    .contribuicao-actions,
    .auth-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .main-search-box button,
    .main-search-box select,
    .btn-main,
    .btn-light-soft,
    .btn-correction-submit,
    .btn-correction-light,
    .btn-profile-primary,
    .btn-profile-light,
    .btn-primary-repo,
    .btn-submit,
    .btn-continuar,
    .btn-secondary-repo,
    .btn-cancelar {
        width: 100%;
        max-width: 100% !important;
        text-align: center;
        justify-content: center;
    }

    .ranking-card-header,
    .author-header,
    .author-panel-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .metadata-row,
    .dashboard-grid,
    .content-grid,
    .profile-grid,
    .profile-form-grid,
    .author-summary-grid,
    .correction-form-grid,
    .correction-anexo-row {
        grid-template-columns: 1fr;
    }

    .metadata-label {
        border-bottom: 1px solid #dbeaf2;
        background: rgba(13,143,209,.08);
    }

    .public-card .nav-tabs .nav-item {
        width: 100%;
    }

    .public-card .nav-tabs .nav-link {
        width: 100%;
        text-align: left;
        border-radius: var(--radius-sm) !important;
    }

    .author-actions,
    .author-approved-actions {
        justify-content: flex-start;
    }

    .author-obs-box {
        max-width: 100%;
    }
}
