:root {
    /* Color Palette - HUB CPC (baseada na logo) */
    --primary-color: #1e3a5f;          /* Azul índigo - HUB */
    --primary-dark: #152a47;
    --primary-light: #0d9488;          /* Turquesa - CPC */
    --accent-color: #22d3ee;           /* Ciano brilhante - ícone rede */
    --accent-warm: #f59e0b;            /* Laranja dourado - gradiente felino */
    --accent-purple: #7c3aed;          /* Violeta - gradiente felino */

    /* RGB para rgba() */
    --primary-rgb: 30, 58, 95;
    --accent-rgb: 34, 211, 238;

    --bg-body: #f1f5f9;
    --bg-white: #ffffff;
    --bg-sidebar: #ffffff;

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --font-main: 'Outfit', sans-serif;

    /* Border radius moderno */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    position: relative;
    /* Needed for mobile overlay positioning */
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-sidebar) 0%, #f8fafc 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    z-index: 50;
    /* Higher z-index for mobile overlay */
    transition: transform 0.3s ease, width 0.3s ease;
}

.logo-area {
    min-height: 64px;
    height: 160px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
    cursor: pointer;
}
.logo-area .sidebar-logo,
.logo-area img {
    width: 160px;
    max-width: 160px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    flex-shrink: 0;
}

.user-profile-mini {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    font-weight: 600;
}
.avatar .avatar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.user-profile-mini .info {
    display: flex;
    flex-direction: column;
}

.user-profile-mini .info strong {
    font-size: 0.9rem;
}

.user-profile-mini .info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.5rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.nav-section-title {
    padding: 1rem 1rem 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    position: relative;
}

.nav-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1rem;
    text-align: center;
}

.nav-item:hover {
    background-color: rgba(var(--primary-rgb), 0.06);
    color: var(--primary-color);
}

.nav-item.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.nav-item.has-submenu {
    cursor: pointer;
}

.nav-item.has-submenu .nav-chevron {
    margin-left: auto;
    transition: transform 0.2s;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-item.has-submenu.expanded .nav-chevron {
    transform: rotate(90deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 0.5rem;
}

.nav-submenu.expanded {
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.nav-submenu.expanded::-webkit-scrollbar {
    width: 4px;
}
.nav-submenu.expanded::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

.nav-subitem {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    position: relative;
}

.nav-subitem i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    text-align: center;
}

.nav-subitem:hover {
    background-color: rgba(var(--primary-rgb), 0.06);
    color: var(--primary-color);
}

.nav-subitem.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-left: auto;
    background-color: var(--border-color);
}

.status-dot.healthy {
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-link {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-link.logout:hover {
    color: var(--danger);
}

/* Botão recolher/expandir menu lateral */
.sidebar-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.sidebar-collapse-toggle:hover {
    background-color: rgba(var(--primary-rgb), 0.06);
    color: var(--primary-color);
}
.sidebar-collapse-toggle i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar recolhido: mais espaço útil para o conteúdo */
.sidebar.collapsed {
    width: 72px;
    min-width: 72px;
}
.sidebar.collapsed .logo-area {
    justify-content: center;
    padding: 0 0.5rem;
}
.sidebar.collapsed .logo-area span {
    display: none;
}
.sidebar.collapsed .logo-area .sidebar-logo,
.sidebar.collapsed .logo-area img {
    width: auto;
    max-width: 48px;
    max-height: 36px;
}
/* Logo na tela de login */
.login-logo img,
.login-logo-img {
    width: 160px;
    max-width: 160px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.sidebar.collapsed .user-profile-mini {
    flex-direction: column;
    padding: 0.75rem 0.5rem;
    align-items: center;
}
.sidebar.collapsed .user-profile-mini .info {
    display: none;
}
.sidebar.collapsed .sidebar-nav .nav-item span,
.sidebar.collapsed .sidebar-nav .nav-chevron,
.sidebar.collapsed .sidebar-nav .nav-section-title + .nav-item span {
    display: none;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem;
}
.sidebar.collapsed .nav-item i {
    margin-right: 0;
}
.sidebar.collapsed .nav-section-title {
    font-size: 0;
    padding: 0.5rem;
    margin: 0;
    line-height: 0;
}
.sidebar.collapsed .nav-section-title::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--border-color);
    margin: 0.25rem 0;
}
.sidebar.collapsed .nav-submenu {
    display: none !important;
}
.sidebar.collapsed .nav-item.has-submenu .nav-chevron {
    display: none;
}
.sidebar.collapsed .sidebar-footer {
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.sidebar.collapsed .footer-link {
    justify-content: center;
    padding: 0.5rem;
    font-size: 0;
}
.sidebar.collapsed .footer-link i {
    font-size: 1rem;
}
.sidebar.collapsed .sidebar-collapse-toggle {
    justify-content: center;
    padding: 0.5rem;
}
.sidebar.collapsed .sidebar-collapse-toggle span {
    display: none;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg-body);
    width: 100%;
    min-width: 0; /* Permite encolhimento em flex para não cortar o header */
}

.top-header {
    height: 64px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    gap: 1rem;
    min-width: 0; /* Permite encolhimento correto em flex */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 0;
    min-width: 0; /* Crítico: permite que o flex item encolha abaixo do conteúdo */
    overflow: hidden;
}

/* Mobile Toggle Button */
.mobile-only {
    display: none;
}

/* Botão do menu sempre visível em todas as páginas: no desktop recolhe/expande a sidebar; no mobile abre o drawer */
#sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: var(--bg-body);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    width: 380px;
    max-width: 100%;
    transition: box-shadow 0.2s;
}

.search-bar:focus-within {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
    background-color: var(--bg-white);
}

.search-bar i {
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0; /* Nunca encolher - ícones sempre visíveis */
}

/* Grupo de ações (ícones) - prioridade máxima em todas as resoluções */
.header-right .icon-btn {
    flex-shrink: 0;
}

.top-nav {
    display: flex;
    gap: 1.5rem;
    margin-right: 1rem;
}

.top-nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s;
    white-space: nowrap;
    /* Prevent line break */
}

