/* ==========================================================================
   LEXGO - GLOBAL STYLESHEET (Refactored & Modernized)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root,
:root[data-theme="dark"] {
    /* Color Palette - Dark Theme (Default) */
    --bg-primary: #151522;
    --bg-secondary: #1c1c2b;
    --bg-card: #222235;
    --bg-card-hover: #292942;
    --border-color: #2f2f4e;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Brand & Accent Colors */
    --primary: #1e90ff;
    --accent: #6c5ce7;
    --accent-hover: #5b4bc4;
    --accent-glow: rgba(108, 92, 231, 0.2);
    
    --success: #2ed573;
    --success-hover: #26af5f;
    --warning: #ffa502;
    --danger: #ff4757;
    --danger-hover: #e03d4b;
    --info: #1e90ff;
    
    /* Layout Sizes */
    --topbar-height: 56px;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 64px;
    
    /* Border Radius & Shadows */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-speed: 0.2s;
}

/* Light Theme Variables */
:root[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --primary: #1e90ff;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --success-hover: #059669;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --info: #3b82f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Custom Scrollbar for High Visibility in Dark and Light themes */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
    border: 2px solid var(--bg-primary);
}

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

:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
    border: 2px solid #151522;
}

:root[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #6c5ce7;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a, a:hover, a:focus, a:active,
.proc-number, .proc-number:hover,
button, button:hover,
.sidebar-link, .sidebar-link:hover,
.btn, .btn:hover {
    text-decoration: none !important;
}

a {
    color: var(--accent);
    text-decoration: none !important;
    transition: color var(--transition-speed);
}
a:hover {
    color: var(--text-primary);
    text-decoration: none !important;
}

/* Layout Structure */
#app-layout {
    display: flex;
    min-height: 100vh;
}

/* Topbar Fixed */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
}

/* ==========================================================================
   NATIVE BRAND LOGO COMPONENT (SVG & Typography)
   ========================================================================== */

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    user-select: none;
    transition: transform var(--transition-speed);
}

.brand-logo-icon {
    flex-shrink: 0;
    height: 1.5em;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.svg-loop-left,
.svg-loop-right {
    transition: color var(--transition-speed), stroke var(--transition-speed);
}

.brand-logo:hover .brand-logo-icon {
    transform: scale(1.05);
}

.brand-name {
    font-weight: 800;
    letter-spacing: -0.3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    transition: color var(--transition-speed);
}

.brand-space {
    font-weight: 800;
    font-size: 0.72em;
    letter-spacing: 1.5px;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all var(--transition-speed);
}

/* Dark Theme Logo Colors */
:root,
:root[data-theme="dark"] {
    .brand-logo-icon {
        color: #8B5CF6;
    }
    .brand-logo-icon-dark {
        display: inline-block !important;
    }
    .brand-logo-icon-light {
        display: none !important;
    }
    .svg-loop-left {
        color: #8B5CF6;
        stroke: #8B5CF6;
    }
    .svg-loop-right {
        color: #CBD5E1;
        stroke: #CBD5E1;
    }
    .brand-name {
        color: #A78BFA;
    }
    .brand-space {
        color: #FFFFFF;
        background: rgba(139, 92, 246, 0.25);
        border: 1px solid rgba(139, 92, 246, 0.45);
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
    }
}

/* Light Theme Logo Colors */
:root[data-theme="light"] {
    .brand-logo-icon {
        color: #7C3AED;
    }
    .brand-logo-icon-dark {
        display: none !important;
    }
    .brand-logo-icon-light {
        display: inline-block !important;
    }
    .svg-loop-left {
        color: #7C3AED;
        stroke: #7C3AED;
    }
    .svg-loop-right {
        color: #475569;
        stroke: #475569;
    }
    .brand-name {
        color: #6D28D9;
    }
    .brand-space {
        color: #1E293B;
        background: rgba(124, 58, 237, 0.12);
        border: 1px solid rgba(124, 58, 237, 0.3);
    }
}

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

/* TopBar Variant */
.brand-logo-topbar .brand-logo-icon {
    height: 26px;
    width: auto;
}

.brand-logo-topbar .brand-name {
    font-size: 18px;
}

/* Login Hero Left Variant */
.brand-logo-hero .brand-logo-icon {
    height: 48px;
    width: auto;
}

.brand-logo-hero .brand-name {
    font-size: 32px;
}

/* Login Auth Card Right Variant */
.brand-logo-card .brand-logo-icon {
    height: 36px;
    width: auto;
}

.brand-logo-card .brand-name {
    font-size: 24px;
}

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

/* Theme Toggle Button */
.btn-theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}
.btn-theme-toggle:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

