/* ==========================================================================
   Intranet Portal Design System & Core Stylesheet
   Theme: Slate Dark & Glowing Teal (Premium Heritage & Modern Tech)
   ========================================================================== */

/* 1. Tokens & Custom Properties */
:root {
    /* Ulysses Brand Variables (PCI Design System) */
    --pci-accent: #2563eb;
    --pci-accent-hover: #1d4ed8;
    --pci-gold: #d4af37;
    --pci-gold-soft: rgba(212, 175, 55, 0.1);
    --pci-bg-page: #f8fafc;
    --pci-border: #cbd5e1;
    --pci-text-main: #0f172a;
    --pci-text-muted: #64748b;

    /* Intranet Design Tokens Mapped to the New Palette */
    --bg-base: var(--pci-bg-page);
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.75);
    --bg-surface-hover: #f1f5f9;
    --accent: var(--pci-accent);
    /* Heritage Blue */
    --accent-light: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --accent-gradient: linear-gradient(135deg, var(--pci-accent) 0%, var(--pci-accent-hover) 100%);
    --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;

    --text-primary: var(--pci-text-main);
    --text-secondary: #475569;
    --text-muted: var(--pci-text-muted);

    --border-color: #e2e8f0;
    --border-color-hover: #cbd5e1;
    --glass-border: rgba(0, 0, 0, 0.06);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --sidebar-width: 270px;
    --header-height: 75px;
    --border-radius-sm: 8px;
    --border-radius: 12px;
    --border-radius-lg: 16px;

    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px -3px rgba(59, 130, 246, 0.25);

    --max-content-width: 1400px;
}

/* 2. Reset & General Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-gradient);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--text-primary);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 3. Layout Structure */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    position: relative;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.2px;
}

.logo-text .accent-text {
    color: var(--pci-gold);
}

.sidebar-nav {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
    min-height: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition-smooth);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

.nav-item:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding-left: 13px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(9, 13, 22, 0.3);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    padding: 8px 12px;
    margin: -8px -12px;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.user-profile:hover {
    background-color: var(--bg-surface-hover);
    transform: translateY(-1px);
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Wrapper */
.main-wrapper {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
    transition: var(--transition-smooth);
}

/* Topbar Header */
.topbar {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-primary);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-bar-container {
    position: relative;
    width: 320px;
    transition: var(--transition-smooth);
}

.search-bar-container.focus {
    width: 380px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
    transition: var(--transition-fast);
}

.search-bar-container input {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px 10px 42px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.search-bar-container input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-bar-container input:focus+.search-icon {
    color: var(--accent-light);
}

.topbar-actions {
    display: flex;
    align-items: center;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    position: relative;
}

.action-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    transform: scale(1.05);
}

.action-btn .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--error);
}

/* Content Container */
.content-container {
    padding: 32px;
    flex-grow: 1;
    max-width: var(--max-content-width);
    width: 100%;
    margin: 0 auto;
}

.content-container.content-container-full {
    max-width: 100% !important;
    padding: 16px 24px !important;
}


/* App Footer */
.app-footer {
    padding: 24px 32px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent-light);
}

.footer-links .bullet {
    color: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   4. Core Component & Utility Styles
   ========================================================================== */

/* Glass Cards */
.card-glass {
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 24px;
    transition: var(--transition-smooth);
}

.card-glass:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Primary Button */
.btn {
    padding: 9px 18px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 24px -2px rgba(37, 99, 235, 0.4);
    color: #ffffff;
}

.btn-primary i {
    width: 18px;
    height: 18px;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-base);
    border-color: var(--border-color-hover);
}

.btn-danger {
    background: transparent;
    color: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Text Input for form */
.form-input {
    width: 100%;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent);
}

/* Spinner Loader */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 16px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(59, 130, 246, 0.15);
    border-top: 3px solid var(--accent-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* User Status Pill */
.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-pill.active {
    background-color: var(--success-bg);
    color: var(--success);
}

.status-pill.active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    display: inline-block;
}

/* Grid & Layout Utilities */
.view-title-section {
    margin-bottom: 32px;
}

.view-subtitle {
    color: var(--text-secondary);
    margin-top: 4px;
    font-size: 15px;
}

/* ==========================================================================
   5. Landing Page (Home View) Styles
   ========================================================================== */

.home-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}

/* Hero Welcome Section */
.hero-welcome {
    position: relative;
    padding: 48px;
    border-radius: var(--border-radius-lg);
    background: linear-gradient(rgba(15, 23, 42, 0.3), rgba(15, 23, 42, 0.75)), url('../img/pesquisa.jpg') center 30% / cover;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    color: #ffffff;
}

.hero-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pci-gold) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
}

.hero-welcome h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #ffffff;
}

.hero-welcome h2 span {
    color: var(--pci-gold);
}

.hero-welcome p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    line-height: 1.6;
}

/* Shortcut Tiles */
.shortcuts-section {
    margin-bottom: 40px;
}

.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.section-title-bar h3 {
    font-size: 18px;
    font-weight: 600;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.shortcut-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    text-align: left;
}

.shortcut-tile:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.shortcut-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: var(--transition-smooth);
}

.shortcut-tile:hover .shortcut-icon-box {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.shortcut-tile h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.shortcut-tile p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Announcements Grid */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.announcement-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    padding: 20px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.announcement-card:hover {
    border-color: var(--border-color-hover);
    transform: translateX(4px);
}

.announcement-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-base);
}

.announcement-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.announcement-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.announcement-tag {
    color: var(--accent-light);
    background-color: rgba(37, 99, 235, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.announcement-date {
    color: var(--text-muted);
}

.announcement-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.announcement-excerpt {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.announcement-author-info {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Home Sidebar (Widgets) */
.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.widget {
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.widget-title i {
    color: var(--accent-light);
    width: 20px;
    height: 20px;
}

/* Calendar Widget */
.event-item {
    display: flex;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.event-date-badge {
    width: 46px;
    height: 48px;
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.event-day {
    font-size: 16px;
    color: var(--accent-light);
}

.event-month {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1;
}

.event-details h5 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.event-details p {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-details p i {
    width: 12px;
    height: 12px;
}

/* Culture Widget */
.culture-quote-box {
    position: relative;
    padding: 16px;
    border-left: 3px solid var(--accent);
    background-color: rgba(37, 99, 235, 0.03);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
}

.quote-text {
    font-style: italic;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.quote-author {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   6. Contacts Directory Page
   ========================================================================== */

.contacts-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.directory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 24px;
}

.search-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    flex-wrap: wrap;
}

.view-toggle-container {
    display: flex;
    align-items: center;
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.view-toggle-btn:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.view-toggle-btn.active {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.view-toggle-btn i {
    width: 16px;
    height: 16px;
}

.filters-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    background-color: var(--border-color);
}

.filter-btn.active {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.contacts-count-status {
    font-size: 14px;
    color: var(--text-secondary);
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* List View Styles for Contacts */
.contacts-grid.list-view {
    grid-template-columns: 1fr;
    gap: 16px;
}

.contacts-grid.list-view .contact-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 24px;
}

.contacts-grid.list-view .contact-card-header {
    margin-bottom: 0;
    flex: 1 1 280px;
    min-width: 0;
}

.contacts-grid.list-view .contact-card-body {
    border-top: none;
    padding-top: 0;
    flex-direction: row;
    flex: 2 1 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 32px;
    min-width: 0;
}

.contacts-grid.list-view .contact-card-body .contact-detail-row {
    flex: 1 1 180px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contacts-grid.list-view .contact-card-body .contact-detail-row a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contacts-grid.list-view .contact-card-body .contact-bio-preview {
    display: none;
}

.contacts-grid.list-view .contact-card-footer {
    margin-top: 0;
    flex: 0 0 auto;
}

/* Responsive adjustment for list view on smaller screens */
@media (max-width: 992px) {
    .contacts-grid.list-view .contact-card {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 16px;
    }

    .contacts-grid.list-view .contact-card-header {
        flex: none;
    }

    .contacts-grid.list-view .contact-card-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        border-top: 1px solid var(--border-color);
        padding-top: 16px;
    }

    .contacts-grid.list-view .contact-card-body .contact-detail-row {
        flex: none;
        width: 100%;
    }

    .contacts-grid.list-view .contact-card-body .contact-bio-preview {
        display: -webkit-box;
    }

    .contacts-grid.list-view .contact-card-footer {
        margin-top: 12px;
    }
}

.contact-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition-smooth);
}

.contact-card:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.contact-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.contact-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    transition: var(--transition-smooth);
}

.contact-card:hover .contact-img {
    border-color: var(--accent-light);
}

.contact-main-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.contact-role {
    font-size: 13px;
    color: var(--accent-light);
}

.contact-department {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.contact-card-body {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.contact-detail-row i {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.contact-detail-row a:hover {
    text-decoration: underline;
}

.contact-bio-preview {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.contact-card-footer {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
}

.btn-detail {
    font-size: 12px;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.btn-detail:hover {
    color: var(--text-primary);
}

.contact-title-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-light);
    background-color: var(--accent-glow);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Detailed Employee Profile Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color-hover);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 580px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-cover {
    height: 120px;
    background: var(--accent-gradient);
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.5);
    transform: scale(1.05);
}

.modal-body {
    padding: 32px;
    position: relative;
}

.modal-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -80px;
    margin-bottom: 24px;
}

.modal-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg-surface);
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
}

.modal-name {
    font-size: 22px;
    font-weight: 700;
}

.modal-role {
    color: var(--accent-light);
    font-weight: 500;
    font-size: 15px;
}

.modal-department {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.modal-info-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    margin-bottom: 24px;
}

.modal-bio-box h6 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.modal-bio-box p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   7. About Us Page (Sobre)
   ========================================================================== */

.about-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.about-header h2 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.about-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Mission & Vision Section */
.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.mv-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mv-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mv-icon-box i {
    width: 24px;
    height: 24px;
}

.mv-card h3 {
    font-size: 20px;
    font-weight: 700;
}

.mv-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Core Values Section */
.values-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.value-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.value-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-light);
}

.value-card h4 {
    font-size: 18px;
    font-weight: 600;
}

.value-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Timeline/History Section */
.history-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    width: 100%;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-light);
    border: 4px solid var(--bg-base);
    top: 26px;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-item.left::after {
    right: -8px;
}

.timeline-item.right::after {
    left: -8px;
}

.timeline-badge {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--accent-light);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 8px;
}

.timeline-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.timeline-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.timeline-content p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   8. Responsive Design & Media Queries
   ========================================================================== */

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

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

    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 240px;
    }

    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.open {
        left: 0;
    }

    .main-wrapper {
        margin-left: 0;
        max-width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .topbar {
        padding: 0 16px;
    }

    .search-bar-container {
        display: none;
        /* Hide global search on mobile to save space */
    }

    .hero-welcome {
        padding: 24px;
    }

    .hero-welcome h2 {
        font-size: 24px;
    }

    .announcement-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .announcement-img {
        height: 160px;
    }

    .mission-vision-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 54px;
        padding-right: 0;
        text-align: left !important;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item::after {
        left: 23px !important;
    }
}

@media (max-width: 480px) {
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .content-container {
        padding: 16px;
    }

    .directory-controls {
        padding: 12px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* ==========================================================================
   Organograma Orgânico Styling
   ========================================================================== */

.org-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: max-content;
    min-width: 100%;
    margin-top: 10px;
    gap: 8px;
    padding: 10px 40px 40px 40px;
    transform-origin: center top;
    transition: transform 0.05s ease-out;
}

.org-board-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative;
}

.org-support-wrapper,
.org-vps-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 1000px;
    margin: 8px 0;
}