.top-nav a:hover,
.top-nav a.active {
    color: var(--primary-color);
}

.top-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -21px;
    /* Adjust based on header height vertical align */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border: none;
    background: transparent;
}

.icon-btn:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.icon-btn .badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

/* Dashboard Content */
.dashboard-container {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.welcome-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    /* Allow wrapping on mobile */
    gap: 1rem;
}

.welcome-text h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.welcome-text p {
    color: var(--text-secondary);
}

.welcome-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0f1f35 100%);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-outline {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: #f9fafb;
    border-color: var(--text-secondary);
}

.widgets-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.card {
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.card-header {
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(var(--primary-rgb), 0.03), transparent);
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.01em;
}

.card-header h3 i {
    color: var(--accent-color);
    font-size: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(var(--accent-rgb), 0.25));
}

.card-header .counter {
    font-size: 0.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--bg-body) 0%, var(--border-color) 100%);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card-header .counter:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mural de Recados: header mais compacto, proporcional aos blocos */
.widget-card.wide .card-header {
    padding: 1rem 1.25rem 0.85rem;
}

.widget-card.wide .card-header h3 {
    font-size: 1rem;
}

.widget-card.wide .card-header .counter {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
}

.widget-card.wide .card-footer {
    padding: 0.65rem 1rem;
}

.card-body {
    padding: 1.25rem;
    flex: 1;
}

.card-body.scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--primary-rgb), 0.25) transparent;
}

.card-body.scrollable::-webkit-scrollbar {
    width: 6px;
}

.card-body.scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.card-body.scrollable::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.2);
    border-radius: 10px;
}

.card-body.scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--primary-rgb), 0.4);
}

.card-footer {
    padding: 1rem;
    border-top: 1px solid #f3f4f6;
}

.card-footer.center {
    text-align: center;
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    position: relative;
}

.btn-text:hover {
    color: var(--primary-color);
    background: rgba(var(--accent-rgb), 0.1);
    transform: translateY(-1px);
}

