* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f1f5f9;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ==================== TELA DE LOGIN ==================== */
.login-screen {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-box {
    background: #fff;
    padding: clamp(30px, 5vw, 50px);
    width: 100%;
    max-width: 450px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.login-box h1 {
    text-align: center;
    color: #1e293b;
    margin-bottom: 10px;
    font-size: clamp(24px, 6vw, 32px);
}

.login-box p {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
    font-size: clamp(13px, 4vw, 15px);
}

.login-logo {
    text-align: center;
    margin-bottom: 20px;
}

.login-logo-img {
    max-width: 180px;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

/* ==================== INPUTS GLOBAIS ==================== */
input, select, textarea, button {
    width: 100%;
    padding: clamp(10px, 3vw, 14px);
    margin-top: 15px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: clamp(13px, 4vw, 15px);
    transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

button {
    background: #1e293b;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* ==================== APP CONTAINER ==================== */
#app {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 280px;
    background: #0f172a;
    color: #fff;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar h2 {
    font-size: clamp(20px, 5vw, 24px);
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.5px;
}

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #334155;
}

.logo-img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 70px;
    object-fit: contain;
    margin-bottom: 8px;
}

.sidebar-logo h2 {
    font-size: clamp(18px, 4vw, 22px);
    margin-bottom: 0;
    text-align: center;
    letter-spacing: -0.5px;
    color: #fff;
}

.menu {
    margin-top: 10px;
    text-align: left;
    background: #1e293b;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: normal;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: clamp(13px, 4vw, 15px);
    display: flex !important;
    align-items: center;
    gap: 10px;
    border: none;
    color: #fff;
    width: 100%;
}

.menu:hover {
    background: #334155;
    transform: translateX(5px);
}

.menu.active {
    background: #3b82f6;
}

.menu .menu-icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.menu .menu-label {
    flex: 1;
}

.menu .menu-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
}

.unit-filter {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

.unit-filter label {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(11px, 3.5vw, 13px);
    color: #94a3b8;
}

.unit-filter select {
    background: #1e293b;
    color: #fff;
    border: 1px solid #334155;
    margin-top: 0;
    font-size: clamp(12px, 3.5vw, 14px);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #334155;
}

#loggedUser {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #1e293b;
    border-radius: 10px;
    font-size: clamp(12px, 3.5vw, 14px);
    word-break: break-word;
}

.danger {
    background: #dc2626;
}

.danger:hover {
    background: #b91c1c;
}

/* Botão Menu Mobile */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #1e293b;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: #0f172a;
    transform: scale(1.02);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* ==================== MAIN CONTENT ==================== */
.content {
    flex: 1;
    margin-left: 280px;
    padding: clamp(20px, 4vw, 35px);
    width: calc(100% - 280px);
    transition: all 0.3s ease;
}

/* ==================== BOTÃO NOVO CHAMADO ==================== */
.btn-new-ticket {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    margin: 0;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-new-ticket:hover {
    background: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-new-ticket:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
    width: auto;
    margin: 0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

/* ==================== CARDS DASHBOARD ==================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(15px, 3vw, 25px);
    margin-bottom: clamp(20px, 4vw, 35px);
}

.card {
    background: #fff;
    padding: clamp(20px, 4vw, 30px);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

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

.card span {
    font-size: clamp(32px, 8vw, 48px);
    font-weight: bold;
    display: block;
    color: #1e293b;
}

.card small {
    color: #64748b;
    font-size: clamp(12px, 3.5vw, 14px);
}

/* ==================== PANELS ==================== */
.panel {
    background: #fff;
    padding: clamp(20px, 4vw, 30px);
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.panel h2 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: clamp(18px, 5vw, 22px);
    font-weight: 600;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-header h2 {
    margin-bottom: 0;
}

/* ==================== TABELA ==================== */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: clamp(10px, 1.5vw, 14px);
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    word-break: break-word;
    white-space: normal;
}

th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

tr:hover {
    background: #f8fafc;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-pendente { background: #fef3c7; color: #d97706; }
.status-em_andamento { background: #dbeafe; color: #2563eb; }
.status-encerrado { background: #d1fae5; color: #059669; }
.status-finalizado { background: #e0e7ff; color: #4338ca; }
.status-cancelado { background: #fee2e2; color: #dc2626; }

/* ==================== GRÁFICOS ==================== */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 20px;
    margin-top: 30px;
}

.chart-box {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-box h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 15px;
}

.chart-box canvas {
    max-height: 280px;
    width: 100%;
}

/* ==================== FILTROS ==================== */
.search-section {
    margin-bottom: 20px;
}

.search-filters {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.search-box {
    flex: 2;
    min-width: 180px;
}

.search-box input {
    margin: 0;
    padding: 10px 12px;
}

.filter-box {
    flex: 1;
    min-width: 140px;
}

.filter-box select {
    margin: 0;
    padding: 10px 12px;
    background: white;
}

/* ==================== BOTÕES RELATÓRIO ==================== */
.report-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    align-items: center;
}

.report-btn, .export-btn {
    width: auto;
    padding: 8px 18px;
    margin: 0;
    font-size: 13px;
}

.report-btn { background: #3b82f6; }
.export-btn { background: #10b981; }
.report-select { margin-left: auto; }
.report-select select {
    margin: 0;
    padding: 8px 12px;
    background: white;
}

/* ==================== MODAL ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 95%;
    width: 100%;
    max-height: 95%;
    overflow-y: auto;
}

.modal-large {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #e5e7eb;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    word-break: break-word;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    width: auto;
    padding: 0;
    margin: 0;
}

.close-modal:hover {
    color: #ef4444;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 2px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: #f8fafc;
    position: sticky;
    bottom: 0;
    flex-wrap: wrap;
}

.modal-footer button {
    width: auto;
    padding: 8px 16px;
    margin: 0;
}

/* ==================== TICKET DETAIL ==================== */
.ticket-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.ticket-info-summary {
    flex: 2;
    min-width: 200px;
}

.ticket-info-summary p {
    margin: 8px 0;
    word-break: break-word;
    font-size: 14px;
}

.ticket-status-area {
    flex-shrink: 0;
}

.ticket-status-select {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    width: auto;
    margin: 0;
}

.ticket-description {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    word-break: break-word;
}

/* ==================== COMENTÁRIOS ==================== */
.ticket-comments {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
}

.comment-item {
    background: white;
    padding: 12px 15px;
    margin: 12px 0;
    border-radius: 12px;
    border-left: 4px solid #3b82f6;
}

.comment-item.admin-comment {
    border-left-color: #8b5cf6;
    background: #faf5ff;
}

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

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.comment-avatar.admin {
    background: #8b5cf6;
}

.comment-author-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.comment-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #64748b;
}

.comment-badge.admin {
    background: #8b5cf6;
    color: white;
}

.comment-date {
    font-size: 11px;
    color: #94a3b8;
}

.comment-text {
    color: #334155;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
    word-break: break-word;
}

/* ==================== ANEXOS EM COMENTÁRIOS ==================== */
.comment-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    max-width: 100%;
    overflow: hidden;
    min-width: 60px;
}

.comment-attachment:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.comment-attachment img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid white;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.comment-attachment img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.comment-attachment .file-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.comment-attachment .file-name {
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.comment-attachment .file-size {
    color: #94a3b8;
    font-size: 11px;
}

.comment-attachment .file-icon {
    font-size: 32px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    border-radius: 10px;
}

.comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

/* ==================== ZOOM DA IMAGEM ==================== */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
    cursor: zoom-out;
    padding: 20px;
    animation: zoomFadeIn 0.25s ease;
}

@keyframes zoomFadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.image-zoom-overlay img {
    max-width: 95%;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    cursor: zoom-out;
}

.image-zoom-overlay .zoom-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100000 !important;
}

.image-zoom-overlay .zoom-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.image-zoom-overlay .zoom-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'Segoe UI', sans-serif;
    z-index: 100000 !important;
}

/* ==================== FORMULÁRIO DE COMENTÁRIO ==================== */
.comment-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.comment-editor {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.comment-editor .ql-editor {
    min-height: 100px;
    font-size: 14px;
}

.comment-editor .ql-toolbar {
    border: none;
    border-bottom: 1px solid #cbd5e1;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
}

.comment-attachment-area {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-file-label {
    background: #e2e8f0;
    color: #1e293b;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    width: auto;
    margin: 0;
}

.comment-file-label:hover {
    background: #cbd5e1;
}

.comment-pending-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.comment-pending-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.remove-comment-attachment {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.comment-submit-btn {
    margin-top: 12px;
    width: auto;
    background: #3b82f6;
    padding: 8px 20px;
}

/* ==================== HISTÓRICO ==================== */
.ticket-history {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.history-item {
    padding: 10px 12px;
    margin-bottom: 10px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #94a3b8;
}

.history-item.status-change { border-left-color: #f59e0b; }
.history-item.comment-added { border-left-color: #3b82f6; }
.history-date { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.history-action { font-size: 13px; color: #1e293b; }

/* ==================== ANEXOS ==================== */
.ticket-attachments {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
}

.attachments-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.attachment-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
}

/* ==================== DEPARTAMENTOS GRID ==================== */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 15px;
    margin-top: 20px;
}

.department-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.department-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.department-icon { font-size: 22px; }
.department-name { font-weight: 600; font-size: 14px; }

/* ==================== RICH TEXT EDITOR ==================== */
.editor-toolbar {
    display: flex;
    gap: 5px;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px 8px 0 0;
    flex-wrap: wrap;
}

.editor-toolbar button {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
}

.rich-editor {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 8px 8px;
}

.rich-editor .ql-editor {
    min-height: 150px;
    font-size: 14px;
}

.rich-text-content {
    line-height: 1.6;
    font-size: 14px;
}

.rich-text-content img {
    max-width: 100%;
    border-radius: 8px;
}

/* ==================== PENDING ATTACHMENTS ==================== */
.pending-attachments {
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e2e8f0;
}

.pending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.pending-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 12px;
}

.pending-preview {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.remove-attachment {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    font-size: 10px;
}

/* ==================== ERROR MESSAGE ==================== */
.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-size: 13px;
}

/* ==================== ANIMAÇÃO ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== CHAT / MENSAGENS ==================== */
.chat-message {
    display: flex;
    gap: 14px;
    animation: slideIn 0.3s ease;
}

.chat-message.first { margin-top: 0; }
.chat-message.last { margin-bottom: 0; }

.chat-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-avatar.admin { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.chat-avatar.user { background: linear-gradient(135deg, #8b8fa3, #6b7280); }

.chat-content {
    flex: 1;
    min-width: 0;
}

.chat-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 4px;
    padding-left: 4px;
}

.chat-author {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.chat-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: #dbeafe;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.chat-badge.own {
    background: #d1fae5;
    color: #059669;
}

.chat-time {
    font-size: 12px;
    color: #94a3b8;
    margin-left: auto;
}

.chat-bubble {
    padding: 14px 18px;
    border-radius: 14px;
    word-break: break-word;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.chat-message-user .chat-bubble {
    background: white;
    border: 1px solid #e2e8f0;
}

.chat-message-user .chat-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 16px;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent white transparent transparent;
}

.chat-message-admin .chat-bubble {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.chat-message-admin .chat-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 16px;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent #eff6ff transparent transparent;
}

.chat-message-admin { justify-content: flex-start; }
.chat-message-user { justify-content: flex-start; }

.chat-text {
    font-size: 14px;
    line-height: 1.6;
    color: #1e293b;
}

.chat-text p { margin: 0 0 8px 0; }
.chat-text p:last-child { margin-bottom: 0; }
.chat-text img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

.chat-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.chat-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.chat-empty p { font-size: 16px; color: #475569; margin-bottom: 4px; }
.chat-empty-sub { font-size: 13px; color: #94a3b8; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== PLANO DE AÇÃO ==================== */
.action-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.action-plan-header h1 {
    font-size: 24px;
    color: #1e293b;
    margin: 0;
}

.action-plan-header .subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.action-plan-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-plan-actions .btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.action-plan-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.action-plan-actions .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.action-plan-actions .btn-secondary {
    background: #f1f5f9;
    color: #1e293b;
}

.action-plan-actions .btn-secondary:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.action-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.action-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.action-card-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-card-info {
    display: flex;
    flex-direction: column;
}

.action-card-number {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.action-card-label {
    font-size: 13px;
    color: #64748b;
}

.action-tips-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.action-tips-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.action-tips-header h3 {
    margin: 0;
    color: #1e293b;
}

.tips-toggle {
    background: #f1f5f9;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
    width: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.tips-toggle:hover {
    background: #e2e8f0;
}

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

.action-tips-grid.hidden { display: none; }

.tip-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.tip-icon { font-size: 28px; flex-shrink: 0; }
.tip-content h4 { margin: 0 0 4px 0; color: #1e293b; font-size: 14px; }
.tip-content p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.5; }

.action-plan-filters {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    margin: 0;
    width: auto;
}

.filter-group input { min-width: 200px; }

/* Action Plan Cards */
.action-plan-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 24px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.action-plan-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border-color: #cbd5e1;
}

.action-plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.action-plan-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-plan-icon { font-size: 24px; }
.action-plan-title h3 { margin: 0; font-size: 16px; color: #1e293b; }

.action-plan-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-plan-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-plan-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #64748b;
}

.action-plan-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-plan-description {
    color: #475569;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
}

.action-plan-metrics {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.metric-label { color: #94a3b8; }
.metric-value { font-weight: 600; color: #1e293b; }

.action-plan-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar.large { height: 12px; }

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    min-width: 40px;
}

.action-plan-evolution {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.evolution-label { font-size: 13px; color: #94a3b8; }
.evolution-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.evolution-chip {
    padding: 4px 12px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #bfdbfe;
}

.action-plan-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
}

.action-plan-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-plan-actions button {
    padding: 6px 16px;
    margin: 0;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
}

.action-plan-actions .view-action-btn { background: #3b82f6; color: white; }
.action-plan-actions .view-action-btn:hover { background: #2563eb; }

.action-plan-actions .edit-action-btn { background: #f59e0b; color: white; }
.action-plan-actions .edit-action-btn:hover { background: #d97706; }

.action-plan-actions .delete-action-btn { background: #ef4444; color: white; }
.action-plan-actions .delete-action-btn:hover { background: #dc2626; }

.action-plan-actions .comment-action-btn { background: #8b5cf6; color: white; }
.action-plan-actions .comment-action-btn:hover { background: #7c3aed; }

/* Formulário Plano de Ação */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 0;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.metric-item label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.metric-item input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    margin: 0;
}

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

.evolution-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evolution-item label {
    font-size: 12px;
    color: #64748b;
}

.evolution-item input {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.form-actions button {
    width: auto;
    padding: 10px 24px;
    margin: 0;
}

/* Visualizar Plano */
.view-action-header { margin-bottom: 20px; }
.view-action-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.category-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    background: #f1f5f9;
    color: #475569;
}

.view-action-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #64748b;
}

.view-action-description {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.view-action-description h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
}

.view-action-description p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.view-action-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.metric-box {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
}

.metric-box .metric-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
}

.metric-box .metric-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-top: 4px;
}

.view-action-progress { margin-bottom: 16px; }
.view-action-progress h4 { margin: 0 0 8px 0; color: #1e293b; }

.view-action-evolution { margin-bottom: 16px; }
.view-action-evolution h4 { margin: 0 0 8px 0; color: #1e293b; }

.evolution-table { overflow-x: auto; }
.evolution-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.evolution-table th,
.evolution-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}
.evolution-table th { background: #f8fafc; font-weight: 600; color: #1e293b; }

.view-action-notes {
    background: #fffbeb;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #fde68a;
    margin-bottom: 16px;
}

.view-action-notes h4 { margin: 0 0 8px 0; color: #92400e; }
.view-action-notes p { margin: 0; color: #78350f; line-height: 1.6; }

.view-action-timeline h4 { margin: 0 0 12px 0; color: #1e293b; }

.timeline {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    flex-shrink: 0;
}

.timeline-dot.completed { background: #10b981; }

.timeline-item div {
    display: flex;
    justify-content: space-between;
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
}

.timeline-item strong { color: #1e293b; font-size: 13px; }
.timeline-item span { color: #64748b; font-size: 13px; }

/* Admin Comments */
.admin-comments-list,
.admin-comments-list-full {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.admin-comment-item,
.admin-comment-item-full {
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
}

.admin-comment-item-full .admin-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.admin-comment-item-full p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.admin-comment-date {
    font-size: 11px;
    color: #94a3b8;
}

.view-action-add-comment {
    margin: 16px 0;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.view-action-add-comment h4 { margin: 0 0 8px 0; color: #1e293b; }

.view-action-add-comment textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    font-family: inherit;
    margin: 0;
    resize: vertical;
}

/* ==================== TICKETS CARDS ==================== */
.tickets-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.ticket-card {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.ticket-card-id {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 500;
}

.ticket-card-id strong {
    color: #1e293b;
    font-size: 16px;
}

.ticket-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    flex: 1;
}

.ticket-card-title .ticket-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 8px;
}

.ticket-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin: 8px 0 12px 0;
}

.ticket-card-body .ticket-field {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #475569;
}

.ticket-card-body .ticket-field .label {
    color: #94a3b8;
    font-weight: 400;
}

.ticket-card-body .ticket-field .value {
    color: #1e293b;
    font-weight: 500;
}

.ticket-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.ticket-card-footer .ticket-date {
    font-size: 12px;
    color: #94a3b8;
}

.ticket-card-footer .ticket-date strong {
    color: #64748b;
}

.ticket-card-footer .ticket-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-card-footer .ticket-actions button {
    padding: 6px 16px;
    margin: 0;
    font-size: 12px;
    border-radius: 6px;
    width: auto;
}

.ticket-card-description {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    border-left: 3px solid #3b82f6;
    max-height: 100px;
    overflow: hidden;
    position: relative;
}

.ticket-card-description.expanded { max-height: none; }

.ticket-card-description .expand-btn {
    display: inline-block;
    color: #3b82f6;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    margin-top: 4px;
}

.ticket-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.ticket-counter strong {
    color: #1e293b;
    font-size: 18px;
}

.priority-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.priority-baixa { background: #e2e8f0; color: #475569; }
.priority-media { background: #fef3c7; color: #d97706; }
.priority-alta { background: #fee2e2; color: #dc2626; }
.priority-urgente { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.quick-filters button {
    padding: 6px 16px;
    margin: 0;
    font-size: 13px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    width: auto;
    transition: all 0.2s;
}

.quick-filters button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.quick-filters button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* ==================== GERENCIAMENTO DE PERMISSÕES - CAIXA FLUTUANTE ==================== */
.permission-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #3b82f6;
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
}

.permission-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6);
}

.permission-float-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.permission-float-btn.visible {
    display: flex;
}

.permission-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 420px;
    max-width: calc(100vw - 60px);
    max-height: 70vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 1000;
    overflow: hidden;
    display: none;
    animation: slideUp 0.3s ease;
}

.permission-panel.open { display: block; }

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.permission-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #0f172a;
    color: white;
    cursor: pointer;
}

.permission-panel-header h2 {
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.permission-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: auto;
    padding: 0;
    margin: 0;
}

.permission-panel-close:hover {
    color: #ef4444;
    transform: none;
}

.permission-panel-body {
    padding: 16px 20px;
    overflow-y: auto;
    max-height: calc(70vh - 70px);
}

.permission-section {
    margin-bottom: 20px;
}

.permission-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-section-title .section-icon {
    font-size: 16px;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.permission-item:hover {
    background: #f1f5f9;
}

.permission-item .permission-label {
    font-size: 13px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-item .permission-label .role-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
}

.permission-item .permission-label .role-tag.master { background: #fef3c7; color: #d97706; }
.permission-item .permission-label .role-tag.admin { background: #dbeafe; color: #2563eb; }
.permission-item .permission-label .role-tag.manager { background: #d1fae5; color: #059669; }
.permission-item .permission-label .role-tag.user { background: #e2e8f0; color: #475569; }

.permission-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.permission-toggle.active {
    background: #3b82f6;
}

.permission-toggle .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.permission-toggle.active .toggle-slider {
    left: 22px;
}

.permission-toggle:hover {
    transform: scale(1.05);
}

.permission-info {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    padding-left: 12px;
}

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

.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { color: #1e293b; margin-bottom: 4px; }
.empty-state p { color: #94a3b8; }

/* ==================== DROPDOWN MENU ==================== */
.dropdown-menu {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 16px;
    cursor: pointer;
    width: auto;
    color: #1e293b;
    transition: all 0.2s;
    margin: 0;
    min-width: 36px;
    text-align: center;
}

.dropdown-trigger:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.dropdown-content {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 170px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #e2e8f0;
    z-index: 10000;
    display: none;
    overflow: hidden;
    margin-top: 5px;
}

.dropdown-content.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.dropdown-content button {
    width: 100%;
    text-align: left;
    padding: 10px 16px;
    margin: 0;
    background: white;
    color: #1e293b;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.dropdown-content button:last-child {
    border-bottom: none;
}

.dropdown-content button:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.dropdown-content button.danger {
    color: #dc2626;
}

.dropdown-content button.danger:hover {
    background: #fef2f2;
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 1366px) {
    .sidebar { width: 260px; }
    .content { margin-left: 260px; width: calc(100% - 260px); }
}

@media (max-width: 1024px) {
    .sidebar { width: 240px; }
    .content { margin-left: 240px; width: calc(100% - 240px); padding: 20px; }
    .cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .charts-container { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .permission-panel { width: 380px; right: 20px; bottom: 90px; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    
    .sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        z-index: 1000;
    }
    
    .sidebar.open {
        left: 0;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }
    
    .sidebar-overlay { display: none; }
    .sidebar-overlay.open { display: block; }
    
    .content {
        margin-left: 0;
        width: 100%;
        padding: 80px 15px 80px 15px;
    }
    
    .cards { grid-template-columns: 1fr; gap: 12px; }
    .charts-container { grid-template-columns: 1fr; gap: 15px; }
    
    .search-filters { flex-direction: column; }
    .search-box, .filter-box { width: 100%; }
    
    .report-buttons { flex-direction: column; align-items: stretch; }
    .report-select { margin-left: 0; }
    .report-btn, .export-btn, .report-select select { width: 100%; }
    
    .modal-content { width: 100%; max-width: 100%; }
    .modal-header { flex-direction: column; align-items: flex-start; }
    .modal-footer { flex-direction: column; }
    .modal-footer button { width: 100%; }
    
    .ticket-card { padding: 16px; }
    .ticket-card-header { flex-direction: column; align-items: flex-start; }
    .ticket-card-body { flex-direction: column; gap: 8px; }
    .ticket-card-footer { flex-direction: column; align-items: flex-start; }
    .ticket-card-footer .ticket-actions { width: 100%; }
    .ticket-card-footer .ticket-actions button { flex: 1; text-align: center; }
    
    .action-plan-header { flex-direction: column; align-items: stretch; text-align: center; }
    .action-plan-actions { justify-content: center; }
    .action-dashboard-cards { grid-template-columns: 1fr 1fr; }
    .action-tips-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: 1fr 1fr; }
    .evolution-grid { grid-template-columns: 1fr 1fr; }
    
    .permission-panel {
        width: calc(100vw - 30px);
        right: 15px;
        bottom: 80px;
        max-height: 60vh;
    }
    
    .permission-float-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
    
    #ticketsTable th:nth-child(3), #ticketsTable td:nth-child(3) { display: none; }
    #ticketsTable th:nth-child(4), #ticketsTable td:nth-child(4) { display: none; }
    #ticketsTable th:nth-child(7), #ticketsTable td:nth-child(7) { width: 18%; }
}

@media (max-width: 480px) {
    .content { padding: 75px 10px 70px 10px; }
    .panel { padding: 15px; }
    .card { padding: 15px; }
    .card span { font-size: 28px; }
    .modal-body { padding: 12px; }
    
    .action-dashboard-cards { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: 1fr; }
    .evolution-grid { grid-template-columns: 1fr; }
    
    .permission-panel { max-height: 50vh; }
    .permission-item { flex-wrap: wrap; gap: 8px; }
    .permission-item .permission-label { font-size: 12px; }
}

@media (min-width: 1600px) {
    .content { max-width: 1600px; margin: 0 auto; margin-left: 280px; width: calc(100% - 280px); }
    .cards { grid-template-columns: repeat(3, 1fr); }
    .charts-container { grid-template-columns: repeat(3, 1fr); }
}

.chat-closed {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
    background: #f8fafc;
    border-radius: 12px;
    margin-top: 16px;
}

.chat-closed span { font-size: 24px; display: block; margin-bottom: 8px; }

/* ==================== PERMISSÕES - ESTILOS ADICIONAIS ==================== */
.permission-item[style*="cursor:pointer"]:hover {
    background: #dbeafe !important;
    border-left: 3px solid #3b82f6;
    padding-left: 9px;
}

.permission-item .role-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
    margin-left: 6px;
}

.permission-item .role-tag.master { background: #fef3c7; color: #d97706; }
.permission-item .role-tag.admin { background: #dbeafe; color: #2563eb; }
.permission-item .role-tag.manager { background: #d1fae5; color: #059669; }
.permission-item .role-tag.user { background: #e2e8f0; color: #475569; }

/* ==================== TOGGLES DE PERMISSÃO ==================== */
.permission-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    user-select: none;
}

.permission-toggle.active {
    background: #3b82f6;
}

.permission-toggle .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.permission-toggle.active .toggle-slider {
    left: 22px;
}

.permission-toggle:hover {
    transform: scale(1.05);
}

.permission-toggle:active {
    transform: scale(0.95);
}

/* Para garantir que o toggle seja clicável em toda sua área */
.permission-toggle .toggle-slider {
    pointer-events: none;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.permission-item:hover {
    background: #f1f5f9;
}

.permission-item .permission-label {
    font-size: 13px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.permission-item .permission-label .role-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
    margin-left: 6px;
}

.permission-item .permission-label .role-tag.master { background: #fef3c7; color: #d97706; }
.permission-item .permission-label .role-tag.admin { background: #dbeafe; color: #2563eb; }
.permission-item .permission-label .role-tag.manager { background: #d1fae5; color: #059669; }
.permission-item .permission-label .role-tag.user { background: #e2e8f0; color: #475569; }

/* Estilo para itens clicáveis no painel de permissões */
.permission-item.clickable {
    cursor: pointer;
}

.permission-item.clickable:hover {
    background: #dbeafe !important;
    border-left: 3px solid #3b82f6;
    padding-left: 11px;
}

.permission-item .manage-link {
    font-size: 12px;
    color: #3b82f6;
    font-weight: 600;
    transition: all 0.2s ease;
}

.permission-item.clickable:hover .manage-link {
    color: #2563eb;
    transform: translateX(3px);
}

/* ==================== COMENTÁRIOS DE REUNIÃO ==================== */
.meeting-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.meeting-comments-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 16px;
}

.btn-add-meeting-comment {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: auto;
    margin: 0;
}

.btn-add-meeting-comment:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.meeting-comments-container {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    max-height: 500px;
    overflow-y: auto;
}

.meeting-comments-group {
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.meeting-comments-group:last-child {
    margin-bottom: 0;
}

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

.meeting-date {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.meeting-count {
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 12px;
    border-radius: 12px;
}

.meeting-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meeting-comment {
    display: flex;
    gap: 12px;
    padding: 4px 0;
}

.meeting-comment.first {
    margin-top: 0;
}

.meeting-comment.last {
    margin-bottom: 0;
}

.meeting-comment-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    margin-top: 2px;
}

.meeting-comment-avatar.admin {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.meeting-comment-avatar.user {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.meeting-comment-content {
    flex: 1;
    min-width: 0;
}

.meeting-comment-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 4px;
}

.meeting-comment-author {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}

.meeting-comment-time {
    font-size: 11px;
    color: #94a3b8;
}

.meeting-comment-text {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    word-break: break-word;
}

.meeting-comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.meeting-comments-container::-webkit-scrollbar {
    width: 6px;
}

.meeting-comments-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

.meeting-comments-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}

.meeting-comments-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Responsividade */
@media (max-width: 768px) {
    .meeting-comments-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-add-meeting-comment {
        width: 100%;
        justify-content: center;
    }
    
    .meeting-comment {
        gap: 10px;
    }
    
    .meeting-comment-avatar {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 12px;
    }
    
    .meeting-comment-header {
        font-size: 12px;
    }
    
    .meeting-comment-text {
        font-size: 13px;
    }
}

/* ==================== GERENCIAMENTO DE CATEGORIAS ==================== */
#categoriesList .permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

#categoriesList .permission-item:hover {
    background: #f1f5f9;
}

#categoriesList .permission-item .permission-label {
    font-size: 13px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

#categoriesList .permission-item .permission-label span {
    display: flex;
    align-items: center;
    gap: 4px;
}

#newCategoryLabel, #newCategoryIcon {
    margin-top: 0;
}

#addCategoryBtn {
    margin-top: 0;
}

/* ==================== PLANO DE AÇÃO - FILTROS MODERNOS ==================== */
.action-filters-modern {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    background: white;
    margin: 0;
    width: 100%;
    transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-group.search-group {
    flex: 1.5;
    min-width: 180px;
}

.filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-clear-btn {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    width: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.filter-clear-btn:hover {
    background: #e2e8f0;
    transform: none;
}

.filter-results {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.filter-results strong {
    color: #1e293b;
}

/* ==================== INDICADORES DO CABEÇALHO ==================== */
.action-header-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.indicator-card {
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.2s ease;
}

.indicator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.indicator-number {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    display: block;
    line-height: 1.2;
}

.indicator-label {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.indicator-card.total .indicator-number { color: #1e293b; }
.indicator-card.completed .indicator-number { color: #10b981; }
.indicator-card.inprogress .indicator-number { color: #3b82f6; }
.indicator-card.pending .indicator-number { color: #f59e0b; }
.indicator-card.late .indicator-number { color: #dc2626; }
.indicator-card.progress .indicator-number { color: #8b5cf6; }

/* ==================== CARDS MODERNOS ==================== */
.action-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 16px;
}

.action-card-modern {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-card-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

.action-card-modern.late {
    border-left: 4px solid #dc2626;
    background: #fefaf9;
}

.action-card-modern.late:hover {
    background: #fef5f4;
}

/* Cabeçalho do Card */
.action-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.action-card-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.action-card-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.action-card-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    word-break: break-word;
    line-height: 1.3;
}

.action-card-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.action-card-badge {
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.action-card-badge.category {
    background: #f1f5f9;
    color: #475569;
}

.action-card-badge.store {
    background: #dbeafe;
    color: #2563eb;
}

/* Corpo do Card */
.action-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    font-size: 13px;
    color: #475569;
}

.action-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}

.action-card-meta .meta-item .meta-label {
    color: #94a3b8;
    font-weight: 400;
}

.action-card-meta .meta-item .meta-value {
    color: #1e293b;
    font-weight: 500;
}

/* Progresso */
.action-card-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.action-card-progress .progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.action-card-progress .progress-bar .progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}

.action-card-progress .progress-percent {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    min-width: 44px;
    text-align: right;
}

/* Evolução */
.action-card-evolution {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.evolution-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

.evolution-chips-modern {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.evolution-chip-modern {
    padding: 2px 8px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 10px;
    border: 1px solid #bfdbfe;
}

.evolution-chip-modern.empty {
    background: #f1f5f9;
    color: #94a3b8;
    border-color: #e2e8f0;
}

/* Última Atualização e Comentário */
.action-card-update {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 10px;
    border-left: 3px solid #3b82f6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-card-update:hover {
    background: #f1f5f9;
}

.action-card-update .update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #94a3b8;
}

.action-card-update .update-header .update-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-card-update .update-comment {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-card-update .update-comment.empty {
    color: #94a3b8;
    font-style: italic;
}

/* Rodapé do Card */
.action-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 8px;
}

.action-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-card-status .status-badge {
    font-size: 11px;
    padding: 3px 12px;
}

.action-card-actions-modern {
    display: flex;
    gap: 4px;
}

.action-card-actions-modern button {
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-card-actions-modern .view-action-btn {
    background: #eff6ff;
    color: #3b82f6;
}

.action-card-actions-modern .view-action-btn:hover {
    background: #3b82f6;
    color: white;
    transform: scale(1.1);
}

.action-card-actions-modern .edit-action-btn {
    background: #fef3c7;
    color: #d97706;
}

.action-card-actions-modern .edit-action-btn:hover {
    background: #d97706;
    color: white;
    transform: scale(1.1);
}

.action-card-actions-modern .delete-action-btn {
    background: #fee2e2;
    color: #dc2626;
}

.action-card-actions-modern .delete-action-btn:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

.action-card-actions-modern .comment-action-btn {
    background: #f3e8ff;
    color: #7c3aed;
}

.action-card-actions-modern .comment-action-btn:hover {
    background: #7c3aed;
    color: white;
    transform: scale(1.1);
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 1024px) {
    .action-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    
    .filter-row {
        gap: 8px;
    }
    
    .filter-group {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .action-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-group.search-group {
        flex: 1;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .action-card-meta {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .action-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-card-badges {
        justify-content: flex-start;
    }
    
    .action-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-card-actions-modern {
        justify-content: center;
    }
    
    .action-header-indicators {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .action-header-indicators {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-card-modern {
        padding: 14px;
    }
    
    .indicator-number {
        font-size: 20px;
    }
}