.org-tree-divider {
    width: 2px;
    height: 20px;
    background: var(--accent);
    position: relative;
    opacity: 0.6;
    margin: 0 auto;
}

.org-tree-divider::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-light);
    box-shadow: 0 0 8px var(--accent-light);
}

/* Horizontal connector line across all department columns */
.org-departments-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
    align-items: start;
    position: relative;
    padding-top: 16px;
}

.org-departments-grid::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(100% / 14);
    right: calc(100% / 14);
    height: 2px;
    background: var(--accent);
    opacity: 0.6;
}

/* Vertical line from the horizontal branch line down to the department card */
.org-dept-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
    padding-top: 12px;
}

.org-dept-column::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 28px;
    background: var(--accent);
    opacity: 0.6;
}

/* Custom alignment for direct Board divisions without a department parent */
.org-dept-column.no-dept {
    padding-top: 144px;
}

.org-dept-column.no-dept::before {
    height: 160px;
}

.org-sub-connector {
    width: 2px;
    height: 12px;
    background: var(--accent);
    opacity: 0.6;
}

.org-center-connector {
    width: 2px;
    height: 10px;
    background: var(--accent);
    opacity: 0.4;
    margin: 2px auto;
}

/* Connectors for division cards stacked vertically under a department */
.org-divisions-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    position: relative;
}

.org-divisions-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: var(--accent);
    opacity: 0.4;
    z-index: 0;
}

/* Node Cards */
.org-node-card {
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px;
    width: 100%;
    max-width: 260px;
    transition: var(--transition-bounce);
    position: relative;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    z-index: 2;
}

.org-node-card.clickable {
    cursor: pointer;
}

.org-node-card.clickable:hover {
    transform: translateY(-4px);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

/* Node Type Coding */
.org-node-card.type-board {
    border-left: 4px solid var(--accent-light);
    max-width: 300px;
}

.org-node-card.type-support {
    border-left: 4px solid var(--warning);
    max-width: 210px;
}

.org-node-card.type-department {
    border-left: 4px solid var(--success);
}

.org-node-card.type-division {
    border-left: 4px solid var(--text-secondary);
    padding: 10px 12px;
    background: var(--bg-surface-glass);
}

.org-node-card.type-center {
    border-left: 4px solid var(--text-muted);
    padding: 8px 10px;
    background: var(--bg-surface-glass);
}

/* Card Content Details */
.org-card-header h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.org-node-desc {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin-bottom: 6px;
    height: 31px;
}

.org-manager-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
    margin-top: 2px;
}

.org-manager-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent);
}

.org-manager-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.org-manager-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-manager-role {
    font-size: 9px;
    color: var(--text-secondary);
    line-height: 1.2;
}

/* Organograma Responsiveness - Disabled to preserve horizontal tree layout in zoom/pan viewport */
/*
@media (max-width: 1400px) {
    .org-departments-grid {
        grid-template-columns: repeat(4, 1fr);
        justify-content: center;
        gap: 20px;
    }
}

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

@media (max-width: 600px) {
    .org-departments-grid {
        grid-template-columns: 1fr;
    }
    .org-node-card {
        max-width: 100%;
    }
}
*/

/* Zoom & Pan Viewport & Controls */
.org-viewport {
    position: relative;
    z-index: 1;
    width: 100%;
    height: calc(100vh - 230px);
    min-height: 600px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-base);
    background-image: radial-gradient(var(--border-color) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    overflow: hidden;
    contain: paint;
    isolation: isolate;
    cursor: grab;
    user-select: none;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
    margin-top: 10px;
}

[data-theme="dark"] .org-viewport {
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6);
}

.org-viewport.dragging {
    cursor: grabbing;
}

.org-zoom-controls {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.zoom-ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(16px);
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-md);
}

.zoom-ctrl-btn:hover {
    background: var(--accent);
    border-color: var(--accent-light);
    color: var(--text-primary);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    transform: scale(1.1) translateY(-2px);
}

.zoom-ctrl-btn i {
    width: 20px;
    height: 20px;
    transition: var(--transition-fast);
}

.zoom-ctrl-btn:active {
    transform: scale(0.95);
}

/* Organogram Admin Management Styles */
.org-title-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.title-left-group {
    display: flex;
    flex-direction: column;
}

.title-right-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.admin-toggle-btn.admin-active {
    background-color: rgba(244, 63, 94, 0.15) !important;
    border-color: var(--error) !important;
    color: var(--error) !important;
}

.admin-toggle-btn.admin-active:hover {
    background-color: var(--error) !important;
    color: var(--text-primary) !important;
}

.org-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: var(--transition-fast);
    z-index: 10;
}

.org-node-card:hover .org-card-actions {
    opacity: 1;
}

.org-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--bg-surface-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.org-action-btn:hover {
    transform: scale(1.1);
    color: var(--text-primary);
}

.org-action-btn.edit-btn:hover {
    background: var(--accent);
    border-color: var(--accent-light);
}

.org-action-btn.delete-btn:hover {
    background: var(--error);
    border-color: var(--error);
}

.org-action-btn i {
    width: 14px;
    height: 14px;
}

/* Form Styles inside Modals */
.node-admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.node-admin-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.node-admin-form label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: left;
}

.node-admin-form select.search-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238892b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    height: 42px;
    font-size: 14px;
}

/* News Page Layout */
.news-page-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-header {
    margin-bottom: 8px;
}

.news-header h2 {
    font-size: 28px;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.news-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Tabs and Filter chips styling */
.news-tabs-row {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 4px;
    overflow-x: auto;
}

.news-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.news-tab-btn i {
    width: 16px;
    height: 16px;
}

.news-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.news-tab-btn.active {
    color: var(--accent-light);
    background: var(--accent-glow);
    border-color: var(--accent);
}

.news-chips-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.news-chip-btn {
    padding: 6px 14px;
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.news-chip-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    background: var(--bg-surface-hover);
}

.news-chip-btn.active {
    background: var(--accent);
    border-color: var(--accent-light);
    color: #ffffff;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

/* News Card */
.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

/* Image section */
.news-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #0d131f;
}

.news-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.news-card:hover .news-card-img {
    transform: scale(1.05);
}

.news-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--text-muted);
}

.news-card-img-placeholder i {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.news-card-type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    backdrop-filter: blur(8px);
}

.news-card-type-tag.tag-news {
    background: rgba(37, 99, 235, 0.85);
    /* Accent Blue */
    color: #ffffff;
}

.news-card-type-tag.tag-event {
    background: rgba(245, 158, 11, 0.85);
    /* Warning Orange */
    color: #ffffff;
}

/* News Content */
.news-card-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-grow: 1;
    gap: 12px;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.news-card-cat-badge {
    color: var(--accent-light);
    font-weight: 500;
}

.news-card-date {
    color: var(--text-muted);
}

.news-card-title {
    font-size: 17px;
    line-height: 1.4;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 48px;
}

.news-card-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 63px;
}

.news-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.news-card-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition-fast);
}

.news-card-link-btn i {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-fast);
}

.news-card-link-btn:hover {
    color: var(--text-primary);
}

.news-card-link-btn:hover i {
    transform: translate(2px, -2px);
}

/* ==========================================================================
   8. Skeleton Loading Screens & Animations
   ========================================================================== */
@keyframes skeleton-pulse {
    0% {
        opacity: 0.35;
    }

    50% {
        opacity: 0.85;
    }

    100% {
        opacity: 0.35;
    }
}