.btn-text::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn-text:hover::after {
    transform: translateX(4px);
}

/* List Item Implementation */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #f3f4f6;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge-status {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.badge-status.success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-status.archived {
    background-color: #f3f4f6;
    color: #6b7280;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon:hover {
    background-color: #f0fdfa;
}

/* Notice Item Implementation - blocos compactos, proporcionais ao layout */
.notice-item {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(249, 250, 251, 0.5));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.notice-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--border-color);
    transition: all 0.3s ease;
}

.notice-item:hover {
    border-color: rgba(var(--accent-rgb), 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(34, 211, 238, 0.06));
}

.notice-item:hover::before {
    background: var(--accent-color);
    width: 4px;
}

.notice-item:last-child {
    margin-bottom: 0;
}

.notice-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.tag:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.tag-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.1);
}

.tag-red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid rgba(153, 27, 27, 0.1);
}

.tag-purple {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #5b21b6;
    border: 1px solid rgba(91, 33, 182, 0.1);
}

.tag-enquete {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    border: 1px solid rgba(217, 119, 6, 0.2);
    animation: pulse-enquete 2s infinite;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.notice-item.enquete-unread {
    animation: glow-enquete 3s ease-in-out infinite;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.25), 0 2px 8px rgba(245, 158, 11, 0.12);
    border: 1px solid #f59e0b;
    background: linear-gradient(135deg, rgba(254, 243, 199, 0.35) 0%, rgba(255, 255, 255, 1) 50%);
    position: relative;
}

.notice-item:has(.enquete-notification) {
    padding-right: 1.65rem;
}

.notice-item.enquete-unread::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    width: 4px;
    animation: glow-border 3s ease-in-out infinite;
}

@keyframes pulse-enquete {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.03);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
    }
}

@keyframes glow-enquete {
    0%, 100% {
        box-shadow: 0 0 24px rgba(245, 158, 11, 0.3), 0 4px 16px rgba(245, 158, 11, 0.15);
        border-color: #f59e0b;
    }
    50% {
        box-shadow: 0 0 32px rgba(245, 158, 11, 0.5), 0 6px 20px rgba(245, 158, 11, 0.25);
        border-color: #fbbf24;
    }
}

@keyframes glow-border {
    0%, 100% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
        width: 4px;
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.9);
        width: 5px;
    }
}

@keyframes pulse-notification {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.8), 0 0 24px rgba(239, 68, 68, 0.4);
    }
}

@keyframes pulse-link {
    0%, 100% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0.85;
        transform: translateX(2px);
    }
}

.notice-meta .date {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.notice-meta .date::before {
    content: '•';
    color: var(--text-muted);
    opacity: 0.5;
}

.notice-item h4 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    letter-spacing: -0.01em;
    transition: color 0.2s ease;
}

.notice-item:hover h4 {
    color: var(--primary-color);
}

.notice-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.read-more:hover {
    color: var(--primary-color);
    gap: 0.75rem;
    transform: translateX(2px);
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(4px);
}

.enquete-notification {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    animation: pulse-notification 1.5s infinite;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.4);
    z-index: 5;
}

/* Status Grid */
.status-grid {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.status-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
    flex: 1;
    /* Allow flexible growth */
}

.status-card.active .status-icon {
    color: var(--success);
}

.status-card.warning .status-icon {
    color: var(--warning);
}

.status-icon {
    font-size: 1.25rem;
}

.status-info {
    display: flex;
    flex-direction: column;
}

.status-info strong {
    font-size: 0.85rem;
}

