/* ================================
   Design System & Variables
   ================================ */
:root {
    /* Colors */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-group-even: rgba(255, 255, 255, 0.03);
    --bg-group-odd: rgba(255, 255, 255, 0.05);
    --group-border: rgba(255, 255, 255, 0.08);
    --bg-subitem: rgba(255, 255, 255, 0.02);
    --border-subitem: rgba(255, 255, 255, 0.06);
    --bg-input: #12121a;
    --bg-input-disabled: rgba(255, 255, 255, 0.04);
    --border-input: rgba(255, 255, 255, 0.12);
    --border-input-focus: var(--color-blue);
    --text-label: rgba(255, 255, 255, 0.75);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.88);
    --text-muted: rgba(255, 255, 255, 0.65);

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    --color-blue: #667eea;
    --color-purple: #764ba2;
    --color-pink: #f093fb;
    --color-green: #10b981;
    --color-orange: #f59e0b;
    --color-red: #ef4444;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius (Reduzido para design sóbrio e moderno) */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 10px;
    --radius-full: 6px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 72px;
}

/* --- THEME DEFINITIONS --- */


/* 5. WINDOWS 11 LIGHT (Fluent Design - Fundo Branco / Conteúdo Cinza Claro) */
.theme-win11-light {
    /* Fundo geral Branco, Containers/Cards/Caixas Cinza Claro */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f6;
    --bg-card: #f3f4f6;
    --bg-card-hover: #e5e7eb;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-label: #475569;
    
    --bg-group-even: #f8fafc;
    --bg-group-odd: #f3f4f6;
    --group-border: rgba(0, 0, 0, 0.12);
    --bg-subitem: #ffffff;
    --border-subitem: rgba(0, 0, 0, 0.09);
    --bg-input: #ffffff;
    --bg-input-disabled: #e5e7eb;
    --border-input: rgba(0, 0, 0, 0.18);
    --border-input-focus: #0078d4;
    
    --color-blue: #0078d4; /* Win11 Brand Blue */
    --color-purple: #4f6bed;
    --gradient-primary: linear-gradient(135deg, #0078d4 0%, #00c6ff 100%);
    
    --border-color: rgba(0, 0, 0, 0.09);
    --border-hover: rgba(0, 0, 0, 0.18);
    
    --radius-sm: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-full: 4px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --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.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(0, 120, 212, 0.1);
    
    --font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --backdrop-blur: blur(20px);
}

/* 6. WINDOWS 11 DARK (Dark Mica) */
.theme-win11-dark {
    /* Dark Mica Effect Colors */
    --bg-primary: #202020;
    --bg-secondary: #1a1a1a;
    --bg-card: rgba(32, 32, 32, 0.7);
    --bg-card-hover: rgba(45, 45, 45, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-label: #94a3b8;
    
    --bg-group-even: rgba(28, 28, 28, 0.85);
    --bg-group-odd: rgba(36, 36, 36, 0.85);
    --group-border: rgba(255, 255, 255, 0.1);
    --bg-subitem: rgba(22, 22, 22, 0.75);
    --border-subitem: rgba(255, 255, 255, 0.08);
    --bg-input: #141414;
    --bg-input-disabled: rgba(255, 255, 255, 0.06);
    --border-input: rgba(255, 255, 255, 0.15);
    --border-input-focus: #0078d4;
    
    --color-blue: #0078d4;
    --color-purple: #4f6bed;
    --gradient-primary: linear-gradient(135deg, #0078d4 0%, #00c6ff 100%);
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    --radius-sm: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-full: 4px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 120, 212, 0.2);
    
    --font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --backdrop-blur: blur(25px);
}

/* 7. WINDOWS 11 EMERALD (Dark Mica Emerald) */
.theme-win11-emerald {
    --bg-primary: #0a140f;
    --bg-secondary: #050a08;
    --bg-card: rgba(16, 185, 129, 0.08);
    --bg-card-hover: rgba(16, 185, 129, 0.15);
    --text-primary: #f0fdf4;
    --text-secondary: #dcfce7;
    --text-muted: #86efac;
    --text-label: #a7f3d0;
    
    --bg-group-even: rgba(8, 32, 22, 0.75);
    --bg-group-odd: rgba(6, 26, 18, 0.75);
    --group-border: rgba(16, 185, 129, 0.22);
    --bg-subitem: rgba(5, 30, 21, 0.7);
    --border-subitem: rgba(16, 185, 129, 0.2);
    --bg-input: #000000;
    --bg-input-disabled: rgba(5, 20, 14, 0.6);
    --border-input: rgba(16, 185, 129, 0.35);
    --border-input-focus: #10b981;
    
    --color-blue: #10b981; /* Primary Emerald */
    --color-purple: #059669;
    --color-green: #10b981;
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    
    --border-color: rgba(16, 185, 129, 0.15);
    --border-hover: rgba(16, 185, 129, 0.3);
    
    --radius-sm: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-full: 4px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(16, 185, 129, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);
    
    --font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --backdrop-blur: blur(25px);
}

/* 8. WINDOWS 11 BLUE (Dark Mica Blue) */
.theme-win11-blue {
    --bg-primary: #0a1120;
    --bg-secondary: #050810;
    --bg-card: rgba(59, 130, 246, 0.08);
    --bg-card-hover: rgba(59, 130, 246, 0.15);
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-label: #93c5fd;
    
    --bg-group-even: rgba(10, 25, 48, 0.75);
    --bg-group-odd: rgba(8, 20, 40, 0.75);
    --group-border: rgba(59, 130, 246, 0.22);
    --bg-subitem: rgba(7, 20, 40, 0.7);
    --border-subitem: rgba(59, 130, 246, 0.2);
    --bg-input: #040814;
    --bg-input-disabled: rgba(5, 15, 30, 0.6);
    --border-input: rgba(59, 130, 246, 0.35);
    --border-input-focus: #3b82f6;
    
    --color-blue: #3b82f6; /* Primary Vibrant Blue */
    --color-purple: #1d4ed8;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    
    --border-color: rgba(59, 130, 246, 0.15);
    --border-hover: rgba(59, 130, 246, 0.3);
    
    --radius-sm: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --radius-full: 4px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(59, 130, 246, 0.1);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.2);
    
    --font-family: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --backdrop-blur: blur(25px);
}

/* Windows 11 Shared Component Overrides */
.theme-win11-light .stat-card, .theme-win11-dark .stat-card,
.theme-win11-emerald .stat-card, .theme-win11-blue .stat-card,
.theme-win11-light .chart-card, .theme-win11-dark .chart-card,
.theme-win11-emerald .chart-card, .theme-win11-blue .chart-card,
.theme-win11-light .modal-content, .theme-win11-dark .modal-content,
.theme-win11-emerald .modal-content, .theme-win11-blue .modal-content,
.theme-win11-light .message-item, .theme-win11-dark .message-item,
.theme-win11-emerald .message-item, .theme-win11-blue .message-item,
.theme-win11-light .top-header, .theme-win11-dark .top-header,
.theme-win11-emerald .top-header, .theme-win11-blue .top-header,
.theme-win11-light .filter-box, .theme-win11-dark .filter-box,
.theme-win11-emerald .filter-box, .theme-win11-blue .filter-box,
.theme-win11-light .data-section, .theme-win11-dark .data-section,
.theme-win11-emerald .data-section, .theme-win11-blue .data-section,
.theme-win11-light .process-horizontal-card, .theme-win11-dark .process-horizontal-card,
.theme-win11-emerald .process-horizontal-card, .theme-win11-blue .process-horizontal-card {
    background: var(--bg-card);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

.theme-win11-light .financial-edit-area, .theme-win11-dark .financial-edit-area,
.theme-win11-emerald .financial-edit-area, .theme-win11-blue .financial-edit-area,
.theme-win11-light .item-block, .theme-win11-dark .item-block,
.theme-win11-emerald .item-block, .theme-win11-blue .item-block,
.theme-win11-light .group-block, .theme-win11-dark .group-block,
.theme-win11-emerald .group-block, .theme-win11-blue .group-block {
    background: var(--bg-card);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

.theme-win11-light .sidebar {
    background: #f4f4f6 !important;
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--border-color);
}

.theme-win11-dark .sidebar,
.theme-win11-emerald .sidebar, .theme-win11-blue .sidebar {
    background: var(--bg-primary);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--border-color);
}

.theme-win11-light .sort-control-container {
    background: #f3f4f6 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

.theme-win11-light .sort-select {
    background: #f3f4f6 !important;
    color: #18181b !important;
    color-scheme: light;
}

.theme-win11-light .sort-select option {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #18181b !important;
}

.theme-win11-light .status-pill {
    background: #f3f4f6;
    color: #374151;
    border-color: rgba(0, 0, 0, 0.1);
}

.theme-win11-light .status-pill .pill-count {
    background: rgba(0, 0, 0, 0.08);
    color: #18181b;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.theme-win11-light .filter-box-inline {
    background: #f3f4f6;
    border-color: rgba(0, 0, 0, 0.12);
}

.theme-win11-light .nav-item.active, .theme-win11-dark .nav-item.active,
.theme-win11-emerald .nav-item.active, .theme-win11-blue .nav-item.active {
    background: rgba(0, 120, 212, 0.15);
    color: var(--color-blue);
    border-left: 4px solid var(--color-blue);
    border-radius: 4px;
}

.theme-win11-emerald .nav-item.active {
    background: rgba(16, 185, 129, 0.15);
}

.theme-win11-blue .nav-item.active {
    background: rgba(59, 130, 246, 0.15);
}

.theme-win11-light .nav-item.active::before, .theme-win11-dark .nav-item.active::before {
    display: none;
}

.theme-win11-light .btn-primary, .theme-win11-dark .btn-primary,
.theme-win11-emerald .btn-primary, .theme-win11-blue .btn-primary {
    background: var(--color-blue);
    color: #fff;
    border-radius: 4px;
    font-weight: 500;
}

.theme-win11-light .btn-primary:hover, .theme-win11-dark .btn-primary:hover,
.theme-win11-emerald .btn-primary:hover, .theme-win11-blue .btn-primary:hover {
    filter: brightness(1.1);
}

.theme-win11-light .financial-input, .theme-win11-dark .financial-input,
.theme-win11-emerald .financial-input, .theme-win11-blue .financial-input {
    background: var(--bg-secondary);
    border: 1px solid #d1d1d1;
    border-bottom: 2px solid #858585;
    border-radius: 4px;
}

.theme-win11-dark .financial-input, .theme-win11-emerald .financial-input, .theme-win11-blue .financial-input {
    border-color: #444;
    border-bottom-color: #666;
}

.theme-win11-light .financial-input:focus, .theme-win11-dark .financial-input:focus,
.theme-win11-emerald .financial-input:focus, .theme-win11-blue .financial-input:focus {
    border-bottom-color: var(--color-blue);
}

.theme-win11-light .background-effects {
    background: #ffffff !important;
}

.theme-win11-light .gradient-orb {
    display: none !important;
}

.theme-win11-dark .background-effects, .theme-win11-emerald .background-effects, .theme-win11-blue .background-effects {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.theme-win11-dark .gradient-orb,
.theme-win11-emerald .gradient-orb, .theme-win11-blue .gradient-orb {
    opacity: 0.15;
    filter: blur(120px);
}

/* Theme Button Styles */
.theme-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.theme-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.theme-btn.active {
    background: var(--bg-card-hover);
    border-color: var(--color-blue);
    transform: translateY(-2px);
    box-shadow: 0 0 0 2px var(--color-blue), var(--shadow-md);
}

/* Checkmark indicator for active theme */
.theme-btn.active::after {
    content: "✓";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--color-blue);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.theme-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.theme-btn:hover .theme-preview {
    transform: scale(1.1) rotate(5deg);
}

.theme-btn span {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}



/* ================================
   Reset & Base Styles
   ================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    zoom: 0.8;
    height: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100%;
    height: 100%;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-purple);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
    background: none;
}

/* ================================
   Background Effects
   ================================ */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--color-blue);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--color-purple);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--color-pink);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ================================
   Login Page Styles
   ================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.logo {
    margin-bottom: var(--space-lg);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--space-md);
    color: var(--text-muted);
    transition: color var(--transition-fast);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.input-wrapper input::placeholder {
    color: var(--text-muted);
}

.input-wrapper input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.input-wrapper input:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--color-blue);
}

.toggle-password {
    position: absolute;
    right: var(--space-md);
    color: var(--text-muted);
    padding: var(--space-xs);
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--text-primary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all var(--transition-fast);
    position: relative;
}

.checkbox-wrapper input:checked+.checkmark {
    background: var(--gradient-primary);
    border-color: transparent;
}

.checkbox-wrapper input:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-link {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--color-blue);
}

.btn-login {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        border-color: #ef4444;
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.15);
        border-color: #f87171;
    }
}


.error-message {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-red);
    font-size: 0.875rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-5px);
    }

    40%,
    80% {
        transform: translateX(5px);
    }
}

.login-footer {
    margin-top: var(--space-xl);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ================================
   Dashboard Page Styles
   ================================ */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(18, 18, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-xl);
    border-bottom: 1px solid transparent;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-blue);
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.2);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: var(--color-blue);
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--color-blue);
}

.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: var(--space-xl);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    background: transparent;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding-left: var(--space-xl);
}

.header-right {
    padding-right: var(--space-xl);
}