.skeleton {
    animation: skeleton-pulse 1.8s ease-in-out infinite;
    background-color: #e2e8f0;
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-title {
    height: 18px;
    width: 80%;
    margin-bottom: 6px;
    border-radius: 4px;
}

.skeleton-text {
    height: 12px;
    width: 100%;
    margin-bottom: 4px;
    border-radius: 3px;
}

.skeleton-text.short {
    width: 50%;
}

.skeleton-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-btn {
    height: 18px;
    width: 110px;
    border-radius: 4px;
}

/* Skeleton Cards state adjustments */
.contact-card.skeleton-card,
.news-card.skeleton-card {
    pointer-events: none;
    box-shadow: none;
}

.skeleton-img-placeholder {
    width: 100%;
    height: 190px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* ==========================================================================
   9. Produtividade & Recursos: Reservas (Bookings) e Documentos
   ========================================================================== */

/* Reservas (Bookings) Styling */
.bookings-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.resource-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    padding: 20px;
    gap: 16px;
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resource-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    flex-shrink: 0;
}

.resource-icon-box i {
    width: 20px;
    height: 20px;
}

.resource-title-group {
    display: flex;
    flex-direction: column;
}

.resource-title-group h4 {
    font-size: 16px;
    margin: 0;
    color: var(--text-primary);
}

.resource-type-badge {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.resource-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.resource-location i {
    width: 14px;
    height: 14px;
}

.resource-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.resource-bookings-list-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin: 0;
}

.resource-bookings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
}

.booking-item-row {
    font-size: 12px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    padding: 8px 10px;
    border-radius: 4px;
}

.booking-item-time {
    font-weight: 600;
    color: var(--accent-light);
    display: block;
    margin-bottom: 2px;
}

.booking-item-desc {
    color: var(--text-secondary);
}

.no-bookings-text {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
    margin: 4px 0;
}

.resource-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Documents Styling */
.documents-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.document-card {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    height: 100%;
}

.document-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.document-header {
    display: flex;
    align-items: start;
    gap: 16px;
    margin-bottom: 12px;
}

.document-type-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 12px;
}

.doc-pdf {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

.doc-xlsx {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #22c55e;
    color: #4ade80;
}

.doc-docx {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid #3b82f6;
    color: #60a5fa;
}

.document-meta-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.document-meta-group h4 {
    font-size: 16px;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.4;
}

.document-cat-tag {
    font-size: 11px;
    background: var(--bg-surface-hover);
    padding: 2px 8px;
    border-radius: 12px;
    width: fit-content;
    color: var(--text-secondary);
}

.document-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
}

.document-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    margin-top: auto;
}

.document-size-info {
    font-size: 12px;
    color: var(--text-muted);
}

.btn-download-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-download-doc:hover {
    color: var(--text-primary);
}

.btn-download-doc i {
    width: 14px;
    height: 14px;
}

.btn-fill-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-left: auto;
}

.btn-fill-doc:hover {
    color: var(--text-primary);
}

.btn-fill-doc i {
    width: 14px;
    height: 14px;
}

.btn-office-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #d83b01;
    /* Microsoft Office Orange-Red */
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-left: auto;
    text-decoration: none;
}

.btn-office-doc:hover {
    color: var(--text-primary);
}

.btn-office-doc i {
    width: 14px;
    height: 14px;
}


/* ==========================================================================
   10. Base de Conhecimento: FAQs & Accordion
   ========================================================================== */

.faqs-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.faq-item {
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.faq-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.faq-item.faq-item-active {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
    background: var(--bg-surface-hover);
}

.faq-question-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition-fast);
    gap: 16px;
}

.faq-question-btn:focus {
    outline: none;
}

.faq-question-text {
    flex-grow: 1;
    line-height: 1.4;
}

.faq-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-bounce);
    flex-shrink: 0;
}

.faq-icon-box i {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-bounce);
}

.faq-item:hover .faq-icon-box {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent-light);
}

.faq-item.faq-item-active .faq-icon-box {
    background: var(--accent);
    border-color: var(--accent-light);
    color: #ffffff;
    transform: rotate(180deg);
}

.faq-answer-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    background: var(--bg-base);
}

.faq-item.faq-item-active .faq-answer-panel {
    opacity: 1;
    border-top: 1px solid var(--border-color);
}

.faq-answer-content {
    padding: 20px 24px;
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ==========================================================================
   11. Diretório e Mapa de Monumentos
   ========================================================================== */

/* ── Monument Category Cards ─────────────────────────────────────────────── */
.monument-cat-section {
    margin-bottom: 28px;
}

.monument-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.monument-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 12px 14px;
    border-radius: 14px;
    background: var(--card-bg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    user-select: none;
}

.monument-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    border-color: var(--cat-color, var(--accent));
}

.monument-cat-card.active {
    border-color: var(--cat-color, var(--accent));
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 12%, var(--card-bg));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cat-color, var(--accent)) 25%, transparent);
}

.monument-cat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 18%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease;
}

.monument-cat-icon i {
    width: 22px;
    height: 22px;
    color: var(--cat-color, var(--accent));
}

.monument-cat-card:hover .monument-cat-icon {
    background: color-mix(in srgb, var(--cat-color, var(--accent)) 28%, transparent);
}

.monument-cat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    line-height: 1.3;
}

.monument-cat-ext {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
    color: var(--text-muted);
}

.monument-cat-ext i {
    width: 11px;
    height: 11px;
}

.monument-cat-card:hover .monument-cat-ext {
    opacity: 1;
    background: var(--hover-bg);
}

/* ── Monuments Container ─────────────────────────────────────────────────── */
.monuments-container {
    max-width: var(--max-content-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}


.monuments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 8px;
}

.monument-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    transition: var(--transition-smooth);
}

.monument-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), var(--shadow-lg);
}

.monument-image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #0c121e;
}

.monument-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.monument-card:hover .monument-img {
    transform: scale(1.05);
}

.monument-type-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    backdrop-filter: blur(8px);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.tag-museum {
    background: rgba(37, 99, 235, 0.85);
    /* Blue */
}

.tag-palace {
    background: rgba(99, 102, 241, 0.85);
    /* Indigo */
}

.tag-monument {
    background: rgba(225, 29, 72, 0.85);
    /* Rose */
}

.tag-archaeological_site {
    background: rgba(217, 119, 6, 0.85);
    /* Amber */
}

/* === PCIP Category Tags === */
.tag-castle               { background: rgba(124,  58, 237, 0.85); } /* Violet     */
.tag-cathedral            { background: rgba( 30, 100, 200, 0.85); } /* Royal Blue */
.tag-church               { background: rgba( 13, 148, 136, 0.85); } /* Teal       */
.tag-monastery            { background: rgba(180,  83,   9, 0.85); } /* Amber Dark */
.tag-chapel               { background: rgba(219,  39, 119, 0.85); } /* Pink       */
.tag-hermitage            { background: rgba(161, 161, 170, 0.85); } /* Zinc       */
.tag-archaeological_site  { background: rgba(217, 119,   6, 0.85); } /* Amber      */
.tag-rock_art             { background: rgba( 22, 163,  74, 0.85); } /* Green      */
.tag-civil_architecture   { background: rgba(234, 179,   8, 0.85); } /* Yellow     */
.tag-military_architecture{ background: rgba(220,  38,  38, 0.85); } /* Red        */
.tag-cultural_equipment   { background: rgba( 37, 99, 235, 0.85); }  /* Blue       */
/* legacy */
.tag-museum               { background: rgba( 37, 99, 235, 0.85); }
.tag-palace               { background: rgba(101, 163, 13, 0.85); }
.tag-monument             { background: rgba(234, 179,  8, 0.85); }


.monument-card-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-grow: 1;
    gap: 12px;
}

.monument-card-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.monument-card-location i {
    width: 14px;
    height: 14px;
}

.monument-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.monument-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    height: 63px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.monument-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Monument Details Modal Styles */
.monument-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 16px;
    text-align: left;
}

@media (max-width: 768px) {
    .monument-detail-layout {
        grid-template-columns: 1fr;
    }
}

.monument-detail-image-sec {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.monument-detail-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.monument-detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-section-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
    margin: 0 0 10px 0;
}

.monument-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.monument-info-item {
    display: flex;
    align-items: start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.monument-info-item i {
    color: var(--accent-light);
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.monument-info-item span {
    line-height: 1.5;
}

.monument-manager-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    margin-top: 8px;
}

.monument-manager-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent);
    flex-shrink: 0;
}

.monument-manager-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.monument-manager-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.monument-manager-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Premium CSS Radar Map Widget */
.monument-map-placeholder {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6);
}

.map-grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
}

.map-radar-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90px;
    height: 90px;
    margin-left: -45px;
    margin-top: -45px;
    border-radius: 50%;
    border: 1px dashed var(--accent);
    background: rgba(37, 99, 235, 0.05);
    animation: map-radar-pulse 3s infinite linear;
    z-index: 2;
}

.map-marker-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border-radius: 50%;
    background: var(--error);
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px var(--error);
    z-index: 3;
}

.map-coords {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 10px;
    color: var(--text-muted);
    font-family: monospace;
    background: rgba(0, 0, 0, 0.6);
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 4;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes map-radar-pulse {
    0% {
        transform: rotate(0deg) scale(0.8);
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: rotate(360deg) scale(1.3);
        opacity: 0;
    }
}

/* ==========================================================================
   6. Whistleblowing Channel (Canal de Denúncias) Styles
   ========================================================================== */

.complaints-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tab Navigation */
.complaints-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 8px;
    margin-bottom: 8px;
}