.status-info span {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Overlay for Mobile Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    /* Below sidebar, above everything else */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .widgets-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-only {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sidebar Hidden by Default - drawer no mobile */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        z-index: 50;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay {
        z-index: 45;
    }

    /* Header mais compacto no mobile - ícones SEMPRE visíveis (máxima prioridade) */
    .top-header {
        padding: 0 0.75rem;
        height: 56px;
        gap: 0.5rem;
        flex-wrap: nowrap;
        min-width: 0; /* Crucial: permite encolher dentro do main-content */
    }

    .header-left {
        gap: 0.5rem;
        min-width: 0;
        flex: 1 1 0;
        overflow: visible; /* Evita clip do search expandido */
    }

    /* Search bar: modo ÍCONE APENAS quando colapsado - libera espaço para os ícones */
    .search-bar {
        flex: 0 0 auto;
        min-width: 44px;
        width: 44px;
        max-width: 44px;
        padding: 0.4rem;
        overflow: hidden;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s ease, box-shadow 0.3s ease;
    }

    .search-bar input {
        width: 0;
        min-width: 0;
        padding: 0;
        margin: 0;
        opacity: 0;
        border: none;
        transition: opacity 0.2s ease;
        pointer-events: none; /* Cliques passam para o ícone quando colapsado */
    }

    .search-bar i {
        margin-right: 0;
        cursor: pointer;
        flex-shrink: 0;
    }

    .search-bar:focus-within,
    .search-bar.search-expanded {
        width: auto;
        min-width: 120px;
        max-width: 200px;
        flex: 1 1 auto;
        padding: 0.4rem 0.75rem;
    }

    .search-bar:focus-within input,
    .search-bar.search-expanded input {
        width: 100%;
        min-width: 80px;
        padding: 0 0 0 0.5rem;
        margin-right: 0.5rem;
        opacity: 1;
        pointer-events: auto;
    }

    .search-bar:focus-within i,
    .search-bar.search-expanded i {
        margin-right: 0.5rem;
    }

    .top-nav {
        display: none;
        /* Links principais ficam na sidebar no mobile */
    }

    .header-right {
        gap: 0.5rem;
        flex-shrink: 0;
        margin-left: auto; /* Garante alinhamento à direita mesmo com pouco espaço */
    }

    .header-right .icon-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        flex-shrink: 0;
    }

    /* Dashboard Adjustments */
    .dashboard-container {
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
    }

    .welcome-text h1 {
        font-size: 1.5rem;
    }

    .welcome-actions {
        width: 100%;
        gap: 0.5rem;
    }

    .welcome-actions .btn {
        flex: 1;
        justify-content: center;
    }

    /* Adjust cards */
    .card-header h3 {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .top-header {
        padding: 0 0.5rem;
        gap: 0.35rem;
    }

    .search-bar {
        min-width: 40px;
        width: 40px;
        max-width: 40px;
    }

    .search-bar:focus-within,
    .search-bar.search-expanded {
        max-width: 160px;
    }

    .header-right .icon-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        min-height: 34px;
    }

    .dashboard-container {
        padding: 0.75rem;
    }
}

@media (min-width: 769px) {
    .search-bar input {
        display: block !important;
    }
}


/* Page Headers */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.breadcrumbs a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs i {
    font-size: 0.7rem;
    color: #d1d5db;
}

.breadcrumbs span {
    color: var(--text-primary);
    font-weight: 600;
}


/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.setting-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.setting-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background-color: #f3f4f6;
    color: var(--text-secondary);
}

.icon-wrapper.blue {
    background-color: #e0f2fe;
    color: #0284c7;
}

.icon-wrapper.orange {
    background-color: #ffedd5;
    color: #ea580c;
}

.icon-wrapper.purple {
    background-color: #f3e8ff;
    color: #9333ea;
}

.icon-wrapper.green {
    background-color: #dcfce7;
    color: #16a34a;
}

.icon-wrapper.teal {
    background-color: #ccfbf1;
    color: #0d9488;
}

.setting-info {
    flex: 1;
}

.setting-info h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.setting-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.setting-card .arrow {
    color: #d1d5db;
    font-size: 0.9rem;
}

/* Data Table Styles */
.table-card {
    padding: 0;
    /* Remove default padding for clean table edges */
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: #f9fafb;
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-primary);
    position: relative;
}

.data-table td .actions {
    position: relative;
    z-index: 10;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: #f9fafb;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.avatar-sm.purple {
    background-color: #a855f7;
}

.avatar-sm.gray {
    background-color: #9ca3af;
}