.menu-toggle {
    display: none;
    padding: var(--space-sm);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.menu-toggle:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-greeting {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Search Section */
.search-section {
    margin-bottom: var(--space-xl);
}

.search-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0 var(--space-lg);
    border-radius: var(--radius-full);
    height: 50px;
    width: 380px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 8px 32px rgba(0, 0, 0, 0.2);
    background: var(--bg-card-hover);
}

.search-icon {
    color: var(--text-muted);
    margin-right: var(--space-md);
    transition: color var(--transition-fast);
}

.search-box:focus-within .search-icon {
    color: var(--color-blue);
}

.search-input {
    flex: 1;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-shortcut {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: inherit;
}

.search-clear {
    margin-left: var(--space-sm);
    padding: var(--space-xs);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.search-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.search-filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.filter-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

/* Results Section */
.results-section {
    margin-bottom: var(--space-xl);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.results-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.results-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.results-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    min-height: 200px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    color: var(--text-muted);
}

.empty-state svg {
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.empty-state p {
    font-size: 0.9rem;
    max-width: 300px;
}

.results-list {
    padding: var(--space-md);
}

.result-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

/* Base Filter Box Style (Used in Dashboard & Database) */
.filter-box {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0 var(--space-lg);
    border-radius: var(--radius-full);
    height: 44px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-lg);
    overflow: hidden;
    box-sizing: border-box;
}

.filter-box:focus-within {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    background: var(--bg-card-hover);
}

.filter-icon {
    color: var(--text-muted);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.filter-box:focus-within .filter-icon {
    color: var(--color-blue);
}

.filter-input {
    flex: 1 1 auto;
    min-width: 0 !important;
    width: 100%;
    height: 100%;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.filter-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.processos-filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0;
    width: 100%;
    min-height: 36px;
    height: 36px;
}

.status-filter-pills {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 11px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.status-pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.status-pill[data-status="all"].active {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.status-pill[data-status="suspenso"].active {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 12px rgba(244, 63, 94, 0.15);
}

.status-pill .pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-pill .pill-count {
    background: rgba(0, 0, 0, 0.35);
    color: inherit;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 2px;
}

/* Filter Search Pill (Compact Magnifying Glass before 'Todos') & Expandable Input */
.filter-search-container {
    display: inline-flex;
    align-items: center;
    position: relative;
    gap: 0;
    flex-shrink: 0;
}

.filter-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 9px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    box-shadow: var(--shadow-sm);
    height: 28px;
    min-width: 32px;
    box-sizing: border-box;
}

.filter-search-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.filter-search-btn svg {
    color: var(--text-muted);
    transition: color var(--transition-fast);
    flex-shrink: 0;
    display: block;
}

.filter-search-btn:hover svg {
    color: var(--text-primary);
}

.filter-search-btn.active,
.filter-search-container.open .filter-search-btn {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border-color: rgba(59, 130, 246, 0.4) !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.filter-search-btn.active svg,
.filter-search-container.open .filter-search-btn svg {
    color: #60a5fa !important;
}

.filter-search-input-wrapper {
    display: inline-flex;
    align-items: center;
    max-width: 0;
    width: 0;
    opacity: 0;
    overflow: hidden;
    margin-left: 0;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    height: 28px;
    transition: max-width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s ease,
                margin-left 0.25s ease,
                border-color 0.2s ease;
    box-sizing: border-box;
}

.filter-search-container.open .filter-search-input-wrapper {
    max-width: 280px;
    width: 250px;
    opacity: 1;
    margin-left: 5px;
    padding: 0 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.filter-search-container.open .filter-search-input-wrapper:focus-within {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.filter-search-input {
    flex: 1 1 auto;
    min-width: 0 !important;
    width: 100%;
    height: 100%;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    background: transparent !important;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: normal;
    display: block;
    box-sizing: border-box;
}

.filter-search-input::placeholder {
    color: var(--text-muted);
    font-size: 0.76rem;
    opacity: 0.75;
}

.filter-search-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    margin-left: 4px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.filter-search-clear-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Sort Menu Container */
.sort-control-container {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #000000 !important;
    border: 1px solid var(--border-color);
    padding: 0 10px;
    height: 34px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    max-width: 250px;
}

.sort-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
}

.sort-select {
    background: #000000 !important;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 2px;
    color-scheme: dark;
    max-width: 165px;
    text-overflow: ellipsis;
}

.sort-select option {
    background: #000000 !important;
    background-color: #000000 !important;
    color: #f0fdf4 !important;
}

@media (max-width: 1024px) {
    .processos-filter-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .filter-box-inline {
        max-width: 100%;
    }
    .sort-control-container {
        max-width: 100%;
        justify-content: space-between;
    }
    .sort-select {
        max-width: 100%;
        flex: 1;
    }
}

#th-sort-data-realizacao:hover {
    color: var(--color-blue);
}

.result-item:hover {
    background: var(--bg-card-hover);
}

.result-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-icon.document {
    background: rgba(102, 126, 234, 0.15);
    color: var(--color-blue);
}

.result-icon.user {
    background: rgba(118, 75, 162, 0.15);
    color: var(--color-purple);
}

.result-icon.setting {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-green);
}

.result-content {
    flex: 1;
}

.result-title {
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.result-title mark {
    background: rgba(102, 126, 234, 0.3);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

.result-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Stats Section */
.stats-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    transition: all var(--transition-base);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(102, 126, 234, 0.15);
    color: var(--color-blue);
}

.stat-icon.purple {
    background: rgba(118, 75, 162, 0.15);
    color: var(--color-purple);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-green);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-orange);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ================================
   Action Button Section
   ================================ */
.action-section {
    margin-top: var(--space-xl);
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;

    /* 3D Depth Shadow */
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.4),
        0 6px 15px rgba(102, 126, 234, 0.3);
    top: 0;
}

.btn-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.4),
        0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-action:active {
    transform: translateY(2px);
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Novo Processo Dynamic Theme CTA Button */
.btn-novo-processo {
    width: 100%;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--gradient-primary);
    color: #ffffff !important;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 4px 14px -2px rgba(0, 0, 0, 0.35),
        0 0 14px var(--shadow-glow, rgba(102, 126, 234, 0.25)),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    text-decoration: none;
}

.btn-novo-processo:hover {
    filter: brightness(1.08) saturate(1.05);
    box-shadow:
        0 6px 20px -2px rgba(0, 0, 0, 0.45),
        0 0 22px var(--shadow-glow, rgba(102, 126, 234, 0.45)),
        inset 0 1px 0 rgba(255, 255, 255, 0.38);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-novo-processo:active {
    transform: translateY(1px);
    filter: brightness(0.96);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.25);
}

.btn-novo-processo .btn-icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.25);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
    flex-shrink: 0;
}

.btn-novo-processo:hover .btn-icon-circle {
    transform: scale(1.12) rotate(90deg);
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.btn-novo-processo .btn-text-label {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-novo-processo .btn-shimmer-effect {
    position: absolute;
    top: -50%;
    left: -60%;
    width: 35%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );
    transform: rotate(25deg);
    pointer-events: none;
    transition: none;
}

.btn-novo-processo:hover .btn-shimmer-effect {
    animation: btnShimmerSlide 0.75s ease-in-out;
}

@keyframes btnShimmerSlide {
    0% {
        left: -60%;
    }
    100% {
        left: 140%;
    }
}

/* Custom Theme Variations for Novo Processo Button */
.theme-win11-emerald .btn-novo-processo {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%) !important;
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.45), 0 0 16px rgba(6, 78, 59, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.theme-win11-emerald .btn-novo-processo:hover {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #059669 100%) !important;
    box-shadow: 0 6px 20px -2px rgba(0, 0, 0, 0.55), 0 0 22px rgba(16, 185, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(52, 211, 153, 0.55);
}

.theme-win11-light .btn-novo-processo {
    background: linear-gradient(135deg, #334155 0%, #1e293b 50%, #0f172a 100%) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.35), 0 0 12px rgba(51, 65, 85, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.theme-win11-light .btn-novo-processo:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 50%, #1e293b 100%) !important;
    box-shadow: 0 6px 18px -2px rgba(15, 23, 42, 0.45), 0 0 18px rgba(71, 85, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.32);
    border-color: rgba(255, 255, 255, 0.35);
}

/* ================================
   Processos Section
   ================================ */
.processos-section {
    margin-top: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 38px;
    height: 38px;
    margin-bottom: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.processos-count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.processos-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.processos-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    color: var(--text-muted);
}

.processos-empty svg {
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.processos-empty h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.processos-empty p {
    font-size: 0.9rem;
}

.processos-table-wrapper {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
}

/* Linha de detalhe expandida: não cria novo contexto de stacking que possa cortar o conteúdo */
.processos-table tbody tr[id^="proc-analise-detail-"] > td,
.processos-table tbody tr[id^="proc-detail-"] > td,
.processos-table tbody tr[id^="proc-external-detail-"] > td {
    overflow: visible;
}


.processos-table {
    width: 100%;
    border-collapse: collapse;
}

.processos-table th,
.processos-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.processos-table th {
    background: var(--bg-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.processos-table tbody tr {
    transition: background var(--transition-fast);
}

.processos-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.processos-table tbody tr:last-child td {
    border-bottom: none;
}

.processos-table td {
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.45;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.processos-table td.cell-nup,
.processos-table td:first-child {
    white-space: nowrap !important;
    font-family: monospace;
    font-variant-numeric: tabular-nums;
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 190px;
    letter-spacing: 0.02em;
}

.parcelamento-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(102, 126, 234, 0.15);
    color: var(--color-blue);
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    text-transform: capitalize;
}

.action-buttons {
    display: flex;
    gap: var(--space-sm);
}

.btn-icon {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.btn-icon:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-icon:disabled,
.btn-action-icon:disabled {
    opacity: 0.25 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn-icon.view:hover {
    color: var(--color-blue);
}

.btn-icon.pin {
    color: var(--text-muted);
}

.btn-icon.pin:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.btn-icon.pin.pinned {
    color: #f59e0b;
}

.btn-icon.pin.pinned:hover {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.15);
}

tr.processo-pinned-row {
    background: rgba(245, 158, 11, 0.035) !important;
    border-left: 3px solid #f59e0b;
}

tr.processo-pinned-row:hover {
    background: rgba(245, 158, 11, 0.07) !important;
}

.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
}

/* ====================================================
   Workspace Cards (Coordinator Compact & Modern Design)
   ==================================================== */
.workspace-card {
    padding: 10px 14px !important;
    border-radius: 10px !important;
    border: 1px solid var(--border-color) !important;
    background: var(--bg-card) !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.workspace-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.5) !important;
    background: var(--bg-card-hover) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.workspace-card:hover .workspace-card-arrow {
    transform: translateX(3px);
    opacity: 1 !important;
    color: var(--color-blue);
}

.workspace-card-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.workspace-card-name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.workspace-card-email {
    margin: 0;
    font-size: 0.74rem;
    color: var(--text-muted) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.workspace-card-apoio {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 4px;
    padding: 1px 6px;
    margin-top: 3px;
    width: fit-content;
}

.workspace-card-arrow {
    color: var(--text-muted);
    opacity: 0.5;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* ================================
   Settings & User Management
   ================================ */
.settings-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.settings-tab-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all var(--transition-base);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.settings-tab-btn.active {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-blue);
    box-shadow: inset 0 0 0 1px rgba(102, 126, 234, 0.1);
}

.settings-tab-content {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-mgmt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.users-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    text-align: left;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.users-table td {
    border-bottom: 1px solid var(--border-color);
}

.users-table tr:last-child td {
    border-bottom: none;
}

.user-form-overlay {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
}

/* ================================
   Modal Styles
   ================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: var(--space-lg);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    padding: var(--space-xs);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal-form {
    padding: var(--space-xl);
}

.parcelamento-submenu {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    animation: submenuFadeIn 0.3s ease;
}

@keyframes submenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0 var(--space-md);
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-base);
    line-height: 44px;
}

/* Adjust padding for textarea since it shouldn't have fixed height */
.form-group textarea {
    height: auto;
    padding: var(--space-md);
    min-height: 80px;
    line-height: 1.6;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Specific Select Option Styles for Readability */
.form-group select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: var(--space-md);
}

/* Tema Claro overrides for select options */
.theme-light .form-group select option {
    background-color: #ffffff;
    color: #334155;
}

.financial-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Parcelamento Radio Options */
.parcelamento-options {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.radio-option:hover {
    color: var(--text-primary);
}

.radio-option input {
    display: none;
}

.radio-checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--transition-fast);
}

.radio-option input:checked+.radio-checkmark {
    border-color: var(--color-blue);
    background: transparent;
}

.radio-option input:checked+.radio-checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
}

.radio-option input:checked~span:last-child {
    color: var(--text-primary);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border-color);
}

.btn-secondary {
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    top: 0;

    /* 3D Depth Shadow */
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.4),
        0 5px 10px rgba(0, 0, 0, 0.3);
}

.btn-secondary:active {
    transform: translateY(2px);
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    background: var(--gradient-primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
    top: 0;

    /* 3D Depth Shadow */
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.4),
        0 6px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.4),
        0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* ================================
   Toast Notification
   ================================ */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--color-green);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    color: var(--color-green);
    animation: slideInRight 0.3s ease;
    z-index: 1001;
}

.toast.error {
    border-color: var(--color-red);
    color: var(--color-red);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Dashboard Main Grid Layout */
.dashboard-body-grid {
    display: grid;
    grid-template-columns: 1fr 540px;
    gap: var(--space-xl);
    align-items: flex-start;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* Layout Expandido para Visualização de Workspace da Coordenação (100% largura) */
#dashboard-main-content.full-workspace-view {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0 !important;
}

#dashboard-main-content.full-workspace-view .side-column {
    display: none !important;
}

#dashboard-main-content.full-workspace-view .main-column {
    width: 100% !important;
    max-width: 100% !important;
}

#dashboard-main-content.full-workspace-view #coordinator-workspace-view-section {
    width: 100% !important;
    max-width: 100% !important;
}

#dashboard-main-content.full-workspace-view .suite-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
}

