/* ============================= */
/*  SINERGIA INDUSTRIAL - CSS    */
/*  Design System Completo       */
/* ============================= */

:root {
    --bg-dark: #000000;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.07);
    --border-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --premium: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --sidebar-bg: rgba(0, 0, 0, 0.98);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Breakpoints */
    --br-sm: 480px;
    --br-md: 768px;
    --br-lg: 1024px;
    --br-xl: 1280px;
}

/* ===== Light Theme ===== */
body.theme-light {
    --bg-dark: #f0f4f8;
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --sidebar-bg: rgba(255, 255, 255, 0.95);
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-primary);
    border-color: rgba(0, 0, 0, 0.12);
}

body.theme-light .nav-links a:hover,
body.theme-light .nav-links a.active {
    background: rgba(59, 130, 246, 0.08);
}

body.theme-light .search-bar-header {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .search-bar-header:focus-within {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.08);
}

body.theme-light .search-bar-header input {
    color: var(--text-primary);
}

body.theme-light .header-btn {
    border-color: rgba(0, 0, 0, 0.08);
}

body.theme-light .header-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

body.theme-light .profile-dropdown {
    background: rgba(255, 255, 255, 0.95);
}

body.theme-light .notif-dropdown {
    background: rgba(255, 255, 255, 0.95);
}

body.theme-light .profile-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.theme-light .profile-dropdown-divider {
    background: rgba(0, 0, 0, 0.08);
}

body.theme-light .glass-panel {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.macro-card {
    background: var(--bg-glass) !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

body.theme-light .macro-card {
    background: white !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

.stat-card-subtle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

body.theme-light .stat-card-subtle {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.stat-card-subtle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ===== Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse at 15% 50%, rgba(59, 130, 246, 0.08), transparent 50%),
        radial-gradient(ellipse at 85% 20%, rgba(16, 185, 129, 0.05), transparent 50%);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

body.theme-light ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

body.theme-light ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Adaptabilidade de Logos para Tema Escuro */
body.theme-dark .logo-adaptable {
    filter: brightness(0) invert(1) opacity(0.8);
}
body.theme-light .logo-adaptable {
    filter: none;
}
body.theme-dark .logo-main {
    filter: brightness(0) invert(1);
}
body.theme-light .logo-main {
    filter: none;
}

/* ===== Typography ===== */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-secondary); }

/* ===== Glass Panel ===== */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ===== Buttons ===== */
button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    padding: 0.7rem 1.5rem;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
}
.btn-outline:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.btn-icon {
    background: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    font-size: 1.2rem;
}
.btn-icon:hover { color: var(--text-primary); }

.btn-accent {
    background: var(--premium);
    color: #fff;
    padding: 0.5rem 1rem;
}

.btn-success {
    background: var(--success);
    color: white;
    padding: 0.7rem 1.5rem;
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
}
.btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.btn-sm {
    padding: 0.4rem 1rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
}

/* Mural Items */
.mural-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding: 0.8rem 0;
    gap: 1rem;
}

.mural-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.mural-info strong {
    color: var(--text-primary);
    word-break: break-all;
    font-size: 0.9rem;
}

.mural-actions {
    flex-shrink: 0;
}

/* ===== Inputs ===== */
input, select, textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Password Toggle Styles */
.password-field-container {
    position: relative;
    width: 100%;
    display: block;
}

.password-field-container input {
    width: 100%;
    padding-right: 40px !important; /* Space for the toggle button */
}

.btn-toggle-password {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 44px;
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
    cursor: pointer;
    z-index: 20;
    padding: 0 !important;
    box-shadow: none !important;
    pointer-events: all;
    -webkit-tap-highlight-color: transparent;
}

.btn-toggle-password:hover,
.btn-toggle-password:active {
    opacity: 1;
    color: var(--text-primary);
}

.btn-toggle-password svg {
    pointer-events: none;
    display: block;
}

.password-field-container input {
    padding-right: 44px !important;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ===== Responsive Grids ===== */
.grid-1, .grid-2, .grid-3 {
    display: grid;
    gap: 1.25rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ===== Grid Stats (Dashboard) ===== */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}
@media (max-width: 1024px) {
    .grid-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .grid-stats { grid-template-columns: 1fr; }
}

/* ===== Grid Form (2 and 3 columns) ===== */
.grid-form-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.grid-form-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .grid-form-2, .grid-form-3 { grid-template-columns: 1fr; }
}