.complaints-tab-btn {
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.complaints-tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.complaints-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.complaints-tab-btn i {
    margin-right: 8px;
    vertical-align: middle;
    width: 16px;
    height: 16px;
}

/* Panel Layouts */
.complaints-panel {
    display: none;
}

.complaints-panel.active {
    display: block;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Secure Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-zone:hover {
    border-color: var(--accent-light);
    background-color: rgba(37, 99, 235, 0.04);
}

.upload-zone i {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
}

.upload-zone:hover i {
    color: var(--accent-light);
}

.upload-zone-text {
    font-size: 14px;
    font-weight: 500;
}

.upload-zone-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.file-selected-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--accent);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    color: var(--accent-light);
    margin-top: 10px;
}

/* Success Code Display */
.code-display-card {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: 1px solid var(--accent);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-lg);
}

.code-display-card i.success-icon {
    width: 60px;
    height: 60px;
    color: var(--success);
    margin-bottom: 8px;
}

.code-display-card h3 {
    font-size: 24px;
    font-weight: 700;
}

.code-display-card p {
    color: var(--text-secondary);
    max-width: 500px;
    font-size: 14px;
}

.code-box-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    width: 100%;
    max-width: 380px;
}

.code-box {
    flex-grow: 1;
    font-family: monospace;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    text-align: center;
    user-select: all;
}

/* Tracking / Search Panel */
.track-search-box {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin-bottom: 8px;
}

.track-search-box input {
    flex-grow: 1;
    font-family: monospace;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Tracking Details & Chat */
.tracking-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 16px;
}

.complaint-details-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.details-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.details-row:last-child {
    border-bottom: none;
}

.details-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.details-value.description {
    white-space: pre-wrap;
    background-color: var(--bg-base);
    padding: 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    font-size: 14px;
    line-height: 1.5;
}

/* Chat Board */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 480px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-base);
    overflow: hidden;
}

.chat-header {
    padding: 16px 20px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h4 {
    font-size: 15px;
    font-weight: 600;
}

.chat-header i {
    color: var(--accent-light);
    width: 18px;
    height: 18px;
}

.chat-feed {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Chat Message Bubbles */
.chat-bubble {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-bubble.whistleblower {
    align-self: flex-end;
}

.chat-bubble.handler {
    align-self: flex-start;
}

.bubble-meta {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.chat-bubble.whistleblower .bubble-meta {
    text-align: right;
}

.bubble-body {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-bubble.whistleblower .bubble-body {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
    border: 1px solid var(--border-color);
}

.chat-bubble.handler .bubble-body {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.chat-bubble.handler .bubble-body strong {
    color: var(--accent-light);
}

.chat-input-area {
    padding: 16px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.chat-input-area textarea {
    flex-grow: 1;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    resize: none;
    height: 44px;
    transition: var(--transition-fast);
}

.chat-input-area textarea:focus {
    border-color: var(--accent);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius-sm);
    background: var(--accent-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.chat-send-btn i {
    width: 18px;
    height: 18px;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.received {
    background-color: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.status-badge.under_review {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge.resolved {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.archived {
    background-color: rgba(100, 116, 139, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(100, 116, 139, 0.2);
}

/* Admin Dashboard Table */
.admin-table-container {
    width: 100%;
    overflow-x: auto;
}

.complaints-admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.complaints-admin-table th,
.complaints-admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.complaints-admin-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background-color: var(--bg-surface-hover);
}

.complaints-admin-table tbody tr {
    transition: var(--transition-fast);
}

.complaints-admin-table tbody tr:hover {
    background-color: var(--bg-surface-hover);
}

.admin-action-btn-group {
    display: flex;
    gap: 8px;
}

.btn-icon-only {
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    background-color: var(--bg-surface);
}

.btn-icon-only:hover {
    color: var(--text-primary);
    border-color: var(--border-color-hover);
    background-color: var(--bg-surface-hover);
}

.btn-icon-only.btn-danger-hover:hover {
    color: #ffffff;
    background-color: var(--error);
    border-color: var(--error);
}

.btn-icon-only i {
    width: 14px;
    height: 14px;
}

/* Admin Auth Section on Complaints */
.admin-auth-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    margin-bottom: 24px;
}

.admin-auth-info-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-auth-info-group i {
    width: 24px;
    height: 24px;
    color: var(--accent-light);
}

.admin-auth-info-group h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.admin-auth-info-group p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Split Admin View */
.admin-detail-layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 32px;
}

.audit-logs-card {
    margin-top: 32px;
}

.audit-logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.audit-log-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    padding: 8px 12px;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.audit-log-time {
    color: var(--text-muted);
    font-weight: 600;
}

.audit-log-action {
    color: var(--text-primary);
    font-weight: 500;
}

.audit-log-details {
    color: var(--text-secondary);
    font-size: 11px;
}

.attachment-download-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-top: 10px;
}

.attachment-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.attachment-info i {
    width: 20px;
    height: 20px;
    color: var(--accent-light);
}

.attachment-name {
    font-size: 13.5px;
    font-weight: 500;
}

.attachment-download-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.attachment-download-btn:hover {
    color: var(--text-primary);
}

.attachment-download-btn i {
    width: 14px;
    height: 14px;
}

/* Modal Redaction Editor */
.redact-textarea {
    width: 100%;
    min-height: 200px;
    font-family: inherit;
    font-size: 14px;
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 14px;
    color: var(--text-primary);
    outline: none;
    resize: vertical;
    margin-bottom: 20px;
}

.redact-textarea:focus {
    border-color: var(--accent);
}

/* ==========================================================================
   PCI Design System & Ulysses Premium Classes
   ========================================================================== */

.pci-heading {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.text-gold {
    color: var(--pci-gold) !important;
}

.text-accent {
    color: var(--pci-accent) !important;
}

.section-tag {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--pci-accent);
    margin-bottom: 0.75rem;
    display: block;
}

.pci-card {
    background: white;
    border: 1px solid var(--pci-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.pci-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--pci-accent);
}

.btn-pci {
    padding: 0.75rem 1.5rem;
    border-radius: 50rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-pci-primary {
    background: var(--pci-accent);
    color: white;
    border: none;
}

.btn-pci-primary:hover {
    background: var(--pci-accent-hover);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
    color: white;
}

.pci-badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
}

.pci-badge-accent {
    background: rgba(59, 130, 246, 0.1);
    color: var(--pci-accent);
}

.pci-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pci-header-white {
    background: white !important;
    border-bottom: 1px solid var(--pci-border) !important;
    padding: 0.75rem 0 !important;
    height: 90px;
    display: flex;
    align-items: center;
}

.pci-logo-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pci-brand-text {
    border-left: 2px solid var(--pci-gold);
    padding-left: 1rem;
    line-height: 1.2;
}

.pci-brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pci-accent);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.pci-brand-subtitle {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pci-text-muted);
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
}

.pci-nav-pills .nav-link {
    color: var(--pci-text-main);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
}

.pci-nav-pills .nav-link:hover {
    color: var(--pci-accent);
    background: rgba(59, 130, 246, 0.05);
}

.pci-nav-pills .nav-link.active {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--pci-accent) !important;
}

.btn-area-reservada {
    background: var(--pci-accent);
    color: white;
    border-radius: 0.75rem;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-area-reservada:hover {
    background: var(--pci-accent-hover);
    color: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.bg-gold-soft {
    background-color: var(--pci-gold-soft) !important;
}

.border-gold {
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
}

.hover-gold:hover {
    color: var(--pci-gold) !important;
    transition: var(--transition-smooth);
}

.collection-card {
    position: relative;
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    margin-bottom: 20px;
}

.collection-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.collection-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: all 0.5s ease;
}

.collection-card:hover .collection-img {
    filter: brightness(0.5) scale(1.1);
}

.collection-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: white;
}

.nearby-card {
    transition: all 0.3s ease;
    border: 0;
    overflow: hidden;
    height: 100%;
}

.nearby-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.nearby-img-wrapper {
    height: 140px;
    overflow: hidden;
    position: relative;
}

.nearby-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nearby-card:hover .nearby-img {
    transform: scale(1.1);
}

.nearby-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 5px;
    height: 2.3rem;
}

.highlight-card {
    border: 0;
    overflow: hidden;
    background: #000;
    height: 400px;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.highlight-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: transform 1s ease;
}

.highlight-card:hover .highlight-img {
    transform: scale(1.05);
}

.highlight-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
}

.search-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
    position: relative;
}

/* Vacation Form Styling */
.vacation-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    background-color: rgba(255, 255, 255, 0.01);
}

.form-fieldset legend {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    padding: 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 120px;
    gap: 16px;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.section-selector-card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    background-color: var(--bg-surface);
    transition: var(--transition-smooth);
}

.section-selector-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 12px;
    user-select: none;
}

.section-selector-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.section-selector-content {
    transition: all 0.3s ease;
    border-top: 1px dashed var(--border-color);
    padding-top: 16px;
}

.section-selector-content.hidden {
    display: none !important;
}

@media (max-width: 768px) {

    .form-grid-2,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Desktop Sidebar Collapsible Layout
   ========================================================================== */
@media (min-width: 769px) {
    body.sidebar-collapsed {
        --sidebar-width: 80px;
    }

    /* Smooth transition for text components */
    .sidebar .logo-text,
    .sidebar .sidebar-nav span,
    .sidebar .user-info {
        display: inline-block;
        max-width: 200px;
        opacity: 1;
        transition: opacity 0.2s ease, max-width 0.3s ease, margin 0.3s ease, padding 0.3s ease;
        overflow: hidden;
        vertical-align: middle;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .sidebar .logo-container,
    .sidebar .nav-item,
    .sidebar .user-profile {
        transition: gap 0.3s ease, padding 0.3s ease, justify-content 0.3s ease;
    }

    /* Collapsed overrides */
    body.sidebar-collapsed .logo-text,
    body.sidebar-collapsed .sidebar-nav span,
    body.sidebar-collapsed .user-info {
        opacity: 0;
        max-width: 0;
        pointer-events: none;
        margin: 0;
        padding: 0;
    }

    body.sidebar-collapsed .logo-container,
    body.sidebar-collapsed .nav-item,
    body.sidebar-collapsed .user-profile {
        gap: 0;
        justify-content: center;
    }

    body.sidebar-collapsed .sidebar-header {
        justify-content: center;
        padding: 0;
    }

    body.sidebar-collapsed .sidebar-footer {
        padding: 20px 8px;
        transition: padding 0.3s ease;
    }

    body.sidebar-collapsed .sidebar-nav {
        padding: 24px 8px;
        transition: padding 0.3s ease;
    }

    body.sidebar-collapsed .user-profile {
        padding: 0;
        justify-content: center;
    }

    body.sidebar-collapsed .nav-item {
        padding: 12px 0;
        justify-content: center;
    }

    body.sidebar-collapsed .nav-item.active {
        padding-left: 0;
        border-left: 3px solid var(--accent);
    }

    .collapse-icon {
        transition: transform 0.3s ease;
    }

    body.sidebar-collapsed .collapse-icon {
        transform: rotate(180deg);
    }

    /* Hover-expand functionality when sidebar is collapsed */
    body.sidebar-collapsed .sidebar:hover {
        width: 270px;
        box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.15);
    }

    body.sidebar-collapsed .sidebar:hover .logo-text,
    body.sidebar-collapsed .sidebar:hover .sidebar-nav span,
    body.sidebar-collapsed .sidebar:hover .user-info {
        opacity: 1;
        max-width: 200px;
        pointer-events: auto;
    }

    body.sidebar-collapsed .sidebar:hover .logo-container,
    body.sidebar-collapsed .sidebar:hover .nav-item,
    body.sidebar-collapsed .sidebar:hover .user-profile {
        gap: 12px;
        justify-content: flex-start;
    }

    body.sidebar-collapsed .sidebar:hover .sidebar-header {
        justify-content: flex-start;
        padding: 0 24px;
    }

    body.sidebar-collapsed .sidebar:hover .sidebar-footer {
        padding: 20px;
    }

    body.sidebar-collapsed .sidebar:hover .sidebar-nav {
        padding: 24px 16px;
    }

    body.sidebar-collapsed .sidebar:hover .user-profile {
        padding: 0;
        justify-content: flex-start;
        gap: 14px;
    }

    body.sidebar-collapsed .sidebar:hover .nav-item {
        padding: 12px 24px;
        justify-content: flex-start;
    }

    body.sidebar-collapsed .sidebar:hover .nav-item.active {
        padding-left: 24px;
        border-left: 3px solid var(--accent);
    }
}

@media (max-width: 768px) {
    .collapse-toggle-item {
        display: none !important;
    }
}

/* ==========================================================================
   Edit Profile Modal & Photo Upload Custom Styles
   ========================================================================== */
.profile-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: var(--shadow-md);
    transition: var(--transition-bounce);
}

.profile-avatar-wrapper:hover {
    transform: scale(1.05);
    border-color: var(--accent-light);
}

.profile-avatar-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 13, 22, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: #ffffff;
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay i {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

.profile-avatar-overlay span {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-upload-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   Contacts Tree View Layout & Styling
   ========================================================================== */

.contacts-grid.tree-view {
    display: block;
    margin-top: 24px;
}

.org-tree-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tree-dept-node,
.tree-div-node {
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
    transition: var(--transition-smooth);
}

.tree-dept-node:hover,
.tree-div-node:hover {
    border-color: var(--border-color-hover);
}

.tree-dept-header,
.tree-div-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-surface-hover);
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-fast);
}

