/* ============================================
   CDA - Clube da Decoração e Arquitetura
   CSS Base — Bootstrap 5.3 + Custom
   ============================================ */

/* --- Variáveis CSS --- */
:root {
    --primary: #b8860b;
    --primary-dark: #996f0a;
    --primary-light: #d4a017;
    --primary-rgb: 184, 134, 11;
    --secondary: #6c757d;
    --success: #2dc653;
    --danger: #ef233c;
    --warning: #ff9f1c;
    --info: #4cc9f0;
    --bg-body: #f8f9fa;
    --bg-sidebar: #1a1d2e;
    --bg-sidebar-hover: #2a2d3e;
    --bg-card: #ffffff;
    --text-primary: #212529;
    --text-muted: #6c757d;
    --text-sidebar: #a0a4b8;
    --text-sidebar-active: #ffffff;
    --border-color: #e9ecef;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.12);
    --radius: 0.5rem;
    --radius-sm: 0.375rem;
    --radius-lg: 0.75rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s ease;

    /* Bootstrap primary override */
    --bs-primary: #b8860b;
    --bs-primary-rgb: 184, 134, 11;
    --bs-link-color: #b8860b;
    --bs-link-hover-color: #996f0a;
    --bs-link-color-rgb: 184, 134, 11;
}

/* --- Reset & Base --- */
* {
    font-family: var(--font-family);
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* --- Sidebar --- */
#sidebar-wrapper {
    height: 100vh;
    width: 260px;
    background: var(--bg-sidebar);
    transition: width 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-x: hidden;
    overflow-y: auto;
}

#sidebar-wrapper.collapsed {
    width: 70px;
}

#sidebar-wrapper .sidebar-brand {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#sidebar-wrapper .sidebar-brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

#sidebar-wrapper .sidebar-brand h5 {
    color: #fff;
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
    white-space: nowrap;
}

#sidebar-wrapper.collapsed .sidebar-brand h5,
#sidebar-wrapper.collapsed .sidebar-text {
    display: none;
}

#sidebar-wrapper .nav-link {
    color: var(--text-sidebar);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
    white-space: nowrap;
}

#sidebar-wrapper .nav-link:hover {
    color: var(--text-sidebar-active);
    background: var(--bg-sidebar-hover);
}

#sidebar-wrapper .nav-link.active {
    color: var(--text-sidebar-active);
    background: var(--bg-sidebar-hover);
    border-left-color: var(--primary);
    font-weight: 500;
}

#sidebar-wrapper .nav-link i {
    font-size: 1.15rem;
    min-width: 24px;
    text-align: center;
}

#sidebar-wrapper .sidebar-section {
    padding: 1rem 1rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
}

#sidebar-wrapper.collapsed .sidebar-section {
    display: none;
}

/* --- Page Content --- */
#page-content-wrapper {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#page-content-wrapper.expanded {
    margin-left: 70px;
}

/* --- Navbar --- */
.navbar-custom {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-custom .btn-sidebar-toggle {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.navbar-custom .btn-sidebar-toggle:hover {
    color: var(--primary);
}

.navbar-custom .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-custom .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

/* --- Navbar Pública --- */
.navbar-public {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(28, 22, 13, 0.08);
    box-shadow: none;
    padding: 0.45rem 0;
    transition: padding 0.25s ease;
}

.navbar-public .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    margin-right: 0;
    position: relative;
    display: block;
}

/* Caixa comum para as duas logos. As proporções diferem (126x80 e 363x202),
   então sem largura fixa a marca mudaria de tamanho na troca. */
.navbar-public .navbar-logo {
    display: block;
    height: 60px;
    width: 108px;
    object-fit: contain;
    object-position: left center;
    transition: opacity 0.3s ease;
}

.navbar-public .navbar-logo-light {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

/* ---- Menu sobre a imagem (só em páginas com abertura escura) ---- */

.navbar-public.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease,
                border-color 0.3s ease, padding 0.25s ease;
}

/* Véu de contraste. As aberturas escurecem de baixo para cima, então o topo —
   exatamente onde o menu fica — é a parte mais clara da foto. Sem isto os itens
   brancos somem sobre um teto claro ou uma parede iluminada. */
.navbar-public.navbar-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(12, 10, 7, 0.55) 0%,
        rgba(12, 10, 7, 0.30) 55%,
        rgba(12, 10, 7, 0) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Mantém logo e itens acima do véu */
.navbar-public.navbar-overlay > .container {
    position: relative;
    z-index: 1;
}

.navbar-public.navbar-overlay.is-solid::before {
    opacity: 0;
}

.navbar-public.navbar-overlay .navbar-logo-dark {
    opacity: 0;
}

.navbar-public.navbar-overlay .navbar-logo-light {
    opacity: 1;
}

.navbar-public.navbar-overlay .nav-link,
.navbar-public.navbar-overlay .navbar-link-signup {
    color: rgba(255, 255, 255, 0.88);
}

.navbar-public.navbar-overlay .nav-link:hover,
.navbar-public.navbar-overlay .nav-link.active,
.navbar-public.navbar-overlay .navbar-link-signup:hover {
    color: #ffffff;
}

.navbar-public.navbar-overlay .nav-link::after {
    background: #ffffff;
}

.navbar-public.navbar-overlay .navbar-btn-primary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.navbar-public.navbar-overlay .navbar-btn-primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #1c160d;
}

.navbar-public.navbar-overlay .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-public.navbar-overlay .navbar-toggler-icon {
    filter: invert(1) brightness(2);
}

/* Rolou a página (ou abriu o menu no celular): volta ao menu sólido de sempre */
.navbar-public.navbar-overlay.is-solid {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: rgba(28, 22, 13, 0.08);
}

.navbar-public.navbar-overlay.is-solid .navbar-logo-dark { opacity: 1; }
.navbar-public.navbar-overlay.is-solid .navbar-logo-light { opacity: 0; }

.navbar-public.navbar-overlay.is-solid .nav-link,
.navbar-public.navbar-overlay.is-solid .navbar-link-signup {
    color: #4a4335;
}

.navbar-public.navbar-overlay.is-solid .nav-link:hover,
.navbar-public.navbar-overlay.is-solid .nav-link.active,
.navbar-public.navbar-overlay.is-solid .navbar-link-signup:hover {
    color: #1c160d;
}

