/* =============================================================
   CUSTOM.CSS — Ajustes e overrides específicos do Bootstrap
   ============================================================= */

/* ── Sobreescritas de variáveis Bootstrap ── */
:root {
    --bs-primary:         #2563eb;
    --bs-primary-rgb:     37, 99, 235;
    --bs-body-bg:         #f4f6f9;
    --bs-body-color:      #1e293b;
    --bs-border-color:    #e2e8f0;
    --bs-border-radius:   8px;
    --bs-border-radius-lg: 12px;
    --bs-card-border-color: #e2e8f0;
}

/* ── Override de buttons Bootstrap ── */
.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37,99,235,.35);
}

.btn-outline-primary {
    color: #2563eb;
    border-color: #2563eb;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* ── Override de cards Bootstrap ── */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.card-title {
    font-weight: 700;
    color: #1e293b;
}

/* ── Override de form controls ── */
.form-control,
.form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: .9rem;
    padding: .55rem .9rem;
    color: #1e293b;
    background-color: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-control::placeholder {
    color: #94a3b8;
}

/* ── Override de list-group Bootstrap ── */
.list-group-item {
    border-color: #e2e8f0;
    color: #1e293b;
    padding: .65rem 1rem;
    transition: background .15s ease;
}

.list-group-item:hover {
    background: #eff6ff;
}

.list-group-item a {
    color: #2563eb;
}

.list-group-item a:hover {
    text-decoration: none;
    color: #1d4ed8;
}

/* ── Override de tabelas Bootstrap ── */
.table {
    font-size: .875rem;
    color: #1e293b;
}

.table thead th {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    border-bottom: 2px solid #bfdbfe;
    padding: .7rem 1rem;
    white-space: nowrap;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table td {
    padding: .65rem 1rem;
    vertical-align: middle;
}

/* ── Override de alerts Bootstrap ── */
.alert {
    border-radius: 8px;
    font-size: .875rem;
}

/* ── Inputs e botões dentro de tabelas admin (inline) ── */
.table form {
    display: inline-flex;
    gap: .3rem;
    margin: 0;
}

.table .form-select {
    font-size: .78rem;
    padding: .25rem .5rem;
    height: auto;
    min-width: 90px;
}

.table input[type="password"] {
    font-size: .78rem;
    padding: .25rem .5rem;
    height: auto;
    max-width: 120px;
}

/* ── Imagem biblioteca na hero ── */
.hero-img {
    max-width: 420px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.07);
    margin-bottom: 1.5rem;
}

/* ── Artigo: conteúdo dinâmico vindo do HTML salvo ── */
.article-body h1 { font-size: 1.75rem; border-bottom: 2px solid #e2e8f0; padding-bottom: .5rem; }
.article-body h2 { font-size: 1.35rem; color: #2563eb; margin-top: 1.5rem; }
.article-body h3 { font-size: 1.1rem; margin-top: 1.25rem; }
.article-body p  { text-align: justify; line-height: 1.75; }
.article-body ul,
.article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: .3rem; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    margin: 1rem 0;
}
.article-body table th {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    padding: .6rem .9rem;
    border: 1px solid #bfdbfe;
}
.article-body table td {
    padding: .55rem .9rem;
    border: 1px solid #e2e8f0;
}
.article-body table tr:nth-child(even) td {
    background: #f8fafc;
}
.article-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: .75rem 0;
}
.article-body blockquote {
    border-left: 4px solid #2563eb;
    padding: .5rem 1rem;
    background: #eff6ff;
    border-radius: 0 8px 8px 0;
    color: #1e40af;
    margin: 1rem 0;
    font-style: italic;
}

/* ── Seção de referências / links no artigo ── */
.article-refs {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-size: .83rem;
    color: #64748b;
    line-height: 1.7;
    margin-top: 1.5rem;
}

.article-refs h3 {
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #94a3b8;
    margin-bottom: .5rem;
}

/* ── Comentários  ── */
.comment-item {
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 0 8px 8px 0;
    padding: .6rem 1rem;
    margin-bottom: .5rem;
    font-size: .875rem;
    color: #1e293b;
}

/* ── Página de Login/Cadastro centralizada ── */
.auth-wrapper {
    min-height: calc(100vh - var(--topbar-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.07);
    padding: 2.25rem 2rem;
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card .auth-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: .5rem;
}

.auth-card h2 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

/* ── Print styles ── */
@media print {
    .wikera-topbar,
    .wikera-sidebar,
    .wikera-footer,
    .sidebar-toggle-btn,
    form { display: none !important; }

    .wikera-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}
