* {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: inherit;
        }

        body {
            font-family: Verdana, Geneva, sans-serif;
            font-size: 10px;
            background: #f0f4f8;
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1600px;
            margin: 0 auto;
        }

        .header {
            background: #006C7D;
            padding: 20px 30px;
            border-radius: 0;
            margin-bottom: 20px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .ql-container {
            font-size: 12px;
            font-family: Verdana, Geneva, sans-serif;
            border-bottom-left-radius: 8px;
            border-bottom-right-radius: 8px;
        }

        .ql-toolbar {
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
            background: #f7fafc;
        }

        .ql-toolbar.ql-snow {
            border-color: #e2e8f0;
        }

        .ql-container.ql-snow {
            border-color: #e2e8f0;
            min-height: 120px;
        }

        .ql-editor {
            min-height: 120px;
        }

        .ql-editor.ql-blank::before {
            color: #a0aec0;
            font-style: normal;
        }

        .ql-editor img {
            max-width: 320px;
            max-height: 200px;
            object-fit: contain;
            border-radius: 4px;
            cursor: pointer;
            display: inline-block;
        }

        .header h1 {
            color: #ffffff;
            font-size: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .user-info {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .username {
            color: #ffffff;
            font-weight: 500;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 500;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

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

        .btn-primary {
            background: #006C7D;
            color: white;
        }

        .btn-primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 108, 125, 0.4);
            background: #005a69;
        }

        .btn-secondary {
            background: #5C5451;
            color: white;
        }

        .btn-secondary:hover:not(:disabled) {
            background: #4a4240;
        }

        .btn-danger {
            background: #f56565;
            color: white;
        }

        .btn-danger:hover:not(:disabled) {
            background: #e53e3e;
        }

        .btn-edit {
            background: #003f7f;
            color: white;
        }

        .btn-edit:hover:not(:disabled) {
            background: #002b5e;
        }

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

        .btn-ghost {
            background: transparent;
            border: 1px solid #e2e8f0;
            color: #4a5568;
        }

        .btn-ghost:hover:not(:disabled) {
            background: #f7fafc;
        }

        .card {
            background: white;
            border-radius: 12px;
            padding: 24px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            margin-bottom: 20px;
        }

        .tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            flex-wrap: nowrap;
        }

        .tab {
            padding: 8px 14px;
            background: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 11px;
            font-weight: 500;
            transition: all 0.3s;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            white-space: nowrap;
        }

        .tab.active {
            background: #006C7D;
            color: white;
        }

        .form-group {
            margin-bottom: 16px;
        }

        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: #4a5568;
        }

        .form-group input[type="checkbox"] {
            width: auto;
            margin-right: 8px;
        }

        .form-group input,
        .form-group textarea,
        .form-group select {
            width: 100%;
            padding: 10px 12px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 11px;
            transition: border-color 0.2s;
        }

        .form-group input:focus,
        .form-group textarea:focus,
        .form-group select:focus {
            outline: none;
            border-color: #006C7D;
        }

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

        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 16px;
        }

        .ticket-details-row {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }

        .ticket-details-grid {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 24px;
            margin-bottom: 16px;
        }

        .ticket-details-column {
            display: grid;
            gap: 14px;
            align-content: start;
        }

        .ticket-details-item {
            min-height: 28px;
            display: flex;
            align-items: center;
        }

        @media (max-width: 900px) {
            .ticket-details-row {
                grid-template-columns: 1fr;
            }

            .ticket-details-grid {
                grid-template-columns: 1fr;
                gap: 12px;
            }
        }

        .error {
            background: #fed7d7;
            color: #c53030;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 16px;
        }

        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .toast {
            background: #fff;
            border-left: 4px solid #c53030;
            color: #2d3748;
            padding: 14px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            min-width: 300px;
            max-width: 420px;
            animation: toastIn 0.3s ease-out;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .toast.toast-success {
            border-left-color: #38a169;
        }

        .toast i {
            font-size: 16px;
            color: #c53030;
        }

        .toast.toast-success i {
            color: #38a169;
        }

        .toast.toast-out {
            animation: toastOut 0.3s ease-in forwards;
        }

        @keyframes toastIn {
            from { opacity: 0; transform: translateX(40px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @keyframes toastOut {
            from { opacity: 1; transform: translateX(0); }
            to { opacity: 0; transform: translateX(40px); }
        }

        .success {
            background: #c6f6d5;
            color: #22543d;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 16px;
        }

        .table-wrapper {
            max-height: 600px;
            overflow-x: auto;
            overflow-y: auto;
        }

        .table {
            width: 100%;
            min-width: max-content;
            border-collapse: collapse;
        }

        .table thead th {
            position: sticky;
            top: 0;
            background: #f7fafc;
            z-index: 1;
        }

        .table th,
        .table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e2e8f0;
        }

        .table th {
            background: #f7fafc;
            font-weight: 600;
            color: #4a5568;
        }

        .table tr:hover {
            background: #f7fafc;
        }

        .badge {
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 500;
            display: inline-block;
        }

        .badge-open {
            background: #d4edfc;
            color: #006C7D;
        }

        .badge-in_progress {
            background: #fff4d9;
            color: #7c2d12;
        }

        .badge-waiting_customer {
            background: #fed7d7;
            color: #742a2a;
        }

        .badge-resolved {
            background: #d9f2c8;
            color: #2d5016;
        }

        .badge-closed {
            background: #e2e8f0;
            color: #4a5568;
        }

        .badge-low {
            background: #d9f2c8;
            color: #2d5016;
        }

        .badge-medium {
            background: #fff4d9;
            color: #7c2d12;
        }

        .badge-high {
            background: #fed7d7;
            color: #742a2a;
        }

        .badge-urgent {
            background: #c53030;
            color: #fff;
        }

        .badge-none {
            background: #e2e8f0;
            color: #4a5568;
        }

        .badge-public {
            background: #d4edfc;
            color: #006C7D;
        }

        .badge-internal {
            background: #e2e8f0;
            color: #4a5568;
        }

        .badge-sla-met {
            background: #d9f2c8;
            color: #2d5016;
        }

        .badge-sla-on_track {
            background: #d4edfc;
            color: #006C7D;
        }

        .badge-sla-at_risk {
            background: #fff4d9;
            color: #7c2d12;
        }

        .badge-sla-breached {
            background: #fed7d7;
            color: #742a2a;
        }

        .badge-sla-pending {
            background: #e2e8f0;
            color: #4a5568;
        }

        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .modal.show {
            display: flex;
        }

        .modal-content {
            background: white;
            padding: 30px;
            border-radius: 12px;
            max-width: 800px;
            width: 90%;
            max-height: 90vh;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #e2e8f0;
        }

        .modal-header h3 {
            color: #2d3748;
            font-size: 14px;
        }

        .close {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: #a0aec0;
            line-height: 1;
        }

        .close:hover {
            color: #4a5568;
        }

        .stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .stat-card {
            background: #006C7D;
            padding: 20px;
            border-radius: 8px;
            color: white;
        }

        .stat-card h3 {
            font-size: 11px;
            margin-bottom: 8px;
            opacity: 0.9;
        }

        .stat-card .value {
            font-size: 22px;
            font-weight: 700;
        }

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

        .ticket-item {
            padding: 16px;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            transition: all 0.3s;
            position: relative;
        }

        .ticket-item {
            position: relative;
            z-index: 0;
        }

        .ticket-item:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transform: translateY(-2px);
            z-index: 1;
        }

        .ticket-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .ticket-title {
            font-weight: 600;
            color: #2d3748;
            font-size: 12px;
            cursor: pointer;
        }

        .ticket-protocol {
            color: #006C7D;
            font-weight: 500;
            font-size: 11px;
        }

        .ticket-meta {
            display: flex;
            gap: 15px;
            flex-wrap: wrap;
            font-size: 10px;
            color: #718096;
            margin-top: 8px;
        }

        /* Botão de 3 pontinhos por ticket */
        .ticket-actions-btn {
            background: none;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #718096;
            font-size: 16px;
            flex-shrink: 0;
            transition: background 0.2s, color 0.2s, border-color 0.2s;
            position: relative;
        }

        .ticket-actions-btn:hover {
            background: #f0f4f8;
            color: #006C7D;
            border-color: #006C7D;
        }

        .ticket-actions-btn.active {
            background: #006C7D;
            color: #fff;
            border-color: #006C7D;
        }

        .ticket-actions-dropdown {
            position: absolute;
            right: 0;
            top: calc(100% + 6px);
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.13);
            z-index: 9999;
            min-width: 210px;
            overflow: hidden;
            /* animation: dropdownIn 0.15s ease; */
        }

        @keyframes dropdownIn {
            from {
                opacity: 0;
                transform: translateY(-6px);
            }

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

        .ticket-actions-dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 11px 16px;
            font-size: 11px;
            cursor: pointer;
            color: #2d3748;
            transition: background 0.15s;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }

        .ticket-actions-dropdown-item:hover {
            background: #f0f4f8;
        }

        .ticket-actions-dropdown-item.danger {
            color: #e53e3e;
        }

        .ticket-actions-dropdown-item.danger:hover {
            background: #fff5f5;
        }

        .ticket-actions-dropdown-item i {
            width: 18px;
            text-align: center;
            flex-shrink: 0;
        }

        .ticket-actions-dropdown hr {
            border: none;
            border-top: 1px solid #e2e8f0;
            margin: 4px 0;
        }


        .login-form {
            max-width: 400px;
            margin: 50px auto;
        }

        .empty-state {
            text-align: center;
            padding: 40px;
            color: #718096;
        }

        .timeline {
            border-left: 2px solid #e2e8f0;
            padding-left: 20px;
            margin-top: 20px;
        }

        .timeline-item {
            margin-bottom: 20px;
            position: relative;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -26px;
            top: 4px;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #006C7D;
        }

        .timeline-date {
            font-size: 10px;
            color: #718096;
            margin-bottom: 4px;
        }

        .timeline-content {
            background: #f7fafc;
            padding: 12px;
            border-radius: 8px;
        }

        .filter-bar {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .filter-bar input,
        .filter-bar select {
            padding: 8px 12px;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            font-size: 11px;
        }

        .loading {
            text-align: center;
            padding: 40px;
            color: #718096;
        }

        .section-title {
            font-size: 13px;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 2px solid #e2e8f0;
        }

        .spinner {
            border: 4px solid #f3f4f6;
            border-top: 4px solid #006C7D;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }

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

            100% {
                transform: rotate(360deg);
            }
        }
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px; /* Default max-width, can override inline */
}