#dashboard-main-content.full-workspace-view .suite-toolbar {
    width: 100% !important;
    box-sizing: border-box !important;
}

#dashboard-main-content.full-workspace-view .suite-table-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
}

#dashboard-main-content.full-workspace-view #coord-workspace-table {
    width: 100% !important;
    table-layout: auto !important;
}

/* Messages Section */
.messages-section {
    margin-top: var(--space-xl);
}

.messages-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
}

.section-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.btn-clear-all {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-clear-all:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-remove-item {
    padding: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
    /* Hidden until hover */
}

.message-item:hover .btn-remove-item,
.deadline-alert-card:hover .btn-remove-item {
    opacity: 1;
}

.btn-remove-item:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-red);
}

.messages-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-height: 400px;
    overflow-y: auto;
}

.message-item {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
}

.message-item.alert-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    border-left: 4px solid var(--color-red);
}

.message-item.alert-confirmed {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
    border-left: 4px solid var(--color-blue);
}

/* Deadline Alerts */
.deadline-alerts-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.deadline-alert-card {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--color-orange);
    border-left: 5px solid var(--color-orange);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    animation: slideInDown 0.4s ease;
}

.deadline-alert-icon {
    color: var(--color-orange);
    flex-shrink: 0;
}

.deadline-alert-content {
    flex: 1;
}

.deadline-alert-title {
    font-weight: 700;
    color: var(--color-orange);
    margin-bottom: 4px;
    display: block;
}

.deadline-alert-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.deadline-alert-details b {
    color: var(--text-primary);
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Donut Chart Styles */
.chart-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 850px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-lg);
    color: var(--text-secondary);
}

/* 3D Disc Chart Styles */
.pie-3d-scene {
    perspective: 1500px;
    width: 750px;
    height: 750px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: var(--space-2xl) 0;
}

.pie-3d-container {
    position: relative;
    width: 640px;
    height: 640px;
    transform-style: preserve-3d;
    transform: rotateX(55deg) rotateZ(0deg);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.pie-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.pie-top {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 60%),
        conic-gradient(var(--color-blue) 0deg var(--pie-angle, 0deg),
            rgba(255, 255, 255, 0.05) var(--pie-angle, 0deg) 360deg);
    transform: translateZ(90px);
    box-shadow:
        inset 0 0 0 4px rgba(255, 255, 255, 0.1),
        inset 0 0 80px rgba(0, 0, 0, 0.4),
        0 0 100px rgba(102, 126, 234, 0.1),
        0 8px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.pie-bottom {
    background: rgba(0, 0, 0, 0.4);
    transform: translateZ(0px);
    filter: blur(10px);
}

/* Simulated side panels with improved texture */
.pie-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    transform: translateZ(-90px);
    filter: brightness(0.4) contrast(1.1);
    z-index: -1;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.pie-bottom {
    background: rgba(0, 0, 0, 0.6);
    transform: translateZ(-5px);
    filter: blur(25px);
    width: 110%;
    height: 110%;
    left: -5%;
    top: -5%;
}

.pie-percentage-overlay {
    transform: rotateX(-55deg) translate3d(var(--label-x, 0), var(--label-y, 0), 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-primary);
    pointer-events: none;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    width: 240px;
    height: 160px;
    top: calc(50% - 80px);
    left: calc(50% - 120px);
}

.pie-percentage-overlay span {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    background: linear-gradient(180deg, #fff 0%, #cbd5e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pie-percentage-overlay small {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 8px;
    opacity: 0.9;
}

.message-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    position: relative;
}

.message-item.alert-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    animation: pulse-red 2s infinite ease-in-out;
}

.message-item.alert-critical:hover {
    border-color: var(--color-red);
}

.message-item.alert-confirmed {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
}

.message-item.alert-confirmed:hover {
    border-color: var(--color-blue);
}

/* Inatividade — classe genérica (múltiplos de 5 dias) */
.message-item.alert-inatividade {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    border-left: 4px solid var(--color-orange, #f59e0b);
}

.message-item.alert-inatividade:hover {
    border-color: var(--color-orange, #f59e0b);
}

/* A partir de 10 dias: vermelho pulsante */
.message-item.alert-inatividade.alert-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    border-left: 4px solid var(--color-red, #ef4444);
    animation: pulse-red 2s infinite ease-in-out;
}

.message-item.alert-inatividade.alert-critical:hover {
    border-color: var(--color-red, #ef4444);
}

.message-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-blue);
    transform: translateX(4px);
}

.item-notification-entry.unread {
    animation: pulse-red 2s infinite ease-in-out;
}

@keyframes pulse-red {

    0%,
    100% {
        background-color: rgba(239, 68, 68, 0.08);
    }

    50% {
        background-color: rgba(239, 68, 68, 0.25);
    }
}

.item-notification-entry {
    pointer-events: auto;
}

.btn-delete-notif {
    pointer-events: auto !important;
    z-index: 10;
    position: relative;
}

.btn-confirm-activity {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-confirm-activity:hover {
    color: var(--color-blue);
    transform: scale(1.1);
}

.message-item.alert-confirmed .btn-confirm-activity {
    color: var(--color-blue);
    opacity: 0.5;
    pointer-events: none;
}

.message-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
}

.message-icon.info {
    background: rgba(102, 126, 234, 0.1);
    color: var(--color-blue);
}

.message-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-orange);
}

.message-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    flex: 1;
    overflow: hidden;
}

.message-text {
    font-size: 0.75rem;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.message-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    gap: var(--space-md);
}

.message-empty svg {
    opacity: 0.2;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.side-column-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 38px;
    height: 38px;
    margin-bottom: 12px;
}

.side-column-filter {
    display: flex;
    align-items: center;
    min-height: 36px;
    height: 36px;
    margin-bottom: 14px;
}