.badge-role {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    background-color: #f3f4f6;
    color: var(--text-secondary);
    font-weight: 500;
}

.badge-role.admin {
    background-color: #e0e7ff;
    color: #4338ca;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-indicator::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.active {
    color: var(--success);
}

.status-indicator.active::before {
    background-color: var(--success);
}

.status-indicator.warning {
    color: var(--warning);
}

.status-indicator.warning::before {
    background-color: var(--warning);
}

.actions {
    display: flex;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-sm:hover {
    background-color: #f3f4f6;
    color: var(--primary-color);
}

.btn-icon-sm.danger:hover {
    background-color: #fef2f2;
    color: var(--danger);
}


/* - - - Form Components Premium - - - */

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

/* Input Wrapper for Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: color 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control.with-icon {
    padding-left: 2.75rem;
}

.form-control:hover {
    border-color: #cbd5e1;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.input-wrapper:focus-within i {
    color: var(--primary-color);
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Password toggle (exibir/ocultar senha em integrações) */
.password-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-wrapper .form-control {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--text-muted, #64748b);
    font-size: 1rem;
    transition: color 0.2s ease;
    line-height: 1;
}

.password-toggle-btn:hover {
    color: var(--primary-color);
}

.password-toggle-btn i {
    pointer-events: none;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.form-label-with-hint {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.6rem;
}

.form-label-with-hint label {
    margin-bottom: 0;
}

.form-label-with-hint small {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
    font-style: italic;
}

.form-section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary-dark);
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 2.5rem 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    display: flex;
    align-items: center;
}

.form-section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary-color);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

/* Modal Styles Refined */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 41, 55, 0.6);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background-color: var(--bg-white);
    border-radius: 16px;
    width: 100%;
    
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px) scale(0.98);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #fee2e2;
    color: var(--danger);
}