/* ===== Utilities ===== */
.hidden { display: none !important; }
.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-2 { padding: 0.75rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2.5rem; }
.p-6 { padding: 3.5rem; }
.pt-6 { padding-top: 3.5rem; }
.mt-6 { margin-top: 3.5rem; }
.flex-1 { flex: 1; }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--premium); font-weight: 600; }
.text-center { text-align: center; }

/* ===== LAYOUT ===== */
#main-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
#sidebar {
    width: 260px;
    min-width: 260px;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    position: fixed;
    top: 70px;
    bottom: 0;
    left: 0;
    z-index: 99;
    background: var(--sidebar-bg);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden !important;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.03);
}

#sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

#sidebar::-webkit-scrollbar {
    width: 4px;
}

/* Sidebar Collapsed State */
#sidebar.collapsed {
    width: 80px;
    min-width: 80px;
}

#sidebar.collapsed .logo {
    display: none;
}

#sidebar.collapsed .user-profile-sidebar {
    display: none;
}

#sidebar.collapsed .nav-links a {
    justify-content: center;
    align-items: center;
    padding: 0.8rem 0;
    gap: 0;
    width: 80px;
    height: auto;
}

#sidebar.collapsed .nav-links a span {
    display: none !important;
}

#sidebar.collapsed .nav-links a .icon {
    width: 24px;
    height: 24px;
    margin: 0;
}

#sidebar.collapsed .footer-logos,
#sidebar.collapsed .sidebar-footer {
    display: none;
}

#sidebar.collapsed .nav-links {
    gap: 4px;
}

#sidebar.collapsed {
    padding: 0;
}

.logo {
    display: none;
}
.logo img {
    max-width: 160px;
    height: auto;
}

.nav-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.65rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.15s ease;
    white-space: nowrap;
    cursor: pointer;
}

.nav-links a:first-child {
    display: flex !important;
    visibility: visible !important;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    stroke: currentColor;
    transition: stroke 0.2s ease;
}


.nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}
.nav-links a.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent);
    font-weight: 600;
}

/* ===== NOTIFICATION SYSTEM (Header only) ===== */
.notif-dropdown {
    position: fixed;
    top: 70px;
    right: 1rem;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    width: 380px;
    max-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown.hidden {
    display: none;
}

.notif-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-dropdown-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
    padding: 0;
}

.notif-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread {
    background: rgba(59, 130, 246, 0.05);
    border-left: 3px solid var(--accent);
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.notif-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notif-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
    flex-shrink: 0;
}

.notif-body {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.notif-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notif-close:hover {
    color: var(--text-primary);
}

.notif-dropdown-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-glass);
    text-align: center;
}

.notif-dropdown-footer .btn-text {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* ===== TOP HEADER BAR ===== */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 900;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.theme-light .top-header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    min-width: fit-content;
}

.hamburger-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    color: var(--accent);
}

.header-logo {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 0.75rem;
    flex-shrink: 0;
}

.header-logo-img {
    max-height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

body.theme-light .header-logo-img {
    filter: none;
}

.logo-icon-fallback {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}


.header-center {
    flex: 1;
    min-width: 250px;
    max-width: 800px;
    display: flex;
    justify-content: center;
    padding: 0 2rem;
}

.search-bar-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 500px;
}

.search-bar-header:focus-within {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.search-bar-header input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-size: 0.9rem;
}

.search-bar-header input::placeholder {
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    min-width: fit-content;
}

.header-notif-container,
.header-profile-container {
    position: relative;
}

.header-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.header-btn:hover {
    border-color: var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
}

.header-notif-btn {
    position: relative;
}

#header-notif-badge {
    position: absolute;
    top: -6px;
    right: 2px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    border: 2px solid var(--sidebar-bg);
}

#header-notif-badge.hidden {
    display: none;
}


.header-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.profile-dropdown {
    position: fixed;
    top: 75px;
    right: 1rem;
    margin-top: 0;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    width: 280px;
    max-height: calc(100vh - 140px);
    z-index: 1001;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideDown 0.2s ease;
    overflow-y: auto;
}

.profile-dropdown.hidden {
    display: none;
}

.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
}

.profile-dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

.profile-dropdown-info {
    flex: 1;
}

.profile-dropdown-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.profile-dropdown-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 0.5rem 0;
}

.profile-dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s ease;
    text-align: left;
    font-size: 0.9rem;
}