/* Topbar User Area */
.topbar-user-area {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-secondary);
}

.topbar-username {
    font-weight: 500;
    color: var(--text-primary);
}

.topbar-divider {
    color: var(--border-color);
}

/* Profile Dropdown Component */
.profile-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.btn-profile-dropdown {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}
.btn-profile-dropdown:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.dropdown-arrow {
    font-size: 10px;
    color: var(--text-muted);
}

.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 115%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    min-width: 160px;
    z-index: 2000;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.profile-dropdown-item {
    display: block;
    padding: 8px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12.5px;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.profile-dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.badge-profile {
    background: var(--accent-glow);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

/* Sidebar Wrapper Container (Non-clipped fixed bounds for sidebar + toggle button) */
.sidebar-wrapper {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    z-index: 990;
    overflow: visible; /* Prevents toggle button from being clipped */
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 16px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    transition: background-color var(--transition-speed), color var(--transition-speed), padding var(--transition-speed);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    position: relative;
}

.sidebar-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    transition: font-size var(--transition-speed);
}

.sidebar-text {
    white-space: nowrap;
    transition: opacity 0.2s ease, width 0.2s ease;
    opacity: 1;
}

.sidebar-link:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-link.active {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Sidebar Toggle Button (Desktop Chevron Floating on Boundary Line) */
.sidebar-toggle-btn {
    position: absolute;
    top: 22px;
    right: -14px;
    width: 28px;
    height: 28px;
    background-color: var(--accent);
    color: #ffffff !important;
    border: 2px solid var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1010; /* High z-index standing above sidebar and main content cards */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    transition: background-color 0.2s ease, transform 0.3s ease, box-shadow 0.2s ease;
}

.sidebar-toggle-btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 14px var(--accent-glow);
    transform: scale(1.1);
}

.sidebar-toggle-btn .toggle-icon {
    display: inline-block;
    color: #ffffff !important;
    stroke: #ffffff !important;
    transition: transform var(--transition-speed) ease;
}

/* --- COLLAPSED STATE (MINI SIDEBAR) --- */
html.sidebar-collapsed .sidebar-wrapper {
    width: var(--sidebar-collapsed-width);
}

html.sidebar-collapsed .sidebar {
    padding: 16px 4px;
}

html.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

html.sidebar-collapsed .sidebar-link {
    padding: 10px 0;
    justify-content: center;
    gap: 0;
}

html.sidebar-collapsed .sidebar-text {
    opacity: 0;
    width: 0;
    display: none;
}

html.sidebar-collapsed .sidebar-icon {
    font-size: 20px;
    width: auto;
}

html.sidebar-collapsed .sidebar-toggle-btn .toggle-icon {
    transform: rotate(180deg);
}

/* Tooltip on Hover for Mini Sidebar */
@media (min-width: 769px) {
    html.sidebar-collapsed .sidebar-link[data-tooltip]::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        margin-left: 12px;
        background-color: #0f172a;
        color: #ffffff;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 1050;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
        border: 1px solid var(--border-color);
    }

    [data-theme="light"] html.sidebar-collapsed .sidebar-link[data-tooltip]::after {
        background-color: #1e293b;
        color: #ffffff;
    }

    html.sidebar-collapsed .sidebar-link[data-tooltip]:hover::after {
        opacity: 1;
        transform: translateY(-50%) translateX(2px);
    }
}