.modal-body {
    padding: 1rem 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    background-color: #f9fafb;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Connection Cards */
.connection-types {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.connection-type-card {
    flex: 1;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.connection-type-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.connection-type-card.selected {
    border-color: var(--primary-color);
    background-color: #f0fdfa;
    color: var(--primary-color);
}

.connection-type-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.connection-type-card.selected i {
    color: var(--primary-color);
}

.connection-type-card span {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border-left-color: #10b981;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.hidden {
    display: none !important;
}

/* Notifications Dropdown */
.notifications-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
}

.notifications-dropdown.active {
    display: flex;
}

@media (max-width: 768px) {
    .notifications-dropdown {
        position: fixed;
        top: 56px;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        max-height: 70vh;
    }
}

.notifications-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.notifications-header .btn-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.notification-item:hover {
    background-color: #f9fafb;
}

.notification-item.unread {
    background-color: #f0f9ff;
}

.notification-item.unread:hover {
    background-color: #e0f2fe;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-type-info {
    background-color: #dbeafe;
    color: #3b82f6;
}

.notification-type-success {
    background-color: #d1fae5;
    color: #10b981;
}

.notification-type-warning {
    background-color: #fef3c7;
    color: #f59e0b;
}

.notification-type-error {
    background-color: #fee2e2;
    color: #ef4444;
}

.notification-type-ticket {
    background-color: #e0e7ff;
    color: #6366f1;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.notification-empty,
.notification-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.notifications-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notifications-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

.icon-btn {
    position: relative;
}

.icon-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    background-color: var(--danger);
    color: white;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0 4px;
    border: 2px solid white;
}

.icon-btn .badge:empty {
    display: none;
}

/* ============================================
   ESTILOS DE IMPRESSÃO - MURAL DE RECADOS
   ============================================ */

@media print {
    /* Resetar animações e transições */
    * {
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
    }

    /* Ocultar elementos desnecessários para impressão */
    .sidebar,
    .top-header,
    .card-footer,
    .btn-text,
    .read-more,
    .filters-section,
    .mural-header button,
    .icon-btn,
    .search-bar {
        display: none !important;
    }

    /* Ajustar layout principal */
    .app-container {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .main-content {
        width: 100% !important;
        overflow: visible !important;
    }

    .dashboard-container {
        padding: 0.5rem !important;
    }

    /* Otimizar card do mural */
    .card {
        border: 1px solid #000 !important;
        border-radius: 4px !important;
        page-break-inside: avoid;
        margin-bottom: 0.5rem !important;
    }

    .card-header {
        padding: 0.5rem 0.75rem !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
    }

    .card-header h3 {
        font-size: 1rem !important;
        margin: 0 !important;
    }

    .card-body {
        padding: 0.5rem 0.75rem !important;
    }

    .card-body.scrollable {
        max-height: none !important;
        padding: 0.5rem 0.75rem !important;
        overflow: visible !important;
    }

    /* Otimizar caixas de recado (notice-item) - reduzir espaços em branco */
    .notice-item {
        padding: 0.5rem 0.75rem !important;
        margin-bottom: 0.5rem !important;
        border: 1px solid #000 !important;
        border-radius: 2px !important;
        background: #fff !important;
        page-break-inside: avoid;
        position: relative !important;
        overflow: visible !important;
    }

    .notice-item::before {
        display: none !important;
    }

    .notice-item:last-child {
        margin-bottom: 0 !important;
    }

    /* Ajustar meta informações */
    .notice-meta {
        margin-bottom: 0.4rem !important;
        gap: 0.5rem !important;
    }

    .tag {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.5rem !important;
        border: 1px solid #000 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .notice-meta .date {
        font-size: 0.7rem !important;
    }

    /* Ajustar título e conteúdo */
    .notice-item h4 {
        font-size: 0.95rem !important;
        margin-bottom: 0.3rem !important;
        color: #000 !important;
    }

    .notice-item p {
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
        color: #000 !important;
        line-height: 1.4 !important;
    }

    /* CORRIGIR POSICIONAMENTO DO ÍCONE VERMELHO */
    .enquete-notification {
        position: absolute !important;
        top: 0.25rem !important;
        right: 0.25rem !important;
        width: 20px !important;
        height: 20px !important;
        font-size: 0.7rem !important;
        background: #ef4444 !important;
        color: #fff !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: none !important;
        border: 1px solid #000 !important;
        z-index: 1 !important;
        /* Garantir que não saia da caixa */
        transform: none !important;
    }

    /* Ajustar recados com enquete não lida */
    .notice-item.enquete-unread {
        border: 2px solid #000 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .notice-item.enquete-unread::before {
        display: none !important;
    }

    .notice-item:has(.enquete-notification) {
        padding-right: 1.5rem !important;
    }

    /* Otimizar container do mural */
    .mural-container {
        padding: 0.5rem !important;
        max-width: 100% !important;
    }

    .mural-header {
        padding-bottom: 0.5rem !important;
        margin-bottom: 1rem !important;
        border-bottom: 2px solid #000 !important;
    }

    .mural-header h1 {
        font-size: 1.5rem !important;
        margin: 0 !important;
    }

    /* Otimizar grid de recados */
    .recados-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    .recado-card {
        padding: 0.5rem 0.75rem !important;
        margin-bottom: 0.5rem !important;
        border: 1px solid #000 !important;
        border-radius: 2px !important;
        background: #fff !important;
        page-break-inside: avoid;
    }

    .recado-card::before {
        display: none !important;
    }

    /* Melhorar legibilidade em preto e branco */
    body {
        background: #fff !important;
        color: #000 !important;
    }

    /* Evitar quebras de página indesejadas */
    .notice-item,
    .recado-card {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    /* Ajustar cores para impressão em preto e branco */
    .tag-blue,
    .tag-red,
    .tag-purple,
    .tag-enquete {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }

    /* Remover gradientes e usar cores sólidas */
    .card-header {
        background: transparent !important;
    }

    .notice-item {
        background: #fff !important;
    }

    /* Ajustar espaçamento geral */
    * {
        margin-top: 0 !important;
        margin-bottom: 0.3rem !important;
    }

    .notice-item,
    .recado-card {
        margin-bottom: 0.5rem !important;
    }
}