.google-widget {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   GOOGLE CALENDAR WIDGET & EVENTS (THEME-AWARE)
   ========================================================================== */
.event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3.5px solid var(--event-accent, #3b82f6);
}

.event-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px;
    background: var(--event-date-bg, rgba(59, 130, 246, 0.15));
    border-radius: 6px;
    color: var(--event-date-color, #60a5fa);
    border: 1px solid var(--event-date-border, rgba(59, 130, 246, 0.3));
    flex-shrink: 0;
}

.event-date-month {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-date-day {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.1;
}

.event-info {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.event-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.event-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Event Types in Dark Themes */
.event-item.event-primary {
    --event-accent: #3b82f6;
    --event-date-bg: rgba(59, 130, 246, 0.15);
    --event-date-color: #60a5fa;
    --event-date-border: rgba(59, 130, 246, 0.3);
}
.event-item.event-primary .badge-primary-cal {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.event-item.event-shared {
    --event-accent: #8b5cf6;
    --event-date-bg: rgba(139, 92, 246, 0.15);
    --event-date-color: #a78bfa;
    --event-date-border: rgba(139, 92, 246, 0.3);
}
.event-item.event-shared .badge-shared-cal {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.event-item.event-task {
    --event-accent: #10b981;
    --event-date-bg: rgba(16, 185, 129, 0.15);
    --event-date-color: #34d399;
    --event-date-border: rgba(16, 185, 129, 0.3);
}
.event-item.event-task .badge-task {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.event-item.event-holiday {
    --event-accent: #f59e0b;
    --event-date-bg: rgba(245, 158, 11, 0.15);
    --event-date-color: #fbbf24;
    --event-date-border: rgba(245, 158, 11, 0.3);
}
.event-item.event-holiday .badge-holiday {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-today {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   HIGH CONTRAST & CLEAR VISIBILITY FOR WINDOWS 11 LIGHT THEME
   ========================================================================== */
.theme-win11-light .google-widget {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.theme-win11-light .google-widget h2 {
    color: #0f172a;
    font-weight: 700;
}

.theme-win11-light .event-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.theme-win11-light .event-item:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-win11-light .event-title {
    color: #0f172a;
    font-weight: 700;
}

.theme-win11-light .event-meta {
    color: #475569;
    font-weight: 500;
}

/* Light Theme - Dono do Workspace (Primary Calendar: Vibrant Royal Blue) */
.theme-win11-light .event-item.event-primary {
    --event-accent: #1d4ed8;
    background: #f8fbff;
    border-color: #dbeafe;
    border-left: 3.5px solid #1d4ed8;
}

.theme-win11-light .event-item.event-primary:hover {
    background: #ffffff;
    border-color: #bfdbfe;
}

.theme-win11-light .event-item.event-primary .event-date-box {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    box-shadow: 0 1px 2px rgba(29, 78, 216, 0.1);
}

.theme-win11-light .event-item.event-primary .badge-primary-cal {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    font-weight: 700;
}

/* Light Theme - Agendas Compartilhadas (Shared Calendars: Vibrant Purple/Violet) */
.theme-win11-light .event-item.event-shared {
    --event-accent: #6d28d9;
    background: #fbf9ff;
    border-color: #ede9fe;
    border-left: 3.5px solid #7c3aed;
}

.theme-win11-light .event-item.event-shared:hover {
    background: #ffffff;
    border-color: #ddd6fe;
}

.theme-win11-light .event-item.event-shared .event-date-box {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
    box-shadow: 0 1px 2px rgba(109, 40, 217, 0.1);
}

.theme-win11-light .event-item.event-shared .badge-shared-cal {
    background: #ede9fe;
    color: #5b21b6;
    border: 1px solid #ddd6fe;
    font-weight: 700;
}

/* Light Theme - Tarefas (Google Tasks: Crisp Forest Emerald) */
.theme-win11-light .event-item.event-task {
    --event-accent: #047857;
    background: #f6fdf9;
    border-color: #d1fae5;
    border-left: 3.5px solid #059669;
}

.theme-win11-light .event-item.event-task:hover {
    background: #ffffff;
    border-color: #a7f3d0;
}

.theme-win11-light .event-item.event-task .event-date-box {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    box-shadow: 0 1px 2px rgba(4, 120, 87, 0.1);
}

.theme-win11-light .event-item.event-task .badge-task {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-weight: 700;
}

/* Light Theme - Feriados (Holidays: Warm Amber/Orange) */
.theme-win11-light .event-item.event-holiday {
    --event-accent: #b45309;
    background: #fffdfa;
    border-color: #fef3c7;
    border-left: 3.5px solid #d97706;
}

.theme-win11-light .event-item.event-holiday:hover {
    background: #ffffff;
    border-color: #fde68a;
}

.theme-win11-light .event-item.event-holiday .event-date-box {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
    box-shadow: 0 1px 2px rgba(180, 83, 9, 0.1);
}

.theme-win11-light .event-item.event-holiday .badge-holiday {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    font-weight: 700;
}

/* Light Theme - Badge HOJE */
.theme-win11-light .badge-today {
    background: #ffedd5 !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
    font-weight: 700;
}

@media (max-width: 1200px) {
    .dashboard-body-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Detail Dashboard Section (Tabs)
   ================================ */
.detail-dashboard-section {
    animation: fadeIn 0.4s ease;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.detail-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.btn-back {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-base);
}

.btn-back:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.detail-status-badge {
    padding: var(--space-xs) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Horizontal Summary Card */
.process-horizontal-card {
    position: relative;
    z-index: 100;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-lg) var(--space-xl);
    margin-bottom: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.horizontal-info-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xl);
}

.info-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-block label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 2px;
}

.info-block span {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Financial Edit Area - Theme-Harmonized Containers */
.financial-edit-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 4px);
    padding: var(--space-md) var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.financial-edit-area .btn-status-doc {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.financial-edit-area:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.financial-edit-area .item-block-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.05em;
}

/* Inner Column Sub-Cards */
.financial-edit-area > div > div[style*="background:"],
.financial-edit-area div[style*="background:"] {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 3px);
    box-shadow: var(--shadow-sm);
}

/* Labels Inside Item/Group Containers */
.financial-field label {
    font-size: 0.72rem;
    color: var(--text-label, var(--text-secondary));
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

/* Financial Inputs inside Containers */
.financial-input {
    width: 100%;
    background: var(--bg-input, var(--bg-secondary));
    border: 1px solid var(--border-input, var(--border-color));
    border-radius: var(--radius-sm, 3px);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.financial-input[readonly],
.financial-input[disabled] {
    background: var(--bg-input-disabled, var(--bg-secondary));
    color: var(--text-muted);
    border-color: var(--border-color);
}

.financial-input:focus {
    border-color: var(--border-input-focus, var(--color-blue));
    background: var(--bg-input, var(--bg-secondary));
    box-shadow: 0 0 0 2px var(--shadow-glow);
}

.sub-item-row {
    background: var(--bg-subitem, var(--bg-secondary));
    border: 1px solid var(--border-subitem, var(--border-color));
    border-radius: var(--radius-sm, 3px);
}

/* Esmaecer todo o grupo ou item quando marcado como Deserto */
.financial-edit-area.item-cancelled-dimmed {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.financial-edit-area.item-cancelled-dimmed .item-input-conv,
.financial-edit-area.item-cancelled-dimmed .item-input-cnpj,
.financial-edit-area.item-cancelled-dimmed .item-input-qtd,
.financial-edit-area.item-cancelled-dimmed .item-input-est,
.financial-edit-area.item-cancelled-dimmed .item-input-arr,
.financial-edit-area.item-cancelled-dimmed .item-input-pro,
.financial-edit-area.item-cancelled-dimmed .item-input-marca,
.financial-edit-area.item-cancelled-dimmed .item-input-dat-conv,
.financial-edit-area.item-cancelled-dimmed .sub-item-row,
.financial-edit-area.item-cancelled-dimmed .btn-status-doc:not(.active):not([data-type="desertoOk"]) {
    opacity: 0.45 !important;
    filter: grayscale(0.7) !important;
}

.financial-edit-area.item-cancelled-dimmed .btn-status-doc {
    pointer-events: auto;
}

/* Manter o botão acionado (DESERTO) 100% visível, sem esmaecer */
.btn-status-doc[data-type="desertoOk"].active,
.financial-edit-area.item-cancelled-dimmed .btn-status-doc.active[data-type="desertoOk"] {
    opacity: 1 !important;
    filter: none !important;
    transform: scale(1.02);
    pointer-events: auto !important;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.items-table-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    border: 1px solid var(--border-color);
}

.header-col {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.financial-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: var(--space-md);
    align-items: center;
}

.financial-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.financial-field label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-currency-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-prefix {
    position: absolute;
    left: var(--space-sm);
    color: var(--color-blue);
    font-weight: 600;
    font-size: 0.85rem;
    pointer-events: none;
}

.financial-input {
    width: 100%;
    padding: var(--space-sm) var(--space-sm) var(--space-sm) 38px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--color-blue);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    height: 34px;
    transition: all var(--transition-base);
}

.financial-input.readonly {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-blue);
    cursor: default;
    border-left: 3px solid transparent;
}

.financial-input.positive {
    color: var(--color-green);
}

.financial-input.negative {
    color: var(--color-red);
}

.financial-input.deadline-expired {
    color: var(--color-red) !important;
    font-weight: 700;
}

.item-input-pro,
.sub-item-input-pro {
    color: #fb923c !important;
    font-weight: 700;
}

/* Valor Negociado: Azul (#3b82f6) */
.financial-input.prop-negociado,
.financial-input.arr-negociado,
.item-input-pro.prop-negociado,
.sub-item-input-pro.prop-negociado,
.item-input-arr.arr-negociado,
.sub-item-input-arr.arr-negociado {
    color: #3b82f6 !important;
    font-weight: 700 !important;
}

/* Valor Equalizado (7,5% ICMS CE): Roxo (#a855f7) */
.financial-input.prop-equalizado,
.financial-input.arr-equalizado,
.item-input-pro.prop-equalizado,
.sub-item-input-pro.prop-equalizado,
.item-input-arr.arr-equalizado,
.sub-item-input-arr.arr-equalizado {
    color: #a855f7 !important;
    font-weight: 700 !important;
}

/* Arrematado Normal: Vermelho (quando > Estimado) */
.financial-input.arr-red,
.item-input-arr.arr-red,
.sub-item-input-arr.arr-red {
    color: #ef4444 !important;
    font-weight: 700 !important;
}

/* Arrematado Normal: Verde (quando <= Estimado) */
.financial-input.arr-green,
.item-input-arr.arr-green,
.sub-item-input-arr.arr-green {
    color: #10b981 !important;
    font-weight: 700 !important;
}

.financial-input:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.validation-summary {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    display: none;
}

/* Document Status Buttons (3D Enhanced) */
.btn-status-doc {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 110px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    line-height: 1.1;

    /* 3D Depth Shadow */
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    top: 0;
}

.btn-status-doc:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.4),
        0 5px 10px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-status-doc:active {
    transform: translateY(2px);
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-status-doc.active,
.btn-status-doc.homologacao-ativa {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn-status-doc:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
    box-shadow: none;
    transform: none;
    background: var(--bg-secondary);
}

/* Specific colors for 3D state */
.btn-status-doc.homologacao-ativa {
    background: linear-gradient(180deg, #9f7aea 0%, #805ad5 100%);
    box-shadow:
        0 3px 0 #553c9a,
        0 6px 20px rgba(128, 90, 213, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-status-doc[data-type="propostaOk"].active {
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    box-shadow:
        0 3px 0 #0099cc,
        0 6px 20px rgba(79, 172, 254, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-status-doc[data-type="habilitacaoOk"].active {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    box-shadow:
        0 3px 0 #047857,
        0 6px 20px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Pressed state for active buttons */
.btn-status-doc.active:active {
    box-shadow:
        0 0 0 transparent,
        inset 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Coluna DOCUMENTAÇÃO (Proposta, Habilitação, Amostra) - Transparente 3D (35% Opacidade + Blur) */
.btn-status-doc[data-type="propostaOk"].active {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.35) 0%, rgba(14, 116, 144, 0.35) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(8, 145, 178, 0.6), 0 6px 15px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-status-doc[data-type="habilitacaoOk"].active {
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.35) 0%, rgba(15, 118, 110, 0.35) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(15, 118, 110, 0.6), 0 6px 15px rgba(20, 184, 166, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-status-doc[data-type="amostraOk"].active {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.35) 0%, rgba(30, 58, 138, 0.35) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(30, 58, 138, 0.6), 0 6px 15px rgba(59, 130, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* Coluna JULGAMENTO & RESULTADO (Homologado e Homologado Fracassado) - Transparente 3D */
.btn-status-doc[data-type="aceitoHabilitadoOk"].active,
.btn-status-doc[data-type="homologadoOk"].active,
.btn-status-doc[data-type="homologadoTotalOk"].active {
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.55) 0%, rgba(29, 78, 216, 0.55) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(30, 58, 138, 0.7), 0 6px 15px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-status-doc[data-type="homologadoFracassadoOk"].active {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.30) 0%, rgba(217, 119, 6, 0.30) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(180, 83, 9, 0.6), 0 6px 15px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* Coluna RECURSOS (Razões, Contrarrazões, Decidir Recurso, Órgão, PROLIC) - Vermelho Vívido e Transparente 3D */
.btn-status-doc[data-type="intencaoOk"].active,
.btn-status-doc[data-type="recursoOk"].active,
.btn-status-doc[data-type="decidirRecursoOk"].active,
.btn-status-doc[data-type="orgaoOk"].active,
.btn-status-doc[data-type="prolicOk"].active {
    background: linear-gradient(180deg, rgba(255, 23, 68, 0.20) 0%, rgba(225, 29, 72, 0.20) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(159, 18, 57, 0.4), 0 6px 15px rgba(244, 63, 94, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7) !important;
}

.btn-status-doc[data-type="intencaoOk"]:not(.active):not(:disabled):hover,
.btn-status-doc[data-type="recursoOk"]:not(.active):not(:disabled):hover,
.btn-status-doc[data-type="decidirRecursoOk"]:not(.active):not(:disabled):hover {
    border-color: rgba(244, 63, 94, 0.6) !important;
    background: rgba(244, 63, 94, 0.15) !important;
    color: #f43f5e !important;
}


/* Unificação Global Absoluta dos Botões de Gestão (Header) */
#header-status-buttons .btn-status-doc {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
    opacity: 1 !important;
    top: 0 !important;
    font-weight: 700 !important;
}

/* Estado Ativo: ULTRA-SUTIL e TOTALMENTE UNIFICADO (Fundo e Sombra Idênticos) */
#header-status-buttons .btn-status-doc.active,
#header-status-buttons .btn-status-doc.homologacao-ativa {
    background: var(--bg-card) !important; /* Fundo idêntico */
    color: var(--color-blue) !important;   /* Texto muda de cor */
    border: 1px solid var(--color-blue) !important; /* Borda idêntica (1px) */
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.1) !important; /* Sombra idêntica */
    text-shadow: none !important;
    opacity: 1 !important;
}

/* Estado Desabilitado Unificado para o Grupo de Gestão */
#header-status-buttons .btn-status-doc:disabled {
    background: var(--bg-card) !important;
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    border: 1px solid var(--border-color) !important;
}

/* Hover consistente (Apenas para não-desabilitados) */
#header-status-buttons .btn-status-doc:not(:disabled):hover {
    filter: brightness(1.1) !important;
    transform: translateY(-1px) !important;
    background: var(--bg-card-hover) !important;
}

/* ── BOTÃO FINALIZAR ── borda luminescente pulsante no tema */
@keyframes finalizar-glow {
    0%   { box-shadow: 0 0 4px 1px var(--color-blue), 0 3px 0 rgba(0,0,0,0.2); }
    50%  { box-shadow: 0 0 14px 4px var(--color-blue), 0 3px 0 rgba(0,0,0,0.2); }
    100% { box-shadow: 0 0 4px 1px var(--color-blue), 0 3px 0 rgba(0,0,0,0.2); }
}

#header-status-buttons .btn-finalizar {
    border: 1.5px solid var(--color-blue) !important;
    color: var(--color-blue) !important;
    animation: finalizar-glow 2.4s ease-in-out infinite !important;
    letter-spacing: 0.04em !important;
}

#header-status-buttons .btn-finalizar:hover {
    background: rgba(102, 126, 234, 0.08) !important;
    transform: translateY(-1px) !important;
}

#header-status-buttons .btn-finalizar.active {
    background: var(--color-blue) !important;
    color: #fff !important;
    border-color: var(--color-blue) !important;
    animation: none !important;
    box-shadow: 0 0 16px 4px var(--color-blue), 0 3px 0 rgba(0,0,0,0.3) !important;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}


.recorrente-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-base);
}

.recorrente-item:hover {
    border-color: var(--color-blue);
    background: var(--bg-card-hover);
}

.recorrente-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recorrente-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
}

.recorrente-doc {
    font-size: 0.75rem;
    color: var(--text-muted);
}


/* Dispute Type Buttons (3D Enhanced) */
.btn-tipo-disputa {
    min-width: 160px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    position: relative;
    top: 0;
    box-shadow:
        0 3px 0 rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn-tipo-disputa:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow:
        0 4px 0 rgba(0, 0, 0, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.3);
}

.btn-tipo-disputa:active {
    transform: translateY(2px);
    box-shadow:
        0 0 0 rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.btn-tipo-disputa.tipo-ampla {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 3px 0 #047857, 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-tipo-disputa.tipo-cota {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    box-shadow: 0 3px 0 #b45309, 0 6px 12px rgba(245, 158, 11, 0.3);
}

.btn-tipo-disputa.tipo-exclusiva {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    box-shadow: 0 3px 0 #6d28d9, 0 6px 12px rgba(139, 92, 246, 0.3);
}

/* Custom Dropdowns for Status Buttons */
.status-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-secondary) !important;
    background: var(--bg-secondary) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 1 !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 10000 !important;
    display: none;
    min-width: 220px;
    margin-top: 8px;
    padding: 5px 0;
}

.dropdown-menu.show {
    display: block;
    animation: fadeInScale 0.2s ease-out;
}

/* LicitaGov / LicitaWeb Notification Toasts (Canto Inferior Direito) */
#licitaweb-notification-container {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    z-index: 99999999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-width: 460px !important;
    width: calc(100vw - 48px) !important;
    pointer-events: none !important;
}

.licitaweb-toast {
    background: #0f172a !important;
    background-color: #0f172a !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-left: 4px solid #3b82f6 !important;
    border-radius: 12px !important;
    padding: 16px 18px !important;
    box-shadow: 0 20px 35px -5px rgba(0, 0, 0, 0.8), 0 0 25px rgba(59, 130, 246, 0.25) !important;
    color: #f8fafc !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    pointer-events: auto !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: licitagovSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.licitaweb-toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.licitaweb-toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.licitaweb-toast-body {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.45;
}

.licitaweb-toast-btn-confirm {
    margin-top: 10px;
    width: 100%;
    padding: 9px 16px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.licitaweb-toast-btn-confirm:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.licitaweb-toast-nup-box {
    background: rgba(30, 41, 59, 0.8);
    border: 1px dashed #475569;
    border-radius: 8px;
    padding: 8px 12px;
    margin: 10px 0;
}

.licitaweb-toast-nup-val {
    font-family: monospace;
    font-weight: 700;
    color: #38bdf8;
    font-size: 0.95rem;
}


/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Firefox and standards */
input[type=number] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

.alert-pregao {
    border-left: 4px solid var(--color-red) !important;
}

.blink {
    animation: blink-alert 1.5s ease-in-out infinite;
}

@keyframes blink-alert {
    0%, 100% {
        background-color: rgba(239, 68, 68, 0.1);
        border-color: rgba(239, 68, 68, 0.3);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.4);
        border-color: rgba(239, 68, 68, 0.8);
    }
}

@keyframes blink-bg {

    0%,
    100% {
        background-color: rgba(239, 68, 68, 0.2);
    }

    50% {
        background-color: rgba(239, 68, 68, 0.5);
    }
}

.deadline-expired {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #fff !important;
    font-weight: 800 !important;
    border: 1px solid var(--color-red) !important;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--color-blue);
    padding-left: 20px;
}

.dropdown-item.selected {
    color: var(--color-blue);
    background: rgba(102, 126, 234, 0.1);
}

/* Submenu Styles */
.dropdown-item {
    position: relative;
}

.has-submenu::after {
    content: ' ◀';
    font-size: 0.6rem;
    float: right;
    margin-left: 10px;
    opacity: 0.7;
}

.submenu {
    position: absolute;
    right: 100%;
    left: auto;
    top: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 10001;
    padding: 5px 0;
    margin-right: 2px;
    margin-left: auto;
}

.has-submenu:hover > .submenu {
    display: none;
}

.has-submenu.active-submenu > .submenu {
    display: block !important;
    animation: fadeInScale 0.2s ease-out;
}

.submenu .dropdown-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.submenu .dropdown-item:last-child {
    border-bottom: none;
}

.validation-summary.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: block;
}

/* ================================
   Tipo de Disputa Dropdown
   ================================ */
.btn-tipo-disputa:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-tipo-disputa:active {
    transform: translateY(0);
}

.tipo-disputa-menu {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tipo-disputa-menu .dropdown-item:hover {
    background: var(--bg-card-hover);
    padding-left: 18px;
}

.tipo-disputa-menu .dropdown-item:active {
    background: var(--bg-card-hover);
}

/* ================================
   Responsive Styles
   ================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: var(--space-xl);
    }

    .search-shortcut {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .user-greeting {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        max-height: 85vh;
    }

    .parcelamento-options {
        flex-direction: column;
        gap: var(--space-md);
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: var(--space-lg);
    }

    .form-options {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }

    .filter-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.8rem;
    }

    .toast {
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
    }
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(102, 126, 234, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(102, 126, 234, 0.4);
    border-radius: var(--radius-full);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-to-top:hover {
    background: var(--gradient-primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    border-color: transparent;
}

.btn-back-to-top:active {
    transform: translateY(0);
}

/* ==========================================================================
   Document Editor (A4 Paper) Styles
   ========================================================================== */
.document-editor-section {
    animation: fadeIn 0.4s ease-out;
}

.paper-container {
    display: flex;
    justify-content: center;
    background: #1e1e26;
    /* Darker background to contrast paper */
    padding: 60px 40px;
    border-radius: var(--radius-lg);
    overflow-y: auto;
    max-height: 85vh;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
    scrollbar-width: thin;
    scrollbar-color: var(--color-blue) var(--bg-secondary);
}

.paper-a4 {
    width: 210mm;
    min-height: 297mm;
    background: #fff;
    color: #000;
    padding: 25mm 20mm;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    outline: none;
    box-sizing: border-box;
    overflow-wrap: break-word;
    transition: all 0.3s ease;
}

/* --- Clean Slate Mode: For Imported Models --- */
.paper-a4.model-mode {
    padding: 0 !important;
    /* Allow the imported content to define margins */
    font-family: initial !important;
    line-height: initial !important;
}

.paper-a4.model-mode * {
    all: revert;
    /* Attempt to reset to browser defaults for imported content */
    box-sizing: border-box;
}

/* Preserve specific utility classes for mammoth.js */
.paper-a4.model-mode .text-center {
    text-align: center !important;
    display: block;
}

.paper-a4.model-mode .text-right {
    text-align: right !important;
    display: block;
}

.paper-a4.model-mode .text-left {
    text-align: left !important;
    display: block;
}

.paper-a4.model-mode .text-justify {
    text-align: justify !important;
    display: block;
}

/* Ensure images and tables don't break the A4 width */
.paper-a4.model-mode img,
.paper-a4.model-mode table {
    max-width: 100% !important;
    height: auto !important;
}

/* Reset for plain text imports */
.paper-a4.model-mode pre {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
}

/* Ensure imported content maintains its structure */
.paper-a4 * {
    max-width: 100%;
}

.paper-a4 table {
    width: 100% !important;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.paper-a4 td,
.paper-a4 th {
    border: 1px solid #000;
    padding: 8px;
}

.paper-a4 img {
    max-width: 100%;
    height: auto;
}

/* Editable Field Enhancements */
.editable-field {
    background: rgba(139, 92, 246, 0.05);
    border-bottom: 1px dashed #8b5cf6;
    color: inherit;
    padding: 0 4px;
    transition: all 0.2s ease;
    cursor: text;
    display: inline-block;
    min-width: 20px;
}

.editable-field:hover {
    background: rgba(139, 92, 246, 0.1);
}

.editable-field:focus {
    background: rgba(139, 92, 246, 0.15);
    border-bottom-style: solid;
    outline: none;
}

/* Mammoth.js Alignment Fixes (since mammoth uses tags/classes for alignment) */
.paper-a4 .text-center {
    text-align: center !important;
}

.paper-a4 .text-right {
    text-align: right !important;
}

.paper-a4 .text-left {
    text-align: left !important;
}

.paper-a4 .text-justify {
    text-align: justify !important;
}

@media print {

    .sidebar,
    .top-header,
    .editor-header,
    .btn-back-to-top,
    .toast {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .paper-container {
        padding: 0 !important;
        background: #fff !important;
        overflow: visible !important;
        max-height: none !important;
        box-shadow: none !important;
    }

    .paper-a4 {
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
        padding: 0 !important;
        /* Let printer handle margins */
    }
}

/* Server Status Banner */
.server-status-banner {
    display: none;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #9b1c1c;
    padding: 12px 20px;
    margin: 15px 20px 0 20px;
    border-radius: 10px;
    border-left: 5px solid #9b1c1c;
    align-items: center;
    gap: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(155, 28, 28, 0.1);
    animation: slideDown 0.4s ease-out;
}

.server-status-banner.visible {
    display: flex;
}

.server-status-banner svg {
    flex-shrink: 0;
    color: #9b1c1c;
}

.server-status-banner .btn-retry-server {
    background: #9b1c1c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: auto;
    transition: all 0.3s ease;
}

.server-status-banner .btn-retry-server:hover {
    background: #7f1d1d;
    transform: translateY(-2px);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Processes & Database Table */
.database-table-wrapper .processos-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.database-table-wrapper .processos-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.database-table-wrapper .processos-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.database-table-wrapper .processos-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.database-table-wrapper .processos-table tr:last-child td {
    border-bottom: none;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
        background: var(--color-red);
        color: white;
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
        background: #991b1b;
        color: rgba(255, 255, 255, 0.9);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
        background: var(--color-red);
        color: white;
    }
}

.deadline-alert {
    animation: pulse-red 2s infinite !important;
    background: var(--color-red) !important;
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
}

.alert-critical {
    background: rgba(239, 68, 68, 0.15) !important;
    border-left: 4px solid var(--color-red) !important;
}

.alert-confirmed {
    background: rgba(16, 185, 129, 0.1) !important;
    border-left: 4px solid var(--color-green) !important;
    opacity: 0.8;
}

.btn-delete-activity:hover {
    color: var(--color-red) !important;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* ================================
   Restored Header Specific Styles
   ================================ */
.horizontal-info-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    row-gap: 8px;
    width: 100%;
}

.info-block {
    display: flex;
    flex-direction: column;
    /* Optional: min-width to prevent squishing too much */
    min-width: max-content;
}

.info-block label {
    font-size: 0.75rem;
    /* slightly smaller label */
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 2px;
}

.info-block span {
    font-size: 0.95rem;
    /* slightly larger value for readability */
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.2;
}


/* Click-to-Copy Badge */
.copyable-badge {
    cursor: pointer;
    padding: 2px 6px;
    background: rgba(var(--color-primary-rgb), 0.1);
    border-radius: 4px;
    border: 1px dashed var(--color-primary);
    transition: all 0.2s;
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
}

.copyable-badge:hover {
    background: rgba(var(--color-primary-rgb), 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.copyable-badge:active {
    transform: translateY(0);
}

/* Animations */
@keyframes blink-alert {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0px rgba(245, 158, 11, 0); }
    50% { opacity: 0.7; transform: scale(0.98); box-shadow: 0 0 12px rgba(245, 158, 11, 0.6); }
}

.btn-blink {
    animation: blink-alert 1.5s infinite ease-in-out;
}

/* Status Classes */
.proposta-ok {
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.35) 0%, rgba(14, 116, 144, 0.35) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(8, 145, 178, 0.6), 0 6px 15px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.habilitacao-ok {
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.35) 0%, rgba(15, 118, 110, 0.35) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(15, 118, 110, 0.6), 0 6px 15px rgba(20, 184, 166, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.proposta-diligencia, .habilitacao-diligencia {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

.proposta-diligencia.btn-blink, .habilitacao-diligencia.btn-blink {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
    animation: blink-red-alert 1s infinite ease-in-out;
}

@keyframes blink-red-alert {
    50% { opacity: 0.7; background: #991b1b !important; }
}




/* ================================
   Botões do Modal de Escolha de Fluxo
   ================================ */

/* Padrão base (Ex: Win11 Azul, Claro, Esmeralda) */
.btn-fluxo-pregao {
    padding: 15px;
    font-size: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-fluxo-rem {
    padding: 15px;
    font-size: 1rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--color-blue);
    filter: brightness(0.5) contrast(1.2);
    color: white;
    border: none;
    font-weight: bold;
}

/* Override exclusivo para Win11 Escuro (Tons de Cinza) */
.theme-win11-dark .btn-fluxo-pregao {
    background: #444444 !important;
    color: #ffffff !important;
    filter: none !important;
    border: 1px solid #555;
}

.theme-win11-dark .btn-fluxo-pregao:hover {
    background: #555555 !important;
}

.theme-win11-dark .btn-fluxo-rem {
    background: #1a1a1a !important;
    color: #ffffff !important;
    filter: none !important;
    border: 1px solid #333;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.theme-win11-dark .btn-fluxo-rem:hover {
    background: #252525 !important;
}

/* End of File */
/* Estilos Quadro de Avisos na Sidebar */
.messages-section.in-sidebar {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid var(--border-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    max-height: 400px;
    margin-top: auto; /* Empurra para a base se houver espaço */
}

/* Messaging System Styles */
.chat-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    position: relative;
}

.chat-user-item:hover {
    background: rgba(var(--color-primary-rgb), 0.05);
}

.chat-user-item.active {
    background: rgba(var(--color-primary-rgb), 0.1);
    border-left: 3px solid var(--color-blue);
}

.chat-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-blue);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-message-bubble {
    max-width: 75%;
    padding: 4px 14px;
    border-radius: var(--radius-md);
    font-size: 1.45rem;
    line-height: 1.25;
    position: relative;
    word-break: break-word;
    color: #ffffff !important;
    white-space: pre-wrap;
    letter-spacing: 0.01em;
}

/* High Contrast Input Styles */
.high-contrast-input {
    background: #050505 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}
.high-contrast-input::placeholder {
    color: rgba(255,255,255,0.6) !important;
    font-weight: 500;
}
.high-contrast-input:focus {
    border-color: var(--color-blue) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

.chat-message-sent {
    align-self: flex-start;
    background: rgba(102, 126, 234, 0.15) !important;
    border: 1px solid rgba(102, 126, 234, 0.35) !important;
    border-bottom-left-radius: 4px;
}

.chat-message-received {
    align-self: flex-end;
    background: rgba(118, 75, 162, 0.15) !important;
    border: 1px solid rgba(118, 75, 162, 0.35) !important;
    border-bottom-right-radius: 4px;
}

.chat-message-bubble:not(.editing):hover .msg-actions {
    display: flex !important;
}

.chat-unread-dot {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg-card);
}

.chat-timestamp {
    font-size: 0.72rem;
    margin-top: 5px;
    opacity: 0.7;
    display: block;
}

.chat-message-sent .chat-timestamp {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.messages-section.in-sidebar .section-header-compact {
    margin-bottom: var(--space-md);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 8px;
}

.messages-section.in-sidebar h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin: 0;
}

.messages-section.in-sidebar .btn-clear-all {
    font-size: 0; 
    padding: 6px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.messages-section.in-sidebar .btn-clear-all svg {
    margin: 0;
}

.messages-section.in-sidebar .btn-clear-all:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.messages-section.in-sidebar .messages-container {
    padding-right: 4px; /* margem p barras */
}

/* ==========================================================================
   FullCalendar Custom Theme Overrides (3D Container Architecture)
   ========================================================================== */
.agenda-section {
    width: 100%;
    padding: 0 !important;
    background: var(--bg-primary) !important;
}

#calendar-container {
    width: 100%;
    margin: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%), var(--bg-primary) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 6px);
    padding: 16px;
    height: calc((100vh - 45px) * 1.1); /* Aumentado em 10% conforme solicitação do usuário */
    min-height: 480px;
    box-shadow: 0 6px 20px -2px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

#calendar {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: transparent !important;
}

/* Remove FullCalendar trailing gap/extra column */
.fc-scrollgrid, 
.fc-col-header, 
.fc-daygrid-body, 
.fc-scrollgrid-sync-table {
    width: 100% !important;
}

.fc-scroller-harness, .fc-scroller {
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* Remove trailing gap while ensuring all 7 days stay visible */
.fc-scrollgrid-section-header > th:last-child:empty {
    display: none !important;
}

/* Base Grid Transparente para acomodar Containers 3D Individuais */
.fc-theme-standard .fc-scrollgrid {
    border: none !important;
    background: transparent !important;
}
.fc-theme-standard td, 
.fc-theme-standard th {
    border: none !important;
    background: transparent !important;
}

/* ==========================================================================
   Cabeçalho com Dias da Semana (3D Containers com Bordas Levemente Arredondadas)
   ========================================================================== */
.fc-theme-standard th.fc-col-header-cell {
    background: transparent !important;
    padding: 3px 2px 7px 2px !important;
    border: none !important;
}

.fc-col-header-cell-cushion {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 9px 4px !important;
    border-radius: 4px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(0, 0, 0, 0.22) 100%), var(--bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.24) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.45) !important;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        inset 0 -1px 0 rgba(0, 0, 0, 0.25) !important;
    color: var(--text-primary) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    text-decoration: none !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
}

.fc-col-header-cell-cushion:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 12px -1px rgba(0, 0, 0, 0.4),
        0 3px 6px -1px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
}

/* ==========================================================================
   Células dos Dias (Containers 3D com Bordas Levemente Arredondadas)
   ========================================================================== */
.fc-daygrid-day {
    padding: 2px !important;
    background: transparent !important;
    border: none !important;
}

.fc-daygrid-day-frame {
    margin: 2px !important;
    border-radius: 4px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 30%, rgba(0, 0, 0, 0.2) 100%), var(--bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.45) !important;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -1px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.2s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100% - 4px) !important;
    min-height: 85px;
}

.fc-daygrid-day:hover .fc-daygrid-day-frame {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4) !important;
    border-top-color: rgba(99, 102, 241, 0.7) !important;
    box-shadow: 
        0 8px 16px -2px rgba(0, 0, 0, 0.5),
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 0 14px rgba(99, 102, 241, 0.2) !important;
    z-index: 5;
}

/* ==========================================================================
   Destaque do Dia Atual (HOJE) em 3D
   ========================================================================== */
.fc-day-today {
    background: transparent !important;
    border: none !important;
}

.fc-day-today .fc-daygrid-day-frame {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.24) 0%, rgba(59, 130, 246, 0.12) 50%, rgba(0, 0, 0, 0.25) 100%), var(--bg-secondary) !important;
    border: 1.5px solid var(--color-blue) !important;
    border-top: 1.5px solid #a5b4fc !important;
    border-radius: 4px !important;
    box-shadow: 
        0 6px 14px -2px rgba(99, 102, 241, 0.4),
        0 3px 6px -1px rgba(0, 0, 0, 0.3),
        inset 0 0 18px rgba(99, 102, 241, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    position: relative;
}

.fc-day-today .fc-daygrid-day-frame::after {
    content: 'HOJE';
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 0.6rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-blue) 0%, #4338ca 100%);
    padding: 2px 6px;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.25);
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Número do Dia no Cabeçalho da Célula
   ========================================================================== */
.fc-daygrid-day-top {
    display: flex;
    flex-direction: row-reverse;
    padding: 4px 6px 2px 6px;
}

.fc-daygrid-day-number {
    color: var(--text-primary) !important;
    font-size: 0.82rem !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 3px;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.fc-day-today .fc-daygrid-day-number {
    background: var(--color-blue);
    color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font-weight: 800 !important;
}

/* Dias de outros meses */
.fc-day-other .fc-daygrid-day-frame {
    opacity: 0.45;
    background: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.03) !important;
}

.fc-day-other:hover .fc-daygrid-day-frame {
    opacity: 0.75;
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) !important;
}