/* --- MOBILE RESPONSIVE DRAWER (<= 768px) --- */
.btn-hamburger {
    display: none;
}

@media (max-width: 768px) {
    .btn-hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 22px;
        cursor: pointer;
        padding: 6px 10px;
        border-radius: 4px;
        margin-right: 8px;
    }

    .btn-hamburger:hover {
        background-color: var(--bg-card);
    }

    .sidebar-toggle-btn {
        display: none !important;
    }

    .sidebar-wrapper {
        width: 250px !important;
        transform: translateX(-100%);
        z-index: 999;
    }

    .sidebar {
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.4);
    }

    html.sidebar-collapsed .sidebar-wrapper {
        width: 250px !important;
        transform: translateX(-100%);
    }

    html.sidebar-collapsed .sidebar {
        padding: 16px 8px;
    }

    html.sidebar-collapsed .sidebar-text {
        opacity: 1;
        width: auto;
        display: inline;
    }

    html.sidebar-collapsed .sidebar-link {
        padding: 10px 12px;
        justify-content: flex-start;
        gap: 10px;
    }

    body.mobile-sidebar-open .sidebar-wrapper {
        transform: translateX(0) !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 16px;
    }

    html.sidebar-collapsed .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

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

    body.mobile-sidebar-open .sidebar-backdrop {
        display: block;
        opacity: 1;
    }
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 32px;
    width: calc(100% - var(--sidebar-width));
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
                width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Containers & Cards (Fluid 100% Width) */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--text-primary);
}
.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--bg-card-hover);
}

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

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

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