.navbar-public.navbar-overlay.is-solid .nav-link::after {
    background: var(--primary);
}

.navbar-public.navbar-overlay.is-solid .navbar-btn-primary {
    background: #1c160d;
    border-color: #1c160d;
    color: #f5e9cf;
}

.navbar-public.navbar-overlay.is-solid .navbar-btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #1d1606;
}

.navbar-public.navbar-overlay.is-solid .navbar-toggler {
    border-color: rgba(28, 22, 13, 0.2);
}

.navbar-public.navbar-overlay.is-solid .navbar-toggler-icon {
    filter: none;
}

.navbar-public .navbar-nav {
    gap: 1.05rem;
}

.navbar-public .nav-link {
    position: relative;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #4a4335;
    padding: 0.5rem 0;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.navbar-public .nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.navbar-public .nav-link:hover,
.navbar-public .nav-link.active {
    color: #1c160d;
}

.navbar-public .nav-link:hover::after,
.navbar-public .nav-link.active::after {
    width: 100%;
}

.navbar-public .navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.navbar-public .navbar-link-signup {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a4335;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.navbar-public .navbar-link-signup:hover {
    color: #1c160d;
}

.navbar-public .navbar-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.15rem;
    border-radius: 999px;
    background: #1c160d;
    border: 1px solid #1c160d;
    color: #f5e9cf;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.navbar-public .navbar-btn-primary i {
    font-size: 0.85em;
}

.navbar-public .navbar-btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #1d1606;
}

@media (min-width: 992px) {
    .navbar-public .container {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        column-gap: 1.1rem;
    }

    .navbar-public .navbar-collapse {
        display: contents !important;
    }

    .navbar-public .navbar-nav {
        justify-content: center;
    }

    .navbar-public .navbar-actions {
        justify-self: end;
    }
}

/* --- Cards Modernos --- */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: var(--bg-card);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* --- Stats Cards (Dashboard) --- */
.stat-card {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Tabelas Modernas --- */
.table-modern {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-modern thead th {
    background: var(--bg-body);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table-modern tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

.table-modern tbody tr:hover {
    background: rgba(184, 134, 11, 0.04);
}

/* --- Badges de Status --- */
.badge-status {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: capitalize;
}

.badge-ativo {
    background: rgba(45, 198, 83, 0.15);
    color: #1a9e3f;
}

.badge-inativo {
    background: rgba(239, 35, 60, 0.15);
    color: #d41e35;
}

.badge-pendente {
    background: rgba(255, 159, 28, 0.15);
    color: #cc7f16;
}

.badge-aprovado {
    background: rgba(45, 198, 83, 0.15);
    color: #1a9e3f;
}

.badge-rejeitado {
    background: rgba(239, 35, 60, 0.15);
    color: #d41e35;
}

.badge-expirado {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
}

/* --- Botões --- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Bootstrap text/bg primary overrides */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

/* --- Formulários --- */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(184, 134, 11, 0.15);
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-muted);
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

/* --- Footer --- */
.footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

/* --- Footer Público --- */
.footer-public {
    background: linear-gradient(180deg, #16120d 0%, #1f1810 100%);
    color: rgba(255, 248, 235, 0.62);
    padding: 5.5rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
    .footer-grid { grid-template-columns: repeat(5, 1fr); gap: 2rem; }
}

.footer-brand {
    display: inline-flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
    text-decoration: none;
}

/* Logo branca do rodapé. O arquivo tem 363x202: exibir a ~160px mantém a
   nitidez em telas retina. A altura vem por auto para não distorcer. */
.footer-brand-logo {
    display: block;
    width: 160px;
    height: auto;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.footer-brand:hover .footer-brand-logo {
    opacity: 1;
}

.footer-about {
    max-width: 320px;
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(255, 248, 235, 0.58);
    margin-bottom: 1.75rem;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 248, 235, 0.14);
    color: rgba(255, 248, 235, 0.75);
    transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease;
}

.footer-social-link:hover {
    border-color: rgba(240, 203, 115, 0.5);
    color: #f0cb73;
    background: rgba(240, 203, 115, 0.08);
}

.footer-heading {
    display: block;
    margin-bottom: 1.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #d9a748;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.15rem;
}

.footer-links a {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.82rem;
    color: rgba(255, 248, 235, 0.62);
    text-decoration: none;
    transition: color 0.25s ease;
}

.footer-links a:hover {
    color: #fff8eb;
}

.footer-links a i {
    font-size: 0.75em;
    margin-left: 0.35rem;
    opacity: 0.7;
}

.footer-contact-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: rgba(255, 248, 235, 0.75);
    text-decoration: none;
    margin-bottom: 0.85rem;
    transition: color 0.25s ease;
}

.footer-contact-line:hover {
    color: #f0cb73;
}

.footer-contact-line i {
    color: #d9a748;
    font-size: 0.95em;
}

.footer-contact-muted {
    color: rgba(255, 248, 235, 0.55);
}

.footer-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(240, 203, 115, 0.35);
    color: #f0cb73;
    font-size: 0.68rem;
    font-weight: 500;
}

.footer-status-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #d9a748;
    animation: footer-status-pulse 1.8s ease-in-out infinite;
}

@keyframes footer-status-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.footer-public .footer-bottom {
    border-top: 1px solid rgba(255, 248, 235, 0.1);
    padding-top: 1.75rem;
    margin-top: 4rem;
    font-size: 0.75rem;
    color: rgba(255, 248, 235, 0.42);
}

.footer-bottom-tagline {
    color: rgba(255, 248, 235, 0.42);
}

.footer-scrolltop-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(240, 203, 115, 0.3);
    color: #f0cb73;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.footer-scrolltop-btn:hover {
    background: #d9a748;
    border-color: #d9a748;
    color: #16120d;
}

/* --- Hero Section --- */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 4rem 0;
    color: #fff;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Notícia Card --- */
.noticia-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-card);
}

.noticia-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.noticia-card .noticia-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.noticia-card .noticia-body {
    padding: 1.25rem;
}