/* Final de Semana com Efeito 3D */
.fc-day-sat, .fc-day-sun {
    width: 6% !important;
}

.fc-daygrid-day.fc-day-sat .fc-daygrid-day-frame, 
.fc-daygrid-day.fc-day-sun .fc-daygrid-day-frame {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.18) 100%), var(--bg-card) !important;
    opacity: 0.88;
}

.fc-day-sat .fc-daygrid-day-number, 
.fc-day-sun .fc-daygrid-day-number {
    opacity: 0.65;
}

/* ==========================================================================
   Toolbar e Botões da Agenda em 3D
   ========================================================================== */
.fc-toolbar {
    margin-bottom: 14px !important;
    padding: 10px 14px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.16) 100%), var(--bg-secondary) !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.25),
        0 1px 3px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fc-toolbar-title {
    color: var(--text-primary) !important;
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.fc-button-primary {
    background: linear-gradient(180deg, #6366f1 0%, #4338ca 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.35) !important;
    border-radius: 4px !important;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    text-transform: capitalize;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    padding: 7px 14px !important;
    transition: all 0.2s ease !important;
}

.fc-button-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 
        0 5px 12px rgba(99, 102, 241, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    filter: brightness(1.08);
}

.fc-button-primary:not(:disabled):active, 
.fc-button-primary:not(:disabled).fc-button-active {
    background: linear-gradient(180deg, #3730a3 0%, #312e81 100%) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    transform: translateY(1px) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   Eventos como Micro-Containers 3D
   ========================================================================== */
.fc-event, 
.fc-daygrid-event {
    border-radius: 3px !important;
    padding: 3px 6px !important;
    font-size: 0.76rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    margin: 2px 3px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.fc-event:hover, 
.fc-daygrid-event:hover {
    transform: translateY(-1px) scale(1.015) !important;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
    filter: brightness(1.1);
    z-index: 10 !important;
}

.fc-view-harness {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 100%), var(--bg-primary) !important;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Agenda Warning Notification */
.message-item.alert-agenda-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left: 4px solid var(--color-orange) !important;
}

.message-item.alert-agenda-warning .message-text {
    color: var(--color-orange) !important;
    font-weight: 700;
}

.blink {
    animation: blink-alert 2s infinite ease-in-out;
}

/* Agenda Holidays Styles */
.feriado-event, .feriado-local-event {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    white-space: normal !important;
    line-height: 1.1 !important;
    padding: 3px 6px !important;
    cursor: default;
    border-radius: 6px !important;
}

.feriado-local-event {
    border-left: 3px solid currentColor !important;
}

.fc-day-other .feriado-local-event {
    opacity: 0.4;
}

/* Animao Pulsante para Novos Avisos */
@keyframes blink-alert-notice {
    0%, 100% { background-color: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.2); }
    50% { background-color: rgba(239, 68, 68, 0.2); border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.4); }
}

.blink-notice {
    animation: blink-alert-notice 1.5s infinite ease-in-out !important;
    border-left: 5px solid #ef4444 !important;
}

/* Animação Pulsante Verde para Avisos de Entrada na PGE/CELIC */
@keyframes blink-alert-green {
    0%, 100% { 
        background-color: rgba(16, 185, 129, 0.08); 
        border-color: rgba(16, 185, 129, 0.25); 
    }
    50% { 
        background-color: rgba(16, 185, 129, 0.25); 
        border-color: #10b981; 
        box-shadow: 0 0 14px rgba(16, 185, 129, 0.5); 
    }
}

.alert-suite-pge,
.message-item.alert-suite-pge {
    animation: blink-alert-green 1.5s infinite ease-in-out !important;
    border-left: 5px solid #10b981 !important;
    background-color: rgba(16, 185, 129, 0.08) !important;
}


/* Mensagens Dashboard Section */
.mensagens-section {
    flex: 1;
    display: none;
    flex-direction: column;
    margin-bottom: var(--space-xl); /* Margem inferior igual à superior */
    height: calc(100vh - 180px);
}

.mensagens-section > div {
    flex: 1;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeIn var(--transition-base);
}

/* Tarefas Concluídas no Calendário */
.task-completed {
    background-color: rgba(16, 185, 129, 0.2) !important; /* Verde Suave */
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

.task-completed .fc-event-title,
.task-completed .fc-event-time {
    color: rgba(255, 255, 255, 0.4) !important; /* Fonte Transparente */
    text-decoration: line-through; /* Texto riscado para reforçar conclusão */
}

.task-completed:hover {
    background-color: rgba(16, 185, 129, 0.3) !important;
}
/* Custom Choice Chips */
.choice-chip {
    cursor: pointer;
}

.choice-chip input {
    display: none;
}

.choice-chip span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.choice-chip input:checked + span {
    background: var(--color-blue);
    border-color: var(--color-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.choice-chip:hover span {
    border-color: var(--color-blue);
    background: var(--bg-card-hover);
}

/* Click-to-Copy for table fields */
.copyable-field {
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.copyable-field:hover {
    background: rgba(102, 126, 234, 0.06);
    color: var(--color-blue);
}

/* Ensure buttons inside copyable cells are not recolored on hover */
.copyable-field:hover button,
.copyable-field:hover .btn-icon,
.copyable-field:hover .btn-status-doc {
    color: inherit;
}

/* ==========================================================================
   Tema Escuro Customizado para a Agenda (Win 11 Esmeralda)
   ========================================================================== */
/* Fundo escuro esmeralda apenas no grid interno (onde ficam os eventos) */
.theme-win11-emerald .fc-view-harness {
    background-color: #050e0a !important; 
}

/* Fonte dos eventos ativa em branco */
.theme-win11-emerald .fc-event:not(.task-completed) .fc-event-title,
.theme-win11-emerald .fc-event:not(.task-completed) .fc-event-time,
.theme-win11-emerald .fc-event:not(.task-completed) * {
    color: #ffffff !important;
}

/* Custom agenda configuration button matching 3D theme */
.agenda-config-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 4px !important;
    color: var(--color-blue);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.18) 100%), var(--bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.4) !important;
    box-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
    padding: 0 !important;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.agenda-config-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(0, 0, 0, 0.22) 100%), var(--bg-card-hover) !important;
    border-color: rgba(99, 102, 241, 0.4) !important;
    color: var(--text-primary) !important;
    box-shadow: 
        0 5px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 10px rgba(99, 102, 241, 0.25) !important;
}

/* Premium "+ X mostrar mais" 3D badge */
.fc-daygrid-more-link {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.2) 0%, rgba(79, 70, 229, 0.1) 100%), var(--bg-secondary) !important;
    color: var(--color-blue) !important;
    padding: 2px 8px !important;
    border-radius: 3px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    display: inline-block !important;
    margin: 2px 4px !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
    border-top: 1px solid rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}