.btn-disabled, .btn:disabled {
    background-color: var(--bg-card);
    color: var(--text-muted);
    border-color: var(--border-color);
    cursor: not-allowed;
    box-shadow: none !important;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Select & Option Visibility in Light/Dark Themes */
select {
    color: var(--text-primary) !important;
    background-color: var(--bg-card) !important;
}

select:focus {
    color: var(--text-primary) !important;
}

select option {
    color: #0f172a !important;
    background-color: #ffffff !important;
}

select option:checked {
    color: #ffffff !important;
    background-color: #3b82f6 !important;
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .form-control {
    color: #0f172a !important;
    background-color: #ffffff !important;
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder {
    color: #64748b !important;
}

:root[data-theme="light"] input[type="date"],
:root[data-theme="light"] input[type="datetime-local"] {
    color-scheme: light !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
}

:root[data-theme="dark"] select option {
    color: #f8fafc !important;
    background-color: #222235 !important;
}

:root[data-theme="dark"] select option:checked {
    color: #ffffff !important;
    background-color: #6366f1 !important;
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.table th {
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

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

/* Process Number & Table Cell Responsiveness */
.proc-number,
.proc-number:hover {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    text-decoration: none !important;
}

.td-pendencia {
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
    color: var(--text-primary) !important;
}

:root[data-theme="dark"] .td-pendencia {
    color: #f8fafc !important;
}

/* Responsive Concluir Button */
.btn-concluir-icon {
    display: none;
}
.btn-concluir-text {
    display: inline;
}

@media (max-width: 768px) {
    .btn-concluir {
        background-color: var(--success) !important;
        border-color: var(--success) !important;
        color: #ffffff !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 2px 6px rgba(46, 213, 115, 0.3) !important;
    }
    .btn-concluir:hover {
        background-color: var(--success-hover) !important;
        border-color: var(--success-hover) !important;
    }
    .btn-concluir-text {
        display: none !important;
    }
    .btn-concluir-icon {
        display: inline !important;
        font-size: 16px !important;
        font-weight: bold !important;
        color: #ffffff !important;
        line-height: 1 !important;
    }
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.badge-success { background-color: rgba(46, 213, 115, 0.15); color: var(--success); }
.badge-warning { background-color: rgba(255, 165, 2, 0.15); color: var(--warning); }
.badge-danger { background-color: rgba(255, 71, 87, 0.15); color: var(--danger); }
.badge-info { background-color: rgba(30, 144, 255, 0.15); color: var(--info); }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: translateY(-20px);
    transition: transform var(--transition-speed);
}

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

.modal-header {
    padding: 16px 24px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 600;
    font-size: 16px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast Notifications (Top-Centered Floating Overlay - Zero Layout Shift) */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    width: calc(100% - 40px);
    max-width: 380px;
    pointer-events: none;
}

.toast {
    position: relative;
    pointer-events: auto;
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: slideDownFade 0.35s ease-out forwards;
    transition: opacity 0.5s ease, transform 0.5s ease, margin-top 0.3s ease, margin-bottom 0.3s ease;
    opacity: 1;
}

.toast.hiding {
    opacity: 0;
    transform: translateY(-20px);
}

.toast-success { border-left-color: var(--success); }
.toast-danger { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

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

/* Serventia Dynamic Colors (Matching Filter Buttons) */
.serv-civel {
    color: #3498db !important;
    font-weight: 600 !important;
}

.serv-fazenda {
    color: #e67e22 !important;
    font-weight: 600 !important;
}

.serv-juizado {
    color: #9b59b6 !important;
    font-weight: 600 !important;
}

.serv-outros {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   AUTHENTICATION & SPLIT SCREEN LAYOUT
   ========================================================================== */

.auth-layout-wrapper {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-primary);
}

.auth-split-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-primary);
}

/* Floating Topbar on Auth Page */
.auth-topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.system-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Split Columns */
.auth-split-left {
    flex: 1.1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 60px 40px 60px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(30, 144, 255, 0.12) 0%, transparent 50%);
}

/* Subtle Pulsing Glow Spheres */
.auth-glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    animation: pulseGlow 8s infinite alternate ease-in-out;
    pointer-events: none;
}

.auth-glow-sphere-1 {
    width: 380px;
    height: 380px;
    background: var(--accent);
    top: -60px;
    left: -60px;
}

.auth-glow-sphere-2 {
    width: 320px;
    height: 320px;
    background: var(--info);
    bottom: -60px;
    right: 40px;
    animation-delay: -4s;
}

@keyframes pulseGlow {
    0% { transform: scale(0.9) translate(0, 0); opacity: 0.3; }
    100% { transform: scale(1.15) translate(25px, 25px); opacity: 0.55; }
}

.auth-brand-content {
    position: relative;
    z-index: 10;
    max-width: 580px;
}

.auth-badge-subtitle {
    display: inline-block;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.auth-main-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.auth-desc-text {
    font-size: 15.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 32px;
}

.auth-features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.auth-feature-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.auth-feature-icon {
    font-size: 22px;
    line-height: 1;
    padding-top: 2px;
}

.auth-feature-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.auth-feature-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Right Column (Authentication Card) */
.auth-split-right {
    flex: 0.9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 80px 40px 40px 40px;
    position: relative;
    z-index: 10;
}

.auth-card-glass {
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 44px 36px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-hero-logo-wrapper {
    margin-bottom: 24px;
}

.auth-hero-logo {
    height: 56px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.auth-card-logo-wrapper {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card-logo-img {
    height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.auth-card-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.btn-google-auth {
    width: 100%;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all var(--transition-speed);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.btn-google-auth:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--text-primary);
}

.auth-card-footer {
    margin-top: 36px;
    font-size: 12px;
    color: var(--text-muted);
}

/* LGPD Cookie Toast / Banner */
.lgpd-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.lgpd-text {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
    .auth-split-wrapper {
        flex-direction: column;
        overflow-y: auto;
    }
    .auth-topbar {
        position: relative;
        padding: 16px 20px;
    }
    .auth-split-left {
        padding: 30px 20px;
    }
    .auth-main-title {
        font-size: 26px;
    }
    .auth-split-right {
        padding: 20px 20px 60px 20px;
    }
    .auth-hero-logo {
        height: 44px;
        max-width: 220px;
    }
    .auth-card-logo-img {
        height: 38px;
        max-width: 180px;
    }
    .topbar-logo-img {
        height: 28px;
        max-width: 150px;
    }
    .lgpd-banner {
        left: 16px;
        right: 16px;
        bottom: 16px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

/* ==========================================================================
   MALOTE DIGITAL BANNER & PRIORITY DYNAMIC STYLES
   ========================================================================== */

.malote-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 18px;
    margin-bottom: 24px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

:root[data-theme="light"] .malote-banner {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.2);
}

.malote-banner-title {
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.malote-banner-divider {
    color: var(--border-color);
    font-weight: 300;
}

.malote-banner-item {
    color: var(--text-secondary);
}

.malote-banner-item strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Priority Dynamic Colors */
.prio-vermelho {
    color: #ff4757 !important;
    font-weight: 700;
}
.prio-amarelo {
    color: #ffa502 !important;
    font-weight: 700;
}
.prio-azul {
    color: #1e90ff !important;
    font-weight: 700;
}
.prio-verde {
    color: #2ed573 !important;
    font-weight: 700;
}

/* Process Number Copy Styling */
.proc-number {
    color: #6c5ce7;
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}
:root[data-theme="light"] .proc-number {
    color: #4f46e5;
}
.proc-number:hover {
    text-decoration: underline;
    color: var(--accent-hover);
}

/* ==========================================================================
   Central de Conhecimento (Knowledge Base) Styles
   ========================================================================== */

/* Search Box & Shortcuts */
.knowledge-search-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.knowledge-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.knowledge-search-input-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.knowledge-search-input-group .search-icon {
    font-size: 18px;
    margin-right: 12px;
    color: var(--text-muted);
}

.knowledge-search-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 15px;
}

.shortcut-badge {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.knowledge-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px 0;
}

.search-result-item {
    display: block;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color var(--transition-speed);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: var(--bg-secondary);
}

.result-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 3px;
}

.result-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.result-snippet {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin-top: 3px;
    line-height: 1.4;
}

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

/* Category Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

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

.category-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px 0;
    color: var(--text-primary);
}

.category-count {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.category-arrow {
    color: var(--text-muted);
    font-size: 16px;
    transition: transform var(--transition-speed);
}

.category-card:hover .category-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

/* Dual Grid for Pinned & Popular */
.knowledge-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 860px) {
    .knowledge-dual-grid {
        grid-template-columns: 1fr;
    }
}

.pinned-articles-list, .popular-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pinned-item, .popular-item {
    border-bottom: 1px solid var(--border-color);
}

.pinned-item:last-child, .popular-item:last-child {
    border-bottom: none;
}

.pinned-link, .popular-link {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    text-decoration: none;
    color: var(--text-primary);
    transition: color var(--transition-speed);
}

.popular-link {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.pinned-link:hover .pinned-title, .popular-link:hover .popular-title {
    color: var(--accent);
}

.pinned-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2px;
}

.pinned-title, .popular-title {
    font-size: 13.5px;
    font-weight: 500;
}

/* Article View Layout */
.article-view-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
}

@media (max-width: 900px) {
    .article-view-layout {
        grid-template-columns: 1fr;
    }
}

.article-display-title {
    font-size: 24px;
    font-weight: 700;
    margin: 8px 0 12px 0;
    color: var(--text-primary);
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: var(--text-secondary);
}

.article-body-content {
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-primary);
}

.copyable-text, .msg-text-box {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition-speed), background-color var(--transition-speed);
}

.copyable-text:hover, .msg-text-box:hover {
    border-color: var(--accent);
}

.msg-content-text {
    font-size: 14.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
}

/* Steps (Projudi) */
.steps {
    list-style: none;
    margin: 14px 0;
    padding: 0;
    counter-reset: step;
}

.steps li {
    counter-increment: step;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.steps li:last-child {
    border-bottom: none;
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    flex: none;
    padding-top: 2px;
    min-width: 24px;
}

.step-copy {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-primary);
    word-break: break-word;
}

/* Field Cards (Fields and inline copiable fields) */
.field-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.field-card {
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: border-color var(--transition-speed);
}

.field-card:hover {
    border-color: var(--accent);
}

.field-card .field-main {
    min-width: 0;
}

.field-label {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 4px;
}

.field-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.field-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.link-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.copyable {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13.5px;
    color: var(--accent);
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.copyable:hover {
    background-color: var(--accent-glow);
}

.notice-callout {
    background-color: rgba(255, 165, 0, 0.12);
    border-left: 4px solid #ffa502;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.variant-block {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 14px;
    transition: border-color var(--transition-speed);
}

.variant-block:hover {
    border-color: var(--accent);
}

.variant-label {
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 8px;
}

.attachment-box {
    background-color: rgba(108, 92, 231, 0.08);
    border: 1px dashed var(--accent);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-top: 18px;
    font-size: 14px;
}

.btn-star-only {
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 50%;
    transition: transform 0.2s ease, filter 0.2s ease;
    color: var(--text-muted);
}

.btn-star-only:hover {
    transform: scale(1.25);
}

.btn-star-only.active {
    color: #f1c40f;
    filter: drop-shadow(0 0 4px rgba(241, 196, 15, 0.6));
}

.action-buttons-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Moderation & Suggestions Styles */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 16px;
}

.suggestion-card {
    display: flex;
    flex-direction: column;
}

.justification-box {
    background-color: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.25);
    font-size: 13px;
}

.tab-navigation {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-speed), border-color var(--transition-speed);
}

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

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