.noticia-card .noticia-data {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.noticia-card .noticia-titulo {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.noticia-card .noticia-resumo {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* --- Notícia Detalhe --- */
.news-detail-card {
    max-width: 980px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.news-detail-hero {
    margin-bottom: 1.85rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.news-detail-cover {
    margin: 0;
}

.news-detail-cover img {
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius);
}

.news-detail-head {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
    gap: 0.8rem;
}

.news-detail-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-dark);
    background: rgba(var(--primary-rgb), 0.12);
}

.news-detail-title {
    font-size: clamp(1.9rem, 3vw, 3.1rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0;
    word-break: break-word;
}

.news-detail-date {
    font-size: 0.92rem;
    color: var(--text-muted);
}

.news-detail-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.news-detail-content {
    font-size: 1.08rem;
    line-height: 1.9;
    color: var(--text-primary);
    max-width: 100%;
    text-align: justify;
    text-justify: inter-word;
}

.news-detail-content p,
.news-detail-content div,
.news-detail-content ul,
.news-detail-content ol {
    margin-bottom: 1.1rem;
}

.news-detail-content a {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.news-detail-content img,
.news-detail-content table {
    max-width: 100%;
    height: auto;
}

.news-share {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1.25rem;
}

.news-detail-footer {
    margin-top: 1rem;
}

.news-gallery-item {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.news-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.news-lightbox.is-open {
    display: flex;
}

.news-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(0, 0, 0, 0.86);
}

.news-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 1200px);
    display: grid;
    grid-template-columns: 52px 1fr 52px;
    align-items: center;
    gap: 1rem;
}

.news-lightbox__figure {
    background: #111;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.news-lightbox__image {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    background: #111;
}

.news-lightbox__caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: #f8f9fa;
    font-size: 0.92rem;
    background: #1a1a1a;
}

.news-lightbox__counter {
    color: #adb5bd;
    white-space: nowrap;
}

.news-lightbox__nav,
.news-lightbox__close {
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    width: 52px;
    height: 52px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.news-lightbox__nav:hover,
.news-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.news-lightbox__close {
    position: absolute;
    top: -0.75rem;
    right: -0.75rem;
    z-index: 2;
}

.news-lightbox-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .news-detail-card {
        padding: 1.35rem;
    }

    .news-detail-cover img {
        max-height: 260px;
    }

    .news-detail-content {
        max-width: 100%;
    }

    .news-detail-footer {
        text-align: start !important;
    }

    .news-lightbox__dialog {
        width: min(96vw, 900px);
        grid-template-columns: 40px 1fr 40px;
        gap: 0.45rem;
    }

    .news-lightbox__nav,
    .news-lightbox__close {
        width: 40px;
        height: 40px;
    }

    .news-lightbox__close {
        top: -0.45rem;
        right: -0.2rem;
    }

    .news-lightbox__caption {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Login Page --- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1d2e 0%, #2d3154 100%);
}

.login-card {
    width: 100%;
    max-width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card .login-logo h2 {
    font-weight: 700;
    color: var(--primary);
}

/* --- Alerts / Toast container --- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

/* --- Loading Overlay --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

/* --- Paginação --- */
.pagination .page-link {
    color: var(--primary);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .page-link:hover {
    color: var(--primary-dark);
    background: rgba(184, 134, 11, 0.08);
}

/* --- Galeria de Fotos --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item .gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* --- DataTables Override --- */
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.5rem;
}

/* --- Utilitários --- */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-soft { background: rgba(184, 134, 11, 0.1) !important; }
.bg-success-soft { background: rgba(45, 198, 83, 0.1) !important; }
.bg-danger-soft { background: rgba(239, 35, 60, 0.1) !important; }
.bg-warning-soft { background: rgba(255, 159, 28, 0.1) !important; }
.bg-info-soft { background: rgba(76, 201, 240, 0.1) !important; }

.rounded-custom { border-radius: var(--radius) !important; }
.shadow-custom { box-shadow: var(--shadow) !important; }

/* --- Responsividade --- */
@media (max-width: 992px) {
    #sidebar-wrapper {
        width: 0;
        overflow: hidden;
    }

    #sidebar-wrapper.show {
        width: 260px;
    }

    #page-content-wrapper {
        margin-left: 0 !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.35rem;
    }

    .hero-section {
        padding: 2.5rem 0;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.85rem;
    }
}

/* --- Page Header Interno CDA --- */
.page-header-cda {
    background: linear-gradient(135deg, #120e0a 0%, #221a10 100%) !important;
    position: relative;
    overflow: hidden;
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
    border-bottom: 1px solid rgba(184, 134, 11, 0.15) !important;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.page-header-cda .container {
    position: relative;
    z-index: 1;
}

.page-header-cda::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(184, 134, 11, 0.08) 0%, rgba(0,0,0,0) 70%);
    pointer-events: none;
}

.page-header-cda::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(184, 134, 11, 0.3) 50%, transparent 100%);
}

.page-header-cda h1 {
    font-size: clamp(2rem, 4vw, 2.75rem) !important;
    letter-spacing: -0.02em;
    font-weight: 700 !important;
    margin-bottom: 0.75rem !important;
    background: linear-gradient(to right, #ffffff 0%, #f3ede2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header-cda .breadcrumb {
    font-size: 0.85rem !important;
    font-weight: 500;
}

.page-header-cda .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.55) !important;
    transition: color 0.3s ease;
}

.page-header-cda .breadcrumb-item a:hover {
    color: var(--primary) !important;
}

.page-header-cda .breadcrumb-item.active {
    color: #fff !important;
}

.page-header-cda .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.25) !important;
    content: "/" !important;
    font-weight: 300;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* --- Paginação Premium CDA --- */
.pagination {
    gap: 0.45rem;
}

.pagination .page-item {
    border: none;
}

.pagination .page-link {
    border: 1px solid rgba(184, 134, 11, 0.15) !important;
    background-color: #ffffff !important;
    color: #4b5563 !important;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.015);
}

.pagination .page-link:hover {
    background-color: rgba(184, 134, 11, 0.08) !important;
    border-color: rgba(184, 134, 11, 0.4) !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(184, 134, 11, 0.08) !important;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #b8860b 0%, #8b6508 100%) !important;
    border-color: #8b6508 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 15px rgba(184, 134, 11, 0.25) !important;
}

.pagination .page-item.disabled .page-link {
    background-color: #f3f4f6 !important;
    border-color: #e5e7eb !important;
    color: #9ca3af !important;
    opacity: 0.6;
    box-shadow: none;
    transform: none !important;
}

/* --- Scroll Reveal --- */
.js-reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1.3s cubic-bezier(0.22, 1, 0.36, 1), transform 1.3s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.js-reveal-ready [data-reveal="left"] {
    transform: translateX(-22px);
}