.profile-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.profile-dropdown-item.profile-dropdown-logout {
    color: var(--danger);
}

.profile-dropdown-item.profile-dropdown-logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem 1rem; /* Adicionado padding lateral para o botÃ£o nÃ£o encostar */
    border-top: 1px solid var(--border-glass);
    margin-top: auto;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.footer-logos img {
    max-height: 24px;
    width: auto;
    object-fit: contain;
    transition: filter 0.3s ease;
}

.sidebar-footer .btn-outline { flex: 1; text-align: center; }

/* ===== MAIN CONTENT ===== */
.content {
    flex: 1;
    margin-left: 260px;
    margin-top: 70px;
    padding: 0.5rem 2.5rem;
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar.collapsed + .content {
    margin-left: 80px;
}

/* ===== VIEW ANIMATIONS ===== */
.view {
    animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.view-header {
    margin-bottom: 1rem;
    padding-top: 0;
}

.view-header h1, .view-header h2 {
    margin-top: 0;
}

.view-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
}

.view-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== AUTH VIEW ===== */
.auth-container {
    max-width: 420px;
    margin: 10vh auto;
    padding: 0 1rem;
}

.auth-card {
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-header img {
    max-width: 200px;
    margin-bottom: 1.5rem;
}
.auth-header h2 {
    margin-bottom: 0.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
}
.auth-footer code {
    background: rgba(59, 130, 246, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: var(--accent);
}

.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
}
.stat-card h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* ===== EDITAIS ===== */
.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.edital-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}
.edital-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255,255,255,0.15);
}

/* Favoritos / Destaque */
.edital-card.favorited {
    border: 1px solid var(--success) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
    background: rgba(16, 185, 129, 0.03);
}

.edital-card.favorited::before {
    content: "Favoritado";
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success);
    color: white;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.edital-card.favorited .edital-meta {
    padding-right: 85px; /* Evita sobreposiÃ§Ã£o com o badge favoritado */
}

.edital-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.fomento-badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Paywall */
.paywall-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60%;
    background: linear-gradient(to top, var(--bg-dark) 30%, transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1.5rem;
}
.lock-badge {
    background: rgba(15, 17, 26, 0.9);
    border: 1px solid var(--premium);
    color: var(--premium);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
}

/* Legacy Demandas section removed - consolidated at the end of file */

.demanda-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-style: italic;
}
.meta-item { display: flex; flex-direction: column; }
.meta-label { color: var(--text-secondary); font-size: 0.75rem; }
.meta-value { font-weight: 500; }