.tree-dept-header:hover,
.tree-div-header:hover {
    background-color: var(--border-color);
}

.tree-toggle-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    transition: transform var(--transition-fast);
}

.tree-dept-node:not(.expanded) .tree-toggle-icon,
.tree-div-node:not(.expanded) .tree-toggle-icon {
    transform: rotate(-90deg);
}

.tree-dept-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.tree-div-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.tree-count-badge {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.tree-dept-content,
.tree-div-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: max-height var(--transition-smooth);
}

.tree-dept-node:not(.expanded) .tree-dept-content,
.tree-div-node:not(.expanded) .tree-div-content {
    display: none;
}

.tree-children-container {
    margin-left: 20px;
    border-left: 1px dashed var(--border-color);
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 4px;
}

.tree-collaborators-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tree-member-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tree-member-card.manager {
    border-left: 4px solid var(--accent);
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.03) 0%, var(--bg-surface) 100%);
}

.tree-member-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-light);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
}

.tree-member-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.tree-member-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tree-member-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.tree-member-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   12. Universal Search Dropdown & FullCalendar Integration
   ========================================================================== */

/* Search Dropdown styles */
.search-bar-container {
    position: relative; /* ensure absolute positioning works */
}

.global-search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 480px;
    max-height: 480px;
    overflow-y: auto;
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), var(--shadow-glow);
    z-index: 1000;
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
}

.global-search-dropdown::-webkit-scrollbar {
    width: 6px;
}
.global-search-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.search-dropdown-section {
    display: flex;
    flex-direction: column;
}

.search-dropdown-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--pci-gold);
    letter-spacing: 0.1em;
    padding: 8px 16px 4px 16px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.search-dropdown-item:hover, .search-dropdown-item.selected {
    background-color: var(--bg-surface-hover);
}

.search-dropdown-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--accent-glow);
    border: 1px solid var(--border-color);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-dropdown-icon img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.search-dropdown-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-dropdown-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown-no-results {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
}

/* FullCalendar Custom Theme Integration */
.bookings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
    width: 100%;
    margin-top: 16px;
}

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

.bookings-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calendar-card {
    padding: 24px;
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-surface-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

/* Override FullCalendar variables/styles to match portal aesthetics */
.fc {
    font-family: var(--font-body) !important;
    --fc-border-color: var(--border-color) !important;
    --fc-page-bg-color: transparent !important;
    --fc-neutral-bg-color: rgba(255, 255, 255, 0.02) !important;
    --fc-list-event-hover-bg-color: var(--bg-surface-hover) !important;
    --fc-today-bg-color: rgba(37, 99, 235, 0.05) !important;
}

.fc .fc-toolbar-title {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    font-size: 1.25rem !important;
    color: var(--text-primary);
}

.fc .fc-button {
    background-color: var(--bg-surface-glass) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-heading) !important;
    font-weight: 500 !important;
    text-transform: capitalize !important;
    transition: var(--transition-fast) !important;
    box-shadow: none !important;
}

.fc .fc-button:hover {
    background-color: var(--bg-surface-hover) !important;
    border-color: var(--border-color-hover) !important;
    color: var(--text-primary) !important;
}

.fc .fc-button-active {
    background-color: var(--accent) !important;
    border-color: var(--accent-light) !important;
    color: #ffffff !important;
}

.fc .fc-button:disabled {
    opacity: 0.4 !important;
}

.fc th {
    font-family: var(--font-heading) !important;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 0 !important;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.fc td {
    font-size: 13px;
}

.fc-theme-standard td, .fc-theme-standard th {
    border-color: var(--border-color);
}

.fc-daygrid-day-number {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-secondary);
    padding: 6px !important;
}

.fc-day-today .fc-daygrid-day-number {
    color: var(--accent-light) !important;
    font-weight: 700;
}

.fc-event {
    cursor: pointer;
    border: none !important;
    border-radius: 4px !important;
    padding: 2px 6px !important;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.fc-event:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.fc-event-title {
    font-weight: 600 !important;
    font-size: 11px !important;
}

/* Event Types Color Coding */
.event-sala {
    background-color: rgba(37, 99, 235, 0.85) !important; /* Blue */
    color: #ffffff !important;
    border-left: 3px solid #2563eb !important;
}

.event-viatura {
    background-color: rgba(245, 158, 11, 0.85) !important; /* Amber */
    color: #ffffff !important;
    border-left: 3px solid #f59e0b !important;
}

.event-equipamento {
    background-color: rgba(16, 185, 129, 0.85) !important; /* Emerald */
    color: #ffffff !important;
    border-left: 3px solid #10b981 !important;
}

/* Resource items in sidebar */
.sidebar-resource-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface-glass);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-resource-item:hover, .sidebar-resource-item.active {
    border-color: var(--accent-light);
    background-color: var(--bg-surface-hover);
}

.sidebar-resource-item.active {
    box-shadow: var(--shadow-glow);
}

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

.dot-sala { background-color: #2563eb; }
.dot-viatura { background-color: #f59e0b; }
.dot-equipamento { background-color: #10b981; }

/* ==========================================================================
   9. Documents Page Enhancements (Favorites, Badges, Modal & Popular)
   ========================================================================== */

/* Star Favorite Button */
.btn-fav-doc {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}

.btn-fav-doc:hover {
    background-color: var(--bg-surface-hover);
    color: #eab308;
    transform: scale(1.1);
}

.btn-fav-doc.active {
    color: #eab308;
}

.btn-fav-doc.active i,
.btn-fav-doc.active svg {
    fill: #eab308;
}

/* Document Cards Position adjustment for star button */
.document-card {
    position: relative;
}

/* Status Badges */
.document-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
    margin-left: 8px;
    vertical-align: middle;
}

.document-badge-new {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    animation: badgePulse 2s infinite ease-in-out;
}

.document-badge-updated {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0);
    }
}