.js-reveal-ready [data-reveal="right"] {
    transform: translateX(22px);
}

[data-reveal].is-revealed {
    opacity: 1 !important;
    transform: translate(0, 0) !important;
}

/* No mobile as colunas ocupam a largura toda: um deslocamento horizontal
   deixaria a página rolável lateralmente até o elemento ser revelado. */
@media (max-width: 991.98px) {
    .js-reveal-ready [data-reveal="left"],
    .js-reveal-ready [data-reveal="right"] {
        transform: translateY(16px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal-ready [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* --- Form Controls CDA (cadastro, contato) --- */
.cad-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 576px) {
    .cad-grid-2 { grid-template-columns: repeat(2, 1fr); }
    .cad-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .cad-col-span-2 { grid-column: span 2; }
}

.cad-label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--ed-soft, #5c5648);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cad-label-hint {
    color: var(--ed-muted, #9a9284);
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: none;
}

.cad-input {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--ed-bone, #f7f5f0);
    border: 1px solid rgba(22, 19, 15, 0.14);
    border-radius: 0;
    color: var(--ed-ink, #16130f);
    font-size: 0.92rem;
    font-weight: 300;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.cad-input::placeholder { color: var(--ed-muted, #9a9284); }

.cad-input:focus {
    outline: none;
    background: #fff;
    border-color: var(--ed-copper, #b8860b);
}

.cad-select { cursor: pointer; }

.cad-cep-wrap { max-width: 260px; position: relative; }

/* Captcha */
.cad-captcha-box {
    padding: 1.25rem;
    margin-top: 0.5rem;
    background: var(--ed-bone-warm, #e8e3d8);
    border: 0;
    border-radius: 0;
}

.cad-captcha-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    color: var(--ed-copper-dark, #8a6508);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cad-captcha-head a {
    color: var(--ed-copper-dark, #8a6508);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-decoration: none;
    text-transform: none;
}

.cad-captcha-head a:hover { color: var(--primary); }

.cad-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cad-captcha-question {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 0;
    border-radius: 0;
    color: var(--ed-ink, #16130f);
    font-family: var(--ed-mono);
    font-size: 0.8rem;
    white-space: nowrap;
}

.cad-captcha-question strong { color: var(--ed-copper-dark, #8a6508); font-weight: 500; }

.cad-captcha-input { flex: 1 1 0; min-width: 0; }

.cad-captcha-error {
    color: #dc3545;
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 0.5rem;
    margin-bottom: 0;
    display: none;
}

/* ============================================================
   Linguagem Editorial CDA (.ed-*)
   Camada compartilhada entre as páginas públicas modernizadas.
   ============================================================ */
:root {
    --ed-bone: #f7f5f0;
    --ed-bone-deep: #efebe2;
    --ed-bone-warm: #e8e3d8;
    --ed-ink: #16130f;
    --ed-soft: #5c5648;
    --ed-muted: #9a9284;
    --ed-copper: #b8860b;
    --ed-copper-dark: #8a6508;
    --ed-copper-light: #d9ab3d;
    --ed-serif: 'Cormorant Garamond', Georgia, serif;
    --ed-mono: 'DM Mono', 'SFMono-Regular', Menlo, monospace;
}

/* --- Elementos de linguagem --- */
.ed-eyebrow {
    display: flex;
    align-items: center;
    margin: 0 0 1.5rem;
    color: var(--ed-copper-dark);
    font-family: var(--ed-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ed-eyebrow i {
    display: inline-block;
    width: 42px;
    height: 1px;
    margin-left: 1rem;
    background: var(--ed-copper);
    opacity: 0.75;
    flex: none;
}

.ed-eyebrow-light {
    color: var(--ed-copper-light);
}

.ed-eyebrow-light i {
    background: var(--ed-copper-light);
}

.ed-number {
    color: var(--ed-copper);
    font-family: var(--ed-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    white-space: nowrap;
}

.ed-number span {
    color: var(--ed-muted);
}

.ed-title {
    margin: 0;
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    font-weight: 400;
    line-height: 0.96;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.ed-title-sm {
    font-size: clamp(2.1rem, 3.8vw, 3.4rem);
    line-height: 1.02;
}

.ed-lead {
    margin: 2rem 0 0;
    color: var(--ed-soft);
    font-size: 1.02rem;
    font-weight: 300;
    line-height: 1.85;
}

.ed-lead + .ed-lead {
    margin-top: 1.4rem;
}

.ed-lead-accent {
    color: var(--ed-copper-dark);
    font-family: var(--ed-serif);
    font-size: 1.45rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
}

/* --- Botões --- */
.ed-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.95rem;
    padding: 1.05rem 1.75rem;
    border: 1px solid transparent;
    border-radius: 0;
    font-family: var(--ed-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.ed-btn i {
    font-size: 1em;
    transition: transform 0.35s ease;
}

/* só as setas se deslocam no hover; ícones ilustrativos ficam parados */
.ed-btn:hover i[class*="bi-arrow"] {
    transform: translate(3px, -3px);
}

.ed-btn-copper {
    background: var(--ed-copper);
    border-color: var(--ed-copper);
    color: #fff;
}

.ed-btn-copper:hover {
    background: var(--ed-copper-dark);
    border-color: var(--ed-copper-dark);
    color: #fff;
}

.ed-btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.ed-btn-ghost:hover {
    background: #fff;
    border-color: #fff;
    color: var(--ed-ink);
}

.ed-btn-outline {
    background: transparent;
    border-color: rgba(22, 19, 15, 0.25);
    color: var(--ed-ink);
}

.ed-btn-outline:hover {
    background: var(--ed-ink);
    border-color: var(--ed-ink);
    color: #f7f5f0;
}

.ed-btn-light {
    background: transparent;
    border-color: rgba(247, 245, 240, 0.38);
    color: #f7f5f0;
}

.ed-btn-light:hover {
    background: #f7f5f0;
    border-color: #f7f5f0;
    color: var(--ed-ink);
}

.ed-link {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--ed-copper);
    color: var(--ed-copper-dark);
    font-family: var(--ed-mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.ed-link i {
    font-size: 1.05em;
    transition: transform 0.35s ease;
}

.ed-link:hover {
    color: var(--ed-ink);
    border-color: var(--ed-ink);
}

.ed-link:hover i {
    transform: translate(3px, -3px);
}

/* --- Estrutura das seções --- */
.ed-section {
    position: relative;
    padding: 7.5rem 0;
}

.ed-section-bone { background: var(--ed-bone); }
.ed-section-deep { background: var(--ed-bone-deep); }
.ed-section-warm { background: var(--ed-bone-warm); }

.ed-heading {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 3.5rem;
    margin-bottom: 4.5rem;
}

.ed-heading-inline {
    grid-template-columns: 1fr 2fr 1fr;
    align-items: end;
}

.ed-heading-solo {
    display: block;
    margin-bottom: 2.5rem;
}

.ed-heading-link {
    justify-self: end;
}

.ed-section-action {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

/* --- Mídia --- */
.ed-media {
    position: relative;
    overflow: hidden;
    background: var(--ed-bone-warm);
}

.ed-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.92);
}

.ed-media-portrait { aspect-ratio: 4 / 5; }
.ed-media-landscape { aspect-ratio: 4 / 3; }

/* --- Abertura de página interna --- */
.ed-page-intro {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: min(62vh, 560px);
    overflow: hidden;
    background: var(--ed-ink);
}

.ed-page-intro .page-header-bg {
    opacity: 1;
    filter: saturate(0.6) contrast(1.05);
}

.ed-page-intro-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 13, 10, 0.9) 0%, rgba(15, 13, 10, 0.55) 50%, rgba(15, 13, 10, 0.25) 100%),
        linear-gradient(0deg, rgba(15, 13, 10, 0.85) 0%, rgba(15, 13, 10, 0) 65%);
    pointer-events: none;
}

.ed-page-intro-inner {
    position: relative;
    z-index: 1;
    padding-top: 6rem;
    padding-bottom: 4.5rem;
}

.ed-page-intro-title {
    margin: 0 0 1.35rem;
    color: #fff;
    font-family: var(--ed-serif);
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.035em;
}

.ed-page-intro-text {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.04rem;
    font-weight: 300;
    line-height: 1.8;
}

.ed-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 2.5rem;
    padding: 0;
    list-style: none;
    font-family: var(--ed-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ed-crumb li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
}

.ed-crumb li + li::before {
    content: '/';
    color: rgba(255, 255, 255, 0.3);
}

.ed-crumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ed-crumb a:hover {
    color: var(--ed-copper-light);
}

.ed-crumb li[aria-current] {
    color: var(--ed-copper-light);
}

/* --- Card de marca associada --- */
.ed-brand-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.75rem 1.35rem 1.5rem;
    background: #fff;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.ed-brand-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 50px rgba(40, 31, 13, 0.12);
}

.ed-brand-index {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.ed-brand-card:hover .ed-brand-index {
    color: var(--ed-copper);
}

.ed-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    margin-bottom: 1.5rem;
}

.ed-brand-logo img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    filter: saturate(0.85);
    transition: filter 0.4s ease;
}

.ed-brand-card:hover .ed-brand-logo img {
    filter: saturate(1);
}

.ed-brand-logo .bi-building {
    color: var(--ed-muted);
    font-size: 2.4rem;
}

.ed-brand-name {
    margin-top: auto;
    color: var(--ed-ink);
    font-family: var(--ed-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    line-height: 1.5;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.ed-brand-card:hover .ed-brand-name {
    color: var(--ed-copper-dark);
}

/* --- Responsivo da camada editorial --- */
@media (max-width: 1199.98px) {
    .ed-heading-inline {
        grid-template-columns: 1fr 3fr;
    }

    .ed-heading-link {
        grid-column: 2;
        justify-self: start;
    }
}

@media (max-width: 991.98px) {
    .ed-section {
        padding: 5.5rem 0;
    }

    .ed-heading,
    .ed-heading-inline {
        display: block;
    }

    .ed-heading .ed-number {
        display: block;
        margin-bottom: 2.5rem;
    }

    .ed-heading-link {
        margin-top: 2rem;
    }

    .ed-page-intro {
        min-height: 440px;
    }

    .ed-page-intro-inner {
        padding-top: 4.5rem;
        padding-bottom: 3.5rem;
    }

    .ed-brand-logo {
        height: 140px;
    }
}

@media (max-width: 767.98px) {
    .ed-section {
        padding: 4.25rem 0;
    }

    .ed-crumb {
        margin-bottom: 2rem;
    }

    .ed-page-intro-title {
        font-size: clamp(2.4rem, 11vw, 3.6rem);
    }

    .ed-brand-card {
        padding: 1.25rem 1rem;
    }

    .ed-brand-logo {
        height: 120px;
    }
}

/* --- Card de notícia (Home e listagem de Notícias) --- */
.ed-news-card {
    background: transparent;
}

.ed-news-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ed-bone-warm);
}

.ed-news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    filter: saturate(0.9);
}

.ed-news-card:hover .ed-news-media img {
    transform: scale(1.05);
}

.ed-news-media-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--ed-muted);
    font-size: 2rem;
}

.ed-news-media-empty span {
    color: var(--ed-copper);
    font-family: var(--ed-serif);
    font-size: 1.75rem;
    letter-spacing: 0.14em;
    opacity: 0.7;
}

.ed-news-index {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    color: #f6f2e9;
    font-family: var(--ed-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 8px rgba(15, 13, 10, 0.6);
}

.ed-news-meta {
    display: block;
    margin: 1.6rem 0 0.9rem;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.ed-news-title {
    margin: 0 0 0.9rem;
    font-family: var(--ed-serif);
    font-size: 1.85rem;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

.ed-news-title a {
    color: var(--ed-ink);
    text-decoration: none;
    transition: color 0.3s ease;
}

.ed-news-title a:hover {
    color: var(--ed-copper-dark);
}

.ed-news-excerpt {
    margin-bottom: 1.5rem;
    color: var(--ed-soft);
    font-size: 0.94rem;
    font-weight: 300;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ed-news-link {
    align-self: flex-start;
}

@media (max-width: 767.98px) {
    .ed-news-title {
        font-size: 1.6rem;
    }
}

/* --- Faixa de CTA escura (Home, Profissionais) --- */
.ed-join {
    background: var(--ed-ink);
    padding: 6.5rem 0;
}

.ed-join-inner {
    display: grid;
    grid-template-columns: 3fr 2fr;
    align-items: end;
    gap: 4rem;
}

.ed-join-title {
    margin: 0 0 1.5rem;
    color: #f7f5f0;
    font-family: var(--ed-serif);
    font-size: clamp(2.3rem, 4.4vw, 4rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.03em;
}

.ed-join-text {
    margin: 0;
    color: rgba(247, 245, 240, 0.72);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.85;
}

.ed-join-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-end;
}

@media (max-width: 991.98px) {
    .ed-join {
        padding: 5rem 0;
    }

    .ed-join-inner {
        display: block;
    }

    .ed-join-actions {
        justify-content: flex-start;
        margin-top: 2.5rem;
    }
}

@media (max-width: 767.98px) {
    .ed-join-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ed-join-actions .ed-btn {
        width: 100%;
    }
}

/* --- Área Restrita (layout de autenticação) --- */
.auth-body {
    background: var(--ed-bone);
}

.auth-main {
    padding: 5.5rem 0;
}

.auth-row {
    box-shadow: 0 30px 70px rgba(40, 31, 13, 0.08);
}

.auth-aside {
    position: relative;
    display: flex;
    align-items: flex-end;
    width: 100%;
    min-height: 540px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.auth-aside-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, rgba(15, 13, 10, 0.92) 0%, rgba(15, 13, 10, 0.15) 70%),
        linear-gradient(90deg, rgba(15, 13, 10, 0.55) 0%, rgba(15, 13, 10, 0.1) 100%);
}

.auth-aside-copy {
    position: relative;
    z-index: 1;
    padding: 3rem 2.75rem;
    color: #f7f5f0;
}

.auth-aside-title {
    margin: 0 0 1rem;
    color: #f7f5f0;
    font-family: var(--ed-serif);
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.03em;
}

.auth-aside-text {
    margin: 0;
    color: rgba(247, 245, 240, 0.72);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.75;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 540px;
    padding: 2.5rem 1.75rem;
    background: #fff;
}

@media (min-width: 576px) {
    .auth-card { padding: 3.5rem; }
}

.auth-logo {
    margin-bottom: 2.5rem;
    text-align: center;
}

.auth-logo img {
    display: block;
    width: auto;
    height: 58px;
    margin: 0 auto;
    object-fit: contain;
}

/* Mensagens de retorno */
.auth-flash {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    background: var(--ed-bone);
    color: var(--ed-ink);
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.6;
    border-left: 3px solid var(--ed-copper);
}

.auth-flash-danger { border-left-color: #c0392b; }
.auth-flash-success { border-left-color: #157347; }
.auth-flash-warning { border-left-color: var(--ed-copper); }

.auth-flash-close {
    flex: none;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ed-muted);
    font-size: 0.75rem;
    transition: color 0.3s ease;
}

.auth-flash-close:hover { color: var(--ed-ink); }

/* Cabeçalho dos formulários de autenticação */
.auth-title {
    margin-bottom: 0.6rem;
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    margin-bottom: 2.5rem;
    color: var(--ed-soft);
    font-size: 0.95rem;
    font-weight: 300;
    line-height: 1.7;
}

.auth-note {
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.75rem;
    background: var(--ed-bone);
    color: var(--ed-soft);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.65;
}

.auth-note strong {
    color: var(--ed-copper-dark);
    font-weight: 400;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-back i { transition: transform 0.35s ease; }
.auth-back:hover { color: var(--ed-ink); }
.auth-back:hover i { transform: translateX(-3px); }

.auth-foot {
    margin: 2.5rem 0 0;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-align: center;
    text-transform: uppercase;
}

.auth-foot a {
    color: var(--ed-copper-dark);
    border-bottom: 1px solid var(--ed-copper);
    text-decoration: none;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.auth-foot a:hover {
    color: var(--ed-ink);
    border-color: var(--ed-ink);
}

@media (max-width: 991.98px) {
    .auth-main { padding: 3.5rem 0; }
    .auth-card { min-height: 0; }
}

/* ============================================================
   Painel da Área Restrita (.cda-ed)
   Escopado pela classe no <body> dos layouts painel.php e admin.php.
   ============================================================ */
.cda-ed {
    background: var(--ed-bone);
    color: var(--ed-ink);
}

/* --- Sidebar --- */
.cda-ed #sidebar-wrapper {
    background: var(--ed-ink);
}

.cda-ed #sidebar-wrapper .sidebar-brand {
    padding: 1.75rem 1rem;
    border-bottom: 0;
}

.cda-ed #sidebar-wrapper .sidebar-section {
    padding: 1.75rem 1.5rem 0.75rem;
    color: rgba(247, 245, 240, 0.35);
    font-family: var(--ed-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.2em;
}

.cda-ed #sidebar-wrapper .nav-link {
    padding: 0.7rem 1.5rem;
    border-left: 2px solid transparent;
    color: rgba(247, 245, 240, 0.62);
    font-family: var(--ed-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.cda-ed #sidebar-wrapper .nav-link:hover {
    background: rgba(247, 245, 240, 0.05);
    color: #f7f5f0;
}

.cda-ed #sidebar-wrapper .nav-link.active {
    background: transparent;
    border-left-color: var(--ed-copper);
    color: var(--ed-copper-light);
    font-weight: 500;
}

.cda-ed #sidebar-wrapper .nav-link i {
    font-size: 1rem;
    min-width: 22px;
}

/* --- Navbar --- */
.cda-ed .navbar-custom {
    padding: 0.85rem 1.5rem;
    background: var(--ed-ink);
    border-bottom: 0;
    box-shadow: none;
}

.cda-ed .navbar-custom .btn-link,
.cda-ed .navbar-custom .dropdown-toggle {
    color: rgba(247, 245, 240, 0.8) !important;
    text-decoration: none;
}

.cda-ed .navbar-custom .btn-link:hover,
.cda-ed .navbar-custom .dropdown-toggle:hover {
    color: #f7f5f0 !important;
}

.cda-ed .navbar-custom .dropdown-toggle span {
    font-family: var(--ed-mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cda-ed .navbar-custom .breadcrumb {
    margin-bottom: 0;
    font-family: var(--ed-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cda-ed .navbar-custom .breadcrumb-item a {
    color: rgba(247, 245, 240, 0.55);
    text-decoration: none;
}

.cda-ed .navbar-custom .breadcrumb-item a:hover { color: var(--ed-copper-light); }
.cda-ed .navbar-custom .breadcrumb-item.active { color: var(--ed-copper-light); }
.cda-ed .navbar-custom .breadcrumb-item + .breadcrumb-item::before { color: rgba(247, 245, 240, 0.3); }

.cda-ed .dropdown-menu {
    border: 0;
    border-radius: 0;
    box-shadow: 0 20px 45px rgba(40, 31, 13, 0.16);
}

.cda-ed .dropdown-item {
    font-size: 0.88rem;
    font-weight: 300;
}

.cda-ed .dropdown-item-text {
    font-family: var(--ed-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* --- Cabeçalho da página --- */
.cda-ed .page-header {
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.cda-ed .page-header h1 {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: clamp(2rem, 3.2vw, 2.9rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

/* o breadcrumb já aparece na navbar; no corpo vira só respiro */
.cda-ed main > nav[aria-label="breadcrumb"] {
    display: none;
}

.cda-ed main.container-fluid {
    padding: 3rem 2.5rem !important;
}

/* --- Cards --- */
.cda-ed .card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.cda-ed .card:hover { box-shadow: none; }

.cda-ed .card-header {
    padding: 1.5rem 1.75rem 0;
    border-bottom: 0;
    background: transparent;
    color: var(--ed-copper-dark);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cda-ed .card-body { padding: 1.75rem; }

/* sem a linha de topo do card-footer do Bootstrap */
.cda-ed .card-footer {
    padding: 0 1.75rem 1.75rem;
    border-top: 0;
    background: transparent;
}

.cda-ed .card-img-top,
.cda-ed .card-img-bottom {
    border-radius: 0;
}

/* listas sem a hairline entre itens — separação por espaçamento */
.cda-ed .list-group-item {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.cda-ed .list-group-item.bg-light {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    background: var(--ed-bone) !important;
}

/* números e subtítulos dentro dos cards em serif, como no resto do site */
.cda-ed .card h3,
.cda-ed .card h4 {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    /* valores financeiros pedem algarismos de altura uniforme */
    font-variant-numeric: lining-nums;
    font-feature-settings: 'lnum' 1;
}

.cda-ed .card h3 { font-size: 2.3rem; }
.cda-ed .card h4 { font-size: 1.9rem; }

.cda-ed .card h6 {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* o card-header é mono/caixa-alta, mas um .card-title dentro dele volta ao serif */
.cda-ed .card-title {
    margin-bottom: 0;
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    text-transform: none;
}

.cda-ed .card-title i {
    margin-right: 0.6rem;
    color: var(--ed-copper);
    font-size: 0.85em;
}

/* tabela colada na borda (card-body.p-0) alinhada com o cabeçalho do card */
.cda-ed .card-body.p-0 .table > :not(caption) > * > *:first-child {
    padding-left: 1.75rem;
}

.cda-ed .card-body.p-0 .table > :not(caption) > * > *:last-child {
    padding-right: 1.75rem;
}

/* --- Stat cards --- */
.cda-ed .stat-card {
    border-radius: 0;
    padding: 2rem 1.75rem;
    background: #fff;
}

.cda-ed .stat-card:hover {
    transform: none;
    box-shadow: none;
}

.cda-ed .stat-card .stat-icon {
    border-radius: 50%;
    border: 1px solid rgba(184, 134, 11, 0.35);
    background: transparent !important;
    color: var(--ed-copper) !important;
    font-size: 1.15rem;
}

.cda-ed .stat-card .stat-value {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: 2.6rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cda-ed .stat-card .stat-label {
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* --- Tabelas --- */
.cda-ed .table {
    color: var(--ed-soft);
    font-size: 0.9rem;
    font-weight: 300;
    --bs-table-bg: transparent;
}

.cda-ed .table > :not(caption) > * > * {
    padding: 1rem 0.85rem;
    background: transparent;
    border-bottom-color: rgba(22, 19, 15, 0.07);
}

.cda-ed .table thead th,
.cda-ed .table-modern thead th {
    background: transparent;
    border-bottom-color: rgba(22, 19, 15, 0.14);
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cda-ed .table tbody tr:hover > * {
    background: var(--ed-bone);
}

.cda-ed .table strong,
.cda-ed .table b {
    color: var(--ed-ink);
    font-weight: 500;
}

/* --- Badges --- */
.cda-ed .badge {
    border-radius: 0;
    padding: 0.4em 0.7em;
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    /* badges com frase (ex.: "72 empresas") em coluna estreita precisam quebrar
       em vez de estourar a linha */
    white-space: normal;
}

.cda-ed .badge-status {
    border-radius: 0;
    font-family: var(--ed-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- Botões --- */
.cda-ed .btn {
    border-radius: 0;
    font-family: var(--ed-mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cda-ed .btn-lg {
    padding: 1rem 1.75rem;
    font-size: 0.68rem;
}

.cda-ed .btn-sm {
    padding: 0.5rem 0.9rem;
    font-size: 0.58rem;
}

.cda-ed .btn-primary {
    background: var(--ed-copper);
    border-color: var(--ed-copper);
    color: #fff;
}

.cda-ed .btn-primary:hover,
.cda-ed .btn-primary:focus,
.cda-ed .btn-primary:active {
    background: var(--ed-copper-dark);
    border-color: var(--ed-copper-dark);
    color: #fff;
}

.cda-ed .btn-outline-primary {
    border-color: rgba(22, 19, 15, 0.25);
    color: var(--ed-ink);
}

.cda-ed .btn-outline-primary:hover,
.cda-ed .btn-outline-primary:focus,
.cda-ed .btn-outline-primary:active {
    background: var(--ed-ink);
    border-color: var(--ed-ink);
    color: #f7f5f0;
}

.cda-ed .btn-icon {
    border-radius: 0;
}

/* --- Formulários --- */
.cda-ed .form-label {
    color: var(--ed-soft);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cda-ed .form-control,
.cda-ed .form-select {
    padding: 0.85rem 1rem;
    background: var(--ed-bone);
    border: 1px solid rgba(22, 19, 15, 0.14);
    border-radius: 0;
    color: var(--ed-ink);
    font-size: 0.92rem;
    font-weight: 300;
}

.cda-ed .form-control:focus,
.cda-ed .form-select:focus {
    background: #fff;
    border-color: var(--ed-copper);
    box-shadow: none;
}

.cda-ed .form-control::placeholder { color: var(--ed-muted); }

.cda-ed .input-group-text {
    background: var(--ed-bone-warm);
    border: 1px solid rgba(22, 19, 15, 0.14);
    border-radius: 0;
    color: var(--ed-muted);
}

.cda-ed .form-text {
    color: var(--ed-muted);
    font-size: 0.78rem;
    font-weight: 300;
}

/* --- Alertas --- */
.cda-ed .alert {
    border: 0;
    border-left: 3px solid var(--ed-copper);
    border-radius: 0;
    background: #fff;
    color: var(--ed-soft);
    font-size: 0.9rem;
    font-weight: 300;
}

.cda-ed .alert-success { border-left-color: #157347; }
.cda-ed .alert-danger { border-left-color: #c0392b; }
.cda-ed .alert-warning { border-left-color: var(--ed-copper); }
.cda-ed .alert-info { border-left-color: var(--ed-copper-light); }

.cda-ed .alert-heading {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: 1.3rem;
    font-weight: 400;
}

/* --- Modais --- */
.cda-ed .modal-content {
    border: 0;
    border-radius: 0;
}

.cda-ed .modal-header,
.cda-ed .modal-footer {
    border-color: rgba(22, 19, 15, 0.1);
}

.cda-ed .modal-title {
    color: var(--ed-ink);
    font-family: var(--ed-serif);
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* --- Paginação --- */
.cda-ed .page-link {
    border-radius: 0;
    font-family: var(--ed-mono);
    font-size: 0.7rem;
}

/* --- Rodapé --- */
.cda-ed .footer {
    background: transparent;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* --- Utilitários herdados do Bootstrap que destoam --- */
.cda-ed .rounded,
.cda-ed .rounded-3,
.cda-ed .rounded-4,
.cda-ed .rounded-pill,
.cda-ed .shadow,
.cda-ed .shadow-sm {
    border-radius: 0 !important;
}

.cda-ed .shadow,
.cda-ed .shadow-sm {
    box-shadow: none !important;
}

.cda-ed .text-muted { color: var(--ed-muted) !important; }

@media (max-width: 991.98px) {
    .cda-ed main.container-fluid {
        padding: 2rem 1.25rem !important;
    }

    .cda-ed .page-header {
        display: block;
        margin-bottom: 1.75rem;
    }

    .cda-ed .page-header h1 {
        margin-bottom: 1rem;
    }
}

/* --- CAS Admin: complementos sobre a camada .cda-ed --- */

/* DataTables */
.cda-ed .dataTables_wrapper .dataTables_filter input,
.cda-ed .dataTables_wrapper .dataTables_length select {
    padding: 0.55rem 0.85rem;
    background: var(--ed-bone);
    border: 1px solid rgba(22, 19, 15, 0.14);
    border-radius: 0;
    color: var(--ed-ink);
    font-size: 0.88rem;
    font-weight: 300;
}

.cda-ed .dataTables_wrapper .dataTables_filter input:focus,
.cda-ed .dataTables_wrapper .dataTables_length select:focus {
    outline: none;
    background: #fff;
    border-color: var(--ed-copper);
    box-shadow: none;
}

.cda-ed .dataTables_wrapper .dataTables_filter,
.cda-ed .dataTables_wrapper .dataTables_length,
.cda-ed .dataTables_wrapper .dataTables_info {
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.cda-ed .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--ed-muted) !important;
    font-family: var(--ed-mono);
    font-size: 0.68rem;
}

.cda-ed .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: transparent !important;
    color: var(--ed-ink) !important;
}

.cda-ed .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.cda-ed .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border: 0 !important;
    background: var(--ed-ink) !important;
    color: #f7f5f0 !important;
}

.cda-ed .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
}

.cda-ed .dt-buttons .btn {
    margin-right: 0.4rem;
}

.cda-ed table.dataTable thead th.sorting,
.cda-ed table.dataTable thead th.sorting_asc,
.cda-ed table.dataTable thead th.sorting_desc {
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Sidebar do CAS: subitens e agrupamentos */
.cda-ed-admin #sidebar-wrapper .nav-link {
    font-size: 0.62rem;
    letter-spacing: 0.08em;
}

.cda-ed-admin #sidebar-wrapper .sidebar-submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.6rem;
}

/* O CAS tem muitos itens de menu: menos respiro entre seções */
.cda-ed-admin #sidebar-wrapper .sidebar-section {
    padding-top: 1.25rem;
}

.cda-ed-admin #sidebar-wrapper .nav-link {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

/* Tabelas densas do admin */
.cda-ed-admin .table > :not(caption) > * > * {
    padding: 0.8rem 0.75rem;
}

/* Os stat cards do dashboard do CAS ficam em col-lg-2 (seis por linha):
   o padding e o corpo de texto padrão não cabem e quebram palavra a palavra. */
.cda-ed .stat-card .card-body {
    padding: 1.5rem 0.85rem;
}

.cda-ed .stat-card h3 {
    font-size: clamp(1.25rem, 1.5vw, 1.9rem);
    line-height: 1.1;
}

.cda-ed .stat-card small {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.7rem;
    line-height: 1.35;
}

.cda-ed .stat-card .stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.5rem;
}

/* Grupos de botões de ação nas listagens */
.cda-ed .btn-group .btn {
    border-radius: 0;
}

/* Abas (relatórios / presidência) */
.cda-ed .nav-tabs {
    border-bottom-color: rgba(22, 19, 15, 0.12);
}

.cda-ed .nav-tabs .nav-link {
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    color: var(--ed-muted);
    font-family: var(--ed-mono);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cda-ed .nav-tabs .nav-link:hover {
    border-bottom-color: rgba(22, 19, 15, 0.25);
    color: var(--ed-ink);
}

.cda-ed .nav-tabs .nav-link.active {
    background: transparent;
    border-bottom-color: var(--ed-copper);
    color: var(--ed-copper-dark);
}

/* Accordion (filtros/agrupamentos) */
.cda-ed .accordion-item {
    border: 0;
    background: transparent;
}

.cda-ed .accordion-button {
    border-radius: 0 !important;
    background: var(--ed-bone);
    box-shadow: none;
    color: var(--ed-ink);
    font-family: var(--ed-mono);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cda-ed .accordion-button:not(.collapsed) {
    background: var(--ed-bone-warm);
    color: var(--ed-copper-dark);
}