/* ===== BADGE ===== */
.badge {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    width: calc(100% - 2rem);
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.payment-method-option {
    cursor: pointer;
}
.payment-method-option input {
    display: none;
}
.pay-method-card {
    border: 1px solid var(--border-glass);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s ease;
    background: rgba(255,255,255,0.03);
}
.pay-method-card span {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}
.pay-method-card small {
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.payment-method-option input:checked + .pay-method-card {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* ===== HAMBURGER MOBILE (Deprecated - usar header-left .hamburger-btn) =====*/

.emulator-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: linear-gradient(90deg, #1e40af, #0f766e);
    color: white;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: monospace;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none; /* Permite clicar atravÃ©s do banner se necessÃ¡rio, exceto nos links */
}

.emulator-banner a {
    pointer-events: auto;
    color: #fff;
    text-decoration: underline;
}

.hamburger-btn:active {
    transform: scale(0.92);
    background: var(--accent-hover);
}

@media (max-width: 768px) {
    .emulator-banner {
        font-size: 11px;
        padding: 10px 5px;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 98;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Admin Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1rem 0;
    border-radius: 8px;
}
.table-responsive table {
    min-width: 700px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 2px solid var(--border-glass);
    color: var(--text-secondary);
    font-weight: 600;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    vertical-align: middle;
}

/* Responsive Table Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table-responsive::-webkit-scrollbar {
    height: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

body.theme-light .table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
}

.admin-table {
    min-width: 800px; /* Garante que a tabela nÃ£o esprema demais e use o scroll horizontal */
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.badge-tipo {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-tipo.Admin { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-tipo.Empresa { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-tipo.Associado { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.active { background: #10b981; box-shadow: 0 0 8px #10b981; }
.dot.pending { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }

/* Admin Tabs System */
.admin-tabs-nav { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 2rem; 
    border-bottom: 1px solid var(--border-glass); 
    padding-bottom: 2px; 
}
.admin-tab-btn { 
    background: transparent; 
    border: none; 
    padding: 12px 24px; 
    color: var(--text-secondary); 
    font-weight: 500; 
    cursor: pointer; 
    border-radius: 8px 8px 0 0; 
    transition: all 0.3s ease; 
    border-bottom: 2px solid transparent; 
}
.admin-tab-btn:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.05); }
.admin-tab-btn.active { color: var(--accent); border-bottom: 2px solid var(--accent); background: rgba(59, 130, 246, 0.1); }

/* ================================ */
/*  RESPONSIVE: Tablet (<= 1024px) */
/* ================================ */
@media (max-width: 1024px) {
    .content {
        padding: 0.5rem 1.5rem;
    }

    .view-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .view-header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* UtilitÃ¡rios de Layout Responsivo */
.flex-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 15px;
}

@media (max-width: 768px) {
    .flex-header-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flex-header-row > div {
        width: 100%;
    }

    .flex-header-row .search-group {
        max-width: none !important;
    }
}

.data-table {
    width: 100%;
    min-width: 900px; /* Garante scroll horizontal no mobile */
    border-collapse: collapse;
    color: var(--text-primary);
}

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
}

.data-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
}

/* ============================== */
/*  RESPONSIVE: Mobile (<= 768px) */
/* ============================== */
@media (max-width: 1024px) {
    .header-center {
        max-width: 450px;
    }

    .search-bar-header {
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 0 1rem;
    }

    .header-left {
        flex-shrink: 1;
    }

    .header-center {
        flex: 1;
        padding: 0 1rem;
    }

    .search-bar-header {
        max-width: 100%;
        font-size: 0.85rem;
        padding: 0.6rem 0.75rem;
    }

    .search-bar-header input {
        font-size: 0.85rem;
    }

    .header-logo img {
        display: none;
    }

    .header-right {
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .header-btn {
        padding: 0.4rem 0.6rem;
    }

    .profile-dropdown {
        width: 240px;
    }

    .notif-dropdown {
        width: 320px;
        max-height: calc(100vh - 130px);
    }

    .content {
        padding: 0.5rem 1.5rem; /* Ajustado para manter respiro no mobile */
    }


    #sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        height: 100dvh !important;
        min-height: 100% !important;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100002 !important;
        margin: 0 !important;
        display: flex !important;
    }
    #sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
        z-index: 99998 !important;
    }

    .content {
        margin-left: 0 !important;
        padding: 0.5rem !important;
        padding-top: 4.5rem !important;
    }

    .glass-panel, .auth-card {
        padding: 0.75rem !important;
        border-radius: 10px !important;
    }

    h1 { font-size: 1.15rem !important; }
    h2 { font-size: 1.0rem !important; }
    
    button:not(.btn-sm) {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.8rem !important;
        width: auto;
    }

    .btn-sm {
        padding: 0.35rem 0.8rem !important;
        font-size: 0.75rem !important;
    }

    /* ForÃ§ar empilhamento do mural no mobile */
    div#approval-mural .mural-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 1rem 0 !important;
    }

    .mural-info {
        width: 100% !important;
    }

    .mural-info strong {
        font-size: 0.85rem !important;
        display: block !important;
        margin-bottom: 2px !important;
    }

    .mural-actions, .mural-actions button {
        width: 100% !important;
        display: block !important;
    }

    .view-header-actions {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .view-header-actions button {
        width: 100% !important;
        margin: 0 !important;
    }

    .stat-number {
        font-size: 1.0rem !important;
    }

    .stat-card {
        padding: 0.75rem !important;
    }

    /* Admin Tabs System Mobile */
    .admin-tabs-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 5px !important;
        margin-bottom: 1.5rem !important;
        gap: 0 !important;
        width: 100% !important;
        border-bottom: 1px solid var(--border-glass) !important;
    }
    
    .admin-tab-btn {
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
        flex: 0 0 auto !important;
        display: inline-block !important;
    }

    /* View header admin buttons mobile (Break earlier at 768px) */
    .view-header-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1.25rem !important;
        width: 100% !important;
        display: flex !important;
    }

    .view-header h1 {
        font-size: 1.3rem !important;
        text-align: center !important;
        margin-bottom: 0.25rem !important;
        width: 100% !important;
    }

    .view-header-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
        display: flex !important;
    }

    .view-header-actions button,
    .view-header button,
    .btn-primary, .btn-secondary {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 52px !important;
        white-space: normal !important;
        text-align: center !important;
    }

    /* Profile Custom Grid */
    .profile-header-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    /* Auth */
    .auth-container {
        margin: 2vh auto;
        max-width: 100%;
    }
    .auth-card { padding: 1.5rem; }
    .auth-header img { max-width: 150px; }

    /* Grids */
    .dashboard-grid { 
        grid-template-columns: 1fr !important; 
        gap: 1rem;
    }
    .grid-2, .grid-3 { 
        grid-template-columns: 1fr !important; 
        gap: 1rem;
    }

    /* Demandas Mobile (Redundant styles removed) */

    /* Search bar */
    .search-bar {
        flex-direction: column;
        gap: 1rem;
    }

    /* Admin Users Search Area */
    [style*="justify-content: flex-end; min-width: 300px"] {
        flex-direction: column !important;
        min-width: unset !important;
        width: 100%;
    }

    /* Buttons touch-friendly */
    button, .btn-primary, .btn-secondary, .btn-outline {
        min-height: 48px;
    }
}

/* ================================ */
/*  RESPONSIVE: Small (<= 480px)   */
/* ================================ */
@media (max-width: 480px) {
    /* Sidebar em mobile: oculto por padrão, drawer quando aberto */
    #sidebar {
        width: 260px !important;
        transform: translateX(-100%);
        z-index: 999;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #sidebar.open {
        transform: translateX(0);
    }

    #sidebar.collapsed {
        width: 260px !important;
        transform: translateX(-100%);
    }

    /* Conteúdo sem margin em mobile */
    #main-layout .content {
        margin-left: 0 !important;
    }

    .content {
        padding: 0.75rem;
        padding-top: 6rem;
    }

    h1 { font-size: 1.25rem !important; }
    h2 { font-size: 1.1rem !important; }

    .stat-number { font-size: 1.8rem; }

    .photo-placeholder {
        width: 130px !important;
        height: 130px !important;
    }

    .glass-panel {
        padding: 1rem !important;
    }

    /* Ajuste para botões muito longos */
    .btn-primary, .btn-secondary, .btn-outline {
        font-size: 0.85rem;
        padding: 0.7rem 1rem;
    }
}