.fc-daygrid-more-link:hover {
    background: var(--color-blue) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    border-color: var(--color-blue) !important;
    text-decoration: none !important;
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Premium Popover for hidden events (3D Container) */
.fc-popover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.25) 100%), var(--bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5) !important;
    border-radius: 6px !important;
    box-shadow: 
        0 12px 28px -4px rgba(0, 0, 0, 0.6),
        0 4px 10px -2px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    z-index: 1000 !important;
    overflow: hidden;
}
.fc-popover-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.15) 100%) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 8px 12px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.fc-popover-title {
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: var(--text-primary) !important;
    text-transform: capitalize;
}
.fc-popover-close {
    color: var(--text-secondary) !important;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.1rem !important;
    transition: all 0.15s ease;
}
.fc-popover-close:hover {
    opacity: 1;
    color: var(--color-red) !important;
    transform: scale(1.1);
}

/* ====================================================
   ESTILOS DO DASHBOARD SUITE CEARÁ
   ==================================================== */
.suite-section {
    animation: fadeIn 0.3s ease-in-out;
}

#suite-table tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.suite-stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.suite-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Suite Table Header Interactive Filters & Sorting */
.suite-th-filter {
    user-select: none;
}

.suite-th-content {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.suite-th-content:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #fff);
}

.suite-filter-icon, .suite-sort-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 4px;
    color: var(--text-muted, #94a3b8);
    transition: all 0.15s ease;
    opacity: 0.7;
}

.suite-th-content:hover .suite-filter-icon,
.suite-th-content:hover .suite-sort-icon {
    opacity: 1;
    color: #60a5fa;
}

.suite-filter-icon.is-active,
.suite-sort-icon.is-active {
    opacity: 1;
    color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.suite-table-container {
    overflow: visible !important;
    min-height: 420px;
    position: relative;
}

#suite-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

#suite-table thead tr th:first-child {
    border-top-left-radius: 12px;
}

#suite-table thead tr th:last-child {
    border-top-right-radius: 12px;
}

/* Suite Popover */
.suite-filter-popover {
    position: absolute;
    top: calc(100% + 6px);
    left: 8px;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
    padding: 14px;
    min-width: 240px;
    max-width: 340px;
    display: none;
    flex-direction: column;
    gap: 10px;
    color: var(--text-primary, #f8fafc);
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    text-align: left;
    animation: suitePopoverFadeIn 0.15s ease-out;
}

@keyframes suitePopoverFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.suite-filter-popover.right-align {
    left: auto;
    right: 8px;
}

.suite-filter-popover.active {
    display: flex;
}

.suite-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
}

.suite-popover-search {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.82rem;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary, #fff);
    outline: none;
    box-sizing: border-box;
}

.suite-popover-search:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.suite-popover-list {
    max-height: 180px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

.suite-popover-list::-webkit-scrollbar {
    width: 4px;
}
.suite-popover-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.suite-popover-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary, #cbd5e1);
    transition: background 0.12s ease, color 0.12s ease;
}

.suite-popover-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.suite-popover-item input[type="checkbox"] {
    cursor: pointer;
    accent-color: #3b82f6;
}

.suite-popover-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.suite-popover-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.suite-popover-btn-clear {
    background: transparent;
    color: var(--text-muted, #94a3b8);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.suite-popover-btn-clear:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.suite-popover-btn-apply {
    background: #3b82f6;
    color: #fff;
}
.suite-popover-btn-apply:hover {
    background: #2563eb;
}

/* Sort Menu Items */
.suite-sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-secondary, #cbd5e1);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.suite-sort-option:hover {
    background: rgba(59, 130, 246, 0.12);
    color: #fff;
    border-color: rgba(59, 130, 246, 0.3);
}

.suite-sort-option.selected {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

/* Suite Process Clickable NUP & Floating Modal */
.suite-nup-clickable-btn {
    background: transparent;
    border: none;
    padding: 6px 10px;
    margin: -6px -10px;
    border-radius: 8px;
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.suite-nup-clickable-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    transform: translateX(3px);
}

.suite-nup-copy-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.88rem;
    font-family: monospace;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    outline: none;
    user-select: none;
}

.suite-nup-copy-btn:hover {
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.45);
    color: #60a5fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

.suite-nup-copy-btn:active {
    transform: scale(0.97);
}

