        @charset "UTF-8";

        /* ── Page Header Bar ── */
        .page-header-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .page-header-bar .page-title-group {
            display: flex;
            align-items: center;
            gap: 0.8rem;
        }

        .page-header-bar .page-icon {
            font-size: 2.2rem;
        }

        .title-text-col {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .page-header-bar h1 {
            font-size: clamp(1.4rem, 3vw, 1.8rem);
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.1;
            margin: 0;
        }

        .page-header-bar .page-subtitle {
            font-size: 0.9rem;
            color: var(--text-secondary);
            font-weight: 400;
            margin-top: 2px;
            margin-left: 0;
            line-height: 1.2;
        }

        .btn-export {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.55rem 1rem;
            background: rgba(255, 149, 0, 0.1);
            border: 1px solid rgba(255, 149, 0, 0.2);
            border-radius: 10px;
            color: #ff9500;
            font-family: var(--font-heading);
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s ease;
        }

        .btn-export:hover {
            background: rgba(255, 149, 0, 0.18);
            border-color: rgba(255, 149, 0, 0.35);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 149, 0, 0.15);
        }

        .btn-drive {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.55rem 1rem;
            background: rgba(66, 133, 244, 0.1);
            border: 1px solid rgba(66, 133, 244, 0.2);
            border-radius: 10px;
            color: #4285f4;
            font-family: var(--font-heading);
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s ease;
            text-decoration: none;
        }

        .btn-drive:hover {
            background: rgba(66, 133, 244, 0.18);
            border-color: rgba(66, 133, 244, 0.35);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
        }

        /* ── Detail Header Actions ── */
        .detail-header-actions {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-shrink: 0;
        }

        .detail-header-utility {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }


        .list-view,
        .detail-view {
            display: none;
        }

        .list-view.active {
            display: block;
            animation: fadeIn 0.3s ease-in-out;
        }

        .detail-view.active {
            display: block;
            animation: fadeIn 0.3s ease-in-out;
            background: rgba(0, 0, 0, 0.25);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 1.5rem;
            margin-bottom: 2rem;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
        }

        .btn-back {
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.2s;
            flex-shrink: 0;
        }

        .btn-back:hover {
            background: rgba(61, 155, 233, 0.12);
            border-color: rgba(61, 155, 233, 0.3);
            color: var(--accent-blue);
        }

        .modal-close {
            position: absolute;
            top: 1.5rem;
            right: 1.5rem;
            width: 36px;
            height: 36px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.2s;
            z-index: 10;
        }

        .modal-close:hover {
            background: rgba(255, 80, 80, 0.15);
            border-color: rgba(255, 80, 80, 0.3);
            color: #ff5050;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* List Search & Filters */
        .search-area {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .search-main-row {
            display: flex;
            gap: 1rem;
            align-items: center;
        }

        .search-input-box {
            flex: 1;
            position: relative;
        }

        .search-input-box span {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
        }

        .search-input-box input {
            width: 100%;
            padding: 0.8rem 1rem 0.8rem 2.8rem;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            font-size: 1rem;
        }

        .btn-filter-toggle {
            padding: 0.8rem 1.5rem;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            transition: 0.2s;
            white-space: nowrap;
        }

        .btn-filter-toggle:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .filters-panel {
            display: none;
            gap: 1rem;
            padding: 1.5rem;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            flex-wrap: wrap;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .filters-panel.active {
            display: flex;
            animation: fadeIn 0.2s;
        }

        .filter-item {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            flex: 1;
            min-width: 160px;
        }

        .filter-item label {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .filter-item input,
        .filter-item select {
            padding: 0.75rem;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.05);
            color: #fff;
            font-family: inherit;
        }

        .filter-item select,
        select.form-input {
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            padding-right: 2rem;
            cursor: pointer;
        }

        .filter-item select option,
        select.form-input option {
            background: #1a1b2e;
            color: #fff;
        }

        /* ── Processos Table Styling ── */
        .table-container {
            background: var(--bg-card);
            border: 1px solid var(--border-subtle);
            border-radius: 16px;
            overflow: hidden;
            backdrop-filter: blur(20px);
        }

        .clients-table {
            width: 100%;
            border-collapse: collapse;
        }

        .clients-table thead {
            background: rgba(255, 255, 255, 0.03);
        }

        .clients-table th {
            padding: 0.9rem 1.2rem;
            text-align: left;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            border-bottom: 1px solid var(--border-subtle);
            white-space: nowrap;
        }

        .clients-table td {
            padding: 0.9rem 1.2rem;
            font-size: 0.9rem;
            color: var(--text-primary);
            border-bottom: 1px solid rgba(255, 255, 255, 0.03);
            vertical-align: middle;
        }

        .clients-table tbody tr {
            transition: background 0.2s ease;
            cursor: pointer;
        }

        .clients-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.04);
        }

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

        .badge {
            display: inline-flex;
            align-items: center;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .badge.judicial {
            background: rgba(61, 155, 233, 0.12);
            color: #3d9be9;
        }

        .badge.extrajudicial {
            background: rgba(138, 43, 226, 0.12);
            color: #8a2be2;
        }

        .badge.status-active {
            background: rgba(13, 178, 107, 0.12);
            color: #0DB26B;
        }

        .badge.status-closed {
            background: rgba(255, 149, 0, 0.12);
            color: #ff9500;
        }

        .btn-icon {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 0.3rem;
            border-radius: 6px;
            font-size: 1.2rem;
            transition: all 0.2s;
            line-height: 1;
        }

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

        /* ── Table Pagination ── */
        .table-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.8rem 1.2rem;
            border-top: 1px solid var(--border-subtle);
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .pagination {
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }

        .pagination button {
            padding: 0.4rem 0.7rem;
            background: rgba(255, 255, 255, 0.04);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            color: var(--text-secondary);
            font-family: var(--font-heading);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s;
        }

        .pagination button:hover {
            background: rgba(255, 255, 255, 0.08);
        }

        .pagination button.active {
            background: rgba(61, 155, 233, 0.2);
            border-color: rgba(61, 155, 233, 0.3);
            color: #3d9be9;
        }

        /* Detail Layout */
        .detail-layout {
            display: flex;
            gap: 2rem;
            align-items: flex-start;
        }

        .detail-main {
            flex: 0 0 calc(60% - 1rem);
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .detail-sidebar {
            flex: 0 0 calc(40% - 1rem);
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            position: sticky;
            top: 1.5rem;
        }

        @media (max-width: 900px) {
            .detail-layout {
                flex-direction: column;
            }

            .detail-main,
            .detail-sidebar {
                flex: 1 1 100%;
                width: 100%;
                position: static;
            }
        }

        /* Forms */
        .form-card {
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            padding: 1.5rem;
        }

        .form-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .form-card h3 {
            font-size: 1.15rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.25rem;
        }

        .form-col-full {
            grid-column: 1 / -1;
        }

        .toggle-visual {
            display: inline-flex;
            background: rgba(0, 0, 0, 0.3);
            border-radius: 8px;
            padding: 4px;
            gap: 4px;
        }

        .toggle-btn {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            transition: 0.2s;
            font-weight: 500;
        }

        .toggle-btn.active.tgt-blue {
            background: #3b82f6;
            color: #fff;
        }

        .toggle-btn.active.tgt-green {
            background: #10b981;
            color: #fff;
        }

        .toggle-btn.active.tgt-grey {
            background: #6b7280;
            color: #fff;
        }

        .toggle-btn.active.tgt-orange {
            background: #ff9500;
            color: #fff;
        }

        .conditional-block {
            display: none;
            margin-top: 1.25rem;
            animation: fadeIn 0.3s ease-in-out;
        }

        .conditional-block.visible {
            display: block;
        }

        .conditional-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.25rem;
        }

        /* Generic */
        .btn-primary {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.7rem 1.4rem;
            background: linear-gradient(135deg, #3d9be9, #2a7bd4);
            color: #fff;
            border: none;
            border-radius: 12px;
            font-family: var(--font-heading);
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
        }

        .btn-primary:hover {
            background: linear-gradient(135deg, #4daaf5, #3d9be9);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(61, 155, 233, 0.35);
        }

        .btn-secondary {
            background: rgba(255, 255, 255, 0.08);
            color: var(--text-primary);
            border: 1px solid var(--glass-border);
            padding: 0.7rem 1.4rem;
            border-radius: 12px;
            font-family: var(--font-heading);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            white-space: nowrap;
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.14);
            transform: translateY(-1px);
        }

        .btn-danger {
            background: rgba(239, 68, 68, 0.15);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.3);
            padding: 0.75rem 1.5rem;
            border-radius: 8px;
            font-weight: 500;
            cursor: pointer;
        }

        .btn-add-part {
            width: 100%;
            padding: 0.75rem;
            border: 1px dashed rgba(61, 155, 233, 0.4);
            background: rgba(61, 155, 233, 0.06);
            color: var(--accent-blue);
            border-radius: 8px;
            cursor: pointer;
            transition: 0.2s;
            font-size: 0.9rem;
        }

        .btn-add-part:hover {
            background: rgba(61, 155, 233, 0.12);
            border-color: rgba(61, 155, 233, 0.6);
            color: #fff;
        }

        .form-input {
            width: 100%;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #fff;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            transition: 0.2s;
        }

        .form-label {
            display: block;
            font-size: 0.85rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        /* Modals and others */
        .empty-state {
            text-align: center;
            padding: 2rem;
            color: var(--text-secondary);
        }

        /* ── Mobile Cards View — oculto no desktop ── */
        .processo-mobile-cards {
            display: none;
        }

        .proc-mobile-card {
            background: rgba(255, 255, 255, 0.03);
            /* tint branco suave = vidro fumê */
            backdrop-filter: var(--glass-blur);
            -webkit-backdrop-filter: var(--glass-blur);
            border: 1px solid var(--glass-border);
            /* rgba(255,255,255,0.08) */
            border-radius: 14px;
            padding: 1rem 1.1rem;
            margin-bottom: 0.9rem;
            cursor: pointer;
            box-shadow: var(--glass-shadow);
            transition: background 0.2s, border-color 0.2s;
        }

        .proc-mobile-card:hover {
            background: rgba(30, 38, 54, 0.85);
            border-color: rgba(61, 155, 233, 0.3);
        }

        /* Linha 1: Identificador + badge Tipo */
        .proc-card-top {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.5rem;
            margin-bottom: 0.2rem;
        }

        .proc-card-id {
            font-family: var(--font-mono);
            font-size: 0.82rem;
            font-weight: 500;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            word-break: break-all;
            flex: 1;
        }

        /* Linha 2: Apelido (condicional) */
        .proc-card-apelido {
            font-size: 0.78rem;
            color: var(--text-muted);
            margin-bottom: 0.45rem;
        }

        /* Linha 3: Cliente Principal + badge Status */
        .proc-card-mid {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 0.5rem;
            padding: 0.45rem 0;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .proc-card-cliente {
            font-size: 0.88rem;
            font-weight: 500;
            color: var(--text-primary);
            flex: 1;
            min-width: 0;
        }

        /* Linha 4: Categorias + Data + Drive */
        .proc-card-bot {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            margin-top: 0.45rem;
            flex-wrap: wrap;
        }

        .proc-card-cats {
            flex: 1;
            min-width: 0;
        }

        .proc-card-date {
            font-family: var(--font-mono);
            font-size: 0.75rem;
            color: var(--text-muted);
            white-space: nowrap;
        }

        /* Empty state no mobile */
        .proc-mobile-empty {
            text-align: center;
            padding: 2rem;
            color: var(--text-secondary);
        }

        /* Partes UI */
        .tabs-header {
            display: flex;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            margin-bottom: 1.5rem;
            gap: 1rem;
        }

        .tab-btn {
            padding: 0.75rem 0;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-weight: 500;
            cursor: pointer;
            position: relative;
        }

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

        .tab-btn.active::after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--accent-blue);
        }

        .polo-box {
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 1.25rem;
            margin-bottom: 1rem;
        }

        .polo-title {
            font-size: 0.95rem;
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--text-primary);
        }

        .parts-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .part-item {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .part-info {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .part-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--accent-blue);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 600;
        }

        .part-avatar.linked {
            background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
            border: 2px solid rgba(13, 178, 107, 0.5);
        }

        .part-avatar.reu {
            background: linear-gradient(135deg, #e05a2b, #c0392b);
            border: 2px solid rgba(192, 57, 43, 0.5);
        }

        .chip-segmento {
            background: rgba(224, 90, 43, 0.18);
            color: #e07a5f;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .part-name {
            font-size: 0.95rem;
            color: #fff;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .part-sub {
            font-size: 0.78rem;
            color: var(--text-muted);
            display: block;
        }

        .chip-principal {
            background: rgba(255, 193, 7, 0.2);
            color: #ffc107;
            padding: 2px 6px;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 600;
        }

        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-content {
            display: none;
            position: absolute;
            right: 0;
            background-color: var(--bg-tertiary);
            min-width: 160px;
            box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
            z-index: 1;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .dropdown-content a,
        .dropdown-content span {
            color: white;
            padding: 12px 16px;
            text-decoration: none;
            display: block;
            cursor: pointer;
        }

        .dropdown-content a:hover,
        .dropdown-content span:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .dropdown:hover .dropdown-content,
        .dropdown.active .dropdown-content {
            display: block;
        }

        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(4px);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal-overlay.active {
            display: flex;
            animation: fadeIn 0.2s;
        }

        .modal-box {
            background: #1a1b1e;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            padding: 2rem;
            width: 90%;
            max-width: 450px;
            text-align: center;
        }

        .cat-tag {
            background: rgba(255, 255, 255, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.05);
            padding: 0.4rem 0.8rem;
            border-radius: 16px;
            font-size: 0.85rem;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            margin: 0.2rem;
        }

        .cat-tag button {
            background: none;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 0;
            font-size: 1rem;
        }

        /* Breadcrumb-style category tags */
        .cat-tag--path {
            flex-wrap: nowrap;
            max-width: 100%;
        }

        .cat-tag-crumb {
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .cat-tag-btn {
            background: none;
            border: none;
            cursor: pointer;
            padding: 0 0.1rem;
            font-size: 0.82rem;
            line-height: 1;
            color: var(--text-secondary);
            flex-shrink: 0;
            transition: color 0.15s;
        }

        .cat-tag-btn--edit:hover {
            color: var(--accent-blue);
        }

        .cat-tag-btn--del:hover {
            color: #ef4444;
        }

        /* Confidential warning inline */
        .conf-warn {
            font-size: 0.78rem;
            color: #ff9500;
            display: none;
            animation: fadeIn 0.2s;
        }

        .sugg-item--blocked {
            opacity: 0.45;
            cursor: not-allowed;
            pointer-events: none;
        }

        .annotation-writer {
            background: rgba(0, 0, 0, 0.2);
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
        }

        /* ── Barra de formatação de anotações ── */
        .ano-toolbar {
            display: flex;
            align-items: center;
            gap: 0.15rem;
            margin-bottom: 0.4rem;
            padding: 0.3rem 0.45rem;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.07);
            border-radius: 6px;
            width: fit-content;
        }

        .ano-tool-btn {
            width: 26px;
            height: 26px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 4px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.15s;
            padding: 0;
            line-height: 1;
            font-family: var(--font-heading);
        }

        .ano-tool-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.12);
            color: var(--text-primary);
        }

        .ano-tool-btn strong {
            font-weight: 700;
        }

        .ano-tool-btn em {
            font-style: italic;
        }

        .ano-tool-sep {
            width: 1px;
            height: 16px;
            background: rgba(255, 255, 255, 0.1);
            margin: 0 0.2rem;
            flex-shrink: 0;
        }

        .annotation-writer textarea {
            width: 100%;
            min-height: 110px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 0.75rem;
            color: #fff;
            margin-bottom: 0.75rem;
            resize: vertical;
            line-height: 1.55;
            font-family: inherit;
        }

        /* ── Renderização de markdown nas anotações ── */
        .ano-text {
            font-size: 0.95rem;
            line-height: 1.6;
            color: var(--text-primary);
            overflow-wrap: break-word;
            word-break: break-word;
        }

        .ano-md-list {
            margin: 0.3rem 0 0.3rem 1.2rem;
            padding: 0;
            list-style: disc;
        }

        .ano-md-list li {
            margin: 0.1rem 0;
            line-height: 1.55;
        }

        .ano-item {
            padding: 1.25rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        .ano-item.private {
            background: rgba(255, 0, 0, 0.03);
            border-left: 2px solid #ff4d4d;
        }

        /* ── Annotation inner layout (desktop) ── */
        .ano-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        .ano-author {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            font-weight: 600;
        }

        .ano-meta {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-secondary);
            font-size: 0.8rem;
        }

        .hist-timeline {
            border-left: 2px solid rgba(255, 255, 255, 0.1);
            padding-left: 1rem;
            margin-top: 1rem;
        }

        .hist-item {
            position: relative;
            margin-bottom: 1rem;
        }

        .hist-item::before {
            content: '';
            position: absolute;
            left: -1.35rem;
            top: 0.25rem;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--text-secondary);
            border: 2px solid #1a1b1e;
        }

        .clients-table tbody tr {
            cursor: pointer;
            transition: background 0.2s;
        }

        .clients-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.03);
        }

        .add-part-inline {
            display: none;
            background: rgba(0, 0, 0, 0.3);
            padding: 1rem;
            border-radius: 8px;
            margin-top: 0.5rem;
            border: 1px solid var(--accent-blue);
            animation: fadeIn 0.2s;
        }

        .add-part-inline.active {
            display: block;
        }

        /* ── Suggestion Dropdown ── */
        .sugg-dropdown {
            position: absolute;
            top: calc(100% + 2px);
            left: 0;
            right: 0;
            background: var(--bg-tertiary);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            z-index: 200;
            max-height: 200px;
            overflow-y: auto;
            display: none;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
        }

        .sugg-dropdown.active {
            display: block;
            animation: fadeIn 0.15s;
        }

        .sugg-item {
            padding: 0.65rem 1rem;
            cursor: pointer;
            font-size: 0.88rem;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        }

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

        .sugg-item:hover {
            background: rgba(61, 155, 233, 0.12);
            color: #fff;
        }

        .sugg-group-header {
            padding: 0.4rem 1rem 0.25rem;
            font-size: 0.71rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.07em;
            color: var(--text-muted);
            border-bottom: 1px solid rgba(255, 255, 255, 0.07);
            background: rgba(255, 255, 255, 0.025);
            user-select: none;
            pointer-events: none;
        }

        /* ── Form Error ── */
        .form-error {
            display: block;
            font-size: 0.78rem;
            color: #ff4d4d;
            margin-top: 0.3rem;
            min-height: 1rem;
        }

        /* ── Star Principal Button ── */
        .btn-star-principal {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.9rem;
            padding: 0 0.1rem;
            color: rgba(255, 255, 255, 0.2);
            transition: color 0.2s;
            line-height: 1;
            flex-shrink: 0;
        }

        .btn-star-principal:hover {
            color: #ffc107;
        }

        .btn-star-principal.active {
            color: #ffc107;
        }

        /* ── Processo Pai Chip ── */
        .processo-pai-chip-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: rgba(61, 155, 233, 0.1);
            border: 1px solid rgba(61, 155, 233, 0.25);
            color: var(--accent-blue);
            padding: 0.3rem 0.75rem;
            border-radius: 20px;
            font-size: 0.85rem;
            margin-top: 0.5rem;
        }

        .processo-pai-chip-tag button {
            background: none;
            border: none;
            color: inherit;
            cursor: pointer;
            padding: 0;
            font-size: 1rem;
            line-height: 1;
            opacity: 0.7;
        }

        .processo-pai-chip-tag button:hover {
            opacity: 1;
        }

        /* ── History Avatar ── */
        .hist-avatar {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: rgba(61, 155, 233, 0.2);
            color: var(--accent-blue);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: 700;
            flex-shrink: 0;
        }

        /* ── Processos Vinculados ── */

        /* Border lateral colorida por tipo */
        .vinculo-item-derivado {
            border-left: 3px solid #adb5bd;
            background: rgba(173, 181, 189, 0.05);
        }

        .vinculo-item-interdependente {
            border-left: 3px solid #ffc107;
            background: rgba(255, 193, 7, 0.05);
        }

        .vinculo-item-relacionado {
            border-left: 3px solid #17a2b8;
            background: rgba(23, 162, 184, 0.05);
        }

        /* Badges de tipo */
        .badge.derivado {
            background: rgba(173, 181, 189, 0.2);
            color: #adb5bd;
            border: 1px solid rgba(173, 181, 189, 0.4);
        }

        .badge.interdependente {
            background: rgba(255, 193, 7, 0.15);
            color: #ffc107;
            border: 1px solid rgba(255, 193, 7, 0.4);
        }

        .badge.relacionado {
            background: rgba(23, 162, 184, 0.15);
            color: #17a2b8;
            border: 1px solid rgba(23, 162, 184, 0.4);
        }

        /* Seletor de tipo */
        .vinculo-tipo-selector {
            margin-bottom: 0.75rem;
        }

        .vinculo-tipo-label {
            font-size: 0.78rem;
            color: var(--text-muted);
            display: block;
            margin-bottom: 0.5rem;
        }

        .vinculo-tipo-options {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }

        .vinculo-tipo-btn {
            padding: 0.3rem 0.75rem;
            font-size: 0.82rem;
            border-radius: 6px;
            border: 1.5px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.04);
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            transition: all 0.15s;
        }

        .vinculo-tipo-btn:hover {
            border-color: rgba(255, 255, 255, 0.25);
            color: var(--text-primary);
        }

        .vinculo-tipo-btn.active {
            border-color: var(--accent-blue);
            color: var(--accent-blue);
            background: rgba(61, 155, 233, 0.08);
        }

        /* Badge "?" de ajuda */
        .vinculo-help {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 15px;
            height: 15px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            color: var(--text-secondary);
            font-size: 0.68rem;
            cursor: pointer;
            user-select: none;
            flex-shrink: 0;
            font-weight: 700;
            transition: background 0.15s;
        }

        .vinculo-help:hover {
            background: rgba(255, 255, 255, 0.35);
            color: var(--text-primary);
        }

        /* Tooltip box */
        .vinculo-tooltip-box {
            display: none;
            background: rgba(0, 0, 0, 0.35);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 6px;
            padding: 0.65rem 0.85rem;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 0.75rem;
            line-height: 1.55;
        }

        .vinculo-tooltip-box.visible {
            display: block;
        }

        /* ── Histórico: lista de alterações ── */
        .hist-changes-list {
            margin: 0.4rem 0 0 0;
            padding: 0.4rem 0.7rem;
            list-style: none;
            background: rgba(0, 0, 0, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 6px;
        }

        .hist-change-item {
            position: relative;
            font-size: 0.74rem;
            color: var(--text-secondary);
            padding: 0.15rem 0 0.15rem 0.85rem;
            line-height: 1.4;
        }

        .hist-change-item+.hist-change-item {
            border-top: 1px solid rgba(255, 255, 255, 0.04);
        }

        .hist-change-item::before {
            content: '›';
            position: absolute;
            left: 0;
            color: var(--accent-blue);
            font-weight: 700;
        }

        /* ── Annotation edit area ── */
        .ano-item .ano-edit-area {
            display: none;
        }

        /* ── Tribunal Suggestion Item: sigla + nome em duas colunas ── */
        .sugg-item--tribunal {
            flex-wrap: wrap;
            align-items: baseline;
        }

        .tribunal-sigla {
            font-family: var(--font-mono);
            font-size: 0.85rem;
            min-width: 4.5rem;
            flex-shrink: 0;
            color: var(--text-primary);
        }

        .tribunal-nome {
            color: var(--text-muted);
            font-size: 0.8rem;
        }

        /* ── Custom Filter Select (substitui <select> nativo de Tipo e Status) ── */
        .filter-item .filt-custom-select {
            width: 100%;
            cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 0.75rem center;
            padding-right: 2rem;
            user-select: none;
            -webkit-user-select: none;
        }

        /* ========================================
           RESPONSIVE — TABLET (≤ 768px)
           (sem alteração no desktop ≥ 769px)
           ======================================== */
        @media (max-width: 768px) {

            /* Oculta a tabela e mostra os mobile cards */
            .table-container {
                display: none;
            }

            .processo-mobile-cards {
                display: block;
            }
        }

        /* ========================================
           RESPONSIVE — MOBILE (≤ 480px)
           (sem alteração no desktop ≥ 481px)
           ======================================== */
        @media (max-width: 480px) {

            /* ── Barreira global de overflow ──────────────────────────────
               Impede que qualquer elemento filho alargue a página.
               É o mesmo padrão que clientes/andamentos usam nos seus
               containers de conteúdo principal. */
            .main-content {
                overflow-x: hidden;
            }

            /* ── Detail View — Header ─────────────────────────────────────
               CRÍTICO: sem flex-direction:column, o título do processo é
               espremido a ~50px pelos botões de ação, fazendo o número do
               processo aparecer na vertical (um caractere por linha).
               A solução empilha título e botões em linhas separadas —
               mesmo padrão do page-header-bar de clientes ≤900px */
            .detail-view.active .page-header-bar {
                flex-direction: column;
                align-items: flex-start;
            }

            .detail-title-left {
                width: 100%;
            }

            .detail-header-actions {
                width: 100%;
                flex-wrap: wrap;
                justify-content: flex-end;
            }

            /* ── Detail View — Layout & Cards ────────────────────────────── */
            .detail-view.active {
                padding: 1rem;
                margin-bottom: 1rem;
            }

            .form-card {
                padding: 1rem;
            }

            .form-card-header {
                margin-bottom: 1rem;
            }

            /* Form grids: 2 colunas → 1 coluna */
            .form-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            .conditional-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }

            /* ── Categorias — Category Tags ──────────────────────────────
               CRÍTICO: display:inline-flex não respeita max-width do parent
               em todos os contextos, causando tags longas ("Civil > Família >
               Divórcio > Google Ads") alargarem toda a página.
               Trocar para display:flex (block-level) com width definido garante
               que o cat-tag-crumb (overflow:hidden + text-overflow:ellipsis)
               funcione corretamente e a página não ultrapasse 100vw. */
            #processo-catsContainer {
                overflow: hidden;
                max-width: 100%;
            }

            .cat-tag--path {
                display: flex;
                width: calc(100% - 0.4rem);
                /* 0.4rem = 2 × margin:0.2rem */
                box-sizing: border-box;
            }

            /* CORREÇÃO: textos longos de categoria quebram linha ao invés de
               alargar a página ("Civil > Família > Divórcio > Google Ads").
               white-space:normal cancela o nowrap e permite o break. */
            .cat-tag-crumb {
                white-space: normal;
                word-break: break-word;
            }

            /* ── Anotações — coluna vertical ─────────────────────────────
               .ano-header (antes tinha display:flex inline — agora é classe CSS)
               No mobile vira coluna: autor em cima, vis+data+botões abaixo.
               .ano-text fica naturalmente após o header (DOM order).
               Linha 1: [Avatar] Autor
               Linha 2: [vis] dd/mm/aa às hh:mm  [✏️] [🗑️]
               Linha 3: Texto da anotação */
            .ano-item {
                padding: 0.85rem;
            }

            .ano-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
                margin-bottom: 0.5rem;
            }

            .ano-author {
                font-size: 0.9rem;
            }

            /* Meta row: vis icon + data à esquerda, botões à direita */
            .ano-meta {
                width: 100%;
                font-size: 0.78rem;
                flex-wrap: wrap;
            }

            /* Botões (✏️🗑️) empurrados para a direita via margin-left:auto */
            .ano-meta>div {
                margin-left: auto;
            }

            /* ── Parts & Responsáveis — cada coisa numa linha ─────────────
               .part-item vira coluna: info (avatar+nome) ocupa a linha
               inteira, botão 🗑️ fica numa linha separada alinhado à direita.
               Sem 3 elementos (avatar | nome+chips | lixo) dividindo ~296px. */
            .part-item {
                flex-direction: column;
                align-items: stretch;
                gap: 0.4rem;
            }

            .part-item>.btn-icon,
            .part-item>.dropdown {
                align-self: flex-end;
            }

            .part-info {
                width: 100%;
                min-width: 0;
                align-items: flex-start;
                /* avatar alinhado ao topo quando nome quebra */
            }

            .part-avatar {
                flex-shrink: 0;
                margin-top: 2px;
            }

            .part-details {
                min-width: 0;
                flex: 1;
            }

            .part-name {
                flex-wrap: wrap;
                gap: 0.3rem;
                line-height: 1.5;
            }

            /* Padding do polo-box reduzido — mais espaço para o conteúdo */
            .polo-box {
                padding: 0.75rem;
            }

            /* toggle-visual: botões podem quebrar linha em telas estreitas */
            .toggle-visual {
                display: flex;
                flex-wrap: wrap;
            }

            .toggle-btn {
                flex: 1;
                min-width: max-content;
                text-align: center;
            }

            /* ── Search & Filters ────────────────────────────────────────── */
            .search-main-row {
                flex-wrap: wrap;
            }

            .btn-filter-toggle {
                width: 100%;
                text-align: center;
            }

            .filters-panel {
                padding: 1rem;
                gap: 0.75rem;
            }

            /* Dois filtros por linha no mobile */
            .filter-item {
                min-width: calc(50% - 0.375rem);
                flex: 1 1 calc(50% - 0.375rem);
            }

            /* ── Table ───────────────────────────────────────────────────── */
            .clients-table th,
            .clients-table td {
                padding: 0.65rem 0.8rem;
                font-size: 0.82rem;
            }

            .table-footer {
                flex-direction: column;
                align-items: flex-start;
            }

            /* ── Modals ───────────────────────────────────────────────────── */
            .modal-box {
                padding: 1.25rem;
            }

            /* ── Annotation Actions Row ───────────────────────────────────
               toggle Pública/Privada/Compartilhada + botão Publicar:
               quando não cabe numa linha, Publicar quebra para a próxima */
            .ano-actions-row {
                flex-wrap: wrap;
                gap: 0.5rem;
                align-items: center;
            }

            /* ── Tribunal dropdown: nome na linha abaixo da sigla ── */
            .sugg-item--tribunal {
                flex-direction: column;
                gap: 0.1rem;
            }

            .tribunal-sigla {
                min-width: 0;
            }
        }