/* Banner de Emulador Mobile Fix */
#emulator-banner {
    font-size: 11px !important;
    padding: 8px 5px !important;
    line-height: 1.3 !important;
}

/* ===== Print ===== */
@media print {
    #sidebar, .hamburger-btn, .sidebar-overlay { display: none !important; }
    .content { margin-left: 0; }
}

/* ===== FORUM & DISCUSSIONS ===== */
.forum-card {
    transition: transform 0.2s ease, border-color 0.2s ease;
    border: 1px solid transparent;
}

.forum-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.comment-bubble {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.comment-body {
    line-height: 1.5;
    color: var(--text-primary);
}

#lista-comentarios-topico {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== UTILITIES ===== */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.w-full { width: 100%; }

/* ===== CHAT & DESAFIOS ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-bottom: 1rem;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    animation: fadeInChat 0.3s ease;
}

@keyframes fadeInChat {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.chat-bubble.me {
    align-self: flex-end;
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-bubble.them {
    align-self: flex-start;
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-bottom-left-radius: 2px;
}

.chat-meta {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.3rem;
    display: block;
}

.chat-bubble.me .chat-meta { text-align: right; color: rgba(255,255,255,0.8); }
.chat-bubble.them .chat-meta { text-align: left; color: var(--text-secondary); }

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status-open { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-closed { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.countdown-timer {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--premium);
    font-size: 0.85rem;
}

.solution-card {
    border: 1px solid var(--border-glass);
    transition: all 0.2s;
    border-radius: 12px;
}

.solution-card.approved {
    border-color: var(--success) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.solution-card.rejected {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

.contact-reveal {
    background: rgba(59, 130, 246, 0.1);
    border: 1px dashed var(--accent);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    animation: slideDownChat 0.3s ease;
}

@keyframes slideDownChat {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* Admin Tabs System */
.admin-tab-content { display: none; animation: fadeIn 0.3s ease; }
.admin-tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ================================ */
/*  DEMANDAS & SOLUÃ‡Ã•ES REFINEMENT  */
/* ================================ */
.demanda-card {
    display: flex !important;
    flex-direction: column !important;
    padding: 1.5rem;
    border-left: 4px solid var(--accent);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    gap: 0.75rem;
    background: var(--bg-glass);
}

.demanda-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    border-left-width: 6px;
}