/* Trending Section (Popular Documents) */
.documents-popular-section {
    background: var(--bg-surface-glass);
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.popular-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popular-section-title i {
    color: #f59e0b; /* Amber */
    animation: flameWiggle 1s infinite alternate;
}

@keyframes flameWiggle {
    0% { transform: rotate(-3deg) scale(1); }
    100% { transform: rotate(3deg) scale(1.08); }
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.popular-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.popular-card:hover {
    border-color: var(--accent-light);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.popular-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.popular-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.popular-title-group h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 2px;
    padding-right: 20px; /* space for star */
}

.popular-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.popular-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-secondary);
}

.popular-actions {
    display: flex;
    gap: 8px;
}

.popular-actions a {
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.popular-actions a:hover {
    color: var(--text-primary);
}

/* PDF Preview Drawer */
.pdf-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 13, 22, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pdf-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.pdf-drawer-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 950px;
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pdf-drawer-overlay.open .pdf-drawer-content {
    transform: translateX(0);
}

.pdf-drawer-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-surface-glass);
}

.pdf-drawer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.pdf-drawer-title i {
    color: #ef4444; /* Red for PDF */
    flex-shrink: 0;
}

.pdf-drawer-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdf-btn-control {
    background-color: var(--bg-surface-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.pdf-btn-control:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.pdf-iframe-container {
    flex: 1;
    position: relative;
    background-color: #525659; /* typical PDF viewer background */
}

.pdf-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* PDF Drawer Resizer handle */
.pdf-drawer-resizer {
    position: absolute;
    left: -6px;
    top: 0;
    bottom: 0;
    width: 12px;
    cursor: ew-resize;
    z-index: 1010;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.pdf-drawer-resizer:hover,
.pdf-drawer-resizer.resizing {
    background-color: var(--accent-light);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Beautiful drag handle indicator for the resizers */
.pdf-drawer-resizer::after,
.profile-drawer-resizer::after,
.booking-drawer-resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 48px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1015;
}

/* Grip dots inside the handles */
.pdf-drawer-resizer::before,
.profile-drawer-resizer::before,
.booking-drawer-resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 2px;
    background-color: var(--text-muted);
    border-radius: 50%;
    box-shadow: 0 -5px 0 var(--text-muted), 0 5px 0 var(--text-muted);
    opacity: 0.8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1016;
    pointer-events: none;
}

.pdf-drawer-resizer:hover::after,
.pdf-drawer-resizer.resizing::after,
.profile-drawer-resizer:hover::after,
.profile-drawer-resizer.resizing::after,
.booking-drawer-resizer:hover::after,
.booking-drawer-resizer.resizing::after {
    background-color: var(--accent);
    border-color: var(--accent-light);
    box-shadow: 0 0 14px var(--accent-glow);
    opacity: 1;
    height: 64px;
}

.pdf-drawer-resizer:hover::before,
.pdf-drawer-resizer.resizing::before,
.profile-drawer-resizer:hover::before,
.profile-drawer-resizer.resizing::before,
.booking-drawer-resizer:hover::before,
.booking-drawer-resizer.resizing::before {
    background-color: #ffffff;
    box-shadow: 0 -5px 0 #ffffff, 0 5px 0 #ffffff;
    opacity: 1;
}

/* Profile Preview Drawer */
.profile-drawer-overlay,
.booking-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 13, 22, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.profile-drawer-overlay {
    z-index: 1000;
}

.booking-drawer-overlay {
    z-index: 2000;
}

.profile-drawer-overlay.open,
.booking-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.profile-drawer-content,
.booking-drawer-content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background-color: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: visible;
}

.profile-drawer-content {
    z-index: 1001;
}

.booking-drawer-content {
    z-index: 2001;
}

.profile-drawer-overlay.open .profile-drawer-content,
.booking-drawer-overlay.open .booking-drawer-content {
    transform: translateX(0);
}

/* Drawer Resizer handles */
.profile-drawer-resizer,
.booking-drawer-resizer {
    position: absolute;
    left: -6px;
    top: 0;
    bottom: 0;
    width: 12px;
    cursor: ew-resize;
    z-index: 1010;
    background-color: transparent;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Visible pill indicator */
.profile-drawer-resizer::after,
.booking-drawer-resizer::after {
    content: '';
    display: block;
    width: 3px;
    height: 40px;
    border-radius: 3px;
    background-color: var(--border-color);
    transition: background-color 0.2s ease, height 0.2s ease, box-shadow 0.2s ease;
}

.profile-drawer-resizer:hover::after,
.profile-drawer-resizer.resizing::after,
.booking-drawer-resizer:hover::after,
.booking-drawer-resizer.resizing::after {
    background-color: var(--accent-light);
    height: 64px;
    box-shadow: 0 0 8px var(--accent-glow);
}

.profile-drawer-resizer:hover,
.profile-drawer-resizer.resizing,
.booking-drawer-resizer:hover,
.booking-drawer-resizer.resizing {
    background-color: var(--accent-glow);
    box-shadow: none;
}

/* Custom internal scrollable containers for the drawers */
.profile-drawer-content #modal-content-body,
.booking-drawer-content #booking-drawer-body {
    overflow-y: auto;
    flex: 1;
    height: 100%;
}

/* Legislation Content Premium Styling */
.legislation-content p {
    margin-bottom: 20px;
    padding: 18px 22px;
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: var(--transition-fast);
}

.legislation-content p:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legislation-content a {
    color: var(--accent-light);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.legislation-content a:hover {
    color: var(--accent);
}

.legislation-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
    padding-left: 12px;
}

/* ==========================================================================
   V2 Features: Mural de Ideias & Guia de Integração (Onboarding)
   ========================================================================== */

/* 1. Guia de Integração & Onboarding Widget */
.onboarding-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.onboarding-widget:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color-hover);
}

.onboarding-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.onboarding-widget-header h4 {
    font-size: 16px;
    font-weight: 700;
}

.onboarding-widget-header i {
    color: var(--accent-light);
}

.onboarding-progress-container {
    margin-bottom: 16px;
}

.onboarding-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.onboarding-progress-bar-bg {
    background-color: var(--border-color);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.onboarding-progress-bar-fill {
    background: var(--accent-gradient);
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease-out;
}

.onboarding-widget-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.onboarding-widget-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
}

.onboarding-widget-item.completed span {
    text-decoration: line-through;
    color: var(--text-muted);
}

.onboarding-widget-item i {
    margin-top: 2px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.onboarding-widget-item:hover i {
    transform: scale(1.1);
}

.onboarding-widget-link {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

/* Detailed Onboarding View */
.onboarding-dashboard-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow-md);
}

.onboarding-dashboard-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
}

.onboarding-dashboard-info p {
    color: var(--text-secondary);
}

.onboarding-radial-progress {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.onboarding-radial-svg {
    transform: rotate(-90deg);
    width: 100px;
    height: 100px;
}

.onboarding-radial-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.onboarding-radial-fill {
    fill: none;
    stroke: var(--accent-light);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 251.2; /* 2 * PI * r (r=40) */
    stroke-dashoffset: 251.2;
    transition: stroke-dashoffset 0.6s ease;
}

.onboarding-radial-text {
    position: absolute;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.onboarding-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .onboarding-grid {
        grid-template-columns: 1fr;
    }
}

.onboarding-section-title {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.onboarding-task-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 16px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.onboarding-task-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.onboarding-task-card.completed {
    border-left: 4px solid var(--success);
    background-color: rgba(16, 185, 129, 0.02);
}

.onboarding-checkbox-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color-hover);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.onboarding-checkbox-btn.checked {
    background-color: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.onboarding-task-content {
    flex: 1;
}

.onboarding-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.onboarding-task-title {
    font-size: 16px;
    font-weight: 600;
}

.onboarding-task-card.completed .onboarding-task-title {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.onboarding-task-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.onboarding-task-card.completed .onboarding-task-desc {
    color: var(--text-muted);
}

.onboarding-task-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: var(--bg-surface-hover);
    color: var(--text-secondary);
}

.onboarding-task-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-light);
    transition: var(--transition-fast);
}

.onboarding-task-link-btn:hover {
    color: var(--accent);
    transform: translateX(2px);
}

.onboarding-guide-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.onboarding-guide-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--accent);
}

.onboarding-guide-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.onboarding-guide-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.onboarding-guide-step {
    display: flex;
    gap: 12px;
}

.onboarding-guide-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--accent);
    color: #ffffff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.onboarding-guide-step-text h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.onboarding-guide-step-text p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* 2. Mural de Ideias (Suggestions Wall) */
.ideas-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.ideas-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-tab:hover {
    border-color: var(--border-color-hover);
    background-color: var(--bg-surface-hover);
}

.filter-tab.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.ideas-btn-new {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-bounce);
}

.ideas-btn-new:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.idea-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.idea-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-color-hover);
}

.idea-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.idea-author-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.idea-header-info {
    flex: 1;
    min-width: 0;
}