.suite-unit-clickable-btn {
    border: none;
    outline: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.suite-unit-clickable-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.suite-unit-clickable-btn:active {
    transform: scale(0.98);
}

.suite-modal-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.suite-summary-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.suite-summary-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.suite-summary-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.suite-timeline-container {
    position: relative;
    padding-left: 24px;
    margin-top: 10px;
}

.suite-timeline-container::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 8px;
    width: 2px;
    background: linear-gradient(to bottom, #3b82f6 0%, rgba(59, 130, 246, 0.3) 70%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 2px;
}

.suite-timeline-item {
    position: relative;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.suite-timeline-item:hover {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateX(3px);
}

.suite-timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #64748b;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.3);
}

.suite-timeline-item.is-latest {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(145deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-secondary) 100%);
}

.suite-timeline-item.is-latest::before {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35);
}

.suite-timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.suite-timeline-action {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.suite-timeline-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.suite-timeline-status {
    font-size: 0.85rem;
    color: var(--text-secondary, #cbd5e1);
    margin-bottom: 8px;
    line-height: 1.4;
}

.suite-timeline-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.suite-timeline-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Suite Modal Tabs & Documents List */
.suite-tab-btn {
    transition: all 0.2s ease;
}

.suite-tab-btn:hover {
    color: #60a5fa !important;
}

.suite-tab-btn.active {
    border-bottom-color: #3b82f6 !important;
    color: #3b82f6 !important;
}

.suite-doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    gap: 12px;
    transition: all 0.2s ease;
}

.suite-doc-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.suite-doc-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.suite-doc-info {
    flex: 1;
    min-width: 0;
}

.suite-doc-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suite-doc-sub {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suite-doc-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.fc-popover-body {
    padding: 12px !important;
    background: var(--bg-secondary) !important;
    border-bottom-left-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
    max-height: 250px;
    overflow-y: auto;
}



/* ==========================================
   Licitagov Floating Toast (Bottom-Right)
   ========================================== */
#licitagov-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.licitagov-toast-card {
    pointer-events: auto;
    background: #0f172a;
    border: 1px solid #10b981;
    border-right: 5px solid #10b981;
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(16, 185, 129, 0.2);
    color: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    animation: licitagovSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes licitagovSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.licitagov-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.licitagov-toast-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.licitagov-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.2s;
}

.licitagov-toast-close:hover {
    color: #f8fafc;
}

.licitagov-toast-nup-box {
    background: rgba(30, 41, 59, 0.8);
    border: 1px dashed #334155;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.licitagov-toast-nup-box:hover {
    background: rgba(30, 41, 59, 1);
    border-color: #34d399;
}

.licitagov-toast-nup-text {
    font-family: monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
}

.licitagov-toast-copy-icon {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.licitagov-toast-btn-confirm {
    background: #10b981;
    color: #0f172a;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 100%;
}

.licitagov-toast-btn-confirm:hover {
    background: #34d399;
    transform: translateY(-1px);
}

.btn-status-doc[data-type="homologadoTotalOk"].active,
.btn-status-doc[data-type="homologadoOk"].active {
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.55) 0%, rgba(29, 78, 216, 0.55) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(30, 58, 138, 0.7), 0 6px 15px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-status-doc[data-type="homologadoFracassadoOk"].active {
    background: linear-gradient(180deg, rgba(194, 65, 12, 0.25) 0%, rgba(234, 88, 12, 0.25) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(124, 45, 18, 0.5), 0 6px 15px rgba(249, 115, 22, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-julgamento-proposta.active,
.btn-julgamento-habilitacao.active,
.btn-status-doc[data-type="fracassadoOk"].active {
    background: linear-gradient(180deg, rgba(5, 46, 22, 0.30) 0%, rgba(6, 78, 59, 0.30) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(2, 44, 34, 0.6), 0 6px 15px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-homologacao-parcial.homologacao-ativa,
.btn-status-doc.homologacao-ativa {
    background: linear-gradient(180deg, rgba(88, 28, 135, 0.55) 0%, rgba(107, 33, 168, 0.55) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(46, 16, 69, 0.7), 0 6px 15px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

.btn-status-doc[data-type="desertoOk"].active {
    background: linear-gradient(180deg, rgba(159, 18, 57, 0.55) 0%, rgba(190, 18, 60, 0.55) 100%) !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 3px 0 rgba(136, 19, 55, 0.7), 0 6px 15px rgba(225, 29, 72, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}

/* Garantir que o botão DESERTO receba cliques em qualquer estado */
.btn-status-doc[data-type="desertoOk"] {
    pointer-events: auto !important;
}


/* Theme-Aware Background for Comments and Notifications */
.item-input-comments {
    background: var(--bg-input, var(--bg-secondary)) !important;
    background-color: var(--bg-input, var(--bg-secondary)) !important;
    border: 1px solid var(--border-input, var(--border-color)) !important;
    color: #ffffff !important;
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    resize: vertical !important;
    overflow-y: auto !important;
    min-height: 65px;
    box-sizing: border-box !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

#ext-anotacoes-textarea.item-input-comments {
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
    color: #ffffff !important;
    min-height: 220px !important;
}

/* Neutralizar fundos brancos/claros e fontes pretas copiadas externamente SEM afetar marcadores intencionais */
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background-color: rgb(255, 255, 255)"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background-color:#ffffff"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background-color: #ffffff"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background-color: #fff"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background-color: white"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background: rgb(255, 255, 255)"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background: #ffffff"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background: #fff"],
.item-input-comments span:not(.comment-hl):not([data-hl])[style*="background: white"],
.item-input-comments p:not(.comment-hl):not([data-hl])[style*="background-color: white"],
.item-input-comments p:not(.comment-hl):not([data-hl])[style*="background: white"],
.item-input-comments div:not(.comment-hl):not([data-hl])[style*="background-color: white"],
.item-input-comments div:not(.comment-hl):not([data-hl])[style*="background: white"] {
    background-color: transparent !important;
}

.item-input-comments span[style*="color: rgb(0, 0, 0)"],
.item-input-comments span[style*="color: #000000"],
.item-input-comments span[style*="color: #000"],
.item-input-comments span[style*="color: black"],
.item-input-comments p[style*="color: black"],
.item-input-comments div[style*="color: black"] {
    color: #ffffff !important;
}

/* Marcadores de texto (Comentários de Itens, Comentários do Grupo e Anotações do Processo) */
.item-input-comments mark.comment-hl,
.item-input-comments [data-hl],
.item-input-comments span.comment-hl,
#ext-anotacoes-textarea mark.comment-hl,
#ext-anotacoes-textarea [data-hl],
#ext-anotacoes-textarea span.comment-hl {
    padding: 1px 5px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    display: inline !important;
    color: #ffffff !important;
}

/* Marcador Amarelo (e compatibilidade retroativa com tons antigos/inline) */
.item-input-comments mark.comment-hl-yellow,
.item-input-comments [data-hl="yellow"],
.item-input-comments [data-hl="lime"],
.item-input-comments span[style*="234, 179, 8"],
.item-input-comments span[style*="234,179,8"],
.item-input-comments span[style*="132, 204, 22"],
.item-input-comments span[style*="132,204,22"],
.item-input-comments span[style*="84cc16"],
.item-input-comments span[style*="eab308"],
#ext-anotacoes-textarea mark.comment-hl-yellow,
#ext-anotacoes-textarea [data-hl="yellow"],
#ext-anotacoes-textarea [data-hl="lime"],
#ext-anotacoes-textarea span[style*="234, 179, 8"],
#ext-anotacoes-textarea span[style*="234,179,8"],
#ext-anotacoes-textarea span[style*="132, 204, 22"],
#ext-anotacoes-textarea span[style*="132,204,22"],
#ext-anotacoes-textarea span[style*="84cc16"],
#ext-anotacoes-textarea span[style*="eab308"] {
    background: rgba(234, 179, 8, 0.55) !important;
    background-color: rgba(234, 179, 8, 0.55) !important;
    color: #ffffff !important;
}

/* Marcador Vermelho */
.item-input-comments mark.comment-hl-red,
.item-input-comments [data-hl="red"],
.item-input-comments span[style*="239, 68, 68"],
.item-input-comments span[style*="239,68,68"],
.item-input-comments span[style*="ef4444"],
#ext-anotacoes-textarea mark.comment-hl-red,
#ext-anotacoes-textarea [data-hl="red"],
#ext-anotacoes-textarea span[style*="239, 68, 68"],
#ext-anotacoes-textarea span[style*="239,68,68"],
#ext-anotacoes-textarea span[style*="ef4444"] {
    background: rgba(239, 68, 68, 0.55) !important;
    background-color: rgba(239, 68, 68, 0.55) !important;
    color: #ffffff !important;
}

/* Marcador Azul */
.item-input-comments mark.comment-hl-blue,
.item-input-comments [data-hl="blue"],
.item-input-comments span[style*="59, 130, 246"],
.item-input-comments span[style*="59,130,246"],
.item-input-comments span[style*="3b82f6"],
#ext-anotacoes-textarea mark.comment-hl-blue,
#ext-anotacoes-textarea [data-hl="blue"],
#ext-anotacoes-textarea span[style*="59, 130, 246"],
#ext-anotacoes-textarea span[style*="59,130,246"],
#ext-anotacoes-textarea span[style*="3b82f6"] {
    background: rgba(59, 130, 246, 0.55) !important;
    background-color: rgba(59, 130, 246, 0.55) !important;
    color: #ffffff !important;
}

.item-input-comments b,
.item-input-comments strong,
.item-input-comments [style*="bold"],
.item-input-comments [style*="font-weight: 700"],
.item-input-comments [style*="font-weight: 800"],
.item-input-comments [style*="font-weight: 900"],
.item-input-comments [style*="font-weight:bold"] {
    font-weight: 800 !important;
}

.item-input-comments i,
.item-input-comments em {
    font-style: italic !important;
}

.item-input-comments u {
    text-decoration: underline !important;
}

.item-notifications-container {
    background: var(--bg-input, var(--bg-secondary)) !important;
    background-color: var(--bg-input, var(--bg-secondary)) !important;
}

/* Perfect Bullet List Alignment inside Comments */
.item-input-comments ul,
.item-input-comments ol {
    margin: 6px 0 6px 16px !important;
    padding-left: 14px !important;
    list-style-position: inside !important;
}

.item-input-comments li {
    margin-bottom: 4px !important;
    line-height: 1.5 !important;
}

/* Active state for rich text formatting buttons */
button.active-format,
.btn-format-active {
    background: rgba(16, 185, 129, 0.4) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6) !important;
}

/* ==========================================================================
   FLOATING QUADRO DE AVISOS (DRAGGABLE & COLLAPSIBLE TOAST WIDGET)
   ========================================================================== */

.floating-messages-widget {
    position: fixed;
    top: auto;
    left: auto;
    bottom: auto;
    right: auto;
    z-index: 10005;
    display: block;
    width: max-content;
    max-width: calc(100vw - 16px);
    font-family: inherit;
    user-select: none;
    touch-action: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: none !important;
}

.floating-messages-widget.is-dragging {
    transition: none !important;
    cursor: grabbing !important;
}
.floating-messages-widget.is-dragging * {
    cursor: grabbing !important;
    user-select: none !important;
}

/* Modo Pílula / Ícone Minimizado */
.floating-widget-pill {
    display: none;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    padding: 8px 16px 8px 12px;
    color: var(--text-primary, #fff);
    cursor: grab;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.floating-widget-pill:hover {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.6), 0 0 15px rgba(99, 102, 241, 0.3);
}

.pill-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-blue, #3b82f6);
}

.pill-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--color-blue, #3b82f6);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.pill-badge.badge-critical {
    background: #ef4444 !important;
    animation: pillPulseRed 1.8s infinite;
}

@keyframes pillPulseRed {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pill-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Modo Expandido / Card Flutuante */
.floating-widget-card {
    display: flex;
    flex-direction: column;
    width: 520px;
    max-width: calc(100vw - 32px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.floating-messages-widget.is-dragging .floating-widget-card {
    box-shadow: 0 25px 50px -5px rgba(0, 0, 0, 0.8), 0 0 0 2px var(--color-blue, #3b82f6);
    opacity: 0.95;
}

/* Header Arrastável */
.floating-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(30, 41, 59, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: grab;
    user-select: none;
}

.floating-messages-widget.is-dragging .floating-widget-header {
    cursor: grabbing;
}

.floating-widget-title-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.drag-grip-icon {
    color: var(--text-muted, #94a3b8);
    opacity: 0.6;
    flex-shrink: 0;
}

.floating-widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    letter-spacing: 0.2px;
}

.floating-count-badge {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 12px;
}

.floating-count-badge.badge-critical {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
}

.floating-widget-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.floating-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #94a3b8);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.floating-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ffffff);
}

.floating-action-btn.btn-toggle-minimize:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Conteúdo de Mensagens */
.floating-messages-widget .messages-container {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 12px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    user-select: auto !important;
}

.floating-messages-widget .message-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-sizing: border-box;
    width: 100%;
}

.floating-messages-widget .message-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: visible !important;
}

.floating-messages-widget .message-text {
    font-size: 0.8rem !important;
    font-weight: 500;
    color: var(--text-primary, #f8fafc) !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-overflow: clip !important;
    flex: 1 !important;
}

.floating-messages-widget .message-time {
    font-size: 0.7rem !important;
    font-weight: 600;
    color: var(--text-muted, #94a3b8) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.floating-messages-widget .btn-delete-activity {
    flex-shrink: 0 !important;
}

/* Custom Scrollbar no container flutuante */
.floating-messages-widget .messages-container::-webkit-scrollbar {
    width: 5px;
}
.floating-messages-widget .messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
.floating-messages-widget .messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Alternância de Estado Minimizado / Expandido */
.floating-messages-widget.is-minimized .floating-widget-card {
    display: none !important;
}
.floating-messages-widget.is-minimized .floating-widget-pill {
    display: flex !important;
}

/* Badge Seletor de Prazo Convocação (2h / 24h) */
.badge-prazo-convocacao {
    min-width: 42px;
    padding: 2px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.badge-prazo-convocacao:hover {
    background: rgba(16, 185, 129, 0.45) !important;
    border-color: rgba(16, 185, 129, 0.8) !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
    transform: scale(1.05);
}

/* ==========================================================================
   MODAL DE HISTÓRICO E AUDITORIA DE AÇÕES
   ========================================================================== */

#modal-historico-overlay .modal {
    max-width: 960px;
    width: 95vw;
    max-height: 90vh;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 30px rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hist-tabs-bar {
    display: flex;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border-color);
}

.hist-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hist-tab-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.3);
}

.hist-tab-btn.active {
    background: #3b82f6 !important;
    border-color: #60a5fa !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.hist-filters-bar {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.hist-date-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.hist-input {
    background: var(--bg-card, #0f172a);
    border: 1px solid var(--border-color, #334155);
    color: var(--text-primary, #f8fafc);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s;
}

.hist-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.hist-quick-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.hist-quick-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

.hist-timeline-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    position: relative;
    max-height: calc(90vh - 210px);
}

.hist-timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    padding-left: 24px;
}

.hist-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 8px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.hist-card {
    position: relative;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px 14px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hist-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.9);
    transform: translateY(-1px);
}

.hist-dot {
    position: absolute;
    left: -20px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid var(--bg-secondary, #0b1329);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.6);
}

.hist-badge-cat {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hist-cat-convocacao { background: rgba(59, 130, 246, 0.18); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.hist-cat-proposta   { background: rgba(99, 102, 241, 0.18); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.35); }
.hist-cat-habilitacao{ background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.35); }
.hist-cat-resultado  { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.hist-cat-recurso    { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.hist-cat-comentario { background: rgba(168, 85, 247, 0.18); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.35); }
.hist-cat-documento  { background: rgba(249, 115, 22, 0.18); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.35); }
.hist-cat-status     { background: rgba(236, 72, 153, 0.18); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.hist-cat-geral      { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.35); }

/* ==========================================================================
   DASHBOARD E SEÇÃO DE HISTÓRICO E AUDITORIA DE AÇÕES
   ========================================================================== */

.historico-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    display: none;
    flex: 1;
}

.hist-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 1100px) {
    .hist-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .hist-stats-grid {
        grid-template-columns: 1fr;
    }
}

.hist-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hist-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), 0 0 12px rgba(59, 130, 246, 0.1);
}

.hist-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.hist-stat-icon.blue   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.hist-stat-icon.indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }
.hist-stat-icon.green  { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.hist-stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

.hist-stat-info {
    display: flex;
    flex-direction: column;
}

.hist-stat-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.hist-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.hist-dash-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.hist-dash-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.hist-processo-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.hist-processo-link:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.35);
}