/* ==========================================================================
   LOTE TURBO COMPONENT STYLES
   ========================================================================== */
.btn-turbo-active {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #ffffff !important;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm, 6px);
}

.btn-turbo-active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.6);
    filter: brightness(1.1);
}

.btn-turbo-disabled {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted, #94a3b8) !important;
    border: 1px dashed rgba(148, 163, 184, 0.3);
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.65;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-sm, 6px);
}

.badge-turbo-token {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    letter-spacing: 0.3px;
}

.badge-turbo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(124, 58, 237, 0.18);
    color: #a78bfa;
    border: 1px solid rgba(124, 58, 237, 0.35);
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 4px;
    letter-spacing: 0.2px;
}

[data-theme="light"] .badge-turbo {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
    border-color: rgba(124, 58, 237, 0.3);
}

/* ==========================================================================
   HASHTAG / TAG FILTERING & BADGES SYSTEM
   ========================================================================== */

.tag-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.tag-chip:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.tag-chip.active {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

:root[data-theme="light"] .tag-chip {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

:root[data-theme="light"] .tag-chip:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: var(--accent);
}

:root[data-theme="light"] .tag-chip.active {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
}

/* Inline Badge Tag */
.badge-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 12px;
    background: rgba(108, 92, 231, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(108, 92, 231, 0.3);
    margin-left: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-tag:hover {
    background: rgba(108, 92, 231, 0.3);
    transform: translateY(-1px);
}

:root[data-theme="light"] .badge-tag {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.3);
}

:root[data-theme="light"] .badge-tag:hover {
    background: rgba(99, 102, 241, 0.25);
}

/* Annotation Modal Tag Shortcuts & Hints */
.form-text-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 10px;
}

.modal-tag-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-tag-shortcut {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 14px;
    border: 1px dashed var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tag-shortcut:hover {
    background: var(--accent);
    color: #ffffff !important;
}

/* Badge Processo Reativado */
.badge-reativado {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(235, 77, 75, 0.15);
    color: #ff4757;
    border: 1px solid rgba(235, 77, 75, 0.3);
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 4px;
    letter-spacing: 0.2px;
}

[data-theme="light"] .badge-reativado {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}