.idea-author-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.idea-date-role {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.idea-status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.badge-submitted { background-color: #f1f5f9; color: #475569; }
.badge-review { background-color: #fef3c7; color: #d97706; }
.badge-approved { background-color: #f3e8ff; color: #7c3aed; }
.badge-implemented { background-color: #d1fae5; color: #059669; }
.badge-rejected { background-color: #fee2e2; color: #dc2626; }

.idea-card-body {
    padding: 20px;
    flex: 1;
}

.idea-category-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.tag-eficiencia { background-color: rgba(245, 158, 11, 0.1); color: #d97706; }
.tag-sustentabilidade { background-color: rgba(16, 185, 129, 0.1); color: #059669; }
.tag-tecnologia { background-color: rgba(37, 99, 235, 0.1); color: #2563eb; }
.tag-cultura { background-color: rgba(139, 92, 246, 0.1); color: #7c3aed; }
.tag-outros { background-color: rgba(100, 116, 139, 0.1); color: #475569; }

.idea-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.idea-card-desc {
    font-size: 14px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.idea-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-gradient);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.idea-actions-left {
    display: flex;
    gap: 12px;
}

.idea-action-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.idea-action-btn:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.idea-action-btn.voted {
    color: var(--error);
}

.idea-action-btn.voted i {
    fill: var(--error);
}

.idea-delete-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.idea-delete-btn:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: var(--error);
}

/* Modal form style overrides for new Idea */
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
}

.form-group select:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Comments Drawer / Side Panel Layout */
.comments-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.comments-drawer-header h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.comments-drawer-desc-box {
    padding: 20px 24px;
    background-color: var(--bg-surface-hover);
    border-bottom: 1px solid var(--border-color);
}

.comments-drawer-desc-box .idea-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
}

.comments-drawer-desc-box .idea-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.comments-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-bubble {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.comment-bubble-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    flex: 1;
    min-width: 0;
}

.comment-author-name {
    font-size: 13px;
    font-weight: 600;
    display: block;
}

.comment-date {
    font-size: 11px;
    color: var(--text-muted);
}

.comment-text {
    font-size: 13.5px;
    color: var(--text-primary);
    line-height: 1.5;
}

.comment-delete-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.comment-delete-btn:hover {
    color: var(--error);
}

.comments-footer-input {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.comment-textarea {
    flex: 1;
    height: 40px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
    resize: none;
    outline: none;
    transition: var(--transition-fast);
}

.comment-textarea:focus {
    border-color: var(--accent-light);
    background-color: var(--bg-surface);
    height: 80px;
}

.comment-submit-btn {
    background: var(--accent-gradient);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition-bounce);
}

.comment-submit-btn:hover {
    transform: scale(1.1);
}

.no-comments-placeholder {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 0;
    font-size: 14px;
}

/* ==========================================================================
   Accordion Menu Styles for Sidebar
   ========================================================================== */
.sidebar-category {
    margin-bottom: 4px;
    width: 100%;
}

.sidebar-category-toggle {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

.sidebar-category-toggle:hover {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
}

.sidebar-category-toggle.has-active-child {
    color: var(--accent);
    font-weight: 600;
}

.category-chevron {
    margin-left: auto;
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}

.sidebar-category-toggle.open .category-chevron {
    transform: rotate(180deg);
}

.sidebar-subcategory-list {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 20px;
    transition: max-height var(--transition-smooth);
}

.nav-sub-item {
    font-size: 13.5px !important;
    padding: 9px 12px !important;
}

/* Collapsed state styles */
@media (min-width: 769px) {
    body.sidebar-collapsed .sidebar-category-toggle {
        justify-content: center;
        padding: 12px 0;
        gap: 0;
    }

    body.sidebar-collapsed .sidebar-category-toggle span,
    body.sidebar-collapsed .sidebar-category-toggle .category-chevron {
        opacity: 0;
        max-width: 0;
        pointer-events: none;
        margin: 0;
        padding: 0;
    }

    body.sidebar-collapsed .sidebar-subcategory-list {
        padding-left: 0;
    }

    /* Expand submenus when collapsed is expanded on hover */
    body.sidebar-collapsed .sidebar:hover .sidebar-category-toggle {
        justify-content: flex-start;
        padding: 12px 18px;
        gap: 12px;
    }

    body.sidebar-collapsed .sidebar:hover .sidebar-category-toggle span,
    body.sidebar-collapsed .sidebar:hover .sidebar-category-toggle .category-chevron {
        opacity: 1;
        max-width: 200px;
        pointer-events: auto;
    }

    body.sidebar-collapsed .sidebar:hover .sidebar-subcategory-list {
        padding-left: 20px;
    }
}

/* Drag and Drop Sorting Styles */
.drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 4px;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    user-select: none;
    -webkit-user-select: none;
}

.drag-handle * {
    pointer-events: none;
}

.drag-handle:hover {
    background-color: var(--bg-surface-hover);
    color: var(--accent);
}

.drag-handle:active {
    cursor: grabbing;
}

tr.draggable {
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

tr.draggable.dragging {
    opacity: 0.4;
    background-color: var(--bg-surface-hover);
    border: 2px dashed var(--accent);
}

tr.draggable.drag-over {
    border-top: 2px solid var(--accent) !important;
    background-color: rgba(37, 99, 235, 0.05);
}

/* Icon Picker Styling */
.icon-picker-container {
    position: relative;
    width: 100%;
}

.icon-picker-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.icon-picker-preview {
    width: 42px;
    height: 42px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-surface-hover);
    color: var(--accent);
    flex-shrink: 0;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.icon-picker-panel {
    display: none;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 16px;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    animation: fadeInScale var(--transition-bounce) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.icon-picker-panel .form-input {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: var(--border-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.icon-cell:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
}

.icon-cell:active {
    transform: scale(0.95);
}

/* User Menu Popover inside Sidebar Footer */
.sidebar-footer {
    position: relative;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    z-index: 50;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: background 0.2s ease;
}

.user-profile:hover {
    background: var(--bg-surface-hover);
}

.user-profile-more {
    margin-left: auto;
    color: var(--text-secondary);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.user-profile:hover .user-profile-more {
    opacity: 1;
}

.user-menu-popover {
    position: absolute;
    bottom: calc(100% - 8px);
    left: 16px;
    right: 16px;
    background: var(--bg-surface-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    flex-direction: column;
    gap: 4px;
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-menu-popover.show {
    display: flex;
}

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

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.user-menu-item:hover {
    background: var(--bg-surface-hover);
    color: var(--accent);
}

.user-menu-item i {
    width: 16px;
    height: 16px;
}

.user-menu-item.logout-item {
    color: var(--error);
    border-top: 1px dashed var(--border-color);
    border-radius: 0;
    margin-top: 4px;
    padding-top: 12px;
}

.user-menu-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
    color: var(--error);
}
/* ==========================================================================
   NEW FEATURES STYLES (v4) — Notifications, Dark Mode, Birthdays, 404, Comments
   ========================================================================== */

/* ── Dark / Light Mode Toggle ─────────────────────────────────────────────── */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255,255,255,0.85);
    --bg-surface-hover: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --glass-border: rgba(0,0,0,0.06);
    --bg-gradient: linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07),0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07),0 4px 6px -4px rgba(0,0,0,0.05);
}

[data-theme="dark"] {
    --bg-base: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-glass: rgba(30,41,59,0.85);
    --bg-surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --glass-border: rgba(255,255,255,0.06);
    --bg-gradient: linear-gradient(180deg,#0f172a 0%,#1e293b 100%);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4),0 2px 4px -2px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5),0 4px 6px -4px rgba(0,0,0,0.4);
    --pci-bg-page: #0f172a;
    --pci-text-main: #f1f5f9;
}

/* ── Notifications Panel ──────────────────────────────────────────────────── */
.notifications-panel {
    position: absolute;
    top: calc(var(--header-height) + 8px);
    right: 20px;
    width: 360px;
    max-height: 480px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.notifications-panel.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
}
.notifications-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.notif-mark-all-btn {
    font-size: 12px;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.notif-mark-all-btn:hover { background: var(--accent-glow); }
.notifications-list {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0;
}
.notif-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 32px 16px;
    font-size: 14px;
}
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.notif-item:hover { background: var(--bg-surface-hover); }
.notif-item.unread { border-left-color: var(--accent); background: var(--accent-glow); }
.notif-item-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--accent-glow);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: var(--accent);
}
.notif-item-icon i { width: 16px; height: 16px; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.notif-item-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.notif-item-time  { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
#notification-badge {
    position: absolute;
    top: 4px; right: 4px;
    min-width: 18px; height: 18px;
    background: var(--error);
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.action-btn { position: relative; }

/* ── Contact Public Profile Modal ─────────────────────────────────────────── */
.contact-profile-modal {
    max-width: 520px;
    padding: 0 !important;
    overflow: hidden;
}
.contact-profile-banner {
    height: 120px;
    background: var(--accent-gradient);
    position: relative;
}
.contact-profile-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    border: 4px solid var(--bg-surface);
    object-fit: cover;
    position: absolute;
    bottom: -45px;
    left: 32px;
    box-shadow: var(--shadow-md);
}
.contact-profile-body {
    padding: 56px 32px 32px;
}
.contact-profile-name {
    font-size: 22px; font-weight: 700;
    color: var(--text-primary); margin-bottom: 4px;
}
.contact-profile-role {
    font-size: 13px; color: var(--accent);
    font-weight: 600; margin-bottom: 16px;
}
.contact-profile-dept {
    font-size: 13px; color: var(--text-secondary);
    margin-bottom: 20px;
}
.contact-profile-fields {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin-bottom: 20px;
}
.contact-field {
    display: flex; flex-direction: column; gap: 2px;
}
.contact-field-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
}
.contact-field-value {
    font-size: 14px; color: var(--text-primary); font-weight: 500;
}
.contact-profile-bio {
    font-size: 13px; color: var(--text-secondary);
    line-height: 1.6; padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.contact-profile-actions {
    display: flex; gap: 10px;
}

/* ── News Comments ─────────────────────────────────────────────────────────── */
.news-comments-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}
.news-comments-section h5 {
    font-size: 15px; font-weight: 600;
    color: var(--text-primary); margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}
.news-comment-item {
    display: flex; gap: 12px; margin-bottom: 16px;
}
.news-comment-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border-color);
}
.news-comment-bubble {
    background: var(--bg-surface-hover);
    border-radius: var(--border-radius);
    padding: 10px 14px; flex: 1;
}
.news-comment-author {
    font-size: 13px; font-weight: 600;
    color: var(--text-primary); display: inline-block; margin-right: 8px;
}
.news-comment-time {
    font-size: 11px; color: var(--text-muted);
}
.news-comment-text {
    font-size: 13px; color: var(--text-secondary);
    margin-top: 4px; line-height: 1.5;
}
.news-comment-form {
    display: flex; gap: 10px; margin-top: 16px; align-items: flex-end;
}
.news-comment-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 13px; resize: none;
    font-family: var(--font-body);
    transition: border-color 0.15s;
}
.news-comment-input:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Birthdays Widget ─────────────────────────────────────────────────────── */
.birthdays-widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 16px;
}
.birthdays-widget h4 {
    font-size: 14px; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-primary); margin-bottom: 14px;
}
.birthday-item {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}
.birthday-item:last-child { border-bottom: none; }
.birthday-avatar {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
}
.birthday-info { flex: 1; min-width: 0; }
.birthday-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.birthday-date { font-size: 11px; color: var(--text-muted); }
.birthday-cake { font-size: 18px; flex-shrink: 0; }

/* ── Admin Monuments Tab ──────────────────────────────────────────────────── */
.monument-type-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em;
}
.monument-type-badge.museum { background: rgba(99,102,241,0.12); color: #6366f1; }
.monument-type-badge.palace { background: rgba(245,158,11,0.12); color: #d97706; }
.monument-type-badge.monument { background: rgba(16,185,129,0.12); color: #059669; }
.monument-type-badge.archaeological_site { background: rgba(239,68,68,0.12); color: #dc2626; }

/* ── 404 Not Found View ────────────────────────────────────────────────────── */
.view-404 {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 60vh; text-align: center; gap: 16px;
    padding: 40px;
}
.view-404-icon {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: var(--accent-glow);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.view-404-icon i { width: 48px; height: 48px; color: var(--accent); }
.view-404 h2 { font-size: 28px; color: var(--text-primary); }
.view-404 p { font-size: 15px; color: var(--text-secondary); max-width: 380px; line-height: 1.6; }

/* ── Last Login indicator in profile modal ─────────────────────────────────── */
.last-login-info {
    font-size: 12px; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
    margin-top: 16px; padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}
.last-login-info i { width: 14px; height: 14px; }

/* ── Contact Inventory Styles ─────────────────────────────────────────────── */
.contact-tabs-container {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    gap: 16px;
    padding: 0 10px;
}
.contact-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}
.contact-tab-btn:hover {
    color: var(--text-primary);
}
.contact-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.inventory-table-container {
    overflow-x: auto;
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-top: 10px;
}
.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}
.inventory-table th {
    background: var(--bg-surface-hover);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}
.inventory-table td {
    padding: 12px 16px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}
.inventory-table tr:last-child td {
    border-bottom: none;
}
.inventory-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.inventory-status.delivered {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}
.inventory-status.returned {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}
.inventory-status.broken {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
.inventory-actions-btn-group {
    display: flex;
    gap: 8px;
}
.inventory-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition-fast);
}
.inventory-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}
.inventory-btn.delete:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.08);
}
.inventory-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 13px;
}
.inventory-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* ── Admin Dashboard Refinements ── */
.admin-container {
    animation: fadeIn 0.4s ease-out;
}