/* Links de Cópia Rápida em Processos Externos */
.copy-ext-link {
    cursor: pointer;
    user-select: text;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.copy-ext-link:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.copy-ext-link:active {
    transform: translateY(0);
}

.hist-dash-filters {
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hist-dash-timeline-body {
    padding: 18px 22px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    flex: 1;
}

.hist-input {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.25) !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 0.80rem !important;
    font-weight: 600 !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.hist-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25) !important;
}

.hist-input option,
#hist-dash-processo-select option,
#hist-dash-categoria-select option {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    padding: 6px 10px !important;
}

.hist-quick-btn {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-secondary, #cbd5e1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 5px;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.hist-quick-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.4);
}

/* ==============================================================================
   DASHBOARD TABS (Processos Cadastrados / Processos Externos)
   ============================================================================== */
.dash-tabs-header {
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.theme-win11-light .dash-tabs-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.dash-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted, #94a3b8);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.dash-tab-btn:hover {
    color: var(--text-primary, #f8fafc);
    background: rgba(255, 255, 255, 0.04);
}

.theme-win11-light .dash-tab-btn:hover {
    background: rgba(0, 0, 0, 0.03);
    color: #0f172a;
}

.dash-tab-btn.active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.08);
}

.theme-win11-light .dash-tab-btn.active {
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
}

.dash-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.dash-tab-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.dash-tab-btn.active .dash-tab-count {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.theme-win11-light .dash-tab-count {
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
}

.theme-win11-light .dash-tab-btn.active .dash-tab-count {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.dash-tab-pane {
    animation: fadeInTab 0.22s ease-out;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.externos-filter-toolbar input:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
    outline: none !important;
}

/* Detalhes do Processo Externo */
.ext-detail-card,
.ext-notes-container {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-win11-light .ext-detail-card,
.theme-win11-light .ext-notes-container {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

#ext-anotacoes-textarea:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
}

.theme-win11-light #ext-anotacoes-textarea {
    background: #f8fafc !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

.theme-win11-light #ext-anotacoes-textarea:focus {
    background: #ffffff !important;
    border-color: #10b981 !important;
}

/* ==============================================================================
   MODAL SELEÇÃO DE FLUXO (ESTILO MODERNO / ACTION CARDS)
   ============================================================================== */
.modal-fluxo-dialog {
    background: var(--bg-card, #1e293b) !important;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1)) !important;
    border-radius: 16px !important;
    backdrop-filter: blur(16px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
}

.theme-win11-light .modal-fluxo-dialog {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12) !important;
}

.fluxo-card-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    text-align: left;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    outline: none;
}

.theme-win11-light .fluxo-card-btn {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.fluxo-card-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.35);
}

.theme-win11-light .fluxo-card-btn:hover {
    background: #ffffff;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

.fluxo-card-btn:active {
    transform: translateY(0px) scale(0.99);
}

/* Card Pregao Hover */
.fluxo-card-pregao:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 10px 24px -6px rgba(16, 185, 129, 0.25);
}

.fluxo-card-pregao:hover .fluxo-card-icon {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
}

/* Card Remanescente Hover */
.fluxo-card-rem:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 24px -6px rgba(59, 130, 246, 0.25);
}

.fluxo-card-rem:hover .fluxo-card-icon {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.4);
}

/* Card Processo Externo Hover */
.fluxo-card-ext:hover {
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 10px 24px -6px rgba(139, 92, 246, 0.25);
}

.fluxo-card-ext:hover .fluxo-card-icon {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.fluxo-card-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

.fluxo-card-content {
    flex: 1;
    min-width: 0;
}

.fluxo-card-title {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.theme-win11-light .fluxo-card-title {
    color: #0f172a;
}

.fluxo-card-desc {
    font-size: 0.81rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.35;
    font-weight: 400;
}

.theme-win11-light .fluxo-card-desc {
    color: #64748b;
}

.fluxo-card-arrow {
    margin-left: auto;
    color: var(--text-muted, #94a3b8);
    opacity: 0.5;
    transition: all 0.24s ease;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.fluxo-card-btn:hover .fluxo-card-arrow {
    transform: translateX(4px);
    opacity: 1;
}

.fluxo-card-pregao:hover .fluxo-card-arrow {
    color: #10b981;
}

.fluxo-card-rem:hover .fluxo-card-arrow {
    color: #60a5fa;
}

.fluxo-card-ext:hover .fluxo-card-arrow {
    color: #a78bfa;
}

/* ==========================================================================
   Date / Datetime / Time Inputs - Calendar & Clock Picker Icons (Theme-Aware)
   ========================================================================== */

/* Default / Dark Themes: Ensure calendar and clock icons are bright and clearly visible in white */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(0.92) brightness(1.2);
    opacity: 0.88;
    padding: 3px;
    margin-right: 4px;
    border-radius: 4px;
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.15s ease;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="week"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    filter: invert(1) brightness(1.4);
    transform: scale(1.08);
}

/* Modals, Form Groups & Financial Inputs */
.modal input[type="date"],
.modal input[type="datetime-local"],
.modal input[type="time"],
.modal-form input[type="date"],
.modal-form input[type="datetime-local"],
.modal-form input[type="time"],
.form-group input[type="date"],
.form-group input[type="datetime-local"],
.form-group input[type="time"],
.financial-input[type="date"],
.financial-input[type="datetime-local"],
.financial-input[type="time"],
.hist-input[type="date"],
.hist-input[type="time"] {
    color-scheme: dark;
}

.financial-input[type="date"],
.financial-input[type="datetime-local"],
.financial-input[type="time"] {
    padding: 6px 10px;
}

.modal input[type="date"]::-webkit-calendar-picker-indicator,
.modal input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.modal input[type="time"]::-webkit-calendar-picker-indicator,
.modal-form input[type="date"]::-webkit-calendar-picker-indicator,
.modal-form input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.modal-form input[type="time"]::-webkit-calendar-picker-indicator,
.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator,
.financial-input[type="date"]::-webkit-calendar-picker-indicator,
.financial-input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.financial-input[type="time"]::-webkit-calendar-picker-indicator,
.hist-input[type="date"]::-webkit-calendar-picker-indicator,
.hist-input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.92) brightness(1.2);
    opacity: 0.9;
}

/* Light Theme overrides: In light theme, icons should be dark and natural */
.theme-win11-light input[type="date"],
.theme-win11-light input[type="datetime-local"],
.theme-win11-light input[type="time"],
.theme-win11-light input[type="month"],
.theme-win11-light input[type="week"],
.theme-light input[type="date"],
.theme-light input[type="datetime-local"],
.theme-light input[type="time"],
.theme-light input[type="month"],
.theme-light input[type="week"],
input.light-mode[type="date"],
input.light-mode[type="datetime-local"],
input.light-mode[type="time"] {
    color-scheme: light;
}

.theme-win11-light input[type="date"]::-webkit-calendar-picker-indicator,
.theme-win11-light input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.theme-win11-light input[type="time"]::-webkit-calendar-picker-indicator,
.theme-win11-light input[type="month"]::-webkit-calendar-picker-indicator,
.theme-win11-light input[type="week"]::-webkit-calendar-picker-indicator,
.theme-light input[type="date"]::-webkit-calendar-picker-indicator,
.theme-light input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.theme-light input[type="time"]::-webkit-calendar-picker-indicator,
.theme-light input[type="month"]::-webkit-calendar-picker-indicator,
.theme-light input[type="week"]::-webkit-calendar-picker-indicator,
input.light-mode[type="date"]::-webkit-calendar-picker-indicator,
input.light-mode[type="datetime-local"]::-webkit-calendar-picker-indicator,
input.light-mode[type="time"]::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.75;
}

.theme-win11-light input[type="date"]::-webkit-calendar-picker-indicator:hover,
.theme-win11-light input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
.theme-win11-light input[type="time"]::-webkit-calendar-picker-indicator:hover,
.theme-light input[type="date"]::-webkit-calendar-picker-indicator:hover,
.theme-light input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
.theme-light input[type="time"]::-webkit-calendar-picker-indicator:hover {
    filter: none;
    opacity: 1;
}

/* Explicit white background inputs (e.g. hist-dash on white background) */
input[style*="background: #ffffff"]::-webkit-calendar-picker-indicator,
input[style*="background: #fff"]::-webkit-calendar-picker-indicator,
input[style*="background: rgb(255, 255, 255)"]::-webkit-calendar-picker-indicator,
input[style*="background:white"]::-webkit-calendar-picker-indicator,
input[style*="background:#ffffff"]::-webkit-calendar-picker-indicator {
    filter: none !important;
    opacity: 0.8 !important;
    color-scheme: light !important;
}







/* =============================================================== */
/* MODO LEITURA (COORDENADOR E VISUALIZADOR)                       */
/* ESCOPO: apenas #detail-dashboard-section — não afeta body/Início */
/* =============================================================== */
#detail-dashboard-section.is-readonly-mode input,
#detail-dashboard-section.is-readonly-mode select,
#detail-dashboard-section.is-readonly-mode textarea {
    pointer-events: none !important;
    cursor: default !important;
    user-select: text !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--text-primary, #f8fafc) !important;
}

#detail-dashboard-section.is-readonly-mode .item-input-comments {
    user-select: text !important;
    cursor: default !important;
    outline: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.22) !important;
}

#detail-dashboard-section.is-readonly-mode .btn-limpar-proposta,
#detail-dashboard-section.is-readonly-mode button[onmousedown*="formatCommentText"],
#detail-dashboard-section.is-readonly-mode .btn-add-subitem,
#detail-dashboard-section.is-readonly-mode .btn-remove-subitem,
#detail-dashboard-section.is-readonly-mode #btn-add-esclarecimento,
#detail-dashboard-section.is-readonly-mode #btn-add-impugnacao {
    display: none !important;
}

#detail-dashboard-section.is-readonly-mode #detail-items-container .btn-status-doc,
#detail-dashboard-section.is-readonly-mode #header-status-buttons .btn-status-doc[data-type],
#detail-dashboard-section.is-readonly-mode .badge-prazo-convocacao {
    pointer-events: none !important;
    cursor: default !important;
}




/* Placeholder for Contenteditable Comment Elements */
.item-input-comments:empty:before,
[contenteditable][data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted, #94a3b8);
    opacity: 0.65;
    pointer-events: none;
    display: block;
    font-size: 1.05rem !important;
    line-height: 1.75 !important;
}

.ext-notes-toolbar button:hover {
    background: var(--bg-hover, rgba(255,255,255,0.08)) !important;
    border-color: var(--color-primary, #10b981) !important;
    color: var(--text-primary) !important;
}

.ext-notes-toolbar button.active-format {
    background: rgba(16, 185, 129, 0.4) !important;
    border-color: #34d399 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.6) !important;
}