.lista-solucoes-recebidas .glass-panel {
    border-left: 4px solid var(--premium);
    background: rgba(245, 158, 11, 0.03);
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.alert-match {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
}

.filter-group select {
    cursor: pointer;
    transition: all 0.2s;
}

.filter-group select:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.1);
}
.badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.4rem;
    background: var(--accent);
    color: #fff;
    text-align: center;
    line-height: 1;
    margin-right: 0.5rem;
}

/* Optional color variations for specific categories (fallback to accent) */
.badge[data-cat="Industrial"]   { background: #0ea5e9; }
.badge[data-cat="Comercial"]    { background: #22c55e; }
.badge[data-cat="JurÃ­dica"]     { background: #ef4444; }
.badge[data-cat="Sustentabilidade"] { background: #10b981; }
.badge[data-cat="Marketing"]    { background: #f59e0b; }
.badge[data-cat="Administrativa"] { background: #8b5cf6; }
.badge[data-cat="RH"]           { background: #ec4899; }
.badge[data-cat="SeguranÃ§a"]   { background: #6366f1; }
.badge[data-cat="Outros"]      { background: #6b7280; }

/* Kanban Layout for Demandas */
.kanban-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    height: calc(100vh - 180px);
    align-items: stretch;
    margin-top: 1.5rem;
}

@media (max-width: 1024px) {
    .kanban-container {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 16px;
    min-height: 400px;
    border: 1px solid var(--border-glass);
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 0.5rem;
}

.kanban-column-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-badge-count {
    background: var(--accent);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.kanban-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Specific headers colors */
.kanban-column:nth-child(1) .kanban-column-header { border-bottom-color: #3b82f6; } /* Aberto - Blue */
.kanban-column:nth-child(2) .kanban-column-header { border-bottom-color: #f59e0b; } /* Em andamento - Orange */
.kanban-column:nth-child(3) .kanban-column-header { border-bottom-color: #10b981; } /* ConcluÃ­do - Green */

/* Chat Demandas Styles */
.chat-msg {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
}
.chat-msg-me {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--accent), #2563eb);
    color: white;
    border-bottom-right-radius: 2px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.chat-msg-other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    border-bottom-left-radius: 2px;
}
.chat-msg-info {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-bottom: 4px;
    display: block;
    font-weight: 600;
    text-transform: uppercase;
}


/* ===== View Toggles & List Mode ===== */
.view-toggles {
    display: flex;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    height: fit-content;
}

.btn-view-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-view-toggle:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.btn-view-toggle.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.list-mode {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.list-mode .glass-panel.list-item {
    display: grid !important;
    grid-template-columns: 80px 2.5fr 1fr 1fr 140px !important;
    align-items: center !important;
    padding: 10px 20px !important;
    gap: 15px !important;
    min-height: auto !important;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.list-mode .glass-panel:hover {
    transform: translateX(5px);
    border-left-color: var(--accent);
}

/* List Mode â€” Mobile Responsive */
@media (max-width: 768px) {
    .list-mode-header { display: none !important; }
    .list-mode .glass-panel.list-item {
        grid-template-columns: 1fr !important;
        gap: 6px !important;
        padding: 12px !important;
    }
}

.ranking-sector-header {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.select-modern {
    padding: 0.4rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
}

.select-modern option {
    background-color: #1a1c26;
    color: white;
}

body.theme-light .select-modern {
    background: white;
    color: #1e293b;
    border-color: rgba(0,0,0,0.1);
}

body.theme-light .select-modern option {
    background-color: white;
    color: #1e293b;
}

select option {
    background-color: #1a1c26;
    color: white;
}

body.theme-light select option {
    background-color: white;
    color: #1e293b;
}

/* ========================================= */
/*  FIXES: Submenus, Grids and List Mode      */
/* ========================================= */

.grid-4 { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.25rem; 
}

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4 { grid-template-columns: 1fr !important; }
}

/* Sub-tabs Navigation (Admin Panel) */
.sub-tabs-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 2rem;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    width: fit-content;
    flex-wrap: wrap;
}

.sub-tab-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sub-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.sub-tab-btn.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.12);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

/* Module Tabs Navigation (SoluÃ§Ãµes, etc) */
.tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

.tab-nav::-webkit-scrollbar {
    height: 4px;
}

.tab-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 8px 20px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
    color: var(--accent);
    background: rgba(59, 130, 246, 0.12);
    font-weight: 600;
}

/* Light theme support for Tabs */
body.theme-light .tab-nav {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
body.theme-light .tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}
body.theme-light .tab-btn.active {
    background: rgba(59, 130, 246, 0.12);
}

/* List Mode Header Fixes */
.list-mode-header {
    display: grid !important;
    grid-template-columns: 80px 2.5fr 1fr 1fr 140px !important;
    padding: 12px 20px !important;
    gap: 15px !important;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 10px;
    align-items: center;
}

.list-mode-header div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ranking-sectors-container .list-mode-header {
    grid-template-columns: 60px 2fr 1fr 1fr 100px !important;
}

/* Typography & Titles UX */
.view-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.view-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 800px;
    line-height: 1.5;
}

h1, h2, h3 {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Logs System Styles */
.log-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .log-stats-row { grid-template-columns: 1fr; }
}

.log-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
}

.log-stat-card h3 {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.log-stat-card .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.log-filter-bar {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    padding: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.log-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-filter-group label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.btn-export-csv {
    background: #10b981;
    color: white;
    padding: 9px 16px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-export-csv:hover {
    background: #059669;
    transform: translateY(-1px);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Brand Logo Upload Components ===== */
.brand-file-input {
    display: none !important;
}

.brand-logo-group {
    position: relative;
}

.brand-logo-preview-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.brand-logo-thumb {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--border-glass);
    background: rgba(255,255,255,0.06);
    padding: 4px;
    flex-shrink: 0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.brand-logo-thumb:hover {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.brand-logo-thumb-sm {
    width: 36px;
    height: 36px;
}

.brand-logo-inputs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.brand-logo-inputs input[type="text"] {
    width: 100%;
    font-size: 0.82rem;
}

.brand-logo-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-upload-logo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-upload-logo:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-upload-logo:active {
    transform: translateY(0);
}

.btn-upload-logo.uploading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-upload-logo.uploading svg {
    animation: spin 1s linear infinite;
}

.btn-clear-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.btn-clear-logo:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.12);
    border-color: var(--danger);
}

/* Upload drag-over visual */
.brand-logo-group.drag-over {
    outline: 2px dashed var(--accent);
    outline-offset: 4px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.04);
}

/* Upload progress toast */
.brand-upload-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 10000;
    animation: slideInUp 0.35s ease;
}

.brand-upload-toast .spinner-sm {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-glass);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.brand-upload-toast.success {
    border-color: var(--success);
}

.brand-upload-toast.success .spinner-sm {
    border: none;
    animation: none;
    color: var(--success);
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Light theme adjustments */
body.theme-light .brand-logo-thumb {
    background: rgba(0,0,0,0.03);
}
body.theme-light .btn-clear-logo {
    background: rgba(0,0,0,0.04);
}
body.theme-light .brand-upload-toast {
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* ===== CalendÃ¡rio da InovaÃ§Ã£o ===== */
#cal-grid > div {
    cursor: default;
    transition: background 0.15s;
}
#cal-grid > div[onclick] {
    cursor: pointer;
}
#cal-grid > div[onclick]:hover {
    background: var(--accent-muted, rgba(59,130,246,0.1)) !important;
}
#cal-month-wrapper {
    border-radius: 12px;
    overflow: hidden;
}
@media (max-width: 600px) {
    #cal-grid > div {
        min-height: 52px !important;
        padding: 3px !important;
    }
}

/* Profile Points Badge Style */
.points-badge-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(59, 130, 246, 0.01));
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

body.theme-light .points-badge-card {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--accent);
}

.points-label {
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 0.15rem;
}

.points-value {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    line-height: 1;
}

/* ===== GLOBAL SEARCH RESULTS ===== */
.global-search-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none !important;
    color: inherit !important;
}
.global-search-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
body.theme-light .global-search-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
body.theme-light .global-search-item:hover {
    background: rgba(0, 0, 0, 0.03);
}
.global-search-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    flex-shrink: 0;
}
body.theme-light .global-search-item-icon {
    background: rgba(0, 0, 0, 0.05);
}
.global-search-item-content {
    flex: 1;
    min-width: 0;
}
.global-search-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary) !important;
}
.global-search-item-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}
.global-search-item-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 6px;
    display: inline-block;
    text-decoration: none;
}