.admin-header-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm);
    padding: 24px 32px !important;
    border-radius: var(--border-radius-lg) !important;
}

.admin-header-card h2 {
    font-size: 24px !important;
    background: linear-gradient(120deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.complaints-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px;
    background: var(--bg-surface-secondary);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.complaints-tabs-nav .complaints-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast) ease-in-out;
}

.complaints-tabs-nav .complaints-tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.complaints-tabs-nav .complaints-tab-btn.active {
    color: #ffffff;
    background-color: var(--accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.complaints-tabs-nav .complaints-tab-btn i {
    width: 15px;
    height: 15px;
    margin-right: 0;
}

/* ── Drawer Layout Enhancements ── */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    position: sticky;
    top: 0;
    z-index: 10;
}

.drawer-header h3 {
    margin: 0 !important;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-header .modal-close {
    position: static !important;
    font-size: 24px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    margin-right: -8px;
    transition: var(--transition-fast);
}

.drawer-header .modal-close:hover {
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
}

/* ── Admin Two-Column Dashboard Layout ── */
.admin-dashboard-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

@media (max-width: 1024px) {
    .admin-dashboard-layout {
        grid-template-columns: 1fr;
    }
}

.admin-sidebar {
    padding: 20px !important;
    border-radius: var(--border-radius-lg);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-color);
}

.admin-sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-sidebar-menu .complaints-tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast) ease-in-out;
}

.admin-sidebar-menu .complaints-tab-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-surface-hover);
}

.admin-sidebar-menu .complaints-tab-btn.active {
    color: #ffffff;
    background-color: var(--accent);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ── Dashboard Stats Grid & Cards ── */
.admin-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px !important;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: var(--border-radius-lg);
    background: var(--bg-surface-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast) ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-card .stat-icon i {
    width: 22px;
    height: 22px;
}

.stat-card .stat-details {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-details span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.stat-card .stat-details h3 {
    margin: 4px 0 0 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   Popup system styles (Session startup announcements & management)
   ========================================================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}

.popup-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.popup-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color-hover);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 520px;
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-bounce), opacity var(--transition-smooth);
    opacity: 0;
}

.popup-overlay.open .popup-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.popup-banner {
    height: 8px;
    background: var(--accent-gradient);
}

.popup-header {
    padding: 28px 28px 16px 28px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.popup-icon-container {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-glow);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.popup-icon-container i {
    width: 24px;
    height: 24px;
}

.popup-title-area {
    flex-grow: 1;
}

.popup-title-area h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.popup-title-area .popup-date {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.popup-body {
    padding: 0 28px 24px 28px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    max-height: 350px;
    overflow-y: auto;
}

.popup-body p {
    margin-bottom: 12px;
}

.popup-body p:last-child {
    margin-bottom: 0;
}

.popup-footer {
    padding: 18px 28px 24px 28px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background-color: var(--bg-base);
}

.popup-footer .btn-dismiss {
    background: var(--accent-gradient);
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-bounce), box-shadow var(--transition-fast);
}

.popup-footer .btn-dismiss:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md), var(--shadow-glow);
}

.popup-footer .btn-dismiss:active {
    transform: translateY(0);
}

/* Admin interface specific adjustments for popups */
.status-badge.inactive {
    background-color: rgba(100, 116, 139, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.2);
}

.status-badge.active {
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* ==========================================================================
   Inventory Assignment Acceptance Styles
   ========================================================================== */
.inventory-acceptance-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 13px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.inventory-acceptance-table th {
    background-color: var(--bg-surface-hover);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.inventory-acceptance-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.inventory-acceptance-table tr:last-child td {
    border-bottom: none;
}

.inventory-acceptance-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.8);
}

.btn-reject {
    background: transparent !important;
    border: 1px solid var(--error) !important;
    color: var(--error) !important;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    transition: transform var(--transition-bounce), background-color var(--transition-fast);
}

.btn-reject:hover {
    background-color: rgba(239, 68, 68, 0.08) !important;
    transform: translateY(-2px);
}

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

.status-badge.blocked {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}


/* ==========================================================================
   Sites Institucionais — Landing Page
   ========================================================================== */

/* Hero banner */
.inst-hero {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 60%, #7c3aed 100%);
    border-radius: var(--border-radius-lg);
    padding: 48px 52px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.35);
}

.inst-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.inst-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 30%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}

.inst-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 20px;
}

.inst-hero-badge i {
    width: 13px;
    height: 13px;
}

.inst-hero-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.8px;
    margin: 0 0 12px 0;
}

.inst-hero-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.82);
    max-width: 580px;
    line-height: 1.6;
    margin: 0;
}

/* Secção / Categoria */
.inst-section {
    margin-bottom: 44px;
}

.inst-cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

.inst-cat-icon {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.inst-cat-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
    flex: 1;
}

.inst-cat-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 12px;
}

/* Grelha de cards */
.inst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

/* Card individual */
.inst-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.inst-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: inherit;
    z-index: 0;
}

.inst-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.18),
                0 0 0 1px rgba(37, 99, 235, 0.12);
}

.inst-card > * {
    position: relative;
    z-index: 1;
}

/* Cabeçalho do card */
.inst-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.inst-card-icon-box {
    width: 42px;
    height: 42px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.inst-card:hover .inst-card-icon-box {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.3);
}

.inst-card-icon-box i {
    width: 20px;
    height: 20px;
}

/* Tag de categoria */
.inst-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 3px 9px;
    border-radius: 10px;
    border: 1px solid;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Nome do site */
.inst-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

/* URL */
.inst-card-url {
    font-size: 12px;
    color: var(--accent);
    margin: 0 0 10px 0;
    font-family: 'Courier New', monospace;
    opacity: 0.8;
}

/* Descrição */
.inst-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rodapé */
.inst-card-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    transition: gap 0.2s ease;
}

.inst-card:hover .inst-card-footer {
    gap: 8px;
}

.inst-card-footer i {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.inst-card:hover .inst-card-footer i {
    transform: translate(2px, -2px);
}

/* Responsivo */
@media (max-width: 768px) {
    .inst-hero {
        padding: 32px 24px;
    }

    .inst-hero-title {
        font-size: 26px;
    }

    .inst-grid {
        grid-template-columns: 1fr;
    }
